aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordongjian <[email protected]>2021-03-16 20:15:15 +0800
committerMartin K. Petersen <[email protected]>2021-03-16 22:33:46 -0400
commit0fdc7d5d8f3719950478cca452cf7f0f1355be10 (patch)
treec7df3f1ce5b6746395d2d565b5e7dc798a37a53d
parent2db4215f47557703dade2baccfa8da7b7e42a7e4 (diff)
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]>
-rw-r--r--drivers/scsi/ufs/ufs-mediatek.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c
index c55202b92a43..a981f261b304 100644
--- a/drivers/scsi/ufs/ufs-mediatek.c
+++ b/drivers/scsi/ufs/ufs-mediatek.c
@@ -911,7 +911,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)