[PATCH 18/74] backport: adjust led_trigger_blink*() to v6.5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Gregory Greenman <gregory.greenman@xxxxxxxxx>

The signature of led_trigger_blink_oneshot() and led_trigger_blink()
was changed in v6.5. Adjust to this change.

Signed-off-by: Gregory Greenman <gregory.greenman@xxxxxxxxx>
Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
---
 backport/backport-include/linux/leds.h | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 backport/backport-include/linux/leds.h

diff --git a/backport/backport-include/linux/leds.h b/backport/backport-include/linux/leds.h
new file mode 100644
index 000000000000..3ebae49d3c8b
--- /dev/null
+++ b/backport/backport-include/linux/leds.h
@@ -0,0 +1,25 @@
+#ifndef __BACKPORT_LINUX_LEDS_H
+#define __BACKPORT_LINUX_LEDS_H
+#include_next <linux/leds.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_IS_LESS(6,5,0)
+static inline void backport_led_trigger_blink_oneshot(struct led_trigger *trigger,
+						      unsigned long delay_on,
+						      unsigned long delay_off,
+						      int invert)
+{
+	led_trigger_blink_oneshot(trigger, &delay_on, &delay_off, invert);
+}
+#define led_trigger_blink_oneshot LINUX_BACKPORT(led_trigger_blink_oneshot)
+
+static inline void backport_led_trigger_blink(struct led_trigger *trigger,
+					      unsigned long delay_on,
+					      unsigned long delay_off)
+{
+	led_trigger_blink(trigger, &delay_on, &delay_off);
+}
+#define led_trigger_blink LINUX_BACKPORT(led_trigger_blink)
+#endif /*  < 6.5 */
+
+#endif /* __BACKPORT_LINUX_LEDS_H */
-- 
2.45.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux