kernel : Bump to 4.14.325
[librecmc/librecmc.git] / target / linux / generic / hack-4.14 / 280-rfkill-stubs.patch
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
5
6 allow building of modules depending on RFKILL even if RFKILL is not enabled.
7
8 Signed-off-by: John Crispin <john@phrozen.org>
9 ---
10  include/linux/rfkill.h |  2 +-
11  net/Makefile           |  2 +-
12  net/rfkill/Kconfig     | 14 +++++++++-----
13  net/rfkill/Makefile    |  2 +-
14  4 files changed, 12 insertions(+), 8 deletions(-)
15
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);
20  };
21  
22 -#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
23 +#if defined(CONFIG_RFKILL_FULL) || defined(CONFIG_RFKILL_FULL_MODULE)
24  /**
25   * rfkill_alloc - allocate rfkill structure
26   * @name: name of the struct -- the string is not copied internally
27 --- a/net/Makefile
28 +++ b/net/Makefile
29 @@ -52,7 +52,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
40 @@ -1,7 +1,11 @@
41  #
42  # RF switch subsystem configuration
43  #
44 -menuconfig RFKILL
45 +config RFKILL
46 +       bool
47 +       default y
48 +
49 +menuconfig RFKILL_FULL
50         tristate "RF switch subsystem support"
51         help
52           Say Y here if you want to have control over RF switches
53 @@ -13,19 +17,19 @@ menuconfig RFKILL
54  # LED trigger support
55  config RFKILL_LEDS
56         bool
57 -       depends on RFKILL
58 +       depends on RFKILL_FULL
59         depends on LEDS_TRIGGERS = y || RFKILL = LEDS_TRIGGERS
60         default y
61  
62  config RFKILL_INPUT
63         bool "RF switch input support" if EXPERT
64 -       depends on RFKILL
65 +       depends on RFKILL_FULL
66         depends on INPUT = y || RFKILL = INPUT
67         default y if !EXPERT
68  
69  config RFKILL_GPIO
70         tristate "GPIO RFKILL driver"
71 -       depends on RFKILL
72 +       depends on RFKILL_FULL
73         depends on GPIOLIB || COMPILE_TEST
74         default n
75         help
76 --- a/net/rfkill/Makefile
77 +++ b/net/rfkill/Makefile
78 @@ -4,5 +4,5 @@
79  
80  rfkill-y                       += core.o
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