]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.fixes/acpi_use_acpi_exception.patch
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / acpi_use_acpi_exception.patch
CommitLineData
00e5a55c
BS
1From: Thomas Renninger <trenn@suse.de>
2Subject: ACPI dock/bay: Use ACPI_EXCEPTION instead of printk(KERN_ERR
3Patch-Mainline: not yet
4
5Getting this error:
6ACPI: \_SB_.PCI0.IDE1.PRI_.MAST: found ejectable bay
7ACPI: \_SB_.PCI0.IDE1.PRI_.MAST: Adding notify handler
8ACPI: Error installing bay notify handler
9
10there could be various reasons why installing the notify handler failed.
11It is expected that the dock driver already has installed the notify
12handler for this device, but this is not clear.
13printk suppresses this information.
14The return value of the previous called and failed acpica function
15holds this information and should be printed using ACPI_EXCEPTION which
16is designed for printing error messages on failed acpica calls.
17
18IMO this should get documented in Documentation/acpi/..., but I
19was unsure whether it's worth to start a acpi_programming_rules.txt
20(couldn't think of much more ading there for now) or
21whether 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 }