summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorRobin Gong <yibin.gong@nxp.com>2017-02-27 16:25:00 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:26:17 +0800
commitcbd37352f2a9fa83c44f65b17f624a07a5b195b2 (patch)
tree0cc616671b8d5725f93c36192e17db826aee2c8c /drivers/regulator
parent890d4bb0a7945b564eb20fd5fef1f8697167ecf5 (diff)
MLK-14275: regulator: pf1550-regulator-rpmsg: clear 'u32 val' before read value by rpmsg
Actually, m4 only fill the least 1byte, so we'd better clear 'val' before reading by rpmsg, thus the gabage data will not bother us. Signed-off-by: Robin Gong <yibin.gong@nxp.com> (cherry picked from commit df3428c6588a00fa153a3b6996cc33b21b69efb6)
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/pf1550-regulator-rpmsg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/regulator/pf1550-regulator-rpmsg.c b/drivers/regulator/pf1550-regulator-rpmsg.c
index 57404ea95c68..11a893373390 100644
--- a/drivers/regulator/pf1550-regulator-rpmsg.c
+++ b/drivers/regulator/pf1550-regulator-rpmsg.c
@@ -382,6 +382,7 @@ static ssize_t pf1550_registers_show(struct device *dev,
msg.header.cmd = PF1550_GET_REG;
msg.reg = i;
+ msg.val = 0;
err = pf1550_send_message(&msg, info);
if (err)