Skip to content

Commit

Permalink
Revert "coresight: cti: Fix hang in cti_disable_hw()"
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Aishwarya TCV <[email protected]>
Cc: Cristian Marussi <[email protected]>
Cc: Suzuki Poulose <[email protected]>
Cc: James Clark <[email protected]>
Cc: Mike Leach <[email protected]>
Cc: Mike Leach <[email protected]>
Cc: Suzuki K Poulose <[email protected]>
Fixes: 665c157 ("coresight: cti: Fix hang in cti_disable_hw()")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Oct 24, 2022
1 parent 39114b8 commit d76308f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/hwtracing/coresight/coresight-cti-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ static int cti_enable_hw(struct cti_drvdata *drvdata)
unsigned long flags;
int rc = 0;

pm_runtime_get_sync(dev->parent);
spin_lock_irqsave(&drvdata->spinlock, flags);

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

Expand Down Expand Up @@ -173,6 +175,7 @@ static int cti_disable_hw(struct cti_drvdata *drvdata)
coresight_disclaim_device_unlocked(csdev);
CS_LOCK(drvdata->base);
spin_unlock(&drvdata->spinlock);
pm_runtime_put(dev->parent);
return 0;

/* not disabled this call */
Expand Down

0 comments on commit d76308f

Please sign in to comment.