Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ivan Grimaldi and committed by
Alexandre Belloni
2ec68825 e21a47ff

+1 -1
+1 -1
drivers/rtc/rtc-ds1390.c
··· 62 62 if (status != 0) 63 63 return status; 64 64 65 - *data = chip->txrx_buf[1]; 65 + *data = chip->txrx_buf[0]; 66 66 67 67 return 0; 68 68 }