1 From 236c1acdfef5958010ac9814a9872e0a46fd78ee Mon Sep 17 00:00:00 2001
2 From: John Crispin <john@phrozen.org>
3 Date: Fri, 7 Jul 2017 17:13:44 +0200
4 Subject: rfkill: add fake rfkill support
6 allow building of modules depending on RFKILL even if RFKILL is not enabled.
8 Signed-off-by: John Crispin <john@phrozen.org>
10 include/linux/rfkill.h | 2 +-
12 net/rfkill/Kconfig | 14 +++++++++-----
13 net/rfkill/Makefile | 2 +-
14 4 files changed, 12 insertions(+), 8 deletions(-)
16 --- a/include/linux/rfkill.h
17 +++ b/include/linux/rfkill.h
18 @@ -64,7 +64,7 @@ struct rfkill_ops {
19 int (*set_block)(void *data, bool blocked);
22 -#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
23 +#if defined(CONFIG_RFKILL_FULL) || defined(CONFIG_RFKILL_FULL_MODULE)
25 * rfkill_alloc - allocate rfkill structure
26 * @name: name of the struct -- the string is not copied internally
29 @@ -53,7 +53,7 @@ obj-$(CONFIG_TIPC) += tipc/
30 obj-$(CONFIG_NETLABEL) += netlabel/
31 obj-$(CONFIG_IUCV) += iucv/
32 obj-$(CONFIG_SMC) += smc/
33 -obj-$(CONFIG_RFKILL) += rfkill/
34 +obj-$(CONFIG_RFKILL_FULL) += rfkill/
35 obj-$(CONFIG_NET_9P) += 9p/
36 obj-$(CONFIG_CAIF) += caif/
37 ifneq ($(CONFIG_DCB),)
38 --- a/net/rfkill/Kconfig
39 +++ b/net/rfkill/Kconfig
42 # RF switch subsystem configuration
49 +menuconfig RFKILL_FULL
50 tristate "RF switch subsystem support"
52 Say Y here if you want to have control over RF switches
53 @@ -13,19 +17,19 @@ menuconfig RFKILL
58 + depends on RFKILL_FULL
59 depends on LEDS_TRIGGERS = y || RFKILL = LEDS_TRIGGERS
63 bool "RF switch input support" if EXPERT
65 + depends on RFKILL_FULL
66 depends on INPUT = y || RFKILL = INPUT
70 tristate "GPIO RFKILL driver"
72 + depends on RFKILL_FULL
73 depends on GPIOLIB || COMPILE_TEST
76 --- a/net/rfkill/Makefile
77 +++ b/net/rfkill/Makefile
81 rfkill-$(CONFIG_RFKILL_INPUT) += input.o
82 -obj-$(CONFIG_RFKILL) += rfkill.o
83 +obj-$(CONFIG_RFKILL_FULL) += rfkill.o
84 obj-$(CONFIG_RFKILL_GPIO) += rfkill-gpio.o