From patchwork Tue Jun 23 00:28:20 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Woithe X-Patchwork-Id: 31892 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5N0Zhiq012155 for ; Tue, 23 Jun 2009 00:35:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751983AbZFWAfi (ORCPT ); Mon, 22 Jun 2009 20:35:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752048AbZFWAfi (ORCPT ); Mon, 22 Jun 2009 20:35:38 -0400 Received: from adelphi.physics.adelaide.edu.au ([129.127.102.1]:60023 "EHLO adelphi.physics.adelaide.edu.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751983AbZFWAfh (ORCPT ); Mon, 22 Jun 2009 20:35:37 -0400 Received: from turbo.physics.adelaide.edu.au (IDENT:0@turbo [129.127.102.108]) by adelphi.physics.adelaide.edu.au (8.13.7/8.13.7/UofA-Physics-1.0) with ESMTP id n5N0SLp9028760; Tue, 23 Jun 2009 09:58:21 +0930 Received: from turbo.physics.adelaide.edu.au (IDENT:7157@localhost [127.0.0.1]) by turbo.physics.adelaide.edu.au (8.13.4/8.13.4) with ESMTP id n5N0SLkP007375; Tue, 23 Jun 2009 09:58:21 +0930 Received: (from jwoithe@localhost) by turbo.physics.adelaide.edu.au (8.13.4/8.13.4/Submit) id n5N0SK69007374; Tue, 23 Jun 2009 09:58:20 +0930 From: Jonathan Woithe Message-Id: <200906230028.n5N0SK69007374@turbo.physics.adelaide.edu.au> Subject: Re: why do drivers evaluate _INI? To: tony@linx.net (Tony Vroon) Date: Tue, 23 Jun 2009 09:58:20 +0930 (CST) Cc: bjorn.helgaas@hp.com (Bjorn Helgaas), lenb@kernel.org (Len Brown), eric.piel@tremplin-utc.net (Eric Piel), pavel@suse.cz (Pavel Machek), jwoithe@physics.adelaide.edu.au (Jonathan Woithe), malattia@linux.it (Mattia Dongili), linux-acpi@vger.kernel.org In-Reply-To: <1245715275.441.13.camel@localhost> from "Tony Vroon" at Jun 23, 2009 01:01:15 AM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Hi Tony > On Mon, 2009-06-22 at 17:32 -0600, Bjorn Helgaas wrote: > > I see the following drivers using _INI: > > drivers/platform/x86/fujitsu-laptop.c > > Bjorn, can you send me an experimental patch where you remove it? I can > regression test that for you on the Lifebook S6420. As far as I can tell it's just a trivial removal of the relevent section of the acpi_*_add() functions. A patch doing this is at the end of this email. This is completely untested so there may be something subtle I've missed (for instance, the local "handle" variable is unused now I suspect but this won't stop compilation or testing). The patch is against fujitsu-laptop.c from 2.6.27.9 (the kernel source tree I happen to have quick access to at present) but I don't *think* a lot has changed since then so it should apply to other recent versions. Regards jonathan --- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- fujitsu-laptop.c-orig 2009-06-23 09:51:08.540087000 +0930 +++ fujitsu-laptop.c 2009-06-23 09:53:54.491830386 +0930 @@ -537,15 +537,6 @@ static int acpi_fujitsu_add(struct acpi_ fujitsu->dev = device; - if (ACPI_SUCCESS - (acpi_get_handle(device->handle, METHOD_NAME__INI, &handle))) { - vdbg_printk(FUJLAPTOP_DBG_INFO, "Invoking _INI\n"); - if (ACPI_FAILURE - (acpi_evaluate_object - (device->handle, METHOD_NAME__INI, NULL, NULL))) - printk(KERN_ERR "_INI Method failed\n"); - } - /* do config (detect defaults) */ dmi_check_system(fujitsu_dmi_table); use_alt_lcd_levels = use_alt_lcd_levels == 1 ? 1 : 0; @@ -764,15 +755,6 @@ static int acpi_fujitsu_hotkey_add(struc fujitsu_hotkey->dev = device; - if (ACPI_SUCCESS - (acpi_get_handle(device->handle, METHOD_NAME__INI, &handle))) { - vdbg_printk(FUJLAPTOP_DBG_INFO, "Invoking _INI\n"); - if (ACPI_FAILURE - (acpi_evaluate_object - (device->handle, METHOD_NAME__INI, NULL, NULL))) - printk(KERN_ERR "_INI Method failed\n"); - } - i = 0; /* Discard hotkey ringbuffer */ while (get_irb() != 0 && (i++) < MAX_HOTKEY_RINGBUFFER_SIZE) ; vdbg_printk(FUJLAPTOP_DBG_INFO, "Discarded %i ringbuffer entries\n", i);