From 7d37a4a1b48ff6c365f6fd3d74ebe043cb8cb8a7 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 16 Nov 2015 15:05:05 +0100 Subject: staging/wilc1000: pass hif operations through initialization The wilc_hif_spi and wilc_hif_sdio structures are part of the bus specific code, and the generic code should have no knowledge of their addresses. This changes the code to reference them only from the bus specific initialization code, which we can then use to split up the driver into separate modules. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/wilc_sdio.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'drivers/staging/wilc1000/wilc_sdio.c') diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index 8441fcc..006aae4 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -912,23 +912,22 @@ static int sdio_sync_ext(int nint /* how mant interrupts to enable. */) * ********************************************/ -struct wilc_hif_func wilc_hif_sdio = { - sdio_init, - sdio_deinit, - sdio_read_reg, - sdio_write_reg, - sdio_read, - sdio_write, - sdio_sync, - sdio_clear_int, - sdio_read_int, - sdio_clear_int_ext, - sdio_read_size, - sdio_write, - sdio_read, - sdio_sync_ext, - - sdio_set_max_speed, - sdio_set_default_speed, +const struct wilc_hif_func wilc_hif_sdio = { + .hif_init = sdio_init, + .hif_deinit = sdio_deinit, + .hif_read_reg = sdio_read_reg, + .hif_write_reg = sdio_write_reg, + .hif_block_rx = sdio_read, + .hif_block_tx = sdio_write, + .hif_sync = sdio_sync, + .hif_clear_int = sdio_clear_int, + .hif_read_int = sdio_read_int, + .hif_clear_int_ext = sdio_clear_int_ext, + .hif_read_size = sdio_read_size, + .hif_block_tx_ext = sdio_write, + .hif_block_rx_ext = sdio_read, + .hif_sync_ext = sdio_sync_ext, + .hif_set_max_bus_speed = sdio_set_max_speed, + .hif_set_default_bus_speed = sdio_set_default_speed, }; -- cgit v1.1