From cbd37352f2a9fa83c44f65b17f624a07a5b195b2 Mon Sep 17 00:00:00 2001 From: Robin Gong Date: Mon, 27 Feb 2017 16:25:00 +0800 Subject: 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 (cherry picked from commit df3428c6588a00fa153a3b6996cc33b21b69efb6) --- drivers/regulator/pf1550-regulator-rpmsg.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/regulator') 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) -- cgit v1.2.3