diff options
author | Ivan Grimaldi <grimaldi.ivan@gmail.com> | 2015-09-18 17:27:56 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-11-08 14:12:14 +0100 |
commit | 2ec68825fc55d1ddeb04ab861f3bfdbaa8e9f3c4 (patch) | |
tree | 15b9073b7714108ee2ce4b4631327f5317a97a02 /drivers/rtc/rtc-ds1390.c | |
parent | e21a47ff4dcef8c5fb57758035b266299b184146 (diff) |
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.c | 2 |
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; } |