[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230406214539.59dfaac7@aktux>
Date: Thu, 6 Apr 2023 21:45:39 +0200
From: Andreas Kemnade <andreas@...nade.info>
To: Matti Vaittinen <mazziesaccount@...il.com>
Cc: pavel@....cz, lee@...nel.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, linux-leds@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
hns@...delico.com
Subject: Re: [PATCH 2/2] leds: bd2606mvv: Driver for the Rohm 6 Channel i2c
LED driver
On Thu, 6 Apr 2023 11:57:15 +0300
Matti Vaittinen <mazziesaccount@...il.com> 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
Powered by blists - more mailing lists