lkml.org 
[lkml]   [2024]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] leds: lp50xx: Remove an unused field in struct lp50xx
Date
In "struct lp50xx", the 'num_of_banked_leds' field is only written and is
never used.
Moreover, storing such an information in the 'priv' structure looks
pointless.

So, remove it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Compile tested only.
---
drivers/leds/leds-lp50xx.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/leds/leds-lp50xx.c b/drivers/leds/leds-lp50xx.c
index 407eddcf17c0..175d4b06659b 100644
--- a/drivers/leds/leds-lp50xx.c
+++ b/drivers/leds/leds-lp50xx.c
@@ -278,7 +278,6 @@ struct lp50xx_led {
* @dev: pointer to the devices device struct
* @lock: lock for reading/writing the device
* @chip_info: chip specific information (ie num_leds)
- * @num_of_banked_leds: holds the number of banked LEDs
* @leds: array of LED strings
*/
struct lp50xx {
@@ -289,7 +288,6 @@ struct lp50xx {
struct device *dev;
struct mutex lock;
const struct lp50xx_chip_info *chip_info;
- int num_of_banked_leds;

/* This needs to be at the end of the struct */
struct lp50xx_led leds[];
@@ -403,8 +401,6 @@ static int lp50xx_probe_leds(struct fwnode_handle *child, struct lp50xx *priv,
return -EINVAL;
}

- priv->num_of_banked_leds = num_leds;
-
ret = fwnode_property_read_u32_array(child, "reg", led_banks, num_leds);
if (ret) {
dev_err(priv->dev, "reg property is missing\n");
--
2.44.0

\
 
 \ /
  Last update: 2024-04-28 19:25    [W:0.038 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site