MLK-17843 rtc: rtc-imx-rpmsg: fix alarm enable function
authorAnson Huang <Anson.Huang@nxp.com>
Tue, 20 Mar 2018 07:25:51 +0000 (15:25 +0800)
committerHaibo Chen <haibo.chen@nxp.com>
Thu, 12 Apr 2018 10:45:37 +0000 (18:45 +0800)
Add missing enable parameter for alarm enable function,
without correct parameter, the "enable" value is a random
value in memory and M4 may disable alarm unexpectedly.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
drivers/rtc/rtc-imx-rpmsg.c

index 308c1d5..82140af 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 NXP
+ * Copyright 2017-2018 NXP
  *
  * The code contained herein is licensed under the GNU General Public
  * License. You may obtain a copy of the GNU General Public License
@@ -199,6 +199,7 @@ static int imx_rpmsg_rtc_alarm_irq_enable(struct device *dev,
        msg.header.minor = IMX_RMPSG_MINOR;
        msg.header.type = RTC_RPMSG_SEND;
        msg.header.cmd = RTC_RPMSG_ENABLE_ALARM;
+       msg.enable = enable;
 
        ret = rtc_send_message(&msg, &rtc_rpmsg, true);
        if (ret)