From patchwork Thu Dec 3 07:44:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Chary X-Patchwork-Id: 64429 X-Patchwork-Delegate: lenb@kernel.org 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 nB37id5U000819 for ; Thu, 3 Dec 2009 07:44:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751329AbZLCHoh (ORCPT ); Thu, 3 Dec 2009 02:44:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754367AbZLCHog (ORCPT ); Thu, 3 Dec 2009 02:44:36 -0500 Received: from iksaif.net ([88.191.73.63]:44216 "EHLO iksaif.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751329AbZLCHoc (ORCPT ); Thu, 3 Dec 2009 02:44:32 -0500 Received: from localhost.localdomain (cxr69-11-88-180-139-205.fbx.proxad.net [88.180.139.205]) (Authenticated sender: corentincj@iksaif.net) by iksaif.net (Postfix) with ESMTPA id 15C2DC90A75; Thu, 3 Dec 2009 08:46:03 +0100 (CET) From: Corentin Chary To: Len Brown Cc: linux-acpi@vger.kernel.org, Alan Jenkins Subject: [PATCH 05/33] asus-acpi: Remove uneccesary acpi_disabled checks Date: Thu, 3 Dec 2009 08:44:49 +0100 Message-Id: <1259826317-18809-6-git-send-email-corentincj@iksaif.net> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <1259826317-18809-5-git-send-email-corentincj@iksaif.net> References: <1259826317-18809-1-git-send-email-corentincj@iksaif.net> <1259826317-18809-2-git-send-email-corentincj@iksaif.net> <1259826317-18809-3-git-send-email-corentincj@iksaif.net> <1259826317-18809-4-git-send-email-corentincj@iksaif.net> <1259826317-18809-5-git-send-email-corentincj@iksaif.net> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/drivers/platform/x86/asus_acpi.c b/drivers/platform/x86/asus_acpi.c index 25a7d57..783243f 100644 --- a/drivers/platform/x86/asus_acpi.c +++ b/drivers/platform/x86/asus_acpi.c @@ -1416,21 +1416,17 @@ static int __init asus_acpi_init(void) { int result; - if (acpi_disabled) - return -ENODEV; + result = acpi_bus_register_driver(&asus_hotk_driver); + if (result < 0) + return result; asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir); if (!asus_proc_dir) { printk(KERN_ERR "Asus ACPI: Unable to create /proc entry\n"); + acpi_bus_unregister_driver(&asus_hotk_driver); return -ENODEV; } - result = acpi_bus_register_driver(&asus_hotk_driver); - if (result < 0) { - remove_proc_entry(PROC_ASUS, acpi_root_dir); - return result; - } - /* * This is a bit of a kludge. We only want this module loaded * for ASUS systems, but there's currently no way to probe the