diff mbox

[v3,1/2] Fixed ds1390_get_reg returned value

Message ID 1442589640-29347-1-git-send-email-grimaldi.ivan@gmail.com
State Superseded
Headers show

Commit Message

Ivan Grimaldi Sept. 18, 2015, 3:20 p.m. UTC
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>
---
 drivers/rtc/rtc-ds1390.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c
index e67bfcb..a4303b4 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;
 }