Skip to content

Commit d76308f

Browse files
committed
Revert "coresight: cti: Fix hang in cti_disable_hw()"
This reverts commit 665c157. It causes reported build warnings: drivers/hwtracing/coresight/coresight-cti-core.c: In functio n 'cti_enable_hw': drivers/hwtracing/coresight/coresight-cti-core.c:93:24: warning: unused variable 'dev' [-Wunused-variable] 93 | struct device *dev = &drvdata->csdev->dev; | ^~~ drivers/hwtracing/coresight/coresight-cti-core.c: In function 'cti_disable_hw': drivers/hwtracing/coresight/coresight-cti-core.c:154:24: warning: unused variable 'dev' [-Wunused-variable] 154 | struct device *dev = &drvdata->csdev->dev; | ^~~ Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Aishwarya TCV <Aishwarya.TCV@arm.com> Cc: Cristian Marussi <Cristian.Marussi@arm.com> Cc: Suzuki Poulose <Suzuki.Poulose@arm.com> Cc: James Clark <james.clark@arm.com> Cc: Mike Leach <mike.leach@linaro.org> Cc: Mike Leach <mike.leach@linaro.org> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> Fixes: 665c157 ("coresight: cti: Fix hang in cti_disable_hw()") Link: https://lore.kernel.org/r/20221024135752.2b83af97@canb.auug.org.au Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 39114b8 commit d76308f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/hwtracing/coresight/coresight-cti-core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ static int cti_enable_hw(struct cti_drvdata *drvdata)
9494
unsigned long flags;
9595
int rc = 0;
9696

97+
pm_runtime_get_sync(dev->parent);
9798
spin_lock_irqsave(&drvdata->spinlock, flags);
9899

99100
/* no need to do anything if enabled or unpowered*/
@@ -118,6 +119,7 @@ static int cti_enable_hw(struct cti_drvdata *drvdata)
118119
/* cannot enable due to error */
119120
cti_err_not_enabled:
120121
spin_unlock_irqrestore(&drvdata->spinlock, flags);
122+
pm_runtime_put(dev->parent);
121123
return rc;
122124
}
123125

@@ -173,6 +175,7 @@ static int cti_disable_hw(struct cti_drvdata *drvdata)
173175
coresight_disclaim_device_unlocked(csdev);
174176
CS_LOCK(drvdata->base);
175177
spin_unlock(&drvdata->spinlock);
178+
pm_runtime_put(dev->parent);
176179
return 0;
177180

178181
/* not disabled this call */

0 commit comments

Comments
 (0)