USB: remove info() macro from usb/serial drivers
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 18 Aug 2008 20:21:04 +0000 (13:21 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 17 Oct 2008 21:41:09 +0000 (14:41 -0700)
USB should not be having it's own printk macros, so remove info() and
use the system-wide standard of dev_info() wherever possible.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
32 files changed:
drivers/usb/serial/belkin_sa.c
drivers/usb/serial/cp2101.c
drivers/usb/serial/cyberjack.c
drivers/usb/serial/cypress_m8.c
drivers/usb/serial/digi_acceleport.c
drivers/usb/serial/empeg.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/garmin_gps.c
drivers/usb/serial/hp4x.c
drivers/usb/serial/io_edgeport.c
drivers/usb/serial/io_ti.c
drivers/usb/serial/ipaq.c
drivers/usb/serial/ipw.c
drivers/usb/serial/ir-usb.c
drivers/usb/serial/iuu_phoenix.c
drivers/usb/serial/keyspan.c
drivers/usb/serial/keyspan_pda.c
drivers/usb/serial/kl5kusb105.c
drivers/usb/serial/kobil_sct.c
drivers/usb/serial/mct_u232.c
drivers/usb/serial/mos7720.c
drivers/usb/serial/mos7840.c
drivers/usb/serial/omninet.c
drivers/usb/serial/option.c
drivers/usb/serial/pl2303.c
drivers/usb/serial/safe_serial.c
drivers/usb/serial/sierra.c
drivers/usb/serial/spcp8x5.c
drivers/usb/serial/ti_usb_3410_5052.c
drivers/usb/serial/usb-serial.c
drivers/usb/serial/visor.c
drivers/usb/serial/whiteheat.c

index 1913bc7..bb19f1c 100644 (file)
@@ -187,7 +187,7 @@ static int belkin_sa_startup(struct usb_serial *serial)
        /* see comments at top of file */
        priv->bad_flow_control =
                (le16_to_cpu(dev->descriptor.bcdDevice) <= 0x0206) ? 1 : 0;
-       info("bcdDevice: %04x, bfc: %d",
+       dev_info(&dev->dev, "bcdDevice: %04x, bfc: %d\n",
                                        le16_to_cpu(dev->descriptor.bcdDevice),
                                        priv->bad_flow_control);
 
@@ -577,7 +577,8 @@ static int __init belkin_sa_init(void)
        retval = usb_register(&belkin_driver);
        if (retval)
                goto failed_usb_register;
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 failed_usb_register:
        usb_serial_deregister(&belkin_device);
index 1279553..8008d0b 100644 (file)
@@ -753,7 +753,8 @@ static int __init cp2101_init(void)
        }
 
        /* Success */
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 }
 
index 94ef36c..068680f 100644 (file)
@@ -499,8 +499,9 @@ static int __init cyberjack_init(void)
        if (retval)
                goto failed_usb_register;
 
-       info(DRIVER_VERSION " " DRIVER_AUTHOR);
-       info(DRIVER_DESC);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION " "
+              DRIVER_AUTHOR "\n");
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n");
 
        return 0;
 failed_usb_register:
index f3514a9..e0ca809 100644 (file)
@@ -1658,7 +1658,8 @@ static int __init cypress_init(void)
        if (retval)
                goto failed_usb_register;
 
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 
 failed_usb_register:
index 5756ac6..ebc2918 100644 (file)
@@ -1854,7 +1854,8 @@ static int __init digi_init(void)
        retval = usb_register(&digi_driver);
        if (retval)
                goto failed_usb_register;
-       info(DRIVER_VERSION ":" DRIVER_DESC);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 failed_usb_register:
        usb_serial_deregister(&digi_acceleport_4_device);
index 1072e84..fdd28e9 100644 (file)
@@ -519,7 +519,8 @@ static int __init empeg_init(void)
        if (retval)
                goto failed_usb_register;
 
-       info(DRIVER_VERSION ":" DRIVER_DESC);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
 
        return 0;
 failed_usb_register:
index 89dab5c..bcadb1f 100644 (file)
@@ -1154,7 +1154,7 @@ static void ftdi_determine_type(struct usb_serial_port *port)
                /* Assume its an FT232R  */
                priv->chip_type = FT232RL;
        }
-       info("Detected %s", ftdi_chip_name[priv->chip_type]);
+       dev_info(&udev->dev, "Detected %s\n", ftdi_chip_name[priv->chip_type]);
 }
 
 
@@ -1410,7 +1410,8 @@ static int ftdi_jtag_probe(struct usb_serial *serial)
        dbg("%s", __func__);
 
        if (interface == udev->actconfig->interface[0]) {
-               info("Ignoring serial port reserved for JTAG");
+               dev_info(&udev->dev,
+                        "Ignoring serial port reserved for JTAG\n");
                return -ENODEV;
        }
 
