Message ID | 1615533260-175467-1-git-send-email-dj0227@163.com |
---|---|
State | Superseded |
Headers | show |
Series | scsi: ufs-mediatek: Correct operator & -> && | expand |
> > From: dongjian <dongjian@yulong.com> > > 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 > > Signed-off-by: dongjian <dongjian@yulong.com> > Signed-off-by: Yue Hu <huyue2@yulong.com> > --- > drivers/scsi/ufs/ufs-mediatek.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c > index c55202b..a981f26 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) > -- > 1.9.1
diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c index c55202b..a981f26 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)