summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ds1390.c
diff options
context:
space:
mode:
authorIvan Grimaldi <grimaldi.ivan@gmail.com>2015-09-18 17:27:56 +0200
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2015-11-08 14:12:14 +0100
commit2ec68825fc55d1ddeb04ab861f3bfdbaa8e9f3c4 (patch)
tree15b9073b7714108ee2ce4b4631327f5317a97a02 /drivers/rtc/rtc-ds1390.c
parentrtc: rtctest: enabling UIE for a chip that doesn't support it returns EINVAL (diff)
downloadlinux-2ec68825fc55d1ddeb04ab861f3bfdbaa8e9f3c4.tar.xz
linux-2ec68825fc55d1ddeb04ab861f3bfdbaa8e9f3c4.zip
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 <grimaldi.ivan@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/rtc-ds1390.c')
-rw-r--r--drivers/rtc/rtc-ds1390.c2
1 files changed, 1 insertions, 1 deletions
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;
}