summaryrefslogtreecommitdiffstats
path: root/drivers/staging/panel
diff options
context:
space:
mode:
authorToshiaki Yamane <yamanetoshi@gmail.com>2012-07-12 22:01:17 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 18:57:26 -0700
commiteb073a9bf2b6edf8cf69eb393a1e511942cd1c64 (patch)
tree990a48b5a8870ba9b9bef80ed7b5fc563cab145a /drivers/staging/panel
parent6622bcd64f7432b99718b373fe6231992e832c9e (diff)
downloadblackbird-obmc-linux-eb073a9bf2b6edf8cf69eb393a1e511942cd1c64.tar.gz
blackbird-obmc-linux-eb073a9bf2b6edf8cf69eb393a1e511942cd1c64.zip
staging: panel: Use pr_err(...) rather than printk(KERN_ERR ...)
-Removed unnecessary OOM messages. -Removed embedded message prefixes. -Added __func__ to some pr_err messages. -Converted printk(KERN_ERR to pr_err -Refactored split printk strings onto a single line -Removed the space before the '!'. Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/panel')
-rw-r--r--drivers/staging/panel/panel.c38
1 files changed, 14 insertions, 24 deletions
diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index c625567d9ebc..3675241315bc 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -1981,10 +1981,9 @@ static struct logical_input *panel_bind_key(char *name, char *press,
struct logical_input *key;
key = kzalloc(sizeof(struct logical_input), GFP_KERNEL);
- if (!key) {
- printk(KERN_ERR "panel: not enough memory\n");
+ if (!key)
return NULL;
- }
+
if (!input_name2mask(name, &key->mask, &key->value, &scan_mask_i,
&scan_mask_o)) {
kfree(key);
@@ -2020,10 +2019,9 @@ static struct logical_input *panel_bind_callback(char *name,
struct logical_input *callback;
callback = kmalloc(sizeof(struct logical_input), GFP_KERNEL);
- if (!callback) {
- printk(KERN_ERR "panel: not enough memory\n");
+ if (!callback)
return NULL;
- }
+
memset(callback, 0, sizeof(struct logical_input));
if (!input_name2mask(name, &callback->mask, &callback->value,
&scan_mask_i, &scan_mask_o))
@@ -2100,10 +2098,8 @@ static void panel_attach(struct parport *port)
return;
if (pprt) {
- printk(KERN_ERR
- "panel_attach(): port->number=%d parport=%d, "
- "already registered !\n",
- port->number, parport);
+ pr_err("%s: port->number=%d parport=%d, already registered!\n",
+ __func__, port->number, parport);
return;
}
@@ -2112,16 +2108,14 @@ static void panel_attach(struct parport *port)
/*PARPORT_DEV_EXCL */
0, (void *)&pprt);
if (pprt == NULL) {
- pr_err("panel_attach(): port->number=%d parport=%d, "
- "parport_register_device() failed\n",
- port->number, parport);
+ pr_err("%s: port->number=%d parport=%d, parport_register_device() failed\n",
+ __func__, port->number, parport);
return;
}
if (parport_claim(pprt)) {
- printk(KERN_ERR
- "Panel: could not claim access to parport%d. "
- "Aborting.\n", parport);
+ pr_err("could not claim access to parport%d. Aborting.\n",
+ parport);
goto err_unreg_device;
}
@@ -2155,10 +2149,8 @@ static void panel_detach(struct parport *port)
return;
if (!pprt) {
- printk(KERN_ERR
- "panel_detach(): port->number=%d parport=%d, "
- "nothing to unregister.\n",
- port->number, parport);
+ pr_err("%s: port->number=%d parport=%d, nothing to unregister.\n",
+ __func__, port->number, parport);
return;
}
@@ -2268,8 +2260,7 @@ int panel_init(void)
init_in_progress = 1;
if (parport_register_driver(&panel_driver)) {
- printk(KERN_ERR
- "Panel: could not register with parport. Aborting.\n");
+ pr_err("could not register with parport. Aborting.\n");
return -EIO;
}
@@ -2281,8 +2272,7 @@ int panel_init(void)
pprt = NULL;
}
parport_unregister_driver(&panel_driver);
- printk(KERN_ERR "Panel driver version " PANEL_VERSION
- " disabled.\n");
+ pr_err("driver version " PANEL_VERSION " disabled.\n");
return -ENODEV;
}
OpenPOWER on IntegriCloud