summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authordongjian <dongjian@yulong.com>2021-03-16 20:15:15 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-25 09:04:09 +0100
commit359d8ff40a09ff95a6382dc0cb0227d2b70e9b40 (patch)
tree9a8c6b56e9b20e329498cdc859e050f1344b0c85 /drivers/scsi
parent38089ba4b20cca60ca9561b531672a6425c44d46 (diff)
scsi: ufs: ufs-mediatek: Correct operator & -> &&
commit 0fdc7d5d8f3719950478cca452cf7f0f1355be10 upstream. The "lpm" and "->enabled" are all boolean. We should be using && rather than the bit operator. Link: https://lore.kernel.org/r/1615896915-148864-1-git-send-email-dj0227@163.com Fixes: 488edafb1120 ("scsi: ufs-mediatek: Introduce low-power mode for device power supply") Reviewed-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: dongjian <dongjian@yulong.com> Signed-off-by: Yue Hu <huyue2@yulong.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/scsi')
-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 934713472ebc..09d2ac20508b 100644
--- a/drivers/scsi/ufs/ufs-mediatek.c
+++ b/drivers/scsi/ufs/ufs-mediatek.c
@@ -813,7 +813,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)