UPSTREAM: scsi: ufs: ufs-mediatek: Correct operator & -> &&

The "lpm" and "->enabled" are all boolean. We should be using &&
rather than the bit operator.

Link: https://lore.kernel.org/r/[email protected]
Fixes: 488edafb1120 ("scsi: ufs-mediatek: Introduce low-power mode for device power supply")
Reviewed-by: Avri Altman <[email protected]>
Signed-off-by: dongjian <[email protected]>
Signed-off-by: Yue Hu <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
(cherry picked from commit 0fdc7d5d8f3719950478cca452cf7f0f1355be10)
Bug: 187129171
Signed-off-by: Connor O'Brien <[email protected]>
Change-Id: I010318ede5b79f8b0443b3acf72a8736640ae3f8
This commit is contained in:
dongjian 2021-03-16 20:15:15 +08:00 • committed by Connor O'Brien
commit 046c52c95b

View file

@ -582,7 +582,7 @@ static void ufs_mtk_vreg_set_lpm(struct ufs_hba *hba, bool lpm)
if (!hba->vreg_info.vccq2 || !hba->vreg_info.vcc)
return;
if (lpm & !hba->vreg_info.vcc->enabled)
if (lpm && !hba->vreg_info.vcc->enabled)
regulator_set_mode(hba->vreg_info.vccq2->reg,
REGULATOR_MODE_IDLE);
else if (!lpm)