]> 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)
commita432863c92eaeba7d7a0a973f9fe9ebb8132ce0a
tree98d1d0bb63bac46a58a98052427674998e004abd
parent0a5ad3d8b43dd6a9f85076ff36c4a79d5dce377c
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