diff options
author | Stanislav Kholmanskikh | 2015-10-08 20:23:13 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-10-13 05:59:18 +0200 |
commit | 6b69b4f0aa7d3e3d5810f5c8c1c55c55be0927d2 (patch) | |
tree | a766b4f53625f46f9f75c1a72951002d3568a827 /drivers/staging/wilc1000/linux_wlan_spi.c | |
parent | staging: wilc1000: rename tenuAuth_type of struct host_if_wep_attr (diff) | |
download | kernel-qcow2-linux-6b69b4f0aa7d3e3d5810f5c8c1c55c55be0927d2.tar.gz kernel-qcow2-linux-6b69b4f0aa7d3e3d5810f5c8c1c55c55be0927d2.tar.xz kernel-qcow2-linux-6b69b4f0aa7d3e3d5810f5c8c1c55c55be0927d2.zip |
staging: wilc1000: linux_wlan_spi: correct types
linux_spi_write(), linux_spi_read(), linux_spi_write_read():
nwi->io_func.u.spi.spi_tx = linux_spi_write;
nwi->io_func.u.spi.spi_rx = linux_spi_read;
nwi->io_func.u.spi.spi_trx = linux_spi_write_read;
are expected to accept arguments of 'u8 *', u32 types:
struct {
int (*spi_max_speed)(void);
int (*spi_tx)(u8 *, u32);
int (*spi_rx)(u8 *, u32);
int (*spi_trx)(u8 *, u8 *, u32);
} spi;
However, linux_spi_read() and linux_spi_write_read() do not do this,
they use 'unsigned char *' and 'unsigned long' instead.
Changed the types of their arguments to satisfy the expectations.
Signed-off-by: Stanislav Kholmanskikh <kholmanskikh.s.s@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/linux_wlan_spi.c')
-rw-r--r-- | drivers/staging/wilc1000/linux_wlan_spi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/wilc1000/linux_wlan_spi.c b/drivers/staging/wilc1000/linux_wlan_spi.c index 51bbd969e96b..c6c1f6ec8c71 100644 --- a/drivers/staging/wilc1000/linux_wlan_spi.c +++ b/drivers/staging/wilc1000/linux_wlan_spi.c @@ -243,7 +243,7 @@ int linux_spi_write(u8 *b, u32 len) #if defined(TXRX_PHASE_SIZE) -int linux_spi_read(unsigned char *rb, unsigned long rlen) +int linux_spi_read(u8 *rb, u32 rlen) { int ret; @@ -307,7 +307,7 @@ int linux_spi_read(unsigned char *rb, unsigned long rlen) kfree(t_buffer); } else { - PRINT_ER("can't read data with the following length: %ld\n", rlen); + PRINT_ER("can't read data with the following length: %u\n", rlen); ret = -1; } /* change return value to match WILC interface */ @@ -317,7 +317,7 @@ int linux_spi_read(unsigned char *rb, unsigned long rlen) } #else -int linux_spi_read(unsigned char *rb, unsigned long rlen) +int linux_spi_read(u8 *rb, u32 rlen) { int ret; @@ -351,7 +351,7 @@ int linux_spi_read(unsigned char *rb, unsigned long rlen) } kfree(t_buffer); } else { - PRINT_ER("can't read data with the following length: %ld\n", rlen); + PRINT_ER("can't read data with the following length: %u\n", rlen); ret = -1; } /* change return value to match WILC interface */ @@ -362,7 +362,7 @@ int linux_spi_read(unsigned char *rb, unsigned long rlen) #endif -int linux_spi_write_read(unsigned char *wb, unsigned char *rb, unsigned int rlen) +int linux_spi_write_read(u8 *wb, u8 *rb, u32 rlen) { int ret; @@ -390,7 +390,7 @@ int linux_spi_write_read(unsigned char *wb, unsigned char *rb, unsigned int rlen PRINT_ER("SPI transaction failed\n"); } } else { - PRINT_ER("can't read data with the following length: %d\n", rlen); + PRINT_ER("can't read data with the following length: %u\n", rlen); ret = -1; } /* change return value to match WILC interface */ |