Re: [PATCH v6 1/2] iio: light: ltr390: Add ALS channel and support for gain and resolution

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

 



> Hi,
>
> >
> > +static int ltr390_set_mode(struct ltr390_data *data, enum ltr390_mode mode)
> > +{
> > +     if (data->mode == mode)
> > +             return 0;
> > +
> > +     switch (mode) {
> > +     case LTR390_SET_ALS_MODE:
> > +             regmap_clear_bits(data->regmap, LTR390_MAIN_CTRL, LTR390_UVS_MODE);
>
> Should this be:
>         ret = regmap_clear_bits();
>         if (ret)
>                 return ret;
> ?
>
> Otherwise, 0 is returned in all cases and ltr390_read_raw() could be
> simplified.
>
> > +             break;
> > +
> > +     case LTR390_SET_UVS_MODE:
> > +             regmap_set_bits(data->regmap, LTR390_MAIN_CTRL, LTR390_UVS_MODE);
>
> Same.
>
Yeah, I totally missed this. I will make the change and send a v7.
Thank you for pointing it out.




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux