Skip to content

Commit

Permalink
acer-wmi: Make device detection error messages more descriptive
Browse files Browse the repository at this point in the history
The current device detection error messages are all copy & pasted - make
them more descriptive so it's easier to see where in the code a problem
occurs.

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Carlos Corbacho authored and Len Brown committed Mar 12, 2008
1 parent a527f2d commit 8d039bc
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions drivers/misc/acer-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,19 +1052,21 @@ static int __init acer_wmi_init(void)

if (wmi_has_guid(WMID_GUID2) && interface) {
if (ACPI_FAILURE(WMID_set_capabilities())) {
printk(ACER_ERR "Unable to detect available devices\n");
printk(ACER_ERR "Unable to detect available WMID "
"devices\n");
return -ENODEV;
}
} else if (!wmi_has_guid(WMID_GUID2) && interface) {
printk(ACER_ERR "Unable to detect available devices\n");
printk(ACER_ERR "No WMID device detection method found\n");
return -ENODEV;
}

if (wmi_has_guid(AMW0_GUID1) && !wmi_has_guid(WMID_GUID1)) {
interface = &AMW0_interface;

if (ACPI_FAILURE(AMW0_set_capabilities())) {
printk(ACER_ERR "Unable to detect available devices\n");
printk(ACER_ERR "Unable to detect available AMW0 "
"devices\n");
return -ENODEV;
}
}
Expand All @@ -1075,8 +1077,8 @@ static int __init acer_wmi_init(void)
find_quirks();

if (!interface) {
printk(ACER_ERR "No or unsupported WMI interface, unable to ");
printk(KERN_CONT "load.\n");
printk(ACER_ERR "No or unsupported WMI interface, unable to "
"load\n");
return -ENODEV;
}

Expand Down

0 comments on commit 8d039bc

Please sign in to comment.