UPSTREAM: scsi: ufs: Remove unnecessary if condition in ufshcd_suspend()

In the case that auto_bkops_enable is false, which means auto bkops has
been disabled, there is no need to call ufshcd_disable_auto_bkops().

Link: https://lore.kernel.org/r/20201125185300.3394-1-huobean@gmail.com
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 939785d35d)
Bug: 204438323
Signed-off-by: Bart Van Assche <bvanassche@google.com>
Change-Id: Id05e190482ce2c782a4cf4ea99e683cfc592c5f1
This commit is contained in:
Bean Huo
2020-11-25 19:53:00 +01:00
committed by Bart Van Assche
parent 3442ca89f2
commit 4fb6025d52

View File

@@ -8784,11 +8784,9 @@ static int ufshcd_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
flush_work(&hba->eeh_work);
if (req_dev_pwr_mode != hba->curr_dev_pwr_mode) {
if ((ufshcd_is_runtime_pm(pm_op) && !hba->auto_bkops_enabled) ||
!ufshcd_is_runtime_pm(pm_op)) {
if (!ufshcd_is_runtime_pm(pm_op))
/* ensure that bkops is disabled */
ufshcd_disable_auto_bkops(hba);
}
if (!hba->dev_info.b_rpm_dev_flush_capable) {
ret = ufshcd_set_dev_pwr_mode(hba, req_dev_pwr_mode);