fujitsu-laptop: Convert printks to pr_<level>

Added pr_fmt, converted printks and removed
hard coded prefixes.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
This commit is contained in:
Joe Perches 2011-03-29 15:21:39 -07:00 committed by Matthew Garrett
parent 22441ffeed
commit 77bad7c830

View file

@ -56,6 +56,8 @@
* *
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
@ -585,8 +587,7 @@ static struct platform_driver fujitsupf_driver = {
static void dmi_check_cb_common(const struct dmi_system_id *id) static void dmi_check_cb_common(const struct dmi_system_id *id)
{ {
acpi_handle handle; acpi_handle handle;
printk(KERN_INFO "fujitsu-laptop: Identified laptop model '%s'.\n", pr_info("Identified laptop model '%s'\n", id->ident);
id->ident);
if (use_alt_lcd_levels == -1) { if (use_alt_lcd_levels == -1) {
if (ACPI_SUCCESS(acpi_get_handle(NULL, if (ACPI_SUCCESS(acpi_get_handle(NULL,
"\\_SB.PCI0.LPCB.FJEX.SBL2", &handle))) "\\_SB.PCI0.LPCB.FJEX.SBL2", &handle)))
@ -691,11 +692,11 @@ static int acpi_fujitsu_add(struct acpi_device *device)
result = acpi_bus_update_power(fujitsu->acpi_handle, &state); result = acpi_bus_update_power(fujitsu->acpi_handle, &state);
if (result) { if (result) {
printk(KERN_ERR "Error reading power state\n"); pr_err("Error reading power state\n");
goto err_unregister_input_dev; goto err_unregister_input_dev;
} }
printk(KERN_INFO "ACPI: %s [%s] (%s)\n", pr_info("ACPI: %s [%s] (%s)\n",
acpi_device_name(device), acpi_device_bid(device), acpi_device_name(device), acpi_device_bid(device),
!device->power.state ? "on" : "off"); !device->power.state ? "on" : "off");
@ -707,7 +708,7 @@ static int acpi_fujitsu_add(struct acpi_device *device)
if (ACPI_FAILURE if (ACPI_FAILURE
(acpi_evaluate_object (acpi_evaluate_object
(device->handle, METHOD_NAME__INI, NULL, NULL))) (device->handle, METHOD_NAME__INI, NULL, NULL)))
printk(KERN_ERR "_INI Method failed\n"); pr_err("_INI Method failed\n");
} }
/* do config (detect defaults) */ /* do config (detect defaults) */
@ -827,7 +828,7 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
error = kfifo_alloc(&fujitsu_hotkey->fifo, RINGBUFFERSIZE * sizeof(int), error = kfifo_alloc(&fujitsu_hotkey->fifo, RINGBUFFERSIZE * sizeof(int),
GFP_KERNEL); GFP_KERNEL);
if (error) { if (error) {
printk(KERN_ERR "kfifo_alloc failed\n"); pr_err("kfifo_alloc failed\n");
goto err_stop; goto err_stop;
} }
@ -859,13 +860,13 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
result = acpi_bus_update_power(fujitsu_hotkey->acpi_handle, &state); result = acpi_bus_update_power(fujitsu_hotkey->acpi_handle, &state);
if (result) { if (result) {
printk(KERN_ERR "Error reading power state\n"); pr_err("Error reading power state\n");
goto err_unregister_input_dev; goto err_unregister_input_dev;
} }
printk(KERN_INFO "ACPI: %s [%s] (%s)\n", pr_info("ACPI: %s [%s] (%s)\n",
acpi_device_name(device), acpi_device_bid(device), acpi_device_name(device), acpi_device_bid(device),
!device->power.state ? "on" : "off"); !device->power.state ? "on" : "off");
fujitsu_hotkey->dev = device; fujitsu_hotkey->dev = device;
@ -875,7 +876,7 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
if (ACPI_FAILURE if (ACPI_FAILURE
(acpi_evaluate_object (acpi_evaluate_object
(device->handle, METHOD_NAME__INI, NULL, NULL))) (device->handle, METHOD_NAME__INI, NULL, NULL)))
printk(KERN_ERR "_INI Method failed\n"); pr_err("_INI Method failed\n");
} }
i = 0; i = 0;
@ -897,8 +898,7 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
call_fext_func(FUNC_RFKILL, 0x4, 0x0, 0x0); call_fext_func(FUNC_RFKILL, 0x4, 0x0, 0x0);
/* Suspect this is a keymap of the application panel, print it */ /* Suspect this is a keymap of the application panel, print it */
printk(KERN_INFO "fujitsu-laptop: BTNI: [0x%x]\n", pr_info("BTNI: [0x%x]\n", call_fext_func(FUNC_BUTTONS, 0x0, 0x0, 0x0));
call_fext_func(FUNC_BUTTONS, 0x0, 0x0, 0x0));
#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
if (call_fext_func(FUNC_LEDS, 0x0, 0x0, 0x0) & LOGOLAMP_POWERON) { if (call_fext_func(FUNC_LEDS, 0x0, 0x0, 0x0) & LOGOLAMP_POWERON) {
@ -907,8 +907,8 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
if (result == 0) { if (result == 0) {
fujitsu_hotkey->logolamp_registered = 1; fujitsu_hotkey->logolamp_registered = 1;
} else { } else {
printk(KERN_ERR "fujitsu-laptop: Could not register " pr_err("Could not register LED handler for logo lamp, error %i\n",
"LED handler for logo lamp, error %i\n", result); result);
} }
} }
@ -919,8 +919,8 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
if (result == 0) { if (result == 0) {
fujitsu_hotkey->kblamps_registered = 1; fujitsu_hotkey->kblamps_registered = 1;
} else { } else {
printk(KERN_ERR "fujitsu-laptop: Could not register " pr_err("Could not register LED handler for keyboard lamps, error %i\n",
"LED handler for keyboard lamps, error %i\n", result); result);
} }
} }
#endif #endif
@ -1169,8 +1169,7 @@ static int __init fujitsu_init(void)
fujitsu->bl_device->props.power = 0; fujitsu->bl_device->props.power = 0;
} }
printk(KERN_INFO "fujitsu-laptop: driver " FUJITSU_DRIVER_VERSION pr_info("driver " FUJITSU_DRIVER_VERSION " successfully loaded\n");
" successfully loaded.\n");
return 0; return 0;
@ -1216,7 +1215,7 @@ static void __exit fujitsu_cleanup(void)
kfree(fujitsu); kfree(fujitsu);
printk(KERN_INFO "fujitsu-laptop: driver unloaded.\n"); pr_info("driver unloaded\n");
} }
module_init(fujitsu_init); module_init(fujitsu_init);