LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fixed ds1390_get_reg returned value
@ 2015-09-17 21:34 Ivan Grimaldi
  0 siblings, 0 replies; only message in thread
From: Ivan Grimaldi @ 2015-09-17 21:34 UTC (permalink / raw
  To: a.zummo, mpfj; +Cc: rtc-linux, linux-kernel

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 --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;
 }
-- 
2.5.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-17 21:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-17 21:34 [PATCH] Fixed ds1390_get_reg returned value Ivan Grimaldi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).