aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/platform/x86/fujitsu-laptop.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 29738cb2e3dd..765d8c15a0d9 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -579,11 +579,10 @@ static struct platform_driver fujitsupf_driver = {
579 579
580static void dmi_check_cb_common(const struct dmi_system_id *id) 580static void dmi_check_cb_common(const struct dmi_system_id *id)
581{ 581{
582 acpi_handle handle;
583 pr_info("Identified laptop model '%s'\n", id->ident); 582 pr_info("Identified laptop model '%s'\n", id->ident);
584 if (use_alt_lcd_levels == -1) { 583 if (use_alt_lcd_levels == -1) {
585 if (ACPI_SUCCESS(acpi_get_handle(NULL, 584 if (acpi_has_method(NULL,
586 "\\_SB.PCI0.LPCB.FJEX.SBL2", &handle))) 585 "\\_SB.PCI0.LPCB.FJEX.SBL2"))
587 use_alt_lcd_levels = 1; 586 use_alt_lcd_levels = 1;
588 else 587 else
589 use_alt_lcd_levels = 0; 588 use_alt_lcd_levels = 0;
@@ -646,7 +645,6 @@ static struct dmi_system_id fujitsu_dmi_table[] = {
646 645
647static int acpi_fujitsu_add(struct acpi_device *device) 646static int acpi_fujitsu_add(struct acpi_device *device)
648{ 647{
649 acpi_handle handle;
650 int result = 0; 648 int result = 0;
651 int state = 0; 649 int state = 0;
652 struct input_dev *input; 650 struct input_dev *input;
@@ -695,8 +693,7 @@ static int acpi_fujitsu_add(struct acpi_device *device)
695 693
696 fujitsu->dev = device; 694 fujitsu->dev = device;
697 695
698 if (ACPI_SUCCESS 696 if (acpi_has_method(device->handle, METHOD_NAME__INI)) {
699 (acpi_get_handle(device->handle, METHOD_NAME__INI, &handle))) {
700 vdbg_printk(FUJLAPTOP_DBG_INFO, "Invoking _INI\n"); 697 vdbg_printk(FUJLAPTOP_DBG_INFO, "Invoking _INI\n");
701 if (ACPI_FAILURE 698 if (ACPI_FAILURE
702 (acpi_evaluate_object 699 (acpi_evaluate_object
@@ -796,7 +793,6 @@ static void acpi_fujitsu_notify(struct acpi_device *device, u32 event)
796 793
797static int acpi_fujitsu_hotkey_add(struct acpi_device *device) 794static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
798{ 795{
799 acpi_handle handle;
800 int result = 0; 796 int result = 0;
801 int state = 0; 797 int state = 0;
802 struct input_dev *input; 798 struct input_dev *input;
@@ -859,8 +855,7 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
859 855
860 fujitsu_hotkey->dev = device; 856 fujitsu_hotkey->dev = device;
861 857
862 if (ACPI_SUCCESS 858 if (acpi_has_method(device->handle, METHOD_NAME__INI)) {
863 (acpi_get_handle(device->handle, METHOD_NAME__INI, &handle))) {
864 vdbg_printk(FUJLAPTOP_DBG_INFO, "Invoking _INI\n"); 859 vdbg_printk(FUJLAPTOP_DBG_INFO, "Invoking _INI\n");
865 if (ACPI_FAILURE 860 if (ACPI_FAILURE
866 (acpi_evaluate_object 861 (acpi_evaluate_object