]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: think-lmi: Move pending_reboot_attr to the attributes sysfs dir
authorMark Pearson <markpearson@lenovo.com>
Sat, 17 Jul 2021 14:36:05 +0000 (16:36 +0200)
committerHans de Goede <hdegoede@redhat.com>
Sat, 17 Jul 2021 14:39:55 +0000 (16:39 +0200)
commit62684695d5a768c1be36fcf46237ae1b8adc408a
tree98d1d0bb63bac46a58a98052427674998e004abd
parent6b2cc90ce88c6bcd2c5614eee9dd606be7e49123
platform/x86: think-lmi: Move pending_reboot_attr to the attributes sysfs dir

Move the pending_reboot node under attributes dir where it should live, as
documented in: Documentation/ABI/testing/sysfs-class-firmware-attributes.

Also move the create / remove code to be together with the other code
populating / cleaning the attributes sysfs dir. In the removal path this
is necessary so that the remove is done before the
kset_unregister(tlmi_priv.attribute_kset) call.

Signed-off-by: Mark Pearson <markpearson@lenovo.com>
Co-developed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210717143607.3580-1-hdegoede@redhat.com
drivers/platform/x86/think-lmi.c