RE: [PATCH] iio: proximity: sx9310: Convert enum->pointer for match data table

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

 



Hi Andy,

Thanks for the feedback.

> Subject: Re: [PATCH] iio: proximity: sx9310: Convert enum->pointer for
> match data table
> 
> On Sat, Aug 12, 2023 at 4:01 PM Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> wrote:
> >
> > Convert enum->pointer for data in match data table, so that
> > device_get_match_data() can do match against OF/ACPI/I2C tables, once
> > i2c bus type match support added to it.
> >
> > Add struct sx931x_info and replace enum->sx931x_info in the match
> > table and simplify sx9310_check_whoami().
> 
> ...
> 
> > +       ddata = device_get_match_data(dev);
> > +       if (ddata->whoami != whoami)
> >                 return -EINVAL;
> 
> -ENODEV looks better.

OK.

> 
> ...
> 
> > +static const struct sx931x_info sx9310_info = {
> > +       .name = "sx9310",
> > +       .whoami = SX9310_WHOAMI_VALUE
> 
> Keep trailing comma.

OK.

> 
> > +};
> > +
> > +static const struct sx931x_info sx9311_info = {
> > +       .name = "sx9311",
> > +       .whoami = SX9311_WHOAMI_VALUE
> 
> Ditto.

OK.

Will fix this in next version, if there is no objections.

Cheers,
Biju

> 
> > +};
> 
> ...
> 
> Otherwise looks good to me
> Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
> 
> --
> With Best Regards,
> Andy Shevchenko




[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