summaryrefslogtreecommitdiff
path: root/include/linux/sunrpc/gss_err.h
diff options
context:
space:
mode:
authorMichał Kępień <kernel@kempniu.pl>2017-05-19 09:44:47 +0200
committerDarren Hart (VMware) <dvhart@infradead.org>2017-06-03 12:04:43 -0700
commita823f8e757a90ff5697fd9346c2dd0ede0083e89 (patch)
tree42636a039672c00f1d4101d57269ea407fdf0ba4 /include/linux/sunrpc/gss_err.h
parent84631e0c8b90411b424682eec4084006fae3f2cc (diff)
downloadlinux-a823f8e757a90ff5697fd9346c2dd0ede0083e89.tar.gz
linux-a823f8e757a90ff5697fd9346c2dd0ede0083e89.tar.xz
platform/x86: fujitsu-laptop: use device-specific data in LED-related code
In order to perform their duties, all LED callbacks need a pointer to the struct acpi_device representing the FUJ02E3 ACPI device. To limit the use of the module-wide pointer, the same pointer should be extracted from data that gets passed to LED callbacks as arguments. However, LED core does not currently support supplying driver-specific pointers to struct led_classdev callbacks, so the latter have to be implemented a bit differently than backlight device callbacks and platform device attribute callbacks. As the FUJ02E3 ACPI device is the parent device of all LED class devices registered by fujitsu-laptop, struct acpi_device representing the former can be extracted by following the parent link present inside the struct device belonging to the struct led_classdev passed as an argument to each LED callback. To get rid of module-wide structures defining LED class devices, allocate them dynamically using devm_kzalloc() and initialize them in acpi_fujitsu_laptop_leds_register(). 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 'include/linux/sunrpc/gss_err.h')
0 files changed, 0 insertions, 0 deletions