From: Len Brown Date: Fri, 16 Jun 2006 01:31:17 +0000 (-0400) Subject: Pull trivial2 into release branch X-Git-Tag: upstream/snapshot3+hdmi~40146^2~19^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf891bd65de65284f3964216fcde493dba5149db;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git Pull trivial2 into release branch --- bf891bd65de65284f3964216fcde493dba5149db diff --cc drivers/acpi/asus_acpi.c index 90eb3c5,fccbf93..839f423 --- 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;