diff options
author | Alan Jenkins <alan-jenkins@tuffmail.co.uk> | 2009-12-03 02:44:49 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-12-09 15:54:30 -0500 |
commit | 5a4a9f6fd3dedefe06aed0e35c76bb6e0177adb6 (patch) | |
tree | 087a2d6919c8b949d4bb565222025869458196ff /drivers/platform/x86/asus_acpi.c | |
parent | b7fab7a0703a9d3a3b4b59aa2f7b098b2b83b8fe (diff) |
asus-acpi: Remove uneccesary acpi_disabled checks
acpi_bus_register_driver() already checks acpi_disabled, so acpi bus
drivers don't need to.
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/platform/x86/asus_acpi.c')
-rw-r--r-- | drivers/platform/x86/asus_acpi.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/platform/x86/asus_acpi.c b/drivers/platform/x86/asus_acpi.c index 25a7d57fe449..783243f7e7a4 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) | |||
1416 | { | 1416 | { |
1417 | int result; | 1417 | int result; |
1418 | 1418 | ||
1419 | if (acpi_disabled) | 1419 | result = acpi_bus_register_driver(&asus_hotk_driver); |
1420 | return -ENODEV; | 1420 | if (result < 0) |
1421 | return result; | ||
1421 | 1422 | ||
1422 | asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir); | 1423 | asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir); |
1423 | if (!asus_proc_dir) { | 1424 | if (!asus_proc_dir) { |
1424 | printk(KERN_ERR "Asus ACPI: Unable to create /proc entry\n"); | 1425 | printk(KERN_ERR "Asus ACPI: Unable to create /proc entry\n"); |
1426 | acpi_bus_unregister_driver(&asus_hotk_driver); | ||
1425 | return -ENODEV; | 1427 | return -ENODEV; |
1426 | } | 1428 | } |
1427 | 1429 | ||
1428 | result = acpi_bus_register_driver(&asus_hotk_driver); | ||
1429 | if (result < 0) { | ||
1430 | remove_proc_entry(PROC_ASUS, acpi_root_dir); | ||
1431 | return result; | ||
1432 | } | ||
1433 | |||
1434 | /* | 1430 | /* |
1435 | * This is a bit of a kludge. We only want this module loaded | 1431 | * This is a bit of a kludge. We only want this module loaded |
1436 | * for ASUS systems, but there's currently no way to probe the | 1432 | * for ASUS systems, but there's currently no way to probe the |