Re: [PATCH v2 13/24] platform/x86: ideapad-laptop: rework is_visible() logic

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

 



On Wed, Jan 13, 2021 at 8:23 PM Barnabás Pőcze <pobrn@xxxxxxxxxxxxxx> 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?
Also, is it okay to have bit fields (I mean from synchronization p.o.v.)?

> +                    fan_mode             : 1,
> +                    touchpad_ctrl_via_ec : 1,
> +                    conservation_mode    : 1,
> +                    fn_lock              : 1;
> +       } features;
>  };

-- 
With Best Regards,
Andy Shevchenko




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux