Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a75dcbd2 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "coresight: place pm_runtime_put() properly"

parents 0420b017 5e6daf81
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2012,2018 The Linux Foundation. All rights reserved.
 *
 * Description: CoreSight Embedded Trace Buffer driver
 *
@@ -669,7 +669,6 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id)
	spin_lock_init(&drvdata->spinlock);

	drvdata->buffer_depth = etb_get_buffer_depth(drvdata);
	pm_runtime_put(&adev->dev);

	if (drvdata->buffer_depth & 0x80000000)
		return -EINVAL;
@@ -698,6 +697,7 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id)
	ret = misc_register(&drvdata->miscdev);
	if (ret)
		goto err_misc_register;
	pm_runtime_put(&adev->dev);

	return 0;

+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2015, 2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2015,2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -132,7 +132,6 @@ static int replicator_probe(struct amba_device *adev, const struct amba_id *id)

	drvdata->base = base;
	dev_set_drvdata(dev, drvdata);
	pm_runtime_put(&adev->dev);

	desc.type = CORESIGHT_DEV_TYPE_LINK;
	desc.subtype.link_subtype = CORESIGHT_DEV_SUBTYPE_LINK_SPLIT;
@@ -143,6 +142,7 @@ static int replicator_probe(struct amba_device *adev, const struct amba_id *id)
	if (IS_ERR(drvdata->csdev))
		return PTR_ERR(drvdata->csdev);

	pm_runtime_put(&adev->dev);
	dev_info(dev, "%s initialized\n", (char *)id->data);
	return 0;
}
+4 −2
Original line number Diff line number Diff line
@@ -689,8 +689,6 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
		drvdata->size = readl_relaxed(drvdata->base + TMC_RSZ) * 4;
	}

	pm_runtime_put(&adev->dev);

	ctidata = of_get_coresight_cti_data(dev, adev->dev.of_node);
	if (IS_ERR(ctidata)) {
		dev_err(dev, "invalid cti data\n");
@@ -754,6 +752,10 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
	ret = misc_register(&drvdata->miscdev);
	if (ret)
		coresight_unregister(drvdata->csdev);

	if (!ret)
		pm_runtime_put(&adev->dev);

out:
	return ret;
}
+3 −3
Original line number Diff line number Diff line
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -678,8 +678,6 @@ static int tpda_probe(struct amba_device *adev, const struct amba_id *id)
	if (!coresight_authstatus_enabled(drvdata->base))
		goto err;

	pm_runtime_put(&adev->dev);

	tpda_init_default_data(drvdata);

	desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL);
@@ -695,6 +693,8 @@ static int tpda_probe(struct amba_device *adev, const struct amba_id *id)
	if (IS_ERR(drvdata->csdev))
		return PTR_ERR(drvdata->csdev);

	pm_runtime_put(&adev->dev);

	dev_dbg(drvdata->dev, "TPDA initialized\n");
	return 0;
err:
+2 −2
Original line number Diff line number Diff line
@@ -4029,8 +4029,6 @@ static int tpdm_probe(struct amba_device *adev, const struct amba_id *id)
	drvdata->bc_counters_avail = BMVAL(devid, 6, 10) + 1;
	drvdata->tc_counters_avail = BMVAL(devid, 4, 5) + 1;

	pm_runtime_put(&adev->dev);

	drvdata->traceid = traceid++;

	desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL);
@@ -4051,6 +4049,8 @@ static int tpdm_probe(struct amba_device *adev, const struct amba_id *id)
	if (boot_enable)
		coresight_enable(drvdata->csdev);

	pm_runtime_put(&adev->dev);

	return 0;
}