diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-05-10 18:09:30 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-05-20 02:43:07 -0400 |
commit | 0c4a1590189b426814748d2e03b95541852b3af6 (patch) | |
tree | b4b1d2eee1ea2b5d1700df4519e182cca816607b /include/linux/spi | |
parent | 521999bd4a8c47a86136b9d8223a9480f5906db8 (diff) |
spi: Use void pointers for data in simple SPI I/O operations
Currently the simple SPI I/O operations all take pointers to u8 * buffers
to operate on. This creates needless type compatibility issues and the
underlying spi_transfer structure uses void pointers anyway so convert the
API over to take void pointers too.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux/spi')
-rw-r--r-- | include/linux/spi/spi.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index b4d7710bc38d..bb4f5fbbbd8e 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -581,7 +581,7 @@ extern int spi_bus_unlock(struct spi_master *master); | |||
581 | * Callable only from contexts that can sleep. | 581 | * Callable only from contexts that can sleep. |
582 | */ | 582 | */ |
583 | static inline int | 583 | static inline int |
584 | spi_write(struct spi_device *spi, const u8 *buf, size_t len) | 584 | spi_write(struct spi_device *spi, const void *buf, size_t len) |
585 | { | 585 | { |
586 | struct spi_transfer t = { | 586 | struct spi_transfer t = { |
587 | .tx_buf = buf, | 587 | .tx_buf = buf, |
@@ -605,7 +605,7 @@ spi_write(struct spi_device *spi, const u8 *buf, size_t len) | |||
605 | * Callable only from contexts that can sleep. | 605 | * Callable only from contexts that can sleep. |
606 | */ | 606 | */ |
607 | static inline int | 607 | static inline int |
608 | spi_read(struct spi_device *spi, u8 *buf, size_t len) | 608 | spi_read(struct spi_device *spi, void *buf, size_t len) |
609 | { | 609 | { |
610 | struct spi_transfer t = { | 610 | struct spi_transfer t = { |
611 | .rx_buf = buf, | 611 | .rx_buf = buf, |
@@ -620,8 +620,8 @@ spi_read(struct spi_device *spi, u8 *buf, size_t len) | |||
620 | 620 | ||
621 | /* this copies txbuf and rxbuf data; for small transfers only! */ | 621 | /* this copies txbuf and rxbuf data; for small transfers only! */ |
622 | extern int spi_write_then_read(struct spi_device *spi, | 622 | extern int spi_write_then_read(struct spi_device *spi, |
623 | const u8 *txbuf, unsigned n_tx, | 623 | const void *txbuf, unsigned n_tx, |
624 | u8 *rxbuf, unsigned n_rx); | 624 | void *rxbuf, unsigned n_rx); |
625 | 625 | ||
626 | /** | 626 | /** |
627 | * spi_w8r8 - SPI synchronous 8 bit write followed by 8 bit read | 627 | * spi_w8r8 - SPI synchronous 8 bit write followed by 8 bit read |