]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.fixes/acpi_use_acpi_exception.patch
Fix oinkmaster patch.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / acpi_use_acpi_exception.patch
1 From: Thomas Renninger <trenn@suse.de>
2 Subject: ACPI dock/bay: Use ACPI_EXCEPTION instead of printk(KERN_ERR
3 Patch-Mainline: not yet
4
5 Getting this error:
6 ACPI: \_SB_.PCI0.IDE1.PRI_.MAST: found ejectable bay
7 ACPI: \_SB_.PCI0.IDE1.PRI_.MAST: Adding notify handler
8 ACPI: Error installing bay notify handler
9
10 there could be various reasons why installing the notify handler failed.
11 It is expected that the dock driver already has installed the notify
12 handler for this device, but this is not clear.
13 printk suppresses this information.
14 The return value of the previous called and failed acpica function
15 holds this information and should be printed using ACPI_EXCEPTION which
16 is designed for printing error messages on failed acpica calls.
17
18 IMO this should get documented in Documentation/acpi/..., but I
19 was unsure whether it's worth to start a acpi_programming_rules.txt
20 (couldn't think of much more ading there for now) or
21 whether it's worth to add print_acpica_errors_in_kernel_drivers.txt
22 (or similar).
23
24 ---
25
26 --- linux-2.6.26.orig/drivers/acpi/dock.c 2008-09-25 22:48:33.000000000 +0200
27 +++ linux-2.6.26/drivers/acpi/dock.c 2008-09-25 22:49:41.000000000 +0200
28 @@ -488,8 +488,8 @@
29 arg.integer.value = dock;
30 status = acpi_evaluate_object(ds->handle, "_DCK", &arg_list, &buffer);
31 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND)
32 - printk(KERN_ERR PREFIX "%s - failed to execute _DCK\n",
33 - (char *)name_buffer.pointer);
34 + ACPI_EXCEPTION((AE_INFO, status, "%s - failed to execute"
35 + " _DCK\n", (char *)name_buffer.pointer));
36 kfree(buffer.pointer);
37 kfree(name_buffer.pointer);
38 }