scsi: ufs-mediatek: Correct operator & -> &&
PATCH 1/1 scsi: ufs-mediatek: Correct operator & -> &&
From: dongjian <[email protected]>
The "lpm" and "->enabled" are all bool type, it should be using operator && rather than bit operator.
Signed-off-by dongjian <[email protected]>
Signed-off-by Yue Hu <[email protected]>
--- drivers/scsi/ufs/ufs-mediatek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ufs/ufs-mediatek.c +1 -1
@@ -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)
Signature · 1 line
1.9.1
Quoted 5 lines
From: dongjian <[email protected]>
The "lpm" and "->enabled" are all bool type, it should be using operator && rather than bit operator.
Maybe fixes tag as well:
Fixes 488edafb1120 (scsi: ufs-mediatek: Introduce low-power mode for device power supply)
Thanks,
Avri
Quoted 23 lines
Signed-off-by dongjian <[email protected]>Signed-off-by Yue Hu <[email protected]>--- drivers/scsi/ufs/ufs-mediatek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/ufs/ufs-mediatek.c +1
-1@@ -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)
--
1.9.1