@@ -1428,7 +1429,8 @@ static int ftdi_mtxorb_hack_setup(struct usb_serial *serial)
 
        if (ep->enabled && ep_desc->wMaxPacketSize == 0) {
                ep_desc->wMaxPacketSize = cpu_to_le16(0x40);
-               info("Fixing invalid wMaxPacketSize on read pipe");
+               dev_info(&serial->dev->dev,
+                        "Fixing invalid wMaxPacketSize on read pipe\n");
        }
 
        return 0;
@@ -2426,7 +2428,8 @@ static int __init ftdi_init(void)
        if (retval)
                goto failed_usb_register;
 
-       info(DRIVER_VERSION ":" DRIVER_DESC);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 failed_usb_register:
        usb_serial_deregister(&ftdi_sio_device);
index 2ad0569..8e6a66e 100644 (file)
@@ -1585,7 +1585,8 @@ static int __init garmin_init(void)
        retval = usb_register(&garmin_driver);
        if (retval)
                goto failed_usb_register;
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
 
        return 0;
 failed_usb_register:
index ab90586..4313292 100644 (file)
@@ -63,7 +63,8 @@ static int __init hp49gp_init(void)
        retval = usb_register(&hp49gp_driver);
        if (retval)
                goto failed_usb_register;
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 failed_usb_register:
        usb_serial_deregister(&hp49gp_device);
index 611f97f..eb95efd 100644 (file)
@@ -3253,7 +3253,8 @@ static int __init edgeport_init(void)
        if (retval)
                goto failed_usb_register;
        atomic_set(&CmdUrbs, 0);
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 
 failed_usb_register:
index 541dd8e..c3cdd00 100644 (file)
@@ -2978,7 +2978,8 @@ static int __init edgeport_init(void)
        retval = usb_register(&io_driver);
        if (retval)
                goto failed_usb_register;
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 failed_usb_register:
        usb_serial_deregister(&edgeport_2port_device);
index 2affa9c..5108cbc 100644 (file)
@@ -976,7 +976,6 @@ static int __init ipaq_init(void)
        retval = usb_serial_register(&ipaq_device);
        if (retval)
                goto failed_usb_serial_register;
-       info(DRIVER_DESC " " DRIVER_VERSION);
        if (vendor) {
                ipaq_id_table[0].idVendor = vendor;
                ipaq_id_table[0].idProduct = product;
@@ -985,6 +984,8 @@ static int __init ipaq_init(void)
        if (retval)
                goto failed_usb_register;
 
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 failed_usb_register:
        usb_serial_deregister(&ipaq_device);
index 480cac2..3ac59a8 100644 (file)
@@ -485,7 +485,8 @@ static int usb_ipw_init(void)
                usb_serial_deregister(&ipw_device);
                return retval;
        }
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 }
 
index 45d4043..b679a55 100644 (file)
@@ -602,7 +602,8 @@ static int __init ir_init(void)
        if (retval)
                goto failed_usb_register;
 
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
 
        return 0;
 
index 53710aa..e320972 100644 (file)
@@ -1185,7 +1185,8 @@ static int __init iuu_init(void)
        retval = usb_register(&iuu_driver);
        if (retval)
                goto failed_usb_register;
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 failed_usb_register:
        usb_serial_deregister(&iuu_device);
index 15447af..9878c0f 100644 (file)
@@ -217,7 +217,8 @@ static int __init keyspan_init(void)
        if (retval)
                goto failed_usb_register;
 
-       info(DRIVER_VERSION ":" DRIVER_DESC);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
 
        return 0;
 failed_usb_register:
index 99e9a14..2928ba8 100644 (file)
@@ -874,7 +874,8 @@ static int __init keyspan_pda_init(void)
        retval = usb_register(&keyspan_pda_driver);
        if (retval)
                goto failed_usb_register;
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 failed_usb_register:
 #ifdef XIRCOM
index ff3a07f..573c697 100644 (file)
@@ -183,11 +183,10 @@ static int klsi_105_chg_port_settings(struct usb_serial_port *port,
                        KLSI_TIMEOUT);
        if (rc < 0)
                err("Change port settings failed (error = %d)", rc);
-       info("%s - %d byte block, baudrate %x, databits %d, u1 %d, u2 %d",
-           __func__,
-           settings->pktlen,
-           settings->baudrate, settings->databits,
-           settings->unknown1, settings->unknown2);
+       dev_info(&port->serial->dev->dev,
+                "%d byte block, baudrate %x, databits %d, u1 %d, u2 %d\n",
+                settings->pktlen, settings->baudrate, settings->databits,
+                settings->unknown1, settings->unknown2);
        return rc;
 } /* klsi_105_chg_port_settings */
 
@@ -215,7 +214,7 @@ static int klsi_105_get_line_state(struct usb_serial_port *port,
        __u8 status_buf[KLSI_STATUSBUF_LEN] = { -1, -1};
        __u16 status;
 
-       info("%s - sending SIO Poll request", __func__);
+       dev_info(&port->serial->dev->dev, "sending SIO Poll request\n");
        rc = usb_control_msg(port->serial->dev,
                             usb_rcvctrlpipe(port->serial->dev, 0),
                             KL5KUSB105A_SIO_POLL,
@@ -230,8 +229,8 @@ static int klsi_105_get_line_state(struct usb_serial_port *port,
        else {
                status = get_unaligned_le16(status_buf);
 
-               info("%s - read status %x %x", __func__,
-                    status_buf[0], status_buf[1]);
+               dev_info(&port->serial->dev->dev, "read status %x %x",
+                        status_buf[0], status_buf[1]);
 
                *line_state_p = klsi_105_status2linestate(status);
        }
@@ -475,8 +474,9 @@ static void klsi_105_close(struct tty_struct *tty,
        /* FIXME */
        /* wgg - do I need this? I think so. */
        usb_kill_urb(port->interrupt_in_urb);
-       info("kl5kusb105 port stats: %ld bytes in, %ld bytes out",
-                                       priv->bytes_in, priv->bytes_out);
+       dev_info(&port->serial->dev->dev,
+                "port stats: %ld bytes in, %ld bytes out\n",
+                priv->bytes_in, priv->bytes_out);
 } /* klsi_105_close */
 
 
@@ -960,7 +960,8 @@ static int __init klsi_105_init(void)
        if (retval)
                goto failed_usb_register;
 
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 failed_usb_register:
        usb_serial_deregister(&kl5kusb105d_device);
index cfcf37c..6286baa 100644 (file)
@@ -744,8 +744,8 @@ static int __init kobil_init(void)
        if (retval)
                goto failed_usb_register;
 
-       info(DRIVER_VERSION " " DRIVER_AUTHOR);
-       info(DRIVER_DESC);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
 
        return 0;
 failed_usb_register:
index 9b2cef8..29fa66e 100644 (file)
@@ -817,7 +817,8 @@ static int __init mct_u232_init(void)
        retval = usb_register(&mct_u232_driver);
        if (retval)
                goto failed_usb_register;
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 failed_usb_register:
        usb_serial_deregister(&mct_u232_device);
index 7b538ca..5711aa5 100644 (file)
@@ -1585,7 +1585,8 @@ static int __init moschip7720_init(void)
        if (retval)
                goto failed_port_device_register;
 
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
 
        /* Register with the usb */
        retval = usb_register(&usb_driver);
index 60543d7..d5f6826 100644 (file)
@@ -2743,7 +2743,8 @@ static int __init moschip7840_init(void)
                goto failed_port_device_register;
 
        dbg("%s\n", "Entring...");
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
 
        /* Register with the usb */
        retval = usb_register(&io_driver);
index c4d70b0..9890f26 100644 (file)
@@ -364,7 +364,8 @@ static int __init omninet_init(void)
        retval = usb_register(&omninet_driver);
        if (retval)
                goto failed_usb_register;
-       info(DRIVER_VERSION ":" DRIVER_DESC);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 failed_usb_register:
        usb_serial_deregister(&zyxel_omninet_device);
index 0d18a40..3d87eab 100644 (file)
@@ -420,7 +420,8 @@ static int __init option_init(void)
        if (retval)
                goto failed_driver_register;
 
-       info(DRIVER_DESC ": " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
 
        return 0;
 
index 9084378..491c885 100644 (file)
@@ -1147,7 +1147,7 @@ static int __init pl2303_init(void)
        retval = usb_register(&pl2303_driver);
        if (retval)
                goto failed_usb_register;
-       info(DRIVER_DESC);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n");
        return 0;
 failed_usb_register:
        usb_serial_deregister(&pl2303_device);
index 72903ac..40cff61 100644 (file)
@@ -250,8 +250,8 @@ static void safe_read_bulk_callback(struct urb *urb)
                if (!fcs) {
                        int actual_length = data[length - 2] >> 2;
                        if (actual_length <= (length - 2)) {
-                               info("%s - actual: %d", __func__,
-                                                       actual_length);
+                               dev_info(&urb->dev->dev, "%s - actual: %d\n",
+                                        __func__, actual_length);
                                tty_insert_flip_string(tty,
                                                        data, actual_length);
                                tty_flip_buffer_push(tty);
@@ -428,14 +428,13 @@ static int __init safe_init(void)
 {
        int i, retval;
 
-       info(DRIVER_VERSION " " DRIVER_AUTHOR);
-       info(DRIVER_DESC);
-       info("vendor: %x product: %x safe: %d padded: %d\n",
-                                       vendor, product, safe, padded);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
 
        /* if we have vendor / product parameters patch them into id list */
        if (vendor || product) {
-               info("vendor: %x product: %x\n", vendor, product);
+               printk(KERN_INFO KBUILD_MODNAME ": vendor: %x product: %x\n",
+                      vendor, product);
 
                for (i = 0; i < ARRAY_SIZE(id_table); i++) {
                        if (!id_table[i].idVendor && !id_table[i].idProduct) {
index 6794e57..0f2b672 100644 (file)
@@ -750,7 +750,8 @@ static int __init sierra_init(void)
        if (retval)
                goto failed_driver_register;
 
-       info(DRIVER_DESC ": " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
 
        return 0;
 
index 1533d6e..96aeec7 100644 (file)
@@ -1054,7 +1054,8 @@ static int __init spcp8x5_init(void)
        retval = usb_register(&spcp8x5_driver);
        if (retval)
                goto failed_usb_register;
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 failed_usb_register:
        usb_serial_deregister(&spcp8x5_device);
index a9523b8..31c42d1 100644 (file)
@@ -382,7 +382,8 @@ static int __init ti_init(void)
        if (ret)
                goto failed_usb;
 
-       info(TI_DRIVER_DESC " " TI_DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " TI_DRIVER_VERSION ":"
+              TI_DRIVER_DESC "\n");
 
        return 0;
 
index e7d4246..92ba4f7 100644 (file)
@@ -1160,7 +1160,7 @@ static int __init usb_serial_init(void)
                goto exit_generic;
        }
 
-       info(DRIVER_DESC);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n");
 
        return result;
 
@@ -1237,7 +1237,7 @@ int usb_serial_register(struct usb_serial_driver *driver)
                                                retval, driver->description);
                list_del(&driver->driver_list);
        } else
-               info("USB Serial support registered for %s",
+               printk(KERN_INFO "USB Serial support registered for %s\n",
                                                driver->description);
 
        return retval;
@@ -1248,7 +1248,8 @@ EXPORT_SYMBOL_GPL(usb_serial_register);
 void usb_serial_deregister(struct usb_serial_driver *device)
 {
        /* must be called with BKL held */
-       info("USB Serial deregistering driver %s", device->description);
+       printk(KERN_INFO "USB Serial deregistering driver %s\n",
+              device->description);
        list_del(&device->driver_list);
        usb_serial_bus_deregister(device);
 }
index a6d1c75..de4b5f0 100644 (file)
@@ -971,11 +971,14 @@ static int __init visor_init(void)
                                break;
                        }
                }
-               info(
-                 "Untested USB device specified at time of module insertion");
-               info("Warning: This is not guaranteed to work");
-               info("Using a newer kernel is preferred to this method");
-               info("Adding Palm OS protocol 4.x support for unknown device: 0x%x/0x%x",
+               printk(KERN_INFO KBUILD_MODNAME
+                      ": Untested USB device specified at time of module insertion\n");
+               printk(KERN_INFO KBUILD_MODNAME
+                      ": Warning: This is not guaranteed to work\n");
+               printk(KERN_INFO KBUILD_MODNAME
+                      ": Using a newer kernel is preferred to this method\n");
+               printk(KERN_INFO KBUILD_MODNAME
+                      ": Adding Palm OS protocol 4.x support for unknown device: 0x%x/0x%x\n",
                        vendor, product);
        }
        retval = usb_serial_register(&handspring_device);
@@ -990,7 +993,7 @@ static int __init visor_init(void)
        retval = usb_register(&visor_driver);
        if (retval)
                goto failed_usb_register;
-       info(DRIVER_DESC);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n");
 
        return 0;
 failed_usb_register:
index 11c8b97..39f7f8d 100644 (file)
@@ -452,8 +452,9 @@ static int whiteheat_attach(struct usb_serial *serial)
 
        hw_info = (struct whiteheat_hw_info *)&result[1];
 
-       info("%s: Driver %s: Firmware v%d.%02d", serial->type->description,
-            DRIVER_VERSION, hw_info->sw_major_rev, hw_info->sw_minor_rev);
+       dev_info(&serial->dev->dev, "%s: Driver %s: Firmware v%d.%02d\n",
+                serial->type->description, DRIVER_VERSION,
+                hw_info->sw_major_rev, hw_info->sw_minor_rev);
 
        for (i = 0; i < serial->num_ports; i++) {
                port = serial->port[i];
@@ -1556,7 +1557,8 @@ static int __init whiteheat_init(void)
        retval = usb_register(&whiteheat_driver);
        if (retval)
                goto failed_usb_register;
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 failed_usb_register:
        usb_serial_deregister(&whiteheat_device);