]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: ds1302: fix error check in set_time
authorAkinobu Mita <akinobu.mita@gmail.com>
Sun, 10 Apr 2016 14:59:23 +0000 (23:59 +0900)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Fri, 20 May 2016 10:33:51 +0000 (12:33 +0200)
commit82f8a6af9b9709ea8fa011835c18cde0dac95849
treead1e38cf7b0ae2862847feb1ec7d5c215d6bc3b6
parent300b6899cdafbd24b107397883e7a5420a596609
rtc: ds1302: fix error check in set_time

The set_time callback for rtc-ds1302 doesn't write clock registers
because the error check for the return value from spi_write_then_read()
is not correct.  spi_write_then_read() which returns zero on success.

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