Skip to content

Commit dd66d05

Browse files
tititiou36lag-linaro
authored andcommitted
leds: lp50xx: Remove unused field 'num_of_banked_leds' from 'struct lp50xx'
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> Link: https://lore.kernel.org/r/a0d472ff587d13a2b91ec32c8776061019caab6a.1714324500.git.christophe.jaillet@wanadoo.fr Signed-off-by: Lee Jones <lee@kernel.org>
1 parent 221db01 commit dd66d05

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/leds/leds-lp50xx.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ struct lp50xx_led {
278278
* @dev: pointer to the devices device struct
279279
* @lock: lock for reading/writing the device
280280
* @chip_info: chip specific information (ie num_leds)
281-
* @num_of_banked_leds: holds the number of banked LEDs
282281
* @leds: array of LED strings
283282
*/
284283
struct lp50xx {
@@ -289,7 +288,6 @@ struct lp50xx {
289288
struct device *dev;
290289
struct mutex lock;
291290
const struct lp50xx_chip_info *chip_info;
292-
int num_of_banked_leds;
293291

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

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

0 commit comments

Comments
 (0)