mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
coresight: tpiu: Cleanup power management
Drop the power only when we have successfully probed. Otherwise leave it to the amba probe to do the rest. Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> [Removed extra newline left after original modification] Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
850ccfe3e8
commit
0bfc53b30e
1 changed files with 6 additions and 3 deletions
|
@ -153,8 +153,6 @@ static int tpiu_probe(struct amba_device *adev, const struct amba_id *id)
|
||||||
/* Disable tpiu to support older devices */
|
/* Disable tpiu to support older devices */
|
||||||
tpiu_disable_hw(drvdata);
|
tpiu_disable_hw(drvdata);
|
||||||
|
|
||||||
pm_runtime_put(&adev->dev);
|
|
||||||
|
|
||||||
desc.type = CORESIGHT_DEV_TYPE_SINK;
|
desc.type = CORESIGHT_DEV_TYPE_SINK;
|
||||||
desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_PORT;
|
desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_PORT;
|
||||||
desc.ops = &tpiu_cs_ops;
|
desc.ops = &tpiu_cs_ops;
|
||||||
|
@ -162,7 +160,12 @@ static int tpiu_probe(struct amba_device *adev, const struct amba_id *id)
|
||||||
desc.dev = dev;
|
desc.dev = dev;
|
||||||
drvdata->csdev = coresight_register(&desc);
|
drvdata->csdev = coresight_register(&desc);
|
||||||
|
|
||||||
return PTR_ERR_OR_ZERO(drvdata->csdev);
|
if (!IS_ERR(drvdata->csdev)) {
|
||||||
|
pm_runtime_put(&adev->dev);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return PTR_ERR(drvdata->csdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
|
|
Loading…
Add table
Reference in a new issue