aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/fujitsu-laptop.c
diff options
context:
space:
mode:
authorMichał Kępień <kernel@kempniu.pl>2017-06-16 06:40:57 +0200
committerDarren Hart (VMware) <dvhart@infradead.org>2017-06-30 20:13:05 -0700
commit32c28f1f431f1c1c6db3491820a0086ddcd317c6 (patch)
tree6de553d8396b6fbc0fa6fa57e577af1f3f9fe977 /drivers/platform/x86/fujitsu-laptop.c
parentplatform/x86: fujitsu-laptop: do not update ACPI device power status (diff)
downloadlinux-dev-32c28f1f431f1c1c6db3491820a0086ddcd317c6.tar.xz
linux-dev-32c28f1f431f1c1c6db3491820a0086ddcd317c6.zip
platform/x86: fujitsu-laptop: do not evaluate ACPI _INI methods
acpi_ns_initialize_devices(), which is called during system-wide ACPI initialization, already detects and calls all _INI methods belonging to objects present in ACPI tables. There is no need to call these methods again every time the module is loaded because they only initialize status flags and hotkey-related variables; status flags are effectively constants, hotkey-related variables may be assigned non-zero values before acpi_fujitsu_laptop_add() is called, but that does not really matter as we drain the scancodes queued in the firmware's ring buffer before doing anything else. Remove sections of code which invoke and check evaluation status of the _INI methods belonging to the ACPI devices handled by the driver. 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 'drivers/platform/x86/fujitsu-laptop.c')
-rw-r--r--drivers/platform/x86/fujitsu-laptop.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 1ab7a115094b..5c80bcb81451 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -423,14 +423,6 @@ static int acpi_fujitsu_bl_add(struct acpi_device *device)
pr_info("ACPI: %s [%s]\n",
acpi_device_name(device), acpi_device_bid(device));
- if (acpi_has_method(device->handle, METHOD_NAME__INI)) {
- vdbg_printk(FUJLAPTOP_DBG_INFO, "Invoking _INI\n");
- if (ACPI_FAILURE
- (acpi_evaluate_object
- (device->handle, METHOD_NAME__INI, NULL, NULL)))
- pr_err("_INI Method failed\n");
- }
-
if (get_max_brightness(device) <= 0)
priv->max_brightness = FUJITSU_LCD_N_LEVELS;
get_lcd_level(device);
@@ -812,14 +804,6 @@ static int acpi_fujitsu_laptop_add(struct acpi_device *device)
pr_info("ACPI: %s [%s]\n",
acpi_device_name(device), acpi_device_bid(device));
- if (acpi_has_method(device->handle, METHOD_NAME__INI)) {
- vdbg_printk(FUJLAPTOP_DBG_INFO, "Invoking _INI\n");
- if (ACPI_FAILURE
- (acpi_evaluate_object
- (device->handle, METHOD_NAME__INI, NULL, NULL)))
- pr_err("_INI Method failed\n");
- }
-
i = 0;
while (call_fext_func(device, FUNC_BUTTONS, 0x1, 0x0, 0x0) != 0
&& (i++) < MAX_HOTKEY_RINGBUFFER_SIZE)