platform/x86: fujitsu-laptop: only register platform device if FUJ02E3 is present
authorMichał Kępień <kernel@kempniu.pl>
Tue, 14 Mar 2017 10:26:30 +0000 (11:26 +0100)
committerDarren Hart (VMware) <dvhart@infradead.org>
Thu, 23 Mar 2017 16:03:23 +0000 (09:03 -0700)
commitc33f4c044d2bb99bb42e1315ede267843dd81d4a
tree53227415e716ee674dc76fc32d0060d08c31a276
parentd811b511c18d9349a3880a4a7fff4c9c1169ac03
platform/x86: fujitsu-laptop: only register platform device if FUJ02E3 is present

The platform device registered by fujitsu-laptop is registered
unconditionally while sysfs attributes attached to it depend on the
FUJ02E3 ACPI device being present.  Fix this by moving platform device
creation and removal to acpi_fujitsu_laptop_add() and
acpi_fujitsu_laptop_remove(), respectively.

Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Tested-by: Jonathan Woithe <jwoithe@just42.net>
Reviewed-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
drivers/platform/x86/fujitsu-laptop.c