From: Joe Perches <joe@perches.com>
To: Matthew Garrett <mjg@redhat.com>,
Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 08/23] fujitsu-laptop: Convert printks to pr_<level>
Date: Tue, 29 Mar 2011 15:21:39 -0700 [thread overview]
Message-ID: <20baaa2f09235d33f2cf751eaf6ad6f1bbb24d64.1301436234.git.joe@perches.com> (raw)
In-Reply-To: <cover.1301436234.git.joe@perches.com>
Added pr_fmt, converted printks and removed
hard coded prefixes.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/platform/x86/fujitsu-laptop.c | 39 ++++++++++++++++-----------------
1 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 493054c..6b26666 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -56,6 +56,8 @@
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
#include <linux/kernel.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)
{
acpi_handle handle;
- printk(KERN_INFO "fujitsu-laptop: Identified laptop model '%s'.\n",
- id->ident);
+ pr_info("Identified laptop model '%s'\n", id->ident);
if (use_alt_lcd_levels == -1) {
if (ACPI_SUCCESS(acpi_get_handle(NULL,
"\\_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);
if (result) {
- printk(KERN_ERR "Error reading power state\n");
+ pr_err("Error reading power state\n");
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),
!device->power.state ? "on" : "off");
@@ -707,7 +708,7 @@ static int acpi_fujitsu_add(struct acpi_device *device)
if (ACPI_FAILURE
(acpi_evaluate_object
(device->handle, METHOD_NAME__INI, NULL, NULL)))
- printk(KERN_ERR "_INI Method failed\n");
+ pr_err("_INI Method failed\n");
}
/* 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),
GFP_KERNEL);
if (error) {
- printk(KERN_ERR "kfifo_alloc failed\n");
+ pr_err("kfifo_alloc failed\n");
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);
if (result) {
- printk(KERN_ERR "Error reading power state\n");
+ pr_err("Error reading power state\n");
goto err_unregister_input_dev;
}
- printk(KERN_INFO "ACPI: %s [%s] (%s)\n",
- acpi_device_name(device), acpi_device_bid(device),
- !device->power.state ? "on" : "off");
+ pr_info("ACPI: %s [%s] (%s)\n",
+ acpi_device_name(device), acpi_device_bid(device),
+ !device->power.state ? "on" : "off");
fujitsu_hotkey->dev = device;
@@ -875,7 +876,7 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
if (ACPI_FAILURE
(acpi_evaluate_object
(device->handle, METHOD_NAME__INI, NULL, NULL)))
- printk(KERN_ERR "_INI Method failed\n");
+ pr_err("_INI Method failed\n");
}
i = 0;
@@ -897,8 +898,7 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
call_fext_func(FUNC_RFKILL, 0x4, 0x0, 0x0);
/* Suspect this is a keymap of the application panel, print it */
- printk(KERN_INFO "fujitsu-laptop: BTNI: [0x%x]\n",
- call_fext_func(FUNC_BUTTONS, 0x0, 0x0, 0x0));
+ pr_info("BTNI: [0x%x]\n", call_fext_func(FUNC_BUTTONS, 0x0, 0x0, 0x0));
#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
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) {
fujitsu_hotkey->logolamp_registered = 1;
} else {
- printk(KERN_ERR "fujitsu-laptop: Could not register "
- "LED handler for logo lamp, error %i\n", result);
+ pr_err("Could not register LED handler for logo lamp, error %i\n",
+ result);
}
}
@@ -919,8 +919,8 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
if (result == 0) {
fujitsu_hotkey->kblamps_registered = 1;
} else {
- printk(KERN_ERR "fujitsu-laptop: Could not register "
- "LED handler for keyboard lamps, error %i\n", result);
+ pr_err("Could not register LED handler for keyboard lamps, error %i\n",
+ result);
}
}
#endif
@@ -1169,8 +1169,7 @@ static int __init fujitsu_init(void)
fujitsu->bl_device->props.power = 0;
}
- printk(KERN_INFO "fujitsu-laptop: driver " FUJITSU_DRIVER_VERSION
- " successfully loaded.\n");
+ pr_info("driver " FUJITSU_DRIVER_VERSION " successfully loaded\n");
return 0;
@@ -1216,7 +1215,7 @@ static void __exit fujitsu_cleanup(void)
kfree(fujitsu);
- printk(KERN_INFO "fujitsu-laptop: driver unloaded.\n");
+ pr_info("driver unloaded\n");
}
module_init(fujitsu_init);
--
1.7.4.2.g597a6.dirty
next prev parent reply other threads:[~2011-03-29 22:26 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-29 22:21 [PATCH 00/23] drivers/platform/x86: Remove warnings and use pr_<level> Joe Perches
2011-03-29 22:21 ` [PATCH 01/23] asus-wmi: Remove __init from asus_wmi_platform_init Joe Perches
2011-03-31 7:17 ` Corentin Chary
2011-03-29 22:21 ` [PATCH 02/23] ibm_rtl: Remove warnings from casts of pointer to int Joe Perches
2011-03-29 22:21 ` [PATCH 03/23] acer-wmi: pr_<level> cleanups Joe Perches
2011-03-31 6:41 ` Joey Lee
2011-03-29 22:21 ` [PATCH 04/23] asus: Add pr_fmt and convert printks to pr_<level> Joe Perches
2011-03-31 7:18 ` Corentin Chary
2011-03-29 22:21 ` [PATCH 05/23] compal-laptop: Convert " Joe Perches
2011-03-29 22:21 ` [PATCH 06/23] dell: " Joe Perches
2011-03-29 22:21 ` [PATCH 07/23] eeepc: Use pr_warn Joe Perches
2011-03-31 7:19 ` Corentin Chary
2011-03-29 22:21 ` Joe Perches [this message]
2011-03-29 22:42 ` [PATCH 08/23] fujitsu-laptop: Convert printks to pr_<level> Jonathan Woithe
2011-03-29 22:50 ` Joe Perches
2011-03-29 22:21 ` [PATCH 09/23] hdaps: " Joe Perches
2011-03-30 1:54 ` Lucas De Marchi
2011-03-30 2:00 ` Joe Perches
2011-03-29 22:21 ` [PATCH 10/23] hp-wmi: " Joe Perches
2011-03-29 22:21 ` [PATCH 11/23] ibm_rtl: Use pr_fmt and pr_<level> Joe Perches
2011-03-29 22:21 ` [PATCH 12/23] ideapad-laptop: Add pr_fmt Joe Perches
2011-03-29 22:21 ` [PATCH 13/23] intel_menlow: Add pr_fmt and use pr_<level> Joe Perches
2011-03-29 22:21 ` [PATCH 14/23] intel_pmic_gpio: Convert printks to pr_<level> Joe Perches
2011-03-29 22:21 ` [PATCH 15/23] msi-laptop: pr_<level> neatening Joe Perches
2011-03-31 6:41 ` Joey Lee
2011-03-29 22:21 ` [PATCH 16/23] msi-wmi: Use pr_fmt and pr_<level> Joe Perches
2011-03-30 14:16 ` Anisse Astier
2011-03-29 22:21 ` [PATCH 17/23] sony-laptop: Add and use #define pr_fmt Joe Perches
2011-03-29 22:21 ` [PATCH 18/23] tc1100-wmi: Add pr_fmt, use pr_<level> Joe Perches
2011-03-29 22:21 ` [PATCH 19/23] thinkpad_acpi: Convert printks to pr_<level> Joe Perches
2011-03-29 22:21 ` [PATCH 20/23] topstar-laptop: Convert remaining printk to pr_info Joe Perches
2011-03-29 23:44 ` Herton Ronaldo Krzesinski
2011-03-29 22:21 ` [PATCH 21/23] toshiba: Convert printks to pr_<level> Joe Perches
2011-03-29 22:21 ` [PATCH 22/23] wmi: Removed trailing whitespace from logging message Joe Perches
2011-03-29 22:21 ` [PATCH 23/23] xo15-ebook: Use pr_<level> Joe Perches
2011-03-30 14:30 ` [PATCH 00/23] drivers/platform/x86: Remove warnings and use pr_<level> Corentin Chary
2011-03-30 15:02 ` Joe Perches
2011-04-01 18:21 ` Matthew Garrett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20baaa2f09235d33f2cf751eaf6ad6f1bbb24d64.1301436234.git.joe@perches.com \
--to=joe@perches.com \
--cc=jwoithe@physics.adelaide.edu.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®