]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: ds1302: fix write value for day of week register
authorAkinobu Mita <akinobu.mita@gmail.com>
Sun, 10 Apr 2016 14:59:24 +0000 (23:59 +0900)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Fri, 20 May 2016 10:33:51 +0000 (12:33 +0200)
commit48f280c1788b49306099a125c369384ec89a4a62
tree628d83f54ff9d7e178cfbc5aedbbcd954ad57e00
parent0dec0257ca865330be0542cd32dd1d8ffece5ec7
rtc: ds1302: fix write value for day of week register

The valid range of day of week register for DS1302 is 1 to 7.  But the
set_time callback for rtc-ds1302 attempts to write the value of
tm->tm_wday which is in the range 0 to 6.  While the get_time callback
correctly decodes the register.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Sergey Yanovich <ynvich@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-ds1302.c