summaryrefslogtreecommitdiff
path: root/include/linux/leds.h
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2016-09-14 20:54:12 +0200
committerJacek Anaszewski <j.anaszewski@samsung.com>2016-09-15 16:49:39 +0200
commit68620e594c250ba8c43a78e77f5296cb9952582e (patch)
tree83008f88475baeb8be9b58baa8d0e35854607eb6 /include/linux/leds.h
parentbe4fdf99fa4dc95aa01144b207caf2cc9fa074d8 (diff)
leds: gpio: introduce gpio_blink_set_t
Introduce a typedef gpio_blink_set_t to improve readability of the code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Diffstat (limited to 'include/linux/leds.h')
-rw-r--r--include/linux/leds.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 8a3b5d29602f..ddfcb2df3656 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -359,6 +359,11 @@ struct led_platform_data {
struct led_info *leds;
};
+struct gpio_desc;
+typedef int (*gpio_blink_set_t)(struct gpio_desc *desc, int state,
+ unsigned long *delay_on,
+ unsigned long *delay_off);
+
/* For the leds-gpio driver */
struct gpio_led {
const char *name;
@@ -382,9 +387,7 @@ struct gpio_led_platform_data {
#define GPIO_LED_NO_BLINK_LOW 0 /* No blink GPIO state low */
#define GPIO_LED_NO_BLINK_HIGH 1 /* No blink GPIO state high */
#define GPIO_LED_BLINK 2 /* Please, blink */
- int (*gpio_blink_set)(struct gpio_desc *desc, int state,
- unsigned long *delay_on,
- unsigned long *delay_off);
+ gpio_blink_set_t gpio_blink_set;
};
#ifdef CONFIG_NEW_LEDS