[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-backports
Subject:    [PATCH 07/14] header: add led_trigger_remove() prototpye
From:       Hauke Mehrtens <hauke () hauke-m ! de>
Date:       2015-06-28 21:59:13
Message-ID: 1435528760-19913-8-git-send-email-hauke () hauke-m ! de
[Download RAW message or body]

The led_trigger_remove() function is exported on older kernel versions,
but there is no pubic prototype for this function. Now the first driver
makes use of this function and this patch adds the prototype.
There is no LINUX_BACKPORT() guard here because we want it to point to
the original function which is exported normally.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/linux/leds.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/backport/backport-include/linux/leds.h b/backport/backport-include/linux/leds.h
index 22679cf..2044abf 100644
--- a/backport/backport-include/linux/leds.h
+++ b/backport/backport-include/linux/leds.h
@@ -26,6 +26,18 @@
 #define led_set_brightness(_dev, _switch) led_brightness_set(_dev, _switch)
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0) */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+/*
+ * There is no LINUX_BACKPORT() guard here because we want it to point to
+ * the original function which is exported normally.
+ */
+#ifdef CONFIG_LEDS_TRIGGERS
+extern void led_trigger_remove(struct led_classdev *led_cdev);
+#else
+static inline void led_trigger_remove(struct led_classdev *led_cdev) {}
+#endif
+#endif
+
 #include <backport/leds-disabled.h>
 
 #endif /* __BACKPORT_LINUX_LEDS_H */
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe backports" in
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic