linux/drivers/staging/wilc1000
Arnd Bergmann f45b8934b9 staging: wilc1000: revert "fix TODO to compile spi and sdio components in single module"
The TODO item named "make spi and sdio components coexist in one build"
was apparently addressed a long time ago, but never removed from the
TODO file. However, the new patch that tries to address it actually
makes it worse again by duplicating the common parts of the driver into
two separate modules rather than sharing them. This also introduces a
build regression when one of the two is built-in while the other is a
loadable module:

drivers/staging/wilc1000/wilc_debugfs.o:(.data+0x10): undefined reference to `__this_module'

Reverting the patch makes it build again. I'm leaving the TODO file
modification though, as there is nothing left to do for this item.

A related problem however still seems to exist: one still cannot have
multiple concurrent instances of wilc1000 devices present in the
system, as there are lots of shared global variables such as

host_interface.c:static struct wilc_vif *periodic_rssi_vif;
wilc_sdio.c:static struct wilc_sdio g_sdio;
wilc_wlan.c:static enum chip_ps_states chip_ps_state = CHIP_WAKEDUP;
wilc_wlan.c:static u32 pending_acks;
wilc_wfi_cfgoperations.c:int wilc_connecting;

In order to have multiple instances working (sdio, spi, or mixed),
all such variables need to be dynamically allocated per instance and
stored in 'struct wilc' or one of the structures referenced by it.

Fixes: 9abc44ba4e ("staging: wilc1000: fix TODO to compile spi and sdio components in single module")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:12:59 +02:00
..
Kconfig staging: wilc1000: removes WIRELESS_EXT 2016-03-28 07:30:36 -07:00
Makefile staging: wilc1000: revert "fix TODO to compile spi and sdio components in single module" 2018-08-27 19:12:59 +02:00
TODO staging: wilc1000: remove TODO item for comments and code style 2018-08-05 16:15:32 +02:00
coreconfigurator.c staging: wilc1000: added Microchip copyright notice header 2018-08-05 16:15:32 +02:00
coreconfigurator.h staging: wilc1000: added Microchip copyright notice header 2018-08-05 16:15:32 +02:00
host_interface.c staging: wilc1000: added Microchip copyright notice header 2018-08-05 16:15:32 +02:00
host_interface.h staging: wilc1000: added Microchip copyright notice header 2018-08-05 16:15:32 +02:00
linux_mon.c staging: wilc1000: added Microchip copyright notice header 2018-08-05 16:15:32 +02:00
linux_wlan.c staging: wilc1000: revert "fix TODO to compile spi and sdio components in single module" 2018-08-27 19:12:59 +02:00
microchip,wilc1000,sdio.txt staging: wilc1000: use descriptor-based interface for GPIO 2018-07-24 13:52:32 +02:00
microchip,wilc1000,spi.txt staging: wilc1000: use descriptor-based interface for GPIO 2018-07-24 13:52:32 +02:00
wilc_debugfs.c staging: wilc1000: revert "fix TODO to compile spi and sdio components in single module" 2018-08-27 19:12:59 +02:00
wilc_sdio.c staging: wilc1000: added Microchip copyright notice header 2018-08-05 16:15:32 +02:00
wilc_spi.c staging: wilc1000: added Microchip copyright notice header 2018-08-05 16:15:32 +02:00
wilc_wfi_cfgoperations.c staging: wilc1000: added Microchip copyright notice header 2018-08-05 16:15:32 +02:00
wilc_wfi_cfgoperations.h staging: wilc1000: added Microchip copyright notice header 2018-08-05 16:15:32 +02:00
wilc_wfi_netdevice.h staging: wilc1000: added Microchip copyright notice header 2018-08-05 16:15:32 +02:00
wilc_wlan.c staging: wilc1000: revert "fix TODO to compile spi and sdio components in single module" 2018-08-27 19:12:59 +02:00
wilc_wlan.h staging: wilc1000: replace ISWILC1000() macro with inline function 2018-08-05 16:15:32 +02:00
wilc_wlan_cfg.c staging: wilc1000: added Microchip copyright notice header 2018-08-05 16:15:32 +02:00
wilc_wlan_cfg.h staging: wilc1000: added Microchip copyright notice header 2018-08-05 16:15:32 +02:00
wilc_wlan_if.h staging: wilc1000: revert "fix TODO to compile spi and sdio components in single module" 2018-08-27 19:12:59 +02:00