From: CMY Date: Fri, 8 Jun 2012 08:46:16 +0000 (+0800) Subject: RK-RFKILL fix bug: build failure if use other board config X-Git-Tag: firefly_0821_release~9112 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0c704d2093436a96deb2329bfdbc32bb363a75da;p=firefly-linux-kernel-4.4.55.git RK-RFKILL fix bug: build failure if use other board config --- diff --git a/arch/arm/configs/rk29_ddr3sdk_defconfig b/arch/arm/configs/rk29_ddr3sdk_defconfig index 4f97bb594024..1319e619a2fd 100755 --- a/arch/arm/configs/rk29_ddr3sdk_defconfig +++ b/arch/arm/configs/rk29_ddr3sdk_defconfig @@ -174,6 +174,7 @@ CONFIG_BT_HCIBCM4325=y CONFIG_BT_AUTOSLEEP=y CONFIG_RFKILL=y # CONFIG_RFKILL_PM is not set +CONFIG_RFKILL_RK=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y # CONFIG_FIRMWARE_IN_KERNEL is not set diff --git a/arch/arm/configs/rk30_sdk_defconfig b/arch/arm/configs/rk30_sdk_defconfig index b892d134c5f7..3796f5fc4f23 100644 --- a/arch/arm/configs/rk30_sdk_defconfig +++ b/arch/arm/configs/rk30_sdk_defconfig @@ -177,6 +177,7 @@ CONFIG_BT_HCIUART_LL=y CONFIG_BT_HCIBCM4325=y CONFIG_BT_AUTOSLEEP=y CONFIG_RFKILL=y +CONFIG_RFKILL_RK=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y # CONFIG_FIRMWARE_IN_KERNEL is not set diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index 8a5b66980c65..452132a5ebde 100755 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c @@ -46,10 +46,6 @@ #include "hci_uart.h" -#ifdef CONFIG_BT_AUTOSLEEP -extern int rfkill_rk_sleep_bt(bool bSleep); -#endif - #define VERSION "2.2" static int reset = 0; @@ -138,8 +134,14 @@ int hci_uart_tx_wakeup(struct hci_uart *hu) restart: clear_bit(HCI_UART_TX_WAKEUP, &hu->tx_state); /*added by Barry,for broadcom 4325*/ -#ifdef CONFIG_BT_AUTOSLEEP - rfkill_rk_sleep_bt(false); +#ifdef CONFIG_BT_AUTOSLEEP +#ifdef CONFIG_RFKILL_RK + extern int rfkill_rk_sleep_bt(bool bSleep); + rfkill_rk_sleep_bt(false); +#else + extern void bcm4325_sleep(unsigned long bSleep); + bcm4325_sleep(0); +#endif #endif while ((skb = hci_uart_dequeue(hu))) { int len; diff --git a/net/rfkill/Kconfig b/net/rfkill/Kconfig index 224786574160..0576cb0a86e8 100644 --- a/net/rfkill/Kconfig +++ b/net/rfkill/Kconfig @@ -54,9 +54,8 @@ config RFKILL_RESET default n config RFKILL_RK - tristate "Rockchips RFKILL driver" + bool "Rockchips RFKILL driver" depends on RFKILL - default y help rockchips rfkill driver for rk29/rk30 diff --git a/net/rfkill/rfkill-rk.c b/net/rfkill/rfkill-rk.c index 31d12b312359..d5815ac06955 100644 --- a/net/rfkill/rfkill-rk.c +++ b/net/rfkill/rfkill-rk.c @@ -75,7 +75,7 @@ enum { // RK29+BCM4329, ÆäwifiÓëbtµÄpower¿ØÖƽÅÊǽÓÔÚÒ»ÆðµÄ // ÔÚ¸øbtϵçʱ£¬ÐèÒªÏÈÅжÏwifi״̬ -#if defined(CONFIG_ARCH_RK29) && defined(CONFIG_BCM4329) +#if defined(CONFIG_BCM4329) #define WIFI_BT_POWER_TOGGLE 1 extern int rk29sdk_bt_power_state; extern int rk29sdk_wifi_power_state;