mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 10:39:04 +00:00
74d00a8c38
* properly format/comment all patches * merge debloat patches * merge Kconfig patches * merge swconfig patches * merge hotplug patches * drop 200-fix_localversion.patch - upstream * drop 222-arm_zimage_none.patch - unused * drop 252-mv_cesa_depends.patch - no longer required * drop 410-mtd-move-forward-declaration-of-struct-mtd_info.patch - unused * drop 661-fq_codel_keep_dropped_stats.patch - outdated * drop 702-phy_add_aneg_done_function.patch - upstream * drop 840-rtc7301.patch - unused * drop 841-rtc_pt7c4338.patch - upstream * drop 921-use_preinit_as_init.patch - unused * drop spio-gpio-old and gpio-mmc - unused Signed-off-by: John Crispin <john@phrozen.org>
62 lines
2.0 KiB
Diff
62 lines
2.0 KiB
Diff
From 68620e594c250ba8c43a78e77f5296cb9952582e Mon Sep 17 00:00:00 2001
|
|
From: Heiner Kallweit <hkallweit1@gmail.com>
|
|
Date: Wed, 14 Sep 2016 20:54:12 +0200
|
|
Subject: [PATCH] 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>
|
|
---
|
|
drivers/leds/leds-gpio.c | 6 ++----
|
|
include/linux/leds.h | 9 ++++++---
|
|
2 files changed, 8 insertions(+), 7 deletions(-)
|
|
|
|
--- a/drivers/leds/leds-gpio.c
|
|
+++ b/drivers/leds/leds-gpio.c
|
|
@@ -29,8 +29,7 @@ struct gpio_led_data {
|
|
u8 new_level;
|
|
u8 can_sleep;
|
|
u8 blinking;
|
|
- int (*platform_gpio_blink_set)(struct gpio_desc *desc, int state,
|
|
- unsigned long *delay_on, unsigned long *delay_off);
|
|
+ gpio_blink_set_t platform_gpio_blink_set;
|
|
};
|
|
|
|
static void gpio_led_work(struct work_struct *work)
|
|
@@ -88,8 +87,7 @@ static int gpio_blink_set(struct led_cla
|
|
|
|
static int create_gpio_led(const struct gpio_led *template,
|
|
struct gpio_led_data *led_dat, struct device *parent,
|
|
- int (*blink_set)(struct gpio_desc *, int, unsigned long *,
|
|
- unsigned long *))
|
|
+ gpio_blink_set_t blink_set)
|
|
{
|
|
int ret, state;
|
|
|
|
--- a/include/linux/leds.h
|
|
+++ b/include/linux/leds.h
|
|
@@ -330,6 +330,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;
|
|
@@ -352,9 +357,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;
|
|
};
|
|
|
|
struct platform_device *gpio_led_register_device(
|