Skip to content

Commit

Permalink
USB: remove info() macro from usb/serial drivers
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
gregkh committed Oct 17, 2008
1 parent 46fcaec commit c197a8d
Show file tree
Hide file tree
Showing 32 changed files with 96 additions and 63 deletions.
5 changes: 3 additions & 2 deletions drivers/usb/serial/belkin_sa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/cp2101.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
5 changes: 3 additions & 2 deletions drivers/usb/serial/cyberjack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/cypress_m8.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/digi_acceleport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/empeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 7 additions & 4 deletions drivers/usb/serial/ftdi_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}


Expand Down Expand Up @@ -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;
}

Expand All @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/garmin_gps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/hp4x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/io_edgeport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/io_ti.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/ipaq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/ipw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/ir-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/iuu_phoenix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/keyspan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/keyspan_pda.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 12 additions & 11 deletions drivers/usb/serial/kl5kusb105.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down Expand Up @@ -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,
Expand All @@ -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);
}
Expand Down Expand Up @@ -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 */


Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/serial/kobil_sct.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/mct_u232.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/mos7720.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/mos7840.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/omninet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/option.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/serial/pl2303.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
13 changes: 6 additions & 7 deletions drivers/usb/serial/safe_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/sierra.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/serial/spcp8x5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading

0 comments on commit c197a8d

Please sign in to comment.