rtc: pl030: remove useless invalid alarm handling
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 6 Mar 2020 00:57:29 +0000 (01:57 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 16 Mar 2020 10:12:09 +0000 (11:12 +0100)
The core will never pass an invalid alarm to .set_alarm, it is not
necessary to check for its validity.

Link: https://lore.kernel.org/r/20200306005730.38268-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-pl030.c

index 30aa813f96c0af5f1e0442bce281f5c206dd8e03..55776e8fa87c678100356f05a33e07444661fc7d 100644 (file)
@@ -46,12 +46,7 @@ static int pl030_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
        unsigned long time;
        int ret;
 
-       /*
-        * At the moment, we can only deal with non-wildcarded alarm times.
-        */
-       ret = rtc_valid_tm(&alrm->time);
-       if (ret == 0)
-               ret = rtc_tm_to_time(&alrm->time, &time);
+       ret = rtc_tm_to_time(&alrm->time, &time);
        if (ret == 0)
                writel(time, rtc->base + RTC_MR);
        return ret;