008-led_default.patch 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. --- a/config.mk
  2. +++ b/config.mk
  3. @@ -132,7 +132,7 @@ CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstr
  4. CONFIG_MAC80211_RC_PID=y
  5. CONFIG_MAC80211_RC_MINSTREL=y
  6. CONFIG_MAC80211_RC_MINSTREL_HT=y
  7. -CONFIG_MAC80211_LEDS=y
  8. +# CONFIG_MAC80211_LEDS=y
  9. # enable mesh networking too
  10. CONFIG_MAC80211_MESH=y
  11. @@ -240,7 +240,7 @@ CONFIG_B43_PCI_AUTOSELECT=y
  12. ifdef CONFIG_PCMCIA
  13. CONFIG_B43_PCMCIA=y
  14. endif #CONFIG_PCMCIA
  15. -CONFIG_B43_LEDS=y
  16. +# CONFIG_B43_LEDS=y
  17. CONFIG_B43_PHY_LP=y
  18. CONFIG_B43_NPHY=y
  19. # CONFIG_B43_FORCE_PIO=y
  20. @@ -249,7 +249,7 @@ CONFIG_B43_NPHY=y
  21. CONFIG_B43LEGACY=m
  22. CONFIG_B43LEGACY_HWRNG=y
  23. CONFIG_B43LEGACY_PCI_AUTOSELECT=y
  24. -CONFIG_B43LEGACY_LEDS=y
  25. +# CONFIG_B43LEGACY_LEDS=y
  26. # CONFIG_B43LEGACY_DEBUG=y
  27. CONFIG_B43LEGACY_DMA=y
  28. CONFIG_B43LEGACY_PIO=y
  29. @@ -544,7 +544,7 @@ endif
  30. # p54
  31. CONFIG_P54_COMMON=m
  32. -CONFIG_P54_LEDS=y
  33. +# CONFIG_P54_LEDS=y
  34. # Atheros
  35. CONFIG_ATH_COMMON=m
  36. --- a/drivers/net/wireless/ath/ath9k/gpio.c
  37. +++ b/drivers/net/wireless/ath/ath9k/gpio.c
  38. @@ -54,6 +54,7 @@ static void ath_led_blink_work(struct wo
  39. sc->sc_flags |= SC_OP_LED_ON;
  40. }
  41. +#ifdef CONFIG_LEDS_CLASS
  42. static void ath_led_brightness(struct led_classdev *led_cdev,
  43. enum led_brightness brightness)
  44. {
  45. @@ -90,10 +91,12 @@ static void ath_led_brightness(struct le
  46. break;
  47. }
  48. }
  49. +#endif
  50. static int ath_register_led(struct ath_softc *sc, struct ath_led *led,
  51. char *trigger)
  52. {
  53. +#ifdef CONFIG_LEDS_CLASS
  54. int ret;
  55. led->sc = sc;
  56. @@ -108,14 +111,19 @@ static int ath_register_led(struct ath_s
  57. else
  58. led->registered = 1;
  59. return ret;
  60. +#else
  61. + return 0;
  62. +#endif
  63. }
  64. static void ath_unregister_led(struct ath_led *led)
  65. {
  66. +#ifdef CONFIG_LEDS_CLASS
  67. if (led->registered) {
  68. led_classdev_unregister(&led->led_cdev);
  69. led->registered = 0;
  70. }
  71. +#endif
  72. }
  73. void ath_deinit_leds(struct ath_softc *sc)
  74. --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
  75. +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
  76. @@ -822,6 +822,7 @@ static void ath9k_led_brightness_work(st
  77. }
  78. }
  79. +#ifdef CONFIG_LEDS_CLASS
  80. static void ath9k_led_brightness(struct led_classdev *led_cdev,
  81. enum led_brightness brightness)
  82. {
  83. @@ -833,6 +834,7 @@ static void ath9k_led_brightness(struct
  84. ieee80211_queue_delayed_work(priv->hw,
  85. &led->brightness_work, 0);
  86. }
  87. +#endif
  88. static void ath9k_led_stop_brightness(struct ath9k_htc_priv *priv)
  89. {
  90. @@ -845,6 +847,7 @@ static void ath9k_led_stop_brightness(st
  91. static int ath9k_register_led(struct ath9k_htc_priv *priv, struct ath_led *led,
  92. char *trigger)
  93. {
  94. +#ifdef CONFIG_LEDS_CLASS
  95. int ret;
  96. led->priv = priv;
  97. @@ -862,14 +865,19 @@ static int ath9k_register_led(struct ath
  98. INIT_DELAYED_WORK(&led->brightness_work, ath9k_led_brightness_work);
  99. return ret;
  100. +#else
  101. + return 0;
  102. +#endif
  103. }
  104. static void ath9k_unregister_led(struct ath_led *led)
  105. {
  106. +#ifdef CONFIG_LEDS_CLASS
  107. if (led->registered) {
  108. led_classdev_unregister(&led->led_cdev);
  109. led->registered = 0;
  110. }
  111. +#endif
  112. }
  113. void ath9k_deinit_leds(struct ath9k_htc_priv *priv)