summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYAMANE Toshiaki <yamanetoshi@gmail.com>2012-10-25 09:16:49 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-24 19:42:34 -0700
commit4f72b738b1c8a9502a297f998b83ffae0815024b (patch)
tree7a5e942186bd8227c03d4b5046c715edb75fe274 /drivers
parent2847ff5d1b63496c2e3eedb8efad2752cc2e195d (diff)
downloadlinux-3.10-4f72b738b1c8a9502a297f998b83ffae0815024b.tar.gz
linux-3.10-4f72b738b1c8a9502a297f998b83ffae0815024b.tar.bz2
linux-3.10-4f72b738b1c8a9502a297f998b83ffae0815024b.zip
staging/comedi: Use pr_ or dev_ printks in drivers/serial2002.c
fixed below checkpatch warning. - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... and added pr_fmt. Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/comedi/drivers/serial2002.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c
index 4b3b9b02947..e6177b48cca 100644
--- a/drivers/staging/comedi/drivers/serial2002.c
+++ b/drivers/staging/comedi/drivers/serial2002.c
@@ -31,6 +31,8 @@ Status: in development
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include "../comedidev.h"
#include <linux/delay.h>
@@ -272,7 +274,7 @@ static struct serial_data serial_read(struct file *f, int timeout)
length++;
if (data < 0) {
- printk(KERN_ERR "serial2002 error\n");
+ pr_err("Failed to read serial.\n");
break;
} else if (data & 0x80) {
result.value = (result.value << 7) | (data & 0x7f);
@@ -346,7 +348,7 @@ static int serial_2002_open(struct comedi_device *dev)
devpriv->tty = filp_open(port, O_RDWR, 0);
if (IS_ERR(devpriv->tty)) {
result = (int)PTR_ERR(devpriv->tty);
- printk(KERN_ERR "serial_2002: file open error = %d\n", result);
+ dev_err(dev->class_dev, "file open error = %d\n", result);
} else {
struct config_t {