Hi Biju, On Sun, Aug 20, 2023 at 7:12 PM Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote: > Convert enum->pointer for data in the match tables, so that > device_get_match_data() can do match against OF/ACPI/I2C tables, once i2c > bus type match support added to it and it returns NULL for non-match. > > Therefore it is better to convert enum->pointer for data match and extend > match support for both ID and OF tables using i2c_get_match_data() by > adding struct sbs_data with flags variable and replacing flags->data in > struct sbs_info. > > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx> Thanks for your patch! > --- a/drivers/power/supply/sbs-battery.c > +++ b/drivers/power/supply/sbs-battery.c > @@ -201,6 +201,10 @@ static const enum power_supply_property string_properties[] = { > > #define NR_STRING_BUFFERS ARRAY_SIZE(string_properties) > > +struct sbs_data { > + u32 flags; > +}; Unless you plan to add more members to struct sbs_data, I see no point in this patch: it only increases kernel size. The various "data" members in <foo>_id structures are intended to contain either a pointer or a single integral value. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds