diff options
author | Glen Lee <glen.lee@atmel.com> | 2015-11-18 15:11:30 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-18 14:30:50 -0800 |
commit | 1b8d17a0c94fe6e42443a01f33a36a199ec58fe6 (patch) | |
tree | 5eea9fd9baa8b67b23f12baf777be9b023021903 /drivers/staging/wilc1000/wilc_spi.c | |
parent | 643b2e42621f66ea951059880f2ba33163b0fef5 (diff) | |
download | op-kernel-dev-1b8d17a0c94fe6e42443a01f33a36a199ec58fe6.zip op-kernel-dev-1b8d17a0c94fe6e42443a01f33a36a199ec58fe6.tar.gz |
staging: wilc1000: wilc_spi_read: pass struct wilc
This patch adds new function parameter struct wilc and use it instead of
global variable wilc_dev, and pass wilc to the functions as well.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_spi.c')
-rw-r--r-- | drivers/staging/wilc1000/wilc_spi.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index 46f7ea8..5e21109 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -365,7 +365,7 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz, /** * Read bytes **/ - if (!wilc_spi_read(&b[ix], nbytes)) { + if (!wilc_spi_read(wilc, &b[ix], nbytes)) { PRINT_ER("[wilc spi]: Failed data block read, bus error...\n"); result = N_FAIL; goto _error_; @@ -375,7 +375,7 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz, * Read Crc **/ if (!g_spi.crc_off) { - if (!wilc_spi_read(crc, 2)) { + if (!wilc_spi_read(wilc, crc, 2)) { PRINT_ER("[wilc spi]: Failed data block crc read, bus error...\n"); result = N_FAIL; goto _error_; @@ -406,7 +406,7 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz, **/ retry = 10; do { - if (!wilc_spi_read(&rsp, 1)) { + if (!wilc_spi_read(wilc, &rsp, 1)) { PRINT_ER("[wilc spi]: Failed data response read, bus error...\n"); result = N_FAIL; break; @@ -422,7 +422,7 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz, /** * Read bytes **/ - if (!wilc_spi_read(&b[ix], nbytes)) { + if (!wilc_spi_read(wilc, &b[ix], nbytes)) { PRINT_ER("[wilc spi]: Failed data block read, bus error...\n"); result = N_FAIL; break; @@ -432,7 +432,7 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz, * Read Crc **/ if (!g_spi.crc_off) { - if (!wilc_spi_read(crc, 2)) { + if (!wilc_spi_read(wilc, crc, 2)) { PRINT_ER("[wilc spi]: Failed data block crc read, bus error...\n"); result = N_FAIL; break; |