Re: [PATCH 2/2] leds: bd2606mvv: Driver for the Rohm 6 Channel i2c LED driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 6 Apr 2023 11:57:15 +0300
Matti Vaittinen <mazziesaccount@xxxxxxxxx> wrote:

[...]

> 
> > + */
> > +
> > +#include <linux/i2c.h>
> > +#include <linux/leds.h>
> > +#include <linux/module.h>
> > +#include <linux/of.h>
> > +#include <linux/of_device.h>
> > +#include <linux/regmap.h>
> > +#include <linux/slab.h>
> > +
> > +#define BD2606_MAX_LEDS 6
> > +#define BD2606_MAX_BRIGHTNESS 63
> > +#define BD2606_REG_PWRCNT 3
> > +#define ldev_to_led(c)	container_of(c, struct bd2606mvv_led, ldev)
> > +
> > +struct bd2606mvv_led {
> > +	bool active;  
> 
> I didn't spot where this 'active' was used?
> 
[..]

> > +		if (reg < 0 || reg >= BD2606_MAX_LEDS ||
> > +		    priv->leds[reg].active) {

here

> > +			of_node_put(child);
> > +			return -EINVAL;
> > +		}
> > +		led = &priv->leds[reg];
> > +
> > +		led->active = true;

and here

Regards,
Andreas



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux