From: Len Brown Date: Fri, 16 Jun 2006 01:31:17 +0000 (-0400) Subject: Pull trivial2 into release branch X-Git-Tag: v2.6.18-rc1~1081^2~19^2~8 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf891bd65de65284f3964216fcde493dba5149db;p=linux-2.6 Pull trivial2 into release branch --- bf891bd65de65284f3964216fcde493dba5149db diff --cc drivers/acpi/asus_acpi.c index 90eb3c5a15,fccbf938ea..839f423d73 --- a/drivers/acpi/asus_acpi.c +++ b/drivers/acpi/asus_acpi.c @@@ -1230,22 -1226,10 +1230,22 @@@ static int __init asus_acpi_init(void asus_proc_dir->owner = THIS_MODULE; result = acpi_bus_register_driver(&asus_hotk_driver); - if (result < 1) { + if (result < 0) { + remove_proc_entry(PROC_ASUS, acpi_root_dir); + return -ENODEV; + } + + /* + * 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 + * ACPI namespace for ASUS HIDs. So we just return failure if + * we didn't find one, which will cause the module to be + * unloaded. + */ + if (!asus_hotk_found) { acpi_bus_unregister_driver(&asus_hotk_driver); remove_proc_entry(PROC_ASUS, acpi_root_dir); - return -ENODEV; + return result; } return 0;