[PATCH 02/49] drivers/staging/asus_oled: Convert printks to pr_<level>
Joe Perches
joe at perches.com
Wed Oct 14 18:53:46 PDT 2009
Signed-off-by: Joe Perches <joe at perches.com>
---
drivers/staging/asus_oled/asus_oled.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/asus_oled/asus_oled.c b/drivers/staging/asus_oled/asus_oled.c
index f4c2657..6a4b442 100644
--- a/drivers/staging/asus_oled/asus_oled.c
+++ b/drivers/staging/asus_oled/asus_oled.c
@@ -29,6 +29,8 @@
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>
@@ -369,16 +371,15 @@ static int append_values(struct asus_oled_dev *odev, uint8_t val, size_t count)
default:
i = 0;
- printk(ASUS_OLED_ERROR "Unknown OLED Pack Mode: %d!\n",
- odev->pack_mode);
+ pr_info("Unknown OLED Pack Mode: %d!\n",
+ odev->pack_mode);
break;
}
if (i >= odev->buf_size) {
- printk(ASUS_OLED_ERROR "Buffer overflow! Report a bug:"
- "offs: %d >= %d i: %d (x: %d y: %d)\n",
- (int) odev->buf_offs, (int) odev->buf_size,
- (int) i, (int) x, (int) y);
+ pr_info("Buffer overflow! Report a bug: offs: %d >= %d i: %d (x: %d y: %d)\n",
+ (int) odev->buf_offs, (int) odev->buf_size,
+ (int) i, (int) x, (int) y);
return -EIO;
}
@@ -455,8 +456,7 @@ static ssize_t odev_set_picture(struct asus_oled_dev *odev,
odev->pic_mode = buf[1];
break;
default:
- printk(ASUS_OLED_ERROR "Wrong picture mode: '%c'.\n",
- buf[1]);
+ pr_info("Wrong picture mode: '%c'.\n", buf[1]);
return -EIO;
break;
}
@@ -515,7 +515,7 @@ static ssize_t odev_set_picture(struct asus_oled_dev *odev,
if (odev->buf == NULL) {
odev->buf_size = 0;
- printk(ASUS_OLED_ERROR "Out of memory!\n");
+ pr_info("Out of memory!\n");
return -ENOMEM;
}
@@ -575,15 +575,15 @@ static ssize_t odev_set_picture(struct asus_oled_dev *odev,
return count;
error_width:
- printk(ASUS_OLED_ERROR "Wrong picture width specified.\n");
+ pr_info("Wrong picture width specified.\n");
return -EIO;
error_height:
- printk(ASUS_OLED_ERROR "Wrong picture height specified.\n");
+ pr_info("Wrong picture height specified.\n");
return -EIO;
error_header:
- printk(ASUS_OLED_ERROR "Wrong picture header.\n");
+ pr_info("Wrong picture header.\n");
return -EIO;
}
--
1.6.5.rc3.dirty
More information about the devel
mailing list