package/mac80211: fix led code
[openwrt-working-2016/.git] / package / kernel / mac80211 / patches / 999-fix_led_code.patch
diff --git a/package/kernel/mac80211/patches/999-fix_led_code.patch b/package/kernel/mac80211/patches/999-fix_led_code.patch
new file mode 100644 (file)
index 0000000..0e568d5
--- /dev/null
@@ -0,0 +1,21 @@
+--- a/compat/backport-4.5.c
++++ b/compat/backport-4.5.c
+@@ -8,10 +8,12 @@
+  * published by the Free Software Foundation.
+  */
+-#include <linux/leds.h>
+ #include <linux/export.h>
+ #include <linux/errno.h>
++#ifdef CONFIG_NEW_LEDS
++#include <linux/leds.h>
++
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
+ int led_set_brightness_sync(struct led_classdev *led_cdev,
+                           enum led_brightness value)
+@@ -31,3 +33,4 @@ int led_set_brightness_sync(struct led_c
+ }
+ EXPORT_SYMBOL_GPL(led_set_brightness_sync);
+ #endif /* >= 3.19 */
++#endif /* CONFIG_NEW_LEDS */