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);
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))
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;
}
/*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;
}
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;
}
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;
}
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;
}