lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200917223338.14164-42-marek.behun@nic.cz>
Date:   Fri, 18 Sep 2020 00:33:29 +0200
From:   Marek Behún <marek.behun@....cz>
To:     linux-leds@...r.kernel.org
Cc:     Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>,
        Ondřej Jirman <megous@...ous.com>,
        linux-kernel@...r.kernel.org, Rob Herring <robh+dt@...nel.org>,
        devicetree@...r.kernel.org,
        Marek Behún <marek.behun@....cz>,
        Simon Guinot <simon.guinot@...uanux.org>,
        Simon Guinot <sguinot@...ie.com>,
        Vincent Donnefort <vdonnefort@...il.com>,
        Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
        Linus Walleij <linus.walleij@...aro.org>
Subject: [PATCH leds v2 41/50] 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@....cz>
Cc: Simon Guinot <simon.guinot@...uanux.org>
Cc: Simon Guinot <sguinot@...ie.com>
Cc: Vincent Donnefort <vdonnefort@...il.com>
Cc: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
Cc: Linus Walleij <linus.walleij@...aro.org>
---
 drivers/leds/leds-ns2.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/leds/leds-ns2.c b/drivers/leds/leds-ns2.c
index fa06ab40ee143..6dba6208433ca 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 @@ static void ns2_led_set_mode(struct ns2_led_data *led_dat,
 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;
 
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