]> err.no Git - linux-2.6/commitdiff
Pull trivial2 into release branch
authorLen Brown <len.brown@intel.com>
Fri, 16 Jun 2006 01:31:17 +0000 (21:31 -0400)
committerLen Brown <len.brown@intel.com>
Fri, 16 Jun 2006 01:31:17 +0000 (21:31 -0400)
1  2 
drivers/acpi/asus_acpi.c
drivers/acpi/thermal.c

index 90eb3c5a15cae8eae0d0d0acd296a39a838844ca,fccbf938ea04c13bf3a7ba4c68543f78aa789542..839f423d738d8618f8bc444b5707c672f833a5ac
@@@ -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;
Simple merge