Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

platform: x86: ACPI: Get rid of ACPICA message printing

A few x86 platform drivers use ACPI_DEBUG_PRINT() or ACPI_EXCEPTION()
for printing messages, but that is questionable, because those macros
belong to ACPICA and they should not be used elsewhere. In addition,
ACPI_DEBUG_PRINT() requires special enabling to allow it to actually
print the message, which is a nuisance, and the _COMPONENT symbol
generally needed for that is not defined in any of the files in
question.

For this reason, replace the ACPI_DEBUG_PRINT() in lg-laptop.c with
pr_debug() and the one in xo15-ebook.c with acpi_handle_debug()
(with the additional benefit that the source object can be identified
more easily after this change).

Also drop the ACPI_MODULE_NAME() definitions that are only used by
the ACPICA message printing macros from those files and from wmi.c
and surfacepro3_button.c (while at it).

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/2074665.VPHYfYaQb6@kreacher
[hdegoede@redhat.com: Drop acer-wmi.c chunk, a similar patch was already merged]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Rafael J. Wysocki and committed by
Hans de Goede
24789075 d9ff4ec3

+3 -8
-2
drivers/platform/surface/surfacepro3_button.c
··· 40 40 #define SURFACE_BUTTON_NOTIFY_PRESS_VOLUME_DOWN 0xc2 41 41 #define SURFACE_BUTTON_NOTIFY_RELEASE_VOLUME_DOWN 0xc3 42 42 43 - ACPI_MODULE_NAME("surface pro 3 button"); 44 - 45 43 MODULE_AUTHOR("Chen Yu"); 46 44 MODULE_DESCRIPTION("Surface Pro3 Button Driver"); 47 45 MODULE_LICENSE("GPL v2");
+1 -1
drivers/platform/x86/lg-laptop.c
··· 678 678 679 679 result = acpi_bus_register_driver(&acpi_driver); 680 680 if (result < 0) { 681 - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error registering driver\n")); 681 + pr_debug("Error registering driver\n"); 682 682 return -ENODEV; 683 683 } 684 684
-1
drivers/platform/x86/wmi.c
··· 32 32 #include <linux/fs.h> 33 33 #include <uapi/linux/wmi.h> 34 34 35 - ACPI_MODULE_NAME("wmi"); 36 35 MODULE_AUTHOR("Carlos Corbacho"); 37 36 MODULE_DESCRIPTION("ACPI-WMI Mapping Driver"); 38 37 MODULE_LICENSE("GPL");
+2 -4
drivers/platform/x86/xo15-ebook.c
··· 26 26 #define XO15_EBOOK_HID "XO15EBK" 27 27 #define XO15_EBOOK_DEVICE_NAME "EBook Switch" 28 28 29 - ACPI_MODULE_NAME(MODULE_NAME); 30 - 31 29 MODULE_DESCRIPTION("OLPC XO-1.5 ebook switch driver"); 32 30 MODULE_LICENSE("GPL"); 33 31 ··· 64 66 ebook_send_state(device); 65 67 break; 66 68 default: 67 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 68 - "Unsupported event [0x%x]\n", event)); 69 + acpi_handle_debug(device->handle, 70 + "Unsupported event [0x%x]\n", event); 69 71 break; 70 72 } 71 73 }