@@ -26,6 +26,8 @@
* Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -64,7 +66,8 @@ static void gunze_process_packet(struct gunze* gunze)
if (gunze->idx != GUNZE_MAX_LENGTH || gunze->data[5] != ',' ||
(gunze->data[0] != 'T' && gunze->data[0] != 'R')) {
- printk(KERN_WARNING "gunze.c: bad packet: >%.*s<\n", GUNZE_MAX_LENGTH, gunze->data);
+ pr_warning("bad packet: >%.*s<\n",
+ GUNZE_MAX_LENGTH, gunze->data);
return;
}
@@ -29,6 +29,8 @@
* e-mail - mail your message to <jsimmons@transvirtual.com>.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -331,7 +333,7 @@ static irqreturn_t h3600ts_interrupt(struct serio *serio, unsigned char data,
h3600ts_process_packet(ts);
break;
default:
- printk("Error3\n");
+ pr_info("Error3\n");
break;
}
@@ -397,14 +399,14 @@ static int h3600ts_connect(struct serio *serio, struct serio_driver *drv)
if (request_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, action_button_handler,
IRQF_SHARED | IRQF_DISABLED, "h3600_action", &ts->dev)) {
- printk(KERN_ERR "h3600ts.c: Could not allocate Action Button IRQ!\n");
+ pr_err("Could not allocate Action Button IRQ!\n");
err = -EBUSY;
goto fail2;
}
if (request_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, npower_button_handler,
IRQF_SHARED | IRQF_DISABLED, "h3600_suspend", &ts->dev)) {
- printk(KERN_ERR "h3600ts.c: Could not allocate Power Button IRQ!\n");
+ pr_err("Could not allocate Power Button IRQ!\n");
err = -EBUSY;
goto fail3;
}
@@ -94,8 +94,7 @@ static int __init hp680_ts_init(void)
if (request_irq(HP680_TS_IRQ, hp680_ts_interrupt,
IRQF_DISABLED, MODNAME, 0) < 0) {
- printk(KERN_ERR "hp680_touchscreen.c: Can't allocate irq %d\n",
- HP680_TS_IRQ);
+ pr_err("Can't allocate irq %d\n", HP680_TS_IRQ);
err = -EBUSY;
goto fail1;
}
@@ -8,6 +8,8 @@
* by the Free Software Foundation.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -114,26 +116,23 @@ static int __devinit htcpen_isa_probe(struct device *dev, unsigned int id)
int err = -EBUSY;
if (!request_region(HTCPEN_PORT_IRQ_CLEAR, 1, "htcpen")) {
- printk(KERN_ERR "htcpen: unable to get IO region 0x%x\n",
- HTCPEN_PORT_IRQ_CLEAR);
+ pr_err("unable to get IO region 0x%x\n", HTCPEN_PORT_IRQ_CLEAR);
goto request_region1_failed;
}
if (!request_region(HTCPEN_PORT_INIT, 1, "htcpen")) {
- printk(KERN_ERR "htcpen: unable to get IO region 0x%x\n",
- HTCPEN_PORT_INIT);
+ pr_err("unable to get IO region 0x%x\n", HTCPEN_PORT_INIT);
goto request_region2_failed;
}
if (!request_region(HTCPEN_PORT_INDEX, 2, "htcpen")) {
- printk(KERN_ERR "htcpen: unable to get IO region 0x%x\n",
- HTCPEN_PORT_INDEX);
+ pr_err("unable to get IO region 0x%x\n", HTCPEN_PORT_INDEX);
goto request_region3_failed;
}
htcpen_dev = input_allocate_device();
if (!htcpen_dev) {
- printk(KERN_ERR "htcpen: can't allocate device\n");
+ pr_err("can't allocate device\n");
err = -ENOMEM;
goto input_alloc_failed;
}
@@ -152,7 +151,7 @@ static int __devinit htcpen_isa_probe(struct device *dev, unsigned int id)
err = request_irq(HTCPEN_IRQ, htcpen_interrupt, 0, "htcpen",
htcpen_dev);
if (err) {
- printk(KERN_ERR "htcpen: irq busy\n");
+ pr_err("irq busy\n");
goto request_irq_failed;
}
@@ -17,6 +17,8 @@
* Copied mtouch.c and edited for iNexio protocol
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -87,7 +89,8 @@ static irqreturn_t inexio_interrupt(struct serio *serio,
if (INEXIO_RESPONSE_BEGIN_BYTE&pinexio->data[0])
inexio_process_data(pinexio);
else
- printk(KERN_DEBUG "inexio.c: unknown/unsynchronized data from device, byte %x\n",pinexio->data[0]);
+ printk(KERN_DEBUG pr_fmt("unknown/unsynchronized data from device, byte %x\n"),
+ pinexio->data[0]);
return IRQ_HANDLED;
}
@@ -13,6 +13,8 @@
* HP Jornada 710/720/729 Touchscreen Driver
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/platform_device.h>
#include <linux/init.h>
#include <linux/input.h>
@@ -130,7 +132,7 @@ static int __devinit jornada720_ts_probe(struct platform_device *pdev)
IRQF_DISABLED | IRQF_TRIGGER_RISING,
"HP7XX Touchscreen driver", pdev);
if (error) {
- printk(KERN_INFO "HP7XX TS : Unable to acquire irq!\n");
+ pr_info("Unable to acquire irq!\n");
goto fail1;
}
@@ -35,6 +35,8 @@
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
@@ -154,7 +156,7 @@ static int __init mk712_init(void)
int err;
if (!request_region(mk712_io, 8, "mk712")) {
- printk(KERN_WARNING "mk712: unable to get IO region\n");
+ pr_warning("unable to get IO region\n");
return -ENODEV;
}
@@ -163,14 +165,14 @@ static int __init mk712_init(void)
if ((inw(mk712_io + MK712_X) & 0xf000) || /* Sanity check */
(inw(mk712_io + MK712_Y) & 0xf000) ||
(inw(mk712_io + MK712_STATUS) & 0xf333)) {
- printk(KERN_WARNING "mk712: device not present\n");
+ pr_warning("device not present\n");
err = -ENODEV;
goto fail1;
}
mk712_dev = input_allocate_device();
if (!mk712_dev) {
- printk(KERN_ERR "mk712: not enough memory\n");
+ pr_err("not enough memory\n");
err = -ENOMEM;
goto fail1;
}
@@ -191,7 +193,7 @@ static int __init mk712_init(void)
input_set_abs_params(mk712_dev, ABS_Y, 0, 0xfff, 88, 0);
if (request_irq(mk712_irq, mk712_interrupt, 0, "mk712", mk712_dev)) {
- printk(KERN_WARNING "mk712: unable to get IRQ\n");
+ pr_warning("unable to get IRQ\n");
err = -EBUSY;
goto fail1;
}
@@ -15,6 +15,8 @@
* Copied elo.c and edited for MicroTouch protocol
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -83,7 +85,7 @@ static void mtouch_process_response(struct mtouch *mtouch)
/* FIXME - process response */
mtouch->idx = 0;
} else if (MTOUCH_MAX_LENGTH == mtouch->idx) {
- printk(KERN_ERR "mtouch.c: too many response bytes\n");
+ pr_err("too many response bytes\n");
mtouch->idx = 0;
}
}
@@ -100,7 +102,8 @@ static irqreturn_t mtouch_interrupt(struct serio *serio,
else if (MTOUCH_RESPONSE_BEGIN_BYTE == mtouch->data[0])
mtouch_process_response(mtouch);
else
- printk(KERN_DEBUG "mtouch.c: unknown/unsynchronized data from device, byte %x\n",mtouch->data[0]);
+ printk(KERN_DEBUG pr_fmt("unknown/unsynchronized data from device, byte %x\n"),
+ mtouch->data[0]);
return IRQ_HANDLED;
}
@@ -18,6 +18,8 @@
* been made separate from ucb1x00-core/ucb1x00-ts on Russell's request.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
#include <linux/init.h>
#include <linux/completion.h>
@@ -321,7 +323,7 @@ static int ucb1400_ts_detect_irq(struct ucb1400_ts *ucb)
UCB_ADC_DAT_VALID)) {
cpu_relax();
if (time_after(jiffies, timeout)) {
- printk(KERN_ERR "ucb1400: timed out in IRQ probe\n");
+ pr_err("timed out in IRQ probe\n");
probe_irq_off(mask);
return -ENODEV;
}
@@ -358,7 +360,7 @@ static int ucb1400_ts_probe(struct platform_device *dev)
if (ucb->irq < 0) {
error = ucb1400_ts_detect_irq(ucb);
if (error) {
- printk(KERN_ERR "UCB1400: IRQ probe failed\n");
+ pr_err("IRQ probe failed\n");
goto err_free_devs;
}
}
@@ -368,11 +370,11 @@ static int ucb1400_ts_probe(struct platform_device *dev)
error = request_irq(ucb->irq, ucb1400_hard_irq, IRQF_TRIGGER_RISING,
"UCB1400", ucb);
if (error) {
- printk(KERN_ERR "ucb1400: unable to grab irq%d: %d\n",
+ pr_err("unable to grab irq%d: %d\n",
ucb->irq, error);
goto err_free_devs;
}
- printk(KERN_DEBUG "UCB1400: found IRQ %d\n", ucb->irq);
+ printk(KERN_DEBUG pr_fmt("found IRQ %d\n"), ucb->irq);
input_set_drvdata(ucb->ts_idev, ucb);
@@ -398,7 +400,7 @@ static int ucb1400_ts_probe(struct platform_device *dev)
x_res = ucb1400_ts_read_xres(ucb);
y_res = ucb1400_ts_read_yres(ucb);
ucb1400_adc_disable(ucb->ac97);
- printk(KERN_DEBUG "UCB1400: x/y = %d/%d\n", x_res, y_res);
+ printk(KERN_DEBUG pr_fmt("x/y = %d/%d\n"), x_res, y_res);
input_set_abs_params(ucb->ts_idev, ABS_X, 0, x_res, 0, 0);
input_set_abs_params(ucb->ts_idev, ABS_Y, 0, y_res, 0, 0);
@@ -43,6 +43,8 @@
*
*****************************************************************************/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
//#define DEBUG
#include <linux/kernel.h>
@@ -832,8 +834,8 @@ static int nexio_init(struct usbtouch_usb *usbtouch)
}
}
- printk(KERN_INFO "Nexio device: %s, firmware version: %s\n",
- device_name, firmware_ver);
+ pr_info("Nexio device: %s, firmware version: %s\n",
+ device_name, firmware_ver);
kfree(firmware_ver);
kfree(device_name);