Skip to contentSkip to conversation

Fixed ds1390_get_reg returned value

PATCH Superseded Ivan Grimaldi 1 participant 1 message Sep 17, 2015 Real time clock (RTC)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fixed ds1390_get_reg returned value

spi_write_then_read puts in rx_buf the received data starting from the first byte of the rx_buf

---
 drivers/rtc/rtc-ds1390.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-ds1390.c +1 -1
index e67bfcb..a4303b4 100644
@@ -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;
 }
Signature · 12 lines
2.5.2

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.