platform/x86: thinkpad_acpi: Convert platform driver to use dev_groups
Platform drivers have the option of having the platform core create and remove any needed sysfs attribute files. So take advantage of that and refactor the attributes management to avoid to register them "by hand". Also, due to some attributes are optionals, refactor the code and move the logic inside the "is_visible" callbacks of the attribute_group structures. Suggested-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NLen Baker <len.baker@gmx.com> Link: https://lore.kernel.org/r/20211023154036.6800-1-len.baker@gmx.comReviewed-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com>
Showing
想要评论请 注册 或 登录