diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-11-16 15:05:04 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-18 14:19:20 -0800 |
commit | c4d139cb8d7dbe67cfbaefa70230d144dbada34c (patch) | |
tree | b987c077a9d78bb4ab112c38d8e9d868fbbd7bc6 /drivers/staging/wilc1000/wilc_wfi_netdevice.h | |
parent | 2e7d5377f684ea1b337a4182f5f025b300d024ff (diff) |
staging/wilc1000: get rid of WILC_SDIO_IRQ_GPIO
Whether the SDIO function uses an internal or external interrupt
should not be a compiletime decision but be determined at runtime.
This changes the code to pass a GPIO number from the init code
as early as possible, and leaves just one #ifdef WILC_SDIO_IRQ_GPIO
to preserve the previous behavior.
All other locations that check for the interrupt method are turned
into runtime checks based on the gpio number (>=0) or the interrupt
number (>0).
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_wfi_netdevice.h')
-rw-r--r-- | drivers/staging/wilc1000/wilc_wfi_netdevice.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index eae9ce175351..92f4cb71608d 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -158,10 +158,9 @@ struct wilc_vif { struct wilc { int io_type; int mac_status; + int gpio; bool initialized; - #if (!defined WILC_SDIO) || (defined WILC_SDIO_IRQ_GPIO) - unsigned short dev_irq_num; - #endif + int dev_irq_num; int close; u8 vif_num; struct wilc_vif vif[NUM_CONCURRENT_IFC]; @@ -213,7 +212,7 @@ void linux_wlan_rx_complete(void); void linux_wlan_dbg(u8 *buff); int linux_wlan_lock_timeout(void *vp, u32 timeout); void wilc_netdev_cleanup(struct wilc *wilc); -int wilc_netdev_init(struct wilc **wilc, struct device *, int io_type); +int wilc_netdev_init(struct wilc **wilc, struct device *, int io_type, int gpio); void wilc1000_wlan_deinit(struct net_device *dev); void WILC_WFI_mgmt_rx(struct wilc *wilc, u8 *buff, u32 size); u16 wilc_set_machw_change_vir_if(struct net_device *dev, bool value); |