Re: [PATCH] rtc: m41t80: Correct alarm month range with RTC reads

From: Alexandre Belloni
Date: Wed Nov 14 2018 - 04:47:36 EST


On 07/11/2018 02:39:13+0000, Maciej W. Rozycki wrote:
> Add the missing adjustment of the month range on alarm reads from the
> RTC, correcting an issue coming from commit 9c6dfed92c3e ("rtc: m41t80:
> add alarm functionality"). The range is 1-12 for hardware and 0-11 for
> `struct rtc_time', and is already correctly handled on alarm writes to
> the RTC.
>
> It was correct up until commit 48e9766726eb ("drivers/rtc/rtc-m41t80.c:
> remove disabled alarm functionality") too, which removed the previous
> implementation of alarm support.
>
> Signed-off-by: Maciej W. Rozycki <macro@xxxxxxxxxxxxxx>
> Fixes: 9c6dfed92c3e ("rtc: m41t80: add alarm functionality")
> References: 48e9766726eb ("drivers/rtc/rtc-m41t80.c: remove disabled alarm functionality")
> Cc: stable@xxxxxxxxxxxxxxx # 4.7+
> ---
> Hi,
>
> I have no means to verify this change at run time as my M41T81 device,
> which is the reason for me to use this driver, regrettably hasn't got its
> IRQ line routed, due to historical reasons I gathered, as it replaced a
> different RTC device, that didn't have an IRQ output at all, used with
> earlier revisions of the Broadcom SiByte SWARM board I have been using
> this code with. However it should be obvious by code inspection.
>
> Please apply and backport as appropriate.
>
> Maciej
> ---
> drivers/rtc/rtc-m41t80.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Applied (and tested), thanks.

--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com