Skip to content
Commit 79f960e2 authored by Len Baker's avatar Len Baker Committed by Hans de Goede
Browse files

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLen Baker <len.baker@gmx.com>
Link: https://lore.kernel.org/r/20211023154036.6800-1-len.baker@gmx.com
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent d477a907
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment