]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/usb/misc/sisusbvga/sisusb_con.c
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[mv-sheeva.git] / drivers / usb / misc / sisusbvga / sisusb_con.c
index 8d0edc867f3316b969106dfb468d9f8bf249388b..b271b0557a1f9fb0db8ea382898fcbe5e18e09c8 100644 (file)
 #include <linux/kernel.h>
 #include <linux/signal.h>
 #include <linux/fs.h>
+#include <linux/usb.h>
 #include <linux/tty.h>
 #include <linux/console.h>
 #include <linux/string.h>
 #include <linux/kd.h>
 #include <linux/init.h>
-#include <linux/slab.h>
 #include <linux/vt_kern.h>
 #include <linux/selection.h>
 #include <linux/spinlock.h>
@@ -373,14 +373,6 @@ sisusbcon_putc(struct vc_data *c, int ch, int y, int x)
                return;
 
        /* sisusb->lock is down */
-
-       /* Don't need to put the character into buffer ourselves,
-        * because the vt does this BEFORE calling us.
-        */
-#if 0
-       sisusbcon_writew(ch, SISUSB_VADDR(x, y));
-#endif
-
        if (sisusb_is_inactive(c, sisusb)) {
                mutex_unlock(&sisusb->lock);
                return;
@@ -490,10 +482,6 @@ sisusbcon_bmove(struct vc_data *c, int sy, int sx,
        struct sisusb_usb_data *sisusb;
        ssize_t written;
        int cols, length;
-#if 0
-       u16 *src, *dest;
-       int i;
-#endif
 
        if (width <= 0 || height <= 0)
                return;
@@ -505,41 +493,6 @@ sisusbcon_bmove(struct vc_data *c, int sy, int sx,
 
        cols = sisusb->sisusb_num_columns;
 
-       /* Don't need to move data outselves, because
-        * vt does this BEFORE calling us.
-        * This is only used by vt's insert/deletechar.
-        */
-#if 0
-       if (sx == 0 && dx == 0 && width >= c->vc_cols && width <= cols) {
-
-               sisusbcon_memmovew(SISUSB_VADDR(0, dy), SISUSB_VADDR(0, sy),
-                                       height * width * 2);
-
-       } else if (dy < sy || (dy == sy && dx < sx)) {
-
-               src  = SISUSB_VADDR(sx, sy);
-               dest = SISUSB_VADDR(dx, dy);
-
-               for (i = height; i > 0; i--) {
-                       sisusbcon_memmovew(dest, src, width * 2);
-                       src  += cols;
-                       dest += cols;
-               }
-
-       } else {
-
-               src  = SISUSB_VADDR(sx, sy + height - 1);
-               dest = SISUSB_VADDR(dx, dy + height - 1);
-
-               for (i = height; i > 0; i--) {
-                       sisusbcon_memmovew(dest, src, width * 2);
-                       src  -= cols;
-                       dest -= cols;
-               }
-
-       }
-#endif
-
        if (sisusb_is_inactive(c, sisusb)) {
                mutex_unlock(&sisusb->lock);
                return;
@@ -584,7 +537,7 @@ sisusbcon_switch(struct vc_data *c)
         */
        if (c->vc_origin == (unsigned long)c->vc_screenbuf) {
                mutex_unlock(&sisusb->lock);
-               printk(KERN_DEBUG "sisusb: ASSERT ORIGIN != SCREENBUF!\n");
+               dev_dbg(&sisusb->sisusb_dev->dev, "ASSERT ORIGIN != SCREENBUF!\n");
                return 0;
        }
 
@@ -1088,7 +1041,8 @@ sisusbcon_set_origin(struct vc_data *c)
 
 /* Interface routine */
 static int
-sisusbcon_resize(struct vc_data *c, unsigned int newcols, unsigned int newrows)
+sisusbcon_resize(struct vc_data *c, unsigned int newcols, unsigned int newrows,
+                unsigned int user)
 {
        struct sisusb_usb_data *sisusb;
        int fh;
@@ -1475,7 +1429,7 @@ static const struct consw sisusb_dummy_con = {
 int
 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);
 
@@ -1508,9 +1462,7 @@ sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last)
        /* Set up text mode (and upload  default font) */
        if (sisusb_reset_text_mode(sisusb, 1)) {
                mutex_unlock(&sisusb->lock);
-               printk(KERN_ERR
-                       "sisusbvga[%d]: Failed to set up text mode\n",
-                       minor);
+               dev_err(&sisusb->sisusb_dev->dev, "Failed to set up text mode\n");
                return 1;
        }
 
@@ -1531,9 +1483,7 @@ sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last)
        /* Allocate screen buffer */
        if (!(sisusb->scrbuf = (unsigned long)vmalloc(sisusb->scrbuf_size))) {
                mutex_unlock(&sisusb->lock);
-               printk(KERN_ERR
-                       "sisusbvga[%d]: Failed to allocate screen buffer\n",
-                       minor);
+               dev_err(&sisusb->sisusb_dev->dev, "Failed to allocate screen buffer\n");
                return 1;
        }