diff mbox series

[v1,6/7] leds: lp50xx: Add missed bits.h and convert to BIT()

Message ID 20210216155050.29322-6-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v1,1/7] leds: lp50xx: Don't spam logs when probe is deferred | expand

Commit Message

Andy Shevchenko Feb. 16, 2021, 3:50 p.m. UTC
Add missed bits.h and convert to BIT() in lp50xx_set_banks().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/leds/leds-lp50xx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Pavel Machek Feb. 19, 2021, 11:27 a.m. UTC | #1
Hi!

> Add missed bits.h and convert to BIT() in lp50xx_set_banks().

> 

> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>


Thanks, I applied whole series except this one...

<< is well known C, it can stay.

Best regards,
							Pavel
-- 
http://www.livejournal.com/~pavelmachek
Andy Shevchenko Feb. 19, 2021, 1:42 p.m. UTC | #2
On Fri, Feb 19, 2021 at 12:27:55PM +0100, Pavel Machek wrote:
> Hi!

> 

> > Add missed bits.h and convert to BIT() in lp50xx_set_banks().

> > 

> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> 

> Thanks,


Thanks!

>	I applied whole series except this one...

> 

> << is well known C, it can stay.


Shall we drop BIT() in the other place?
Otherwise it is inconsistency.


-- 
With Best Regards,
Andy Shevchenko
diff mbox series

Patch

diff --git a/drivers/leds/leds-lp50xx.c b/drivers/leds/leds-lp50xx.c
index 2b4981b5778d..0c6a5a9dd162 100644
--- a/drivers/leds/leds-lp50xx.c
+++ b/drivers/leds/leds-lp50xx.c
@@ -2,6 +2,7 @@ 
 // TI LP50XX LED chip family driver
 // Copyright (C) 2018-20 Texas Instruments Incorporated - https://www.ti.com/
 
+#include <linux/bits.h>
 #include <linux/gpio/consumer.h>
 #include <linux/i2c.h>
 #include <linux/init.h>
@@ -357,7 +358,7 @@  static int lp50xx_set_banks(struct lp50xx *priv, u32 led_banks[])
 
 	for (i = 0; i < priv->chip_info->max_modules; i++) {
 		if (led_banks[i])
-			bank_enable_mask |= (1 << led_banks[i]);
+			bank_enable_mask |= BIT(led_banks[i]);
 	}
 
 	led_config_lo = bank_enable_mask;