From 01026cecf61998ddff76c280e7a710c5b396904e Mon Sep 17 00:00:00 2001 From: Marek BehĂșn Date: Fri, 18 Sep 2020 00:33:29 +0200 Subject: leds: ns2: cosmetic structure rename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename structures: ns2_led -> ns2_led_of_one ns2_led_data -> ns2_led. Signed-off-by: Marek BehĂșn Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij Signed-off-by: Pavel Machek --- drivers/leds/leds-ns2.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'drivers/leds') 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; -- cgit v1.2.3-58-ga151