Commit dd66d058 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Lee Jones

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/a0d472ff587d13a2b91ec32c8776061019caab6a.1714324500.git.christophe.jaillet@wanadoo.frSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent 221db018
...@@ -278,7 +278,6 @@ struct lp50xx_led { ...@@ -278,7 +278,6 @@ struct lp50xx_led {
* @dev: pointer to the devices device struct * @dev: pointer to the devices device struct
* @lock: lock for reading/writing the device * @lock: lock for reading/writing the device
* @chip_info: chip specific information (ie num_leds) * @chip_info: chip specific information (ie num_leds)
* @num_of_banked_leds: holds the number of banked LEDs
* @leds: array of LED strings * @leds: array of LED strings
*/ */
struct lp50xx { struct lp50xx {
...@@ -289,7 +288,6 @@ struct lp50xx { ...@@ -289,7 +288,6 @@ struct lp50xx {
struct device *dev; struct device *dev;
struct mutex lock; struct mutex lock;
const struct lp50xx_chip_info *chip_info; const struct lp50xx_chip_info *chip_info;
int num_of_banked_leds;
/* This needs to be at the end of the struct */ /* This needs to be at the end of the struct */
struct lp50xx_led leds[]; struct lp50xx_led leds[];
...@@ -403,8 +401,6 @@ static int lp50xx_probe_leds(struct fwnode_handle *child, struct lp50xx *priv, ...@@ -403,8 +401,6 @@ static int lp50xx_probe_leds(struct fwnode_handle *child, struct lp50xx *priv,
return -EINVAL; return -EINVAL;
} }
priv->num_of_banked_leds = num_leds;
ret = fwnode_property_read_u32_array(child, "reg", led_banks, num_leds); ret = fwnode_property_read_u32_array(child, "reg", led_banks, num_leds);
if (ret) { if (ret) {
dev_err(priv->dev, "reg property is missing\n"); dev_err(priv->dev, "reg property is missing\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment