From: Len Brown Date: Fri, 16 Jun 2006 01:31:17 +0000 (-0400) Subject: Pull trivial2 into release branch X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bf891bd65de65284f3964216fcde493dba5149db;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Pull trivial2 into release branch --- bf891bd65de65284f3964216fcde493dba5149db diff --cc drivers/acpi/asus_acpi.c index 90eb3c5a15ca,fccbf938ea04..839f423d738d --- 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;