aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew F. Davis <afd@ti.com>2016-06-21 08:40:11 -0400
committerJacek Anaszewski <j.anaszewski@samsung.com>2016-06-27 02:58:42 -0400
commitfca23e47dfdbcdacaae523f8b87d2240ce056ac1 (patch)
tree7bafdb19dcf4e92bae98f39d27739532e20e298e
parentfed758f6b78a84be4c8e2d944e183bf47daf4cbf (diff)
leds: Add no-op gpio_led_register_device when LED subsystem is disabled
Some systems use 'gpio_led_register_device' to make an in-memory copy of their LED device table so the original can be removed as .init.rodata. When the LED subsystem is not enabled source in the led directory is not built and so this function may be undefined. Fix this here. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
-rw-r--r--include/linux/leds.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 0aa3701f2bf4..8a3b5d29602f 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -387,8 +387,16 @@ struct gpio_led_platform_data {
387 unsigned long *delay_off); 387 unsigned long *delay_off);
388}; 388};
389 389
390#ifdef CONFIG_NEW_LEDS
390struct platform_device *gpio_led_register_device( 391struct platform_device *gpio_led_register_device(
391 int id, const struct gpio_led_platform_data *pdata); 392 int id, const struct gpio_led_platform_data *pdata);
393#else
394static inline struct platform_device *gpio_led_register_device(
395 int id, const struct gpio_led_platform_data *pdata)
396{
397 return 0;
398}
399#endif
392 400
393enum cpu_led_event { 401enum cpu_led_event {
394 CPU_LED_IDLE_START, /* CPU enters idle */ 402 CPU_LED_IDLE_START, /* CPU enters idle */