1
0

280-rfkill-stubs.patch 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. allow building of modules depending on RFKILL even if RFKILL is not enabled.
  6. Signed-off-by: John Crispin <john@phrozen.org>
  7. ---
  8. include/linux/rfkill.h | 2 +-
  9. net/Makefile | 2 +-
  10. net/rfkill/Kconfig | 14 +++++++++-----
  11. net/rfkill/Makefile | 2 +-
  12. 4 files changed, 12 insertions(+), 8 deletions(-)
  13. --- a/include/linux/rfkill.h
  14. +++ b/include/linux/rfkill.h
  15. @@ -64,7 +64,7 @@ struct rfkill_ops {
  16. int (*set_block)(void *data, bool blocked);
  17. };
  18. -#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
  19. +#if defined(CONFIG_RFKILL_FULL) || defined(CONFIG_RFKILL_FULL_MODULE)
  20. /**
  21. * rfkill_alloc - allocate rfkill structure
  22. * @name: name of the struct -- the string is not copied internally
  23. --- a/net/Makefile
  24. +++ b/net/Makefile
  25. @@ -52,7 +52,7 @@ obj-$(CONFIG_TIPC) += tipc/
  26. obj-$(CONFIG_NETLABEL) += netlabel/
  27. obj-$(CONFIG_IUCV) += iucv/
  28. obj-$(CONFIG_SMC) += smc/
  29. -obj-$(CONFIG_RFKILL) += rfkill/
  30. +obj-$(CONFIG_RFKILL_FULL) += rfkill/
  31. obj-$(CONFIG_NET_9P) += 9p/
  32. obj-$(CONFIG_CAIF) += caif/
  33. ifneq ($(CONFIG_DCB),)
  34. --- a/net/rfkill/Kconfig
  35. +++ b/net/rfkill/Kconfig
  36. @@ -1,7 +1,11 @@
  37. #
  38. # RF switch subsystem configuration
  39. #
  40. -menuconfig RFKILL
  41. +config RFKILL
  42. + bool
  43. + default y
  44. +
  45. +menuconfig RFKILL_FULL
  46. tristate "RF switch subsystem support"
  47. help
  48. Say Y here if you want to have control over RF switches
  49. @@ -13,19 +17,19 @@ menuconfig RFKILL
  50. # LED trigger support
  51. config RFKILL_LEDS
  52. bool
  53. - depends on RFKILL
  54. + depends on RFKILL_FULL
  55. depends on LEDS_TRIGGERS = y || RFKILL = LEDS_TRIGGERS
  56. default y
  57. config RFKILL_INPUT
  58. bool "RF switch input support" if EXPERT
  59. - depends on RFKILL
  60. + depends on RFKILL_FULL
  61. depends on INPUT = y || RFKILL = INPUT
  62. default y if !EXPERT
  63. config RFKILL_GPIO
  64. tristate "GPIO RFKILL driver"
  65. - depends on RFKILL
  66. + depends on RFKILL_FULL
  67. depends on GPIOLIB || COMPILE_TEST
  68. default n
  69. help
  70. --- a/net/rfkill/Makefile
  71. +++ b/net/rfkill/Makefile
  72. @@ -4,5 +4,5 @@
  73. rfkill-y += core.o
  74. rfkill-$(CONFIG_RFKILL_INPUT) += input.o
  75. -obj-$(CONFIG_RFKILL) += rfkill.o
  76. +obj-$(CONFIG_RFKILL_FULL) += rfkill.o
  77. obj-$(CONFIG_RFKILL_GPIO) += rfkill-gpio.o