include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / usb / misc / uss720.c
index 2734fe2..796e2f6 100644 (file)
@@ -49,6 +49,7 @@
 #include <linux/delay.h>
 #include <linux/completion.h>
 #include <linux/kref.h>
+#include <linux/slab.h>
 
 /*
  * Version Information
@@ -128,7 +129,7 @@ static void async_complete(struct urb *urb)
 #endif
                /* if nAck interrupts are enabled and we have an interrupt, call the interrupt procedure */
                if (rq->reg[2] & rq->reg[1] & 0x10 && pp)
-                       parport_generic_irq(0, pp);
+                       parport_generic_irq(pp);
        }
        complete(&rq->compl);
        kref_put(&rq->ref_count, destroy_async);
@@ -228,11 +229,12 @@ static int get_1284_register(struct parport *pp, unsigned char reg, unsigned cha
                ret = rq->urb->status;
                *val = priv->reg[(reg >= 9) ? 0 : regindex[reg]];
                if (ret)
-                       warn("get_1284_register: usb error %d", ret);
+                       printk(KERN_WARNING "get_1284_register: "
+                              "usb error %d\n", ret);
                kref_put(&rq->ref_count, destroy_async);
                return ret;
        }
-       warn("get_1284_register timeout");
+       printk(KERN_WARNING "get_1284_register timeout\n");
        kill_all_async_requests_priv(priv);
        return -EIO;
 }
@@ -337,7 +339,7 @@ static int uss720_irq(int usbstatus, void *buffer, int len, void *dev_id)
        memcpy(priv->reg, buffer, 4);
        /* if nAck interrupts are enabled and we have an interrupt, call the interrupt procedure */
        if (priv->reg[2] & priv->reg[1] & 0x10)
-               parport_generic_irq(0, pp);
+               parport_generic_irq(pp);
        return 1;
 }
 #endif
@@ -716,7 +718,7 @@ static int uss720_probe(struct usb_interface *intf,
        spin_lock_init(&priv->asynclock);
        INIT_LIST_HEAD(&priv->asynclist);
        if (!(pp = parport_register_port(0, PARPORT_IRQ_NONE, PARPORT_DMA_NONE, &parport_uss720_ops))) {
-               warn("could not register parport");
+               printk(KERN_WARNING "uss720: could not register parport\n");
                goto probe_abort;
        }
 
@@ -769,7 +771,7 @@ static void uss720_disconnect(struct usb_interface *intf)
 }
 
 /* table of cables that work through this driver */
-static struct usb_device_id uss720_table [] = {
+static const struct usb_device_id uss720_table[] = {
        { USB_DEVICE(0x047e, 0x1001) },
        { USB_DEVICE(0x0557, 0x2001) },
        { USB_DEVICE(0x0729, 0x1284) },
@@ -800,10 +802,14 @@ static int __init uss720_init(void)
        if (retval)
                goto out;
 
-       info(DRIVER_VERSION ":" DRIVER_DESC);
-       info("NOTE: this is a special purpose driver to allow nonstandard");
-       info("protocols (eg. bitbang) over USS720 usb to parallel cables");
-       info("If you just want to connect to a printer, use usblp instead");
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
+       printk(KERN_INFO KBUILD_MODNAME ": NOTE: this is a special purpose "
+              "driver to allow nonstandard\n");
+       printk(KERN_INFO KBUILD_MODNAME ": protocols (eg. bitbang) over "
+              "USS720 usb to parallel cables\n");
+       printk(KERN_INFO KBUILD_MODNAME ": If you just want to connect to a "
+              "printer, use usblp instead\n");
 out:
        return retval;
 }