mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 00:51:35 +00:00
spi: use simplified spi_sync() calling convention
Given the patch which simplifies the spi_sync calling convention, this one updates the callers of that routine which tried using it according to the previous specification. (Most didn't.) Signed-off-by: Marc Pignat <marc.pignat@hevs.ch> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
9b938b7490
commit
c24b2602af
3 changed files with 9 additions and 26 deletions
|
@ -89,13 +89,9 @@ static int max6902_get_reg(struct device *dev, unsigned char address,
|
|||
|
||||
/* do the i/o */
|
||||
status = spi_sync(spi, &message);
|
||||
|
||||
if (status == 0)
|
||||
status = message.status;
|
||||
else
|
||||
return status;
|
||||
|
||||
*data = chip->rx_buf[1];
|
||||
|
||||
*data = chip->rx_buf[1];
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -125,9 +121,7 @@ static int max6902_get_datetime(struct device *dev, struct rtc_time *dt)
|
|||
|
||||
/* do the i/o */
|
||||
status = spi_sync(spi, &message);
|
||||
if (status == 0)
|
||||
status = message.status;
|
||||
else
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
/* The chip sends data in this order:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue