Skip to content

Commit

Permalink
scsi: ufs: ufs-mediatek: Correct operator & -> &&
Browse files Browse the repository at this point in the history
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: 488edaf ("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>
  • Loading branch information
dongjian authored and Martin K. Petersen committed Mar 17, 2021
1 parent 2db4215 commit 0fdc7d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/ufs/ufs-mediatek.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0fdc7d5

Please sign in to comment.