Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9df80c5 authored by Corentin Chary's avatar Corentin Chary Committed by Len Brown
Browse files

eeepc-laptop: split eeepc_backlight_exit()



eeepc_backlight_exit() was doing rfkill and input stuff, which
is a nonsense. This patch add two specific exit functions, one
for input and one for rfkill.

Signed-off-by: default avatarCorentin Chary <corentincj@iksaif.net>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 1de9e8e7
Loading
Loading
Loading
Loading
+15 −3
Original line number Original line Diff line number Diff line
@@ -737,13 +737,21 @@ static void eeepc_backlight_exit(void)
{
{
	if (eeepc_backlight_device)
	if (eeepc_backlight_device)
		backlight_device_unregister(eeepc_backlight_device);
		backlight_device_unregister(eeepc_backlight_device);
	if (ehotk->inputdev)
	eeepc_backlight_device = NULL;
		input_unregister_device(ehotk->inputdev);
}

static void eeepc_rfkill_exit(void)
{
	if (ehotk->eeepc_wlan_rfkill)
	if (ehotk->eeepc_wlan_rfkill)
		rfkill_unregister(ehotk->eeepc_wlan_rfkill);
		rfkill_unregister(ehotk->eeepc_wlan_rfkill);
	if (ehotk->eeepc_bluetooth_rfkill)
	if (ehotk->eeepc_bluetooth_rfkill)
		rfkill_unregister(ehotk->eeepc_bluetooth_rfkill);
		rfkill_unregister(ehotk->eeepc_bluetooth_rfkill);
	eeepc_backlight_device = NULL;
}

static void eeepc_input_exit(void)
{
	if (ehotk->inputdev)
		input_unregister_device(ehotk->inputdev);
}
}


static void eeepc_hwmon_exit(void)
static void eeepc_hwmon_exit(void)
@@ -762,6 +770,8 @@ static void eeepc_hwmon_exit(void)
static void __exit eeepc_laptop_exit(void)
static void __exit eeepc_laptop_exit(void)
{
{
	eeepc_backlight_exit();
	eeepc_backlight_exit();
	eeepc_rfkill_exit();
	eeepc_input_exit();
	eeepc_hwmon_exit();
	eeepc_hwmon_exit();
	acpi_bus_unregister_driver(&eeepc_hotk_driver);
	acpi_bus_unregister_driver(&eeepc_hotk_driver);
	sysfs_remove_group(&platform_device->dev.kobj,
	sysfs_remove_group(&platform_device->dev.kobj,
@@ -865,6 +875,8 @@ static int __init eeepc_laptop_init(void)
fail_hwmon:
fail_hwmon:
	eeepc_backlight_exit();
	eeepc_backlight_exit();
fail_backlight:
fail_backlight:
	eeepc_input_exit();
	eeepc_rfkill_exit();
	return result;
	return result;
}
}