ACPI: hp-wmi, msi-wmi: clarify that wmi_install_notify_handler() returns an acpi_status
authorLen Brown <len.brown@intel.com>
Sun, 27 Dec 2009 03:04:03 +0000 (22:04 -0500)
committerLen Brown <len.brown@intel.com>
Wed, 30 Dec 2009 07:48:52 +0000 (02:48 -0500)
Emphasize that that wmi_install_notify_handler() returns an acpi_status
rather than -errno by by testing ACPI_SUCCESS(), ACPI_FAILURE().

No functional change in this patch, but this confusion caused a bug in dell-wmi.

Signed-off-by: Len Brown <len.brown@intel.com>
drivers/platform/x86/hp-wmi.c
drivers/platform/x86/msi-wmi.c

index 8781d8fa7a579b609bd2d4999c9eadb94c79e405..18bf74136d2412af583a5dc7ca9e1a0188bfb25b 100644 (file)
@@ -581,7 +581,7 @@ static int __init hp_wmi_init(void)
        if (wmi_has_guid(HPWMI_EVENT_GUID)) {
                err = wmi_install_notify_handler(HPWMI_EVENT_GUID,
                                                 hp_wmi_notify, NULL);
-               if (!err)
+               if (ACPI_SUCCESS(err))
                        hp_wmi_input_setup();
        }
 
index 7f77f908bb01c95d104342848dad3872f5a2fdcb..f746c677adaa9294539bcbb594709f7535c29084 100644 (file)
@@ -236,7 +236,7 @@ static int __init msi_wmi_init(void)
        }
        err = wmi_install_notify_handler(MSIWMI_EVENT_GUID,
                        msi_wmi_notify, NULL);
-       if (err)
+       if (ACPI_FAILURE(err))
                return -EINVAL;
 
        err = msi_wmi_input_setup();