diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2020-09-18 00:33:29 +0200 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2020-09-26 21:56:41 +0200 |
commit | 01026cecf61998ddff76c280e7a710c5b396904e (patch) | |
tree | 7ade9ce8adf3a6ac04791b65bc797a52292bdb53 /drivers/leds/leds-ns2.c | |
parent | leds: ns2: use devres API for getting GPIO descriptors (diff) | |
download | linux-01026cecf61998ddff76c280e7a710c5b396904e.tar.xz linux-01026cecf61998ddff76c280e7a710c5b396904e.zip |
leds: ns2: cosmetic structure rename
Rename structures:
ns2_led -> ns2_led_of_one
ns2_led_data -> ns2_led.
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
Cc: Simon Guinot <simon.guinot@sequanux.org>
Cc: Simon Guinot <sguinot@lacie.com>
Cc: Vincent Donnefort <vdonnefort@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds/leds-ns2.c')
-rw-r--r-- | drivers/leds/leds-ns2.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/leds/leds-ns2.c b/drivers/leds/leds-ns2.c index fa06ab40ee14..6dba6208433c 100644 --- a/drivers/leds/leds-ns2.c +++ b/drivers/leds/leds-ns2.c @@ -30,7 +30,7 @@ struct ns2_led_modval { int slow_level; }; -struct ns2_led { +struct ns2_led_of_one { const char *name; const char *default_trigger; struct gpio_desc *cmd; @@ -40,8 +40,8 @@ struct ns2_led { }; struct ns2_led_of { - int num_leds; - struct ns2_led *leds; + int num_leds; + struct ns2_led_of_one *leds; }; /* @@ -51,7 +51,7 @@ struct ns2_led_of { * for the command/slow GPIOs corresponds to a LED mode. */ -struct ns2_led_data { +struct ns2_led { struct led_classdev cdev; struct gpio_desc *cmd; struct gpio_desc *slow; @@ -62,7 +62,7 @@ struct ns2_led_data { struct ns2_led_modval *modval; }; -static int ns2_led_get_mode(struct ns2_led_data *led_dat, +static int ns2_led_get_mode(struct ns2_led *led_dat, enum ns2_led_modes *mode) { int i; @@ -85,7 +85,7 @@ static int ns2_led_get_mode(struct ns2_led_data *led_dat, return ret; } -static void ns2_led_set_mode(struct ns2_led_data *led_dat, +static void ns2_led_set_mode(struct ns2_led *led_dat, enum ns2_led_modes mode) { int i; @@ -121,8 +121,8 @@ exit_unlock: static void ns2_led_set(struct led_classdev *led_cdev, enum led_brightness value) { - struct ns2_led_data *led_dat = - container_of(led_cdev, struct ns2_led_data, cdev); + struct ns2_led *led_dat = + container_of(led_cdev, struct ns2_led, cdev); enum ns2_led_modes mode; if (value == LED_OFF) @@ -147,8 +147,8 @@ static ssize_t ns2_led_sata_store(struct device *dev, const char *buff, size_t count) { struct led_classdev *led_cdev = dev_get_drvdata(dev); - struct ns2_led_data *led_dat = - container_of(led_cdev, struct ns2_led_data, cdev); + struct ns2_led *led_dat = + container_of(led_cdev, struct ns2_led, cdev); int ret; unsigned long enable; @@ -179,8 +179,8 @@ static ssize_t ns2_led_sata_show(struct device *dev, struct device_attribute *attr, char *buf) { struct led_classdev *led_cdev = dev_get_drvdata(dev); - struct ns2_led_data *led_dat = - container_of(led_cdev, struct ns2_led_data, cdev); + struct ns2_led *led_dat = + container_of(led_cdev, struct ns2_led, cdev); return sprintf(buf, "%d\n", led_dat->sata); } @@ -194,8 +194,8 @@ static struct attribute *ns2_led_attrs[] = { ATTRIBUTE_GROUPS(ns2_led); static int -create_ns2_led(struct platform_device *pdev, struct ns2_led_data *led_dat, - const struct ns2_led *template) +create_ns2_led(struct platform_device *pdev, struct ns2_led *led_dat, + const struct ns2_led_of_one *template) { int ret; enum ns2_led_modes mode; @@ -231,7 +231,7 @@ create_ns2_led(struct platform_device *pdev, struct ns2_led_data *led_dat, } static int ns2_leds_parse_one(struct device *dev, struct device_node *np, - struct ns2_led *led) + struct ns2_led_of_one *led) { struct ns2_led_modval *modval; int nmodes, ret, i; @@ -289,7 +289,7 @@ ns2_leds_parse_of(struct device *dev, struct ns2_led_of *ofdata) { struct device_node *np = dev_of_node(dev); struct device_node *child; - struct ns2_led *led, *leds; + struct ns2_led_of_one *led, *leds; int ret, num_leds = 0; num_leds = of_get_available_child_count(np); @@ -325,7 +325,7 @@ MODULE_DEVICE_TABLE(of, of_ns2_leds_match); static int ns2_led_probe(struct platform_device *pdev) { struct ns2_led_of *ofdata; - struct ns2_led_data *leds; + struct ns2_led *leds; int i; int ret; |