USB: remove info() macro from usb/serial drivers

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>
This commit is contained in:
Greg Kroah-Hartman 2008-08-18 13:21:04 -07:00
parent 46fcaec505
commit c197a8db59
32 changed files with 96 additions and 63 deletions

View 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);

View 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;
}

View 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:

View 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:

View 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);

View 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:

View 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);

View 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:

View 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);

View 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:

View 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);

View 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);

View 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;
}

View 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;

View 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);

View 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:

View 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

View 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);

View 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:

View 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);

View 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);

View 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);

View 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);

View 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;

View 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);

View 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) {

View 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;

View 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);

View 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;

View 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);
}

View 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:

View 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);