package/mac80211: fix led code
[openwrt-working-2016/.git] / package / kernel / mac80211 / patches / 999-fix_led_code.patch
1 --- a/compat/backport-4.5.c
2 +++ b/compat/backport-4.5.c
3 @@ -8,10 +8,12 @@
4   * published by the Free Software Foundation.
5   */
6  
7 -#include <linux/leds.h>
8  #include <linux/export.h>
9  #include <linux/errno.h>
10  
11 +#ifdef CONFIG_NEW_LEDS
12 +#include <linux/leds.h>
13 +
14  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
15  int led_set_brightness_sync(struct led_classdev *led_cdev,
16                             enum led_brightness value)
17 @@ -31,3 +33,4 @@ int led_set_brightness_sync(struct led_c
18  }
19  EXPORT_SYMBOL_GPL(led_set_brightness_sync);
20  #endif /* >= 3.19 */
21 +#endif /* CONFIG_NEW_LEDS */