From: Ivan Grimaldi Date: Fri, 18 Sep 2015 15:27:56 +0000 (+0200) Subject: rtc: ds1390: fix ds1390_get_reg return value X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2ec68825fc55d1ddeb04ab861f3bfdbaa8e9f3c4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git rtc: ds1390: fix ds1390_get_reg return value spi_write_then_read puts in rx_buf the received data starting from the first byte of the rx_buf Signed-off-by: Ivan Grimaldi Signed-off-by: Alexandre Belloni --- diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c index e67bfcb3a1aa..a4303b43a36a 100644 --- a/drivers/rtc/rtc-ds1390.c +++ b/drivers/rtc/rtc-ds1390.c @@ -62,7 +62,7 @@ static int ds1390_get_reg(struct device *dev, unsigned char address, if (status != 0) return status; - *data = chip->txrx_buf[1]; + *data = chip->txrx_buf[0]; return 0; }