ANDROID: ufs: core: Fix v5.15.91 merge conflicts in android14-5.15

LTS v5.15.91 commit b03f7ed9af ("scsi: ufs: core: Fix
devfreq deadlocks") didn't apply cleanly and it led to a
probable merge conflict which broke DB845c (sdm845).

Bug: 146449535
Fixes: e3d8fe0993 (Merge 5.15.91 into android14-5.15)
Change-Id: I308d6425f49e924dad412d5b5a93dc71c1881cbf
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
This commit is contained in:
Amit Pundir
2023-02-08 20:36:16 +05:30
committed by Greg Kroah-Hartman
parent a4b821db5c
commit a5edfb5af6

View File

@@ -1316,6 +1316,7 @@ static void ufshcd_clock_scaling_unprepare(struct ufs_hba *hba, bool scale_up)
up_write(&hba->clk_scaling_lock);
/* Enable Write Booster if we have scaled up else disable it */
if (ufshcd_enable_wb_if_scaling_up(hba))
ufshcd_wb_toggle(hba, scale_up);
mutex_unlock(&hba->wb_mutex);
@@ -1372,12 +1373,6 @@ static int ufshcd_devfreq_scale(struct ufs_hba *hba, bool scale_up)
}
}
/* Enable Write Booster if we have scaled up else disable it */
if (ufshcd_enable_wb_if_scaling_up(hba)) {
downgrade_write(&hba->clk_scaling_lock);
ufshcd_wb_toggle(hba, scale_up);
}
out_unprepare:
ufshcd_clock_scaling_unprepare(hba, scale_up);
return ret;