projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38089ba
)
scsi: ufs: ufs-mediatek: Correct operator & -> &&
author
dongjian
<dongjian@yulong.com>
Tue, 16 Mar 2021 12:15:15 +0000
(20:15 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 25 Mar 2021 08:04:09 +0000
(09:04 +0100)
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>
drivers/scsi/ufs/ufs-mediatek.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/ufs/ufs-mediatek.c
b/drivers/scsi/ufs/ufs-mediatek.c
index
9347134
..
09d2ac2
100644
(file)
--- 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)