From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Thu, 28 May 2015 16:35:42 +0200 Subject: [PATCH] staging/wilc1000: fix Kconfig dependencies Message-ID: <2619913.NOTkkZWJir@wuerfel> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org The newly added wilc1000 driver lacks several Kconfig dependencies, resulting in a multitude of randconfig build errors, e.g.: drivers/built-in.o: In function `WILC_WFI_mgmt_tx_cancel_wait': binder.c:(.text+0x12bd28): undefined reference to `cfg80211_remain_on_channel_expired' drivers/built-in.o: In function `WILC_WFI_CfgSetChannel': binder.c:(.text+0x12c9d8): undefined reference to `ieee80211_frequency_to_channel' drivers/built-in.o: In function `WILC_WFI_CfgAlloc': binder.c:(.text+0x132530): undefined reference to `wiphy_new_nm' drivers/built-in.o: In function `wilc_netdev_init': binder.c:(.text+0x1356d0): undefined reference to `register_inetaddr_notifier' drivers/built-in.o: In function `linux_spi_init': binder.c:(.text+0x210a68): undefined reference to `spi_register_driver' This change ensures that we always have at least one of SPI or MMC enabled, and are only able to pick an interface that works. It also adds all the missing dependencies for networking infrastructure (cfg80211, wext, and ipv4). In order to make it readable, I also took the liberty of re-indenting the Kconfig file to the normal conventions. Signed-off-by: Arnd Bergmann diff --git a/drivers/staging/wilc1000/Kconfig b/drivers/staging/wilc1000/Kconfig index 101f908bc9ed..02381521ff7f 100644 --- a/drivers/staging/wilc1000/Kconfig +++ b/drivers/staging/wilc1000/Kconfig @@ -1,55 +1,57 @@ config WILC1000 tristate "WILC1000 support (WiFi only)" + depends on CFG80211 && WEXT_CORE && INET + depends on MMC || SPI ---help--- - This module only support IEEE 802.11n WiFi. + This module only support IEEE 802.11n WiFi. choice prompt "Memory Allocation" depends on WILC1000 default WILC1000_PREALLOCATE_AT_LOADING_DRIVER - config WILC1000_PREALLOCATE_AT_LOADING_DRIVER - bool "Preallocate memory at loading driver" - ---help--- - This choice supports static allocation of the memory - for the receive buffer. The driver will allocate the RX buffer - during initial time. The driver will also free the buffer - by calling network device stop. - - config WILC1000_DYNAMICALLY_ALLOCATE_MEMROY - bool "Dynamically allocate memory in real time" - ---help--- - This choice supports dynamic allocation of the memory - for the receive buffer. The driver will allocate the RX buffer - when it is required. +config WILC1000_PREALLOCATE_AT_LOADING_DRIVER + bool "Preallocate memory at loading driver" + ---help--- + This choice supports static allocation of the memory + for the receive buffer. The driver will allocate the RX buffer + during initial time. The driver will also free the buffer + by calling network device stop. + +config WILC1000_DYNAMICALLY_ALLOCATE_MEMROY + bool "Dynamically allocate memory in real time" + ---help--- + This choice supports dynamic allocation of the memory + for the receive buffer. The driver will allocate the RX buffer + when it is required. endchoice - choice - prompt "Bus Type" - depends on WILC1000 - default WILC1000_SDIO - + prompt "Bus Type" + depends on WILC1000 + default WILC1000_SDIO + config WILC1000_SDIO - bool "SDIO support" - depends on MMC - ---help--- - This module adds support for the SDIO interface of adapters using - WILC chipset. Select this if your platform is using the SDIO bus. + bool "SDIO support" + depends on MMC + ---help--- + This module adds support for the SDIO interface + of adapters using WILC chipset. Select this if + your platform is using the SDIO bus. config WILC1000_SPI - bool "SPI support" - ---help--- - This module adds support for the SPI interface of adapters using - WILC chipset. Select this if your platform is using the SPI bus. + depends on SPI + bool "SPI support" + ---help--- + This module adds support for the SPI interface + of adapters using WILC chipset. Select this if + your platform is using the SPI bus. endchoice - config WILC1000_HW_OOB_INTR - bool "Use out of band interrupt" - depends on WILC1000 && WILC1000_SDIO - default n - ---help--- - If your platform don't recognize SDIO IRQ, connect chipset external IRQ pin - and check this option. Or, Use this to get all interrupts including SDIO interrupts. - + bool "Use out of band interrupt" + depends on WILC1000 && WILC1000_SDIO + default n + ---help--- + If your platform don't recognize SDIO IRQ, connect chipset external IRQ pin + and check this option. Or, Use this to get all interrupts including SDIO interrupts. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753869AbbE1Of4 (ORCPT ); Thu, 28 May 2015 10:35:56 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:60271 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753635AbbE1Ofu (ORCPT ); Thu, 28 May 2015 10:35:50 -0400 From: Arnd Bergmann To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rachel Kim , Johnny Kim , Dean Lee , Chris Park , devel@driverdev.osuosl.org Subject: [PATCH] staging/wilc1000: fix Kconfig dependencies Date: Thu, 28 May 2015 16:35:42 +0200 Message-ID: <2619913.NOTkkZWJir@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:VItzoyVl5Ow4rQgjn5W5IW4RCT53a9tHVPJxFguTpU7Gg3rD7+8 Yn+YcLrm8fTe1JTsih9eNQmawdErNvnN43+AnHv4wvDao8gCL3irBIrTVi82Nyy/tc2cvPO PHnxH9jEJ3AALy/CBLftpeh5d+NhFXue1MQEmcSStBP868aQ/Nf5IcyVC3lnsMG78kfnykm tiEstS3JzVhU9MbOHFshA== X-UI-Out-Filterresults: notjunk:1;V01:K0:6RNR8WK9glU=:zhyy0FSx8deCBb9A663N8l DwKtNV/k1QVr8K02IPxe9P7RjtoQedX97629fmNL3PcMW3tyKVVFpvQzJFD5DDDXReG4ilSf8 PvKty+iDlmzGwLBoYKu80Tk/bDWP5V5rIJVFIBX/EE6MivJdDoPMF0nUweJXxm0coAgN2kvDl g1+fc+yiGgQRsVE5NWETgVzbqlbmcJ6+U5CIcrKPTEiKBkCt0PNWAkJWpRT+dwVH6UAKQAVHw tUe0lADchkS3V3tlVq8XTSO/YEaeBdHIENHYXmjNXeDL5FP4d6ai/+gipe6YgjTDcG7fRbGeC MdknyQjz8MDK/avkjPuBePjB1ZZdADVHU8B734K1IT6Z9vjdticqiy56ICmuq5NUJ6e0C63gy kipT7T2LRt01zU4DWzLCAa/0+IZItMG94sCtwDjF+zti+sE+gzXiNes/OHSiatYDewLzS1VRk tKCc6nH6fXcSAXvfjmVeNGIDqJqfX6sPS8V10wZCytFgHF4bt48Xjyrw+QBGmxHVTABLj7BWv CjZ12ApvxGLRVzcDVR4NBtPZwBq/qfNA1r+3aawlNbVdfojvk34BvUtVJYNU7hniXcl+Gid3V i6EwnLa15gecQ80+WOicnr+mVGCx4RMQWXLWlH/sRbex5mNCZ074/5SCQqz6+1H3omEaMtdoZ yU9ePYUxTIFVsbrPkMhfUAPllxW0npwpiXC+JWxNLBXowkA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The newly added wilc1000 driver lacks several Kconfig dependencies, resulting in a multitude of randconfig build errors, e.g.: drivers/built-in.o: In function `WILC_WFI_mgmt_tx_cancel_wait': binder.c:(.text+0x12bd28): undefined reference to `cfg80211_remain_on_channel_expired' drivers/built-in.o: In function `WILC_WFI_CfgSetChannel': binder.c:(.text+0x12c9d8): undefined reference to `ieee80211_frequency_to_channel' drivers/built-in.o: In function `WILC_WFI_CfgAlloc': binder.c:(.text+0x132530): undefined reference to `wiphy_new_nm' drivers/built-in.o: In function `wilc_netdev_init': binder.c:(.text+0x1356d0): undefined reference to `register_inetaddr_notifier' drivers/built-in.o: In function `linux_spi_init': binder.c:(.text+0x210a68): undefined reference to `spi_register_driver' This change ensures that we always have at least one of SPI or MMC enabled, and are only able to pick an interface that works. It also adds all the missing dependencies for networking infrastructure (cfg80211, wext, and ipv4). In order to make it readable, I also took the liberty of re-indenting the Kconfig file to the normal conventions. Signed-off-by: Arnd Bergmann diff --git a/drivers/staging/wilc1000/Kconfig b/drivers/staging/wilc1000/Kconfig index 101f908bc9ed..02381521ff7f 100644 --- a/drivers/staging/wilc1000/Kconfig +++ b/drivers/staging/wilc1000/Kconfig @@ -1,55 +1,57 @@ config WILC1000 tristate "WILC1000 support (WiFi only)" + depends on CFG80211 && WEXT_CORE && INET + depends on MMC || SPI ---help--- - This module only support IEEE 802.11n WiFi. + This module only support IEEE 802.11n WiFi. choice prompt "Memory Allocation" depends on WILC1000 default WILC1000_PREALLOCATE_AT_LOADING_DRIVER - config WILC1000_PREALLOCATE_AT_LOADING_DRIVER - bool "Preallocate memory at loading driver" - ---help--- - This choice supports static allocation of the memory - for the receive buffer. The driver will allocate the RX buffer - during initial time. The driver will also free the buffer - by calling network device stop. - - config WILC1000_DYNAMICALLY_ALLOCATE_MEMROY - bool "Dynamically allocate memory in real time" - ---help--- - This choice supports dynamic allocation of the memory - for the receive buffer. The driver will allocate the RX buffer - when it is required. +config WILC1000_PREALLOCATE_AT_LOADING_DRIVER + bool "Preallocate memory at loading driver" + ---help--- + This choice supports static allocation of the memory + for the receive buffer. The driver will allocate the RX buffer + during initial time. The driver will also free the buffer + by calling network device stop. + +config WILC1000_DYNAMICALLY_ALLOCATE_MEMROY + bool "Dynamically allocate memory in real time" + ---help--- + This choice supports dynamic allocation of the memory + for the receive buffer. The driver will allocate the RX buffer + when it is required. endchoice - choice - prompt "Bus Type" - depends on WILC1000 - default WILC1000_SDIO - + prompt "Bus Type" + depends on WILC1000 + default WILC1000_SDIO + config WILC1000_SDIO - bool "SDIO support" - depends on MMC - ---help--- - This module adds support for the SDIO interface of adapters using - WILC chipset. Select this if your platform is using the SDIO bus. + bool "SDIO support" + depends on MMC + ---help--- + This module adds support for the SDIO interface + of adapters using WILC chipset. Select this if + your platform is using the SDIO bus. config WILC1000_SPI - bool "SPI support" - ---help--- - This module adds support for the SPI interface of adapters using - WILC chipset. Select this if your platform is using the SPI bus. + depends on SPI + bool "SPI support" + ---help--- + This module adds support for the SPI interface + of adapters using WILC chipset. Select this if + your platform is using the SPI bus. endchoice - config WILC1000_HW_OOB_INTR - bool "Use out of band interrupt" - depends on WILC1000 && WILC1000_SDIO - default n - ---help--- - If your platform don't recognize SDIO IRQ, connect chipset external IRQ pin - and check this option. Or, Use this to get all interrupts including SDIO interrupts. - + bool "Use out of band interrupt" + depends on WILC1000 && WILC1000_SDIO + default n + ---help--- + If your platform don't recognize SDIO IRQ, connect chipset external IRQ pin + and check this option. Or, Use this to get all interrupts including SDIO interrupts.