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. ... > +static const struct sx931x_info sx9310_info = { > + .name = "sx9310", > + .whoami = SX9310_WHOAMI_VALUE Keep trailing comma. > +}; > + > +static const struct sx931x_info sx9311_info = { > + .name = "sx9311", > + .whoami = SX9311_WHOAMI_VALUE Ditto. > +}; ... Otherwise looks good to me Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> -- With Best Regards, Andy Shevchenko