Commit 7b5cd5fe authored by Felipe Balbi's avatar Felipe Balbi Committed by Greg Kroah-Hartman

USB: SisUSB2VGA: Convert printk to dev_* macros

This patch convert printk entries to dev_* macros, this provide better
debugging and better readability to the code.
Signed-off-by: default avatarFelipe Balbi <felipe.lima@indt.org.br>
Cc: Thomas <thomas@winischhofer.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ecb8b190
This diff is collapsed.
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/signal.h> #include <linux/signal.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/usb.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/string.h> #include <linux/string.h>
...@@ -537,7 +538,7 @@ sisusbcon_switch(struct vc_data *c) ...@@ -537,7 +538,7 @@ sisusbcon_switch(struct vc_data *c)
*/ */
if (c->vc_origin == (unsigned long)c->vc_screenbuf) { if (c->vc_origin == (unsigned long)c->vc_screenbuf) {
mutex_unlock(&sisusb->lock); mutex_unlock(&sisusb->lock);
printk(KERN_DEBUG "sisusb: ASSERT ORIGIN != SCREENBUF!\n"); dev_dbg(&sisusb->sisusb_dev->dev, "ASSERT ORIGIN != SCREENBUF!\n");
return 0; return 0;
} }
...@@ -1428,7 +1429,7 @@ static const struct consw sisusb_dummy_con = { ...@@ -1428,7 +1429,7 @@ static const struct consw sisusb_dummy_con = {
int int
sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last) sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last)
{ {
int i, ret, minor = sisusb->minor; int i, ret;
mutex_lock(&sisusb->lock); mutex_lock(&sisusb->lock);
...@@ -1461,9 +1462,7 @@ sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last) ...@@ -1461,9 +1462,7 @@ sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last)
/* Set up text mode (and upload default font) */ /* Set up text mode (and upload default font) */
if (sisusb_reset_text_mode(sisusb, 1)) { if (sisusb_reset_text_mode(sisusb, 1)) {
mutex_unlock(&sisusb->lock); mutex_unlock(&sisusb->lock);
printk(KERN_ERR dev_err(&sisusb->sisusb_dev->dev, "Failed to set up text mode\n");
"sisusbvga[%d]: Failed to set up text mode\n",
minor);
return 1; return 1;
} }
...@@ -1484,9 +1483,7 @@ sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last) ...@@ -1484,9 +1483,7 @@ sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last)
/* Allocate screen buffer */ /* Allocate screen buffer */
if (!(sisusb->scrbuf = (unsigned long)vmalloc(sisusb->scrbuf_size))) { if (!(sisusb->scrbuf = (unsigned long)vmalloc(sisusb->scrbuf_size))) {
mutex_unlock(&sisusb->lock); mutex_unlock(&sisusb->lock);
printk(KERN_ERR dev_err(&sisusb->sisusb_dev->dev, "Failed to allocate screen buffer\n");
"sisusbvga[%d]: Failed to allocate screen buffer\n",
minor);
return 1; return 1;
} }
......
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