public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Matthew Garrett <mjg@redhat.com>
Cc: Len Brown <len.brown@intel.com>, linux-acpi@vger.kernel.org
Subject: [PATCH 2/2] dell-wmi - use pr_xxx() for printing messages
Date: Sun, 27 Dec 2009 01:50:18 -0800	[thread overview]
Message-ID: <20091227095005.14542.67746.stgit@localhost.localdomain> (raw)
In-Reply-To: <20091227094754.14542.22118.stgit@localhost.localdomain>

Use pr_xxx() instead of naked printk() to guarantee consistent prefixing
of generated messages.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/platform/x86/dell-wmi.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
index e0a0716..ff67a78 100644
--- a/drivers/platform/x86/dell-wmi.c
+++ b/drivers/platform/x86/dell-wmi.c
@@ -23,6 +23,8 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
@@ -147,8 +149,7 @@ static void dell_wmi_notify(u32 value, void *context)
 		u16 *buffer_entry = (u16 *)obj->buffer.pointer;
 
 		if (dell_new_hk_type && buffer_entry[1] != 0x10) {
-			printk(KERN_INFO
-				"dell-wmi: Received unknown WMI event (0x%x)\n",
+			pr_info("Received unknown WMI event (0x%x)\n",
 				buffer_entry[1]);
 			return;
 		}
@@ -161,8 +162,7 @@ static void dell_wmi_notify(u32 value, void *context)
 		key = sparse_keymap_entry_from_scancode(dell_wmi_input_dev,
 							reported_key);
 		if (!key) {
-			printk(KERN_INFO "dell-wmi: Unknown key %x pressed\n",
-				reported_key);
+			pr_info("Unknown key %x pressed\n", reported_key);
 		} else if ((key->keycode == KEY_BRIGHTNESSUP ||
 			    key->keycode == KEY_BRIGHTNESSDOWN) && acpi_video) {
 			/* Don't report brightness notifications that will also
@@ -268,7 +268,7 @@ static int __init dell_wmi_init(void)
 	int err;
 
 	if (!wmi_has_guid(DELL_EVENT_GUID)) {
-		printk(KERN_WARNING "dell-wmi: No known WMI GUID found\n");
+		pr_warning("No known WMI GUID found\n");
 		return -ENODEV;
 	}
 
@@ -283,9 +283,7 @@ static int __init dell_wmi_init(void)
 					 dell_wmi_notify, NULL);
 	if (err) {
 		dell_wmi_input_destroy();
-		printk(KERN_ERR
-			"dell-wmi: Unable to register notify handler - %d\n",
-			err);
+		pr_err("Unable to register notify handler - %d\n", err);
 		return err;
 	}
 


      reply	other threads:[~2009-12-27  9:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-27  9:49 [PATCH 1/2] dell-wmi - switch to using sparse keymap library Dmitry Torokhov
2009-12-27  9:50 ` Dmitry Torokhov [this message]

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=20091227095005.14542.67746.stgit@localhost.localdomain \
    --to=dmitry.torokhov@gmail.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=mjg@redhat.com \
    /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