Hi 2021. január 16., szombat 20:58 keltezéssel, Andy Shevchenko írta: > On Wed, Jan 13, 2021 at 8:23 PM Barnabás Pőcze wrote: > > > > Store the supported features in the driver private data, and modify the > > is_visible() callback to use it, and create ideapad_check_features() to > > populate it. > > ... > > > + struct { > > + bool hw_rfkill_switch : 1, > > Does it make sense? Not to me. > Why not put all of them (I don't like comma and single occurrence of > the type, it may be problematic in the future) as unsigned int, or > something like that? I will add the full declaration for each, with type and semicolon in each line. Would you prefer the type to be `unsigned int` instead of `bool`, or could you clarify what you mean by the second question? > Also, is it okay to have bit fields (I mean from synchronization p.o.v.)? I am fairly certain it is since this bit-field is only ever written in `ideapad_check_features()` which is called from `ideapad_acpi_add()`. Apart from two instances they are only read indirectly by `ideapad_acpi_add()`, and even in those two cases if the values are read as false instead of their real value, it cannot cause significant issues as far as I see. > > > + fan_mode : 1, > > + touchpad_ctrl_via_ec : 1, > > + conservation_mode : 1, > > + fn_lock : 1; > > + } features; > > }; > [...] Regards, Barnabás Pőcze