Skip to contentSkip to conversation

scsi: ufs: Suspend clock scaling only once in ufshcd_hba_exit()

PATCH In review Matthias Kaehlcke 2 participants 2 messages Aug 1, 2018 – Aug 7, 2018 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: ufs: Suspend clock scaling only once in ufshcd_hba_exit()

Commit 401f1e4490ee ("scsi: ufs: don't suspend clock scaling during clock gating") introduced a check in ufshcd_hba_exit() to suspend clock scaling only when the controller supports clock scaling. However the unconditional call to ufshcd_suspend_clkscaling() was also left in place, so that it is now called twice when clock scaling is supported and still once when the controller doesn't support it. Remove the unconditional call.

Fixes 401f1e4490ee ("scsi: ufs: don't suspend clock scaling during clock gating")
---
 drivers/scsi/ufs/ufshcd.c | 1 -
 1 file changed, 1 deletion(-)
drivers/scsi/ufs/ufshcd.c +0 -1
index 397081d320b1..dca7525af696 100644
@@ -7186,7 +7186,6 @@ static void ufshcd_hba_exit(struct ufs_hba *hba)
 	if (hba->is_powered) {
 		ufshcd_variant_hba_exit(hba);
 		ufshcd_setup_vreg(hba, false);
-		ufshcd_suspend_clkscaling(hba);
 		if (ufshcd_is_clkscaling_supported(hba)) {
 			if (hba->devfreq)
 				ufshcd_suspend_clkscaling(hba);
Signature · 1 line
2.18.0.597.ga71716f1ad-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 28 lines · Matthias Kaehlcke

Commit 401f1e4490ee ("scsi: ufs: don't suspend clock scaling during clock gating") introduced a check in ufshcd_hba_exit() to suspend clock scaling only when the controller supports clock scaling. However the unconditional call to ufshcd_suspend_clkscaling() was also left in place, so that it is now called twice when clock scaling is supported and still once when the controller doesn't support it. Remove the unconditional call.

Fixes 401f1e4490ee ("scsi: ufs: don't suspend clock scaling during clock gating")
---
 drivers/scsi/ufs/ufshcd.c | 1 -
 1 file changed, 1 deletion(-)
drivers/scsi/ufs/ufshcd.c +0 -2
index 397081d320b1..dca7525af696 100644
@@ -7186,7 +7186,6 @@ static void ufshcd_hba_exit(struct ufs_hba *hba)
        if (hba->is_powered) {
                ufshcd_variant_hba_exit(hba);
                ufshcd_setup_vreg(hba, false);
-               ufshcd_suspend_clkscaling(hba);
                if (ufshcd_is_clkscaling_supported(hba)) {
                        if (hba->devfreq)
                                ufshcd_suspend_clkscaling(hba);
--
Quoted 2 lines

2.18.0.597.ga71716f1ad-goog