Skip to content
Commit 679374e4 authored by Michał Kępień's avatar Michał Kępień Committed by Darren Hart (VMware)
Browse files

platform/x86: fujitsu-laptop: allocate fujitsu_bl in acpi_fujitsu_bl_add()



Only allocate memory for struct fujitsu_bl when the FUJ02B1 ACPI device
is present.  Use devm_kzalloc() for allocating memory to simplify
cleanup.

Due to the fact that the power property of the backlight device created
by the backlight driver is accessed from acpi_fujitsu_laptop_add(),
pointer to the allocated memory will remain stored in a module-wide
variable until the backlight driver is extracted into a separate module.

Signed-off-by: default avatarMichał Kępień <kernel@kempniu.pl>
Reviewed-by: default avatarJonathan Woithe <jwoithe@just42.net>
Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
parent 7ec3b54d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment