From 0ead4b6531553bccaddf698722e8c7b5bfd6f485 Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Fri, 22 Jul 2022 19:14:52 +0800 Subject: [PATCH] net: rfkill: rk: Add stub for rfkill_get_wifi_power_state() when CONFIG_RFKILL_RK=n Signed-off-by: Kever Yang Signed-off-by: Jon Lin Change-Id: I15897f8421e7f00b08170f428179c82b969e36fd --- include/linux/rfkill-wlan.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/rfkill-wlan.h b/include/linux/rfkill-wlan.h index 431e71a7a844..c1987c316794 100644 --- a/include/linux/rfkill-wlan.h +++ b/include/linux/rfkill-wlan.h @@ -46,7 +46,14 @@ struct rksdmmc_gpio_wifi_moudle { struct clk *ext_clk; }; +#if IS_REACHABLE(CONFIG_RFKILL_RK) int rfkill_get_wifi_power_state(int *power); +#else +static inline int rfkill_get_wifi_power_state(int *power) +{ + return -1; +} +#endif void *rockchip_mem_prealloc(int section, unsigned long size); int rfkill_set_wifi_bt_power(int on); int rockchip_wifi_power(int on);