From: "Michał Kępień" <kernel@kempniu.pl>
To: Jonathan Woithe <jwoithe@just42.net>,
Darren Hart <dvhart@infradead.org>,
Andy Shevchenko <andy@infradead.org>
Cc: platform-driver-x86@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 6/7] platform/x86: fujitsu-laptop: do not evaluate ACPI _INI methods
Date: Fri, 16 Jun 2017 06:40:57 +0200 [thread overview]
Message-ID: <20170616044058.30443-7-kernel@kempniu.pl> (raw)
In-Reply-To: <20170616044058.30443-1-kernel@kempniu.pl>
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>
---
drivers/platform/x86/fujitsu-laptop.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index b9f3ede4d567..0861be36305d 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -421,14 +421,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);
@@ -801,14 +793,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)
--
2.13.1
next prev parent reply other threads:[~2017-06-16 4:40 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 4:40 [PATCH 0/7] fujitsu-laptop: ACPI-related cleanups Michał Kępień
2017-06-16 4:40 ` [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes Michał Kępień
2017-06-21 18:15 ` Darren Hart
2017-06-21 23:50 ` Jonathan Woithe
2017-06-22 2:44 ` Darren Hart
2017-06-22 3:01 ` Jonathan Woithe
2017-06-22 20:46 ` Michał Kępień
2017-06-22 23:58 ` Darren Hart
2017-06-23 0:14 ` Jonathan Woithe
2017-06-23 5:54 ` Darren Hart
2017-06-22 20:08 ` Michał Kępień
2017-06-24 0:25 ` Rafael J. Wysocki
2017-06-27 0:07 ` Darren Hart
2017-06-27 12:16 ` Jonathan Woithe
2017-06-28 4:30 ` Michał Kępień
2017-06-28 16:03 ` Darren Hart
2017-06-16 4:40 ` [PATCH 2/7] platform/x86: fujitsu-laptop: remove redundant safety checks Michał Kępień
2017-06-16 4:40 ` [PATCH 3/7] platform/x86: fujitsu-laptop: use strcpy to set ACPI device names and classes Michał Kępień
2017-06-16 4:40 ` [PATCH 4/7] platform/x86: fujitsu-laptop: sanitize hotkey input device identification Michał Kępień
2017-06-16 4:40 ` [PATCH 5/7] platform/x86: fujitsu-laptop: do not update ACPI device power status Michał Kępień
2017-06-21 20:17 ` Darren Hart
2017-06-22 21:02 ` Michał Kępień
2017-06-22 23:58 ` Darren Hart
2017-06-23 0:16 ` Jonathan Woithe
2017-06-23 5:52 ` Darren Hart
2017-06-16 4:40 ` Michał Kępień [this message]
2017-06-16 4:40 ` [PATCH 7/7] platform/x86: fujitsu-laptop: rework debugging Michał Kępień
2017-06-18 10:35 ` [PATCH 0/7] fujitsu-laptop: ACPI-related cleanups Jonathan Woithe
2017-06-22 23:57 ` Darren Hart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170616044058.30443-7-kernel@kempniu.pl \
--to=kernel@kempniu.pl \
--cc=andy@infradead.org \
--cc=dvhart@infradead.org \
--cc=jwoithe@just42.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox