Skip to content

Commit

Permalink
platform/x86: thinkpad_acpi: Convert platform driver to use dev_groups
Browse files Browse the repository at this point in the history
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Len Baker <len.baker@gmx.com>
Link: https://lore.kernel.org/r/20211023154036.6800-1-len.baker@gmx.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  • Loading branch information
Len Baker authored and Hans de Goede committed Nov 16, 2021
1 parent d477a90 commit 79f960e
Showing 1 changed file with 243 additions and 283 deletions.
Loading

0 comments on commit 79f960e

Please sign in to comment.