Commit eb073a9b authored by Toshiaki Yamane's avatar Toshiaki Yamane Committed by Greg Kroah-Hartman

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: default avatarToshiaki Yamane <yamanetoshi@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6622bcd6
...@@ -1981,10 +1981,9 @@ static struct logical_input *panel_bind_key(char *name, char *press, ...@@ -1981,10 +1981,9 @@ static struct logical_input *panel_bind_key(char *name, char *press,
struct logical_input *key; struct logical_input *key;
key = kzalloc(sizeof(struct logical_input), GFP_KERNEL); key = kzalloc(sizeof(struct logical_input), GFP_KERNEL);
if (!key) { if (!key)
printk(KERN_ERR "panel: not enough memory\n");
return NULL; return NULL;
}
if (!input_name2mask(name, &key->mask, &key->value, &scan_mask_i, if (!input_name2mask(name, &key->mask, &key->value, &scan_mask_i,
&scan_mask_o)) { &scan_mask_o)) {
kfree(key); kfree(key);
...@@ -2020,10 +2019,9 @@ static struct logical_input *panel_bind_callback(char *name, ...@@ -2020,10 +2019,9 @@ static struct logical_input *panel_bind_callback(char *name,
struct logical_input *callback; struct logical_input *callback;
callback = kmalloc(sizeof(struct logical_input), GFP_KERNEL); callback = kmalloc(sizeof(struct logical_input), GFP_KERNEL);
if (!callback) { if (!callback)
printk(KERN_ERR "panel: not enough memory\n");
return NULL; return NULL;
}
memset(callback, 0, sizeof(struct logical_input)); memset(callback, 0, sizeof(struct logical_input));
if (!input_name2mask(name, &callback->mask, &callback->value, if (!input_name2mask(name, &callback->mask, &callback->value,
&scan_mask_i, &scan_mask_o)) &scan_mask_i, &scan_mask_o))
...@@ -2100,10 +2098,8 @@ static void panel_attach(struct parport *port) ...@@ -2100,10 +2098,8 @@ static void panel_attach(struct parport *port)
return; return;
if (pprt) { if (pprt) {
printk(KERN_ERR pr_err("%s: port->number=%d parport=%d, already registered!\n",
"panel_attach(): port->number=%d parport=%d, " __func__, port->number, parport);
"already registered !\n",
port->number, parport);
return; return;
} }
...@@ -2112,16 +2108,14 @@ static void panel_attach(struct parport *port) ...@@ -2112,16 +2108,14 @@ static void panel_attach(struct parport *port)
/*PARPORT_DEV_EXCL */ /*PARPORT_DEV_EXCL */
0, (void *)&pprt); 0, (void *)&pprt);
if (pprt == NULL) { if (pprt == NULL) {
pr_err("panel_attach(): port->number=%d parport=%d, " pr_err("%s: port->number=%d parport=%d, parport_register_device() failed\n",
"parport_register_device() failed\n", __func__, port->number, parport);
port->number, parport);
return; return;
} }
if (parport_claim(pprt)) { if (parport_claim(pprt)) {
printk(KERN_ERR pr_err("could not claim access to parport%d. Aborting.\n",
"Panel: could not claim access to parport%d. " parport);
"Aborting.\n", parport);
goto err_unreg_device; goto err_unreg_device;
} }
...@@ -2155,10 +2149,8 @@ static void panel_detach(struct parport *port) ...@@ -2155,10 +2149,8 @@ static void panel_detach(struct parport *port)
return; return;
if (!pprt) { if (!pprt) {
printk(KERN_ERR pr_err("%s: port->number=%d parport=%d, nothing to unregister.\n",
"panel_detach(): port->number=%d parport=%d, " __func__, port->number, parport);
"nothing to unregister.\n",
port->number, parport);
return; return;
} }
...@@ -2268,8 +2260,7 @@ int panel_init(void) ...@@ -2268,8 +2260,7 @@ int panel_init(void)
init_in_progress = 1; init_in_progress = 1;
if (parport_register_driver(&panel_driver)) { if (parport_register_driver(&panel_driver)) {
printk(KERN_ERR pr_err("could not register with parport. Aborting.\n");
"Panel: could not register with parport. Aborting.\n");
return -EIO; return -EIO;
} }
...@@ -2281,8 +2272,7 @@ int panel_init(void) ...@@ -2281,8 +2272,7 @@ int panel_init(void)
pprt = NULL; pprt = NULL;
} }
parport_unregister_driver(&panel_driver); parport_unregister_driver(&panel_driver);
printk(KERN_ERR "Panel driver version " PANEL_VERSION pr_err("driver version " PANEL_VERSION " disabled.\n");
" disabled.\n");
return -ENODEV; return -ENODEV;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment