summaryrefslogtreecommitdiffstats
path: root/ipc/mqueue.c
diff options
context:
space:
mode:
authorMichał Kępień <kernel@kempniu.pl>2017-04-07 15:07:11 +0200
committerDarren Hart (VMware) <dvhart@infradead.org>2017-04-19 12:57:19 -0700
commit81f6821f3f7e231b83dca1fb44bf9ddaa3313421 (patch)
tree95be66176d4b4c4efb7d75a7c00d1dc28b226129 /ipc/mqueue.c
parente33ca45ca8fe130d10dda07391c967a8a3851f3a (diff)
downloadlinux-81f6821f3f7e231b83dca1fb44bf9ddaa3313421.tar.bz2
platform/x86: fujitsu-laptop: switch to managed LED class devices
Use devm_led_classdev_register() for registering LED class devices in order to simplify cleanup and remove LED-related fields with the "_registered" suffix from struct fujitsu_laptop. This also fixes a cleanup bug: with non-managed LED class devices, if e.g. two supported LEDs are detected, the first one gets registered successfully but the second one does not, acpi_fujitsu_laptop_add() will return an error, but the successfully registered LED will never get unregistered. Change the parent device for LED class devices to the FUJ02E3 ACPI device due to this being the logically correct relationship as LED class devices do not depend on any facility provided by the platform device registered by fujitsu-laptop, which was their parent until now. Each managed LED class device is automatically unregistered when the last reference to its parent device is dropped. Taking the parent change described above into account, LED class devices registered by fujitsu-laptop will be unregistered after acpi_fujitsu_laptop_remove() is called. During unregistration, LED brightness is reset to LED_OFF by LED core, so do not set the acpi_handle field of struct fujitsu_laptop to NULL inside acpi_fujitsu_laptop_remove() to prevent call_fext_func() from generating errors upon module removal. Signed-off-by: Michał Kępień <kernel@kempniu.pl> Reviewed-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Diffstat (limited to 'ipc/mqueue.c')
0 files changed, 0 insertions, 0 deletions