3f93d156d89275674eb87ebd42e3586bad1b7722
[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,11 +8,13 @@
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  #include <linux/fs.h>
11  
12 +#ifdef CONFIG_NEW_LEDS
13 +#include <linux/leds.h>
14 +
15  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
16  int led_set_brightness_sync(struct led_classdev *led_cdev,
17                             enum led_brightness value)
18 @@ -32,6 +34,7 @@ int led_set_brightness_sync(struct led_c
19  }
20  EXPORT_SYMBOL_GPL(led_set_brightness_sync);
21  #endif /* >= 3.19 */
22 +#endif /* CONFIG_NEW_LEDS */
23  
24  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
25  /**