Commit bfc51614 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: serial: ftdi_sio.c: remove dbg() usage

dbg() was a very old USB-serial-specific macro.
This patch removes it from being used in the
driver and uses dev_dbg() instead.

CC: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
CC: Simon Arlott <simon@fire.lp0.eu>
CC: Andrew Worsley <amworsley@gmail.com>
CC: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f9dfbebb
...@@ -1043,11 +1043,12 @@ static int update_mctrl(struct usb_serial_port *port, unsigned int set, ...@@ -1043,11 +1043,12 @@ static int update_mctrl(struct usb_serial_port *port, unsigned int set,
unsigned int clear) unsigned int clear)
{ {
struct ftdi_private *priv = usb_get_serial_port_data(port); struct ftdi_private *priv = usb_get_serial_port_data(port);
struct device *dev = &port->dev;
unsigned urb_value; unsigned urb_value;
int rv; int rv;
if (((set | clear) & (TIOCM_DTR | TIOCM_RTS)) == 0) { if (((set | clear) & (TIOCM_DTR | TIOCM_RTS)) == 0) {
dbg("%s - DTR|RTS not being set|cleared", __func__); dev_dbg(dev, "%s - DTR|RTS not being set|cleared\n", __func__);
return 0; /* no change */ return 0; /* no change */
} }
...@@ -1068,18 +1069,14 @@ static int update_mctrl(struct usb_serial_port *port, unsigned int set, ...@@ -1068,18 +1069,14 @@ static int update_mctrl(struct usb_serial_port *port, unsigned int set,
urb_value, priv->interface, urb_value, priv->interface,
NULL, 0, WDR_TIMEOUT); NULL, 0, WDR_TIMEOUT);
if (rv < 0) { if (rv < 0) {
dbg("%s Error from MODEM_CTRL urb: DTR %s, RTS %s", dev_dbg(dev, "%s Error from MODEM_CTRL urb: DTR %s, RTS %s\n",
__func__, __func__,
(set & TIOCM_DTR) ? "HIGH" : (set & TIOCM_DTR) ? "HIGH" : (clear & TIOCM_DTR) ? "LOW" : "unchanged",
(clear & TIOCM_DTR) ? "LOW" : "unchanged", (set & TIOCM_RTS) ? "HIGH" : (clear & TIOCM_RTS) ? "LOW" : "unchanged");
(set & TIOCM_RTS) ? "HIGH" :
(clear & TIOCM_RTS) ? "LOW" : "unchanged");
} else { } else {
dbg("%s - DTR %s, RTS %s", __func__, dev_dbg(dev, "%s - DTR %s, RTS %s\n", __func__,
(set & TIOCM_DTR) ? "HIGH" : (set & TIOCM_DTR) ? "HIGH" : (clear & TIOCM_DTR) ? "LOW" : "unchanged",
(clear & TIOCM_DTR) ? "LOW" : "unchanged", (set & TIOCM_RTS) ? "HIGH" : (clear & TIOCM_RTS) ? "LOW" : "unchanged");
(set & TIOCM_RTS) ? "HIGH" :
(clear & TIOCM_RTS) ? "LOW" : "unchanged");
/* FIXME: locking on last_dtr_rts */ /* FIXME: locking on last_dtr_rts */
priv->last_dtr_rts = (priv->last_dtr_rts & ~clear) | set; priv->last_dtr_rts = (priv->last_dtr_rts & ~clear) | set;
} }
...@@ -1091,6 +1088,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty, ...@@ -1091,6 +1088,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty,
struct usb_serial_port *port) struct usb_serial_port *port)
{ {
struct ftdi_private *priv = usb_get_serial_port_data(port); struct ftdi_private *priv = usb_get_serial_port_data(port);
struct device *dev = &port->dev;
__u32 div_value = 0; __u32 div_value = 0;
int div_okay = 1; int div_okay = 1;
int baud; int baud;
...@@ -1126,7 +1124,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty, ...@@ -1126,7 +1124,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty,
alt_speed hack */ alt_speed hack */
baud = tty_get_baud_rate(tty); baud = tty_get_baud_rate(tty);
dbg("%s - tty_get_baud_rate reports speed %d", __func__, baud); dev_dbg(dev, "%s - tty_get_baud_rate reports speed %d\n", __func__, baud);
/* 2. Observe async-compatible custom_divisor hack, update baudrate /* 2. Observe async-compatible custom_divisor hack, update baudrate
if needed */ if needed */
...@@ -1135,7 +1133,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty, ...@@ -1135,7 +1133,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty,
((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) && ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) &&
(priv->custom_divisor)) { (priv->custom_divisor)) {
baud = priv->baud_base / priv->custom_divisor; baud = priv->baud_base / priv->custom_divisor;
dbg("%s - custom divisor %d sets baud rate to %d", dev_dbg(dev, "%s - custom divisor %d sets baud rate to %d\n",
__func__, priv->custom_divisor, baud); __func__, priv->custom_divisor, baud);
} }
...@@ -1158,7 +1156,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty, ...@@ -1158,7 +1156,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty,
case 115200: div_value = ftdi_sio_b115200; break; case 115200: div_value = ftdi_sio_b115200; break;
} /* baud */ } /* baud */
if (div_value == 0) { if (div_value == 0) {
dbg("%s - Baudrate (%d) requested is not supported", dev_dbg(dev, "%s - Baudrate (%d) requested is not supported\n",
__func__, baud); __func__, baud);
div_value = ftdi_sio_b9600; div_value = ftdi_sio_b9600;
baud = 9600; baud = 9600;
...@@ -1169,7 +1167,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty, ...@@ -1169,7 +1167,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty,
if (baud <= 3000000) { if (baud <= 3000000) {
div_value = ftdi_232am_baud_to_divisor(baud); div_value = ftdi_232am_baud_to_divisor(baud);
} else { } else {
dbg("%s - Baud rate too high!", __func__); dev_dbg(dev, "%s - Baud rate too high!\n", __func__);
baud = 9600; baud = 9600;
div_value = ftdi_232am_baud_to_divisor(9600); div_value = ftdi_232am_baud_to_divisor(9600);
div_okay = 0; div_okay = 0;
...@@ -1192,7 +1190,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty, ...@@ -1192,7 +1190,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty,
} }
div_value = ftdi_232bm_baud_to_divisor(baud); div_value = ftdi_232bm_baud_to_divisor(baud);
} else { } else {
dbg("%s - Baud rate too high!", __func__); dev_dbg(dev, "%s - Baud rate too high!\n", __func__);
div_value = ftdi_232bm_baud_to_divisor(9600); div_value = ftdi_232bm_baud_to_divisor(9600);
div_okay = 0; div_okay = 0;
baud = 9600; baud = 9600;
...@@ -1206,7 +1204,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty, ...@@ -1206,7 +1204,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty,
} else if (baud < 1200) { } else if (baud < 1200) {
div_value = ftdi_232bm_baud_to_divisor(baud); div_value = ftdi_232bm_baud_to_divisor(baud);
} else { } else {
dbg("%s - Baud rate too high!", __func__); dev_dbg(dev, "%s - Baud rate too high!\n", __func__);
div_value = ftdi_232bm_baud_to_divisor(9600); div_value = ftdi_232bm_baud_to_divisor(9600);
div_okay = 0; div_okay = 0;
baud = 9600; baud = 9600;
...@@ -1215,7 +1213,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty, ...@@ -1215,7 +1213,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty,
} /* priv->chip_type */ } /* priv->chip_type */
if (div_okay) { if (div_okay) {
dbg("%s - Baud rate set to %d (divisor 0x%lX) on chip %s", dev_dbg(dev, "%s - Baud rate set to %d (divisor 0x%lX) on chip %s\n",
__func__, baud, (unsigned long)div_value, __func__, baud, (unsigned long)div_value,
ftdi_chip_name[priv->chip_type]); ftdi_chip_name[priv->chip_type]);
} }
...@@ -1261,7 +1259,7 @@ static int write_latency_timer(struct usb_serial_port *port) ...@@ -1261,7 +1259,7 @@ static int write_latency_timer(struct usb_serial_port *port)
if (priv->flags & ASYNC_LOW_LATENCY) if (priv->flags & ASYNC_LOW_LATENCY)
l = 1; l = 1;
dbg("%s: setting latency timer = %i", __func__, l); dev_dbg(&port->dev, "%s: setting latency timer = %i\n", __func__, l);
rv = usb_control_msg(udev, rv = usb_control_msg(udev,
usb_sndctrlpipe(udev, 0), usb_sndctrlpipe(udev, 0),
...@@ -1416,7 +1414,7 @@ static void ftdi_determine_type(struct usb_serial_port *port) ...@@ -1416,7 +1414,7 @@ static void ftdi_determine_type(struct usb_serial_port *port)
version = le16_to_cpu(udev->descriptor.bcdDevice); version = le16_to_cpu(udev->descriptor.bcdDevice);
interfaces = udev->actconfig->desc.bNumInterfaces; interfaces = udev->actconfig->desc.bNumInterfaces;
dbg("%s: bcdDevice = 0x%x, bNumInterfaces = %u", __func__, dev_dbg(&port->dev, "%s: bcdDevice = 0x%x, bNumInterfaces = %u\n", __func__,
version, interfaces); version, interfaces);
if (interfaces > 1) { if (interfaces > 1) {
int inter; int inter;
...@@ -1447,7 +1445,8 @@ static void ftdi_determine_type(struct usb_serial_port *port) ...@@ -1447,7 +1445,8 @@ static void ftdi_determine_type(struct usb_serial_port *port)
/* BM-type devices have a bug where bcdDevice gets set /* BM-type devices have a bug where bcdDevice gets set
* to 0x200 when iSerialNumber is 0. */ * to 0x200 when iSerialNumber is 0. */
if (version < 0x500) { if (version < 0x500) {
dbg("%s: something fishy - bcdDevice too low for multi-interface device", dev_dbg(&port->dev,
"%s: something fishy - bcdDevice too low for multi-interface device\n",
__func__); __func__);
} }
} else if (version < 0x200) { } else if (version < 0x200) {
...@@ -1562,7 +1561,7 @@ static ssize_t store_event_char(struct device *dev, ...@@ -1562,7 +1561,7 @@ static ssize_t store_event_char(struct device *dev,
int v = simple_strtoul(valbuf, NULL, 10); int v = simple_strtoul(valbuf, NULL, 10);
int rv; int rv;
dbg("%s: setting event char = %i", __func__, v); dev_dbg(&port->dev, "%s: setting event char = %i\n", __func__, v);
rv = usb_control_msg(udev, rv = usb_control_msg(udev,
usb_sndctrlpipe(udev, 0), usb_sndctrlpipe(udev, 0),
...@@ -1571,7 +1570,7 @@ static ssize_t store_event_char(struct device *dev, ...@@ -1571,7 +1570,7 @@ static ssize_t store_event_char(struct device *dev,
v, priv->interface, v, priv->interface,
NULL, 0, WDR_TIMEOUT); NULL, 0, WDR_TIMEOUT);
if (rv < 0) { if (rv < 0) {
dbg("Unable to write event character: %i", rv); dev_dbg(&port->dev, "Unable to write event character: %i\n", rv);
return -EIO; return -EIO;
} }
...@@ -1590,7 +1589,7 @@ static int create_sysfs_attrs(struct usb_serial_port *port) ...@@ -1590,7 +1589,7 @@ static int create_sysfs_attrs(struct usb_serial_port *port)
/* XXX I've no idea if the original SIO supports the event_char /* XXX I've no idea if the original SIO supports the event_char
* sysfs parameter, so I'm playing it safe. */ * sysfs parameter, so I'm playing it safe. */
if (priv->chip_type != SIO) { if (priv->chip_type != SIO) {
dbg("sysfs attributes for %s", ftdi_chip_name[priv->chip_type]); dev_dbg(&port->dev, "sysfs attributes for %s\n", ftdi_chip_name[priv->chip_type]);
retval = device_create_file(&port->dev, &dev_attr_event_char); retval = device_create_file(&port->dev, &dev_attr_event_char);
if ((!retval) && if ((!retval) &&
(priv->chip_type == FT232BM || (priv->chip_type == FT232BM ||
...@@ -1730,8 +1729,8 @@ static int ftdi_NDI_device_setup(struct usb_serial *serial) ...@@ -1730,8 +1729,8 @@ static int ftdi_NDI_device_setup(struct usb_serial *serial)
if (latency > 99) if (latency > 99)
latency = 99; latency = 99;
dbg("%s setting NDI device latency to %d", __func__, latency); dev_dbg(&udev->dev, "%s setting NDI device latency to %d\n", __func__, latency);
dev_info(&udev->dev, "NDI device with a latency value of %d", latency); dev_info(&udev->dev, "NDI device with a latency value of %d\n", latency);
/* FIXME: errors are not returned */ /* FIXME: errors are not returned */
usb_control_msg(udev, usb_sndctrlpipe(udev, 0), usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
...@@ -1949,7 +1948,7 @@ static int ftdi_process_packet(struct tty_struct *tty, ...@@ -1949,7 +1948,7 @@ static int ftdi_process_packet(struct tty_struct *tty,
char *ch; char *ch;
if (len < 2) { if (len < 2) {
dbg("malformed packet"); dev_dbg(&port->dev, "malformed packet\n");
return 0; return 0;
} }
...@@ -2064,11 +2063,11 @@ static void ftdi_break_ctl(struct tty_struct *tty, int break_state) ...@@ -2064,11 +2063,11 @@ static void ftdi_break_ctl(struct tty_struct *tty, int break_state)
FTDI_SIO_SET_DATA_REQUEST_TYPE, FTDI_SIO_SET_DATA_REQUEST_TYPE,
urb_value , priv->interface, urb_value , priv->interface,
NULL, 0, WDR_TIMEOUT) < 0) { NULL, 0, WDR_TIMEOUT) < 0) {
dev_err(&port->dev, "%s FAILED to enable/disable break state " dev_err(&port->dev, "%s FAILED to enable/disable break state (state was %d)\n",
"(state was %d)\n", __func__, break_state); __func__, break_state);
} }
dbg("%s break state is %d - urb is %d", __func__, dev_dbg(&port->dev, "%s break state is %d - urb is %d\n", __func__,
break_state, urb_value); break_state, urb_value);
} }
...@@ -2081,6 +2080,7 @@ static void ftdi_set_termios(struct tty_struct *tty, ...@@ -2081,6 +2080,7 @@ static void ftdi_set_termios(struct tty_struct *tty,
struct usb_serial_port *port, struct ktermios *old_termios) struct usb_serial_port *port, struct ktermios *old_termios)
{ {
struct usb_device *dev = port->serial->dev; struct usb_device *dev = port->serial->dev;
struct device *ddev = &port->dev;
struct ftdi_private *priv = usb_get_serial_port_data(port); struct ftdi_private *priv = usb_get_serial_port_data(port);
struct ktermios *termios = tty->termios; struct ktermios *termios = tty->termios;
unsigned int cflag = termios->c_cflag; unsigned int cflag = termios->c_cflag;
...@@ -2094,14 +2094,14 @@ static void ftdi_set_termios(struct tty_struct *tty, ...@@ -2094,14 +2094,14 @@ static void ftdi_set_termios(struct tty_struct *tty,
/* Force baud rate if this device requires it, unless it is set to /* Force baud rate if this device requires it, unless it is set to
B0. */ B0. */
if (priv->force_baud && ((termios->c_cflag & CBAUD) != B0)) { if (priv->force_baud && ((termios->c_cflag & CBAUD) != B0)) {
dbg("%s: forcing baud rate for this device", __func__); dev_dbg(ddev, "%s: forcing baud rate for this device\n", __func__);
tty_encode_baud_rate(tty, priv->force_baud, tty_encode_baud_rate(tty, priv->force_baud,
priv->force_baud); priv->force_baud);
} }
/* Force RTS-CTS if this device requires it. */ /* Force RTS-CTS if this device requires it. */
if (priv->force_rtscts) { if (priv->force_rtscts) {
dbg("%s: forcing rtscts for this device", __func__); dev_dbg(ddev, "%s: forcing rtscts for this device\n", __func__);
termios->c_cflag |= CRTSCTS; termios->c_cflag |= CRTSCTS;
} }
...@@ -2143,10 +2143,16 @@ static void ftdi_set_termios(struct tty_struct *tty, ...@@ -2143,10 +2143,16 @@ static void ftdi_set_termios(struct tty_struct *tty,
} }
if (cflag & CSIZE) { if (cflag & CSIZE) {
switch (cflag & CSIZE) { switch (cflag & CSIZE) {
case CS7: urb_value |= 7; dbg("Setting CS7"); break; case CS7:
case CS8: urb_value |= 8; dbg("Setting CS8"); break; urb_value |= 7;
dev_dbg(ddev, "Setting CS7\n");
break;
case CS8:
urb_value |= 8;
dev_dbg(ddev, "Setting CS8\n");
break;
default: default:
dev_err(&port->dev, "CSIZE was set but not CS7-CS8\n"); dev_err(ddev, "CSIZE was set but not CS7-CS8\n");
} }
} }
...@@ -2159,8 +2165,8 @@ static void ftdi_set_termios(struct tty_struct *tty, ...@@ -2159,8 +2165,8 @@ static void ftdi_set_termios(struct tty_struct *tty,
FTDI_SIO_SET_DATA_REQUEST_TYPE, FTDI_SIO_SET_DATA_REQUEST_TYPE,
urb_value , priv->interface, urb_value , priv->interface,
NULL, 0, WDR_SHORT_TIMEOUT) < 0) { NULL, 0, WDR_SHORT_TIMEOUT) < 0) {
dev_err(&port->dev, "%s FAILED to set " dev_err(ddev, "%s FAILED to set databits/stopbits/parity\n",
"databits/stopbits/parity\n", __func__); __func__);
} }
/* Now do the baudrate */ /* Now do the baudrate */
...@@ -2172,8 +2178,7 @@ static void ftdi_set_termios(struct tty_struct *tty, ...@@ -2172,8 +2178,7 @@ static void ftdi_set_termios(struct tty_struct *tty,
FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
0, priv->interface, 0, priv->interface,
NULL, 0, WDR_TIMEOUT) < 0) { NULL, 0, WDR_TIMEOUT) < 0) {
dev_err(&port->dev, dev_err(ddev, "%s error from disable flowcontrol urb\n",
"%s error from disable flowcontrol urb\n",
__func__); __func__);
} }
/* Drop RTS and DTR */ /* Drop RTS and DTR */
...@@ -2182,8 +2187,7 @@ static void ftdi_set_termios(struct tty_struct *tty, ...@@ -2182,8 +2187,7 @@ static void ftdi_set_termios(struct tty_struct *tty,
/* set the baudrate determined before */ /* set the baudrate determined before */
mutex_lock(&priv->cfg_lock); mutex_lock(&priv->cfg_lock);
if (change_speed(tty, port)) if (change_speed(tty, port))
dev_err(&port->dev, "%s urb failed to set baudrate\n", dev_err(ddev, "%s urb failed to set baudrate\n", __func__);
__func__);
mutex_unlock(&priv->cfg_lock); mutex_unlock(&priv->cfg_lock);
/* Ensure RTS and DTR are raised when baudrate changed from 0 */ /* Ensure RTS and DTR are raised when baudrate changed from 0 */
if (!old_termios || (old_termios->c_cflag & CBAUD) == B0) if (!old_termios || (old_termios->c_cflag & CBAUD) == B0)
...@@ -2194,17 +2198,15 @@ static void ftdi_set_termios(struct tty_struct *tty, ...@@ -2194,17 +2198,15 @@ static void ftdi_set_termios(struct tty_struct *tty,
/* Note device also supports DTR/CD (ugh) and Xon/Xoff in hardware */ /* Note device also supports DTR/CD (ugh) and Xon/Xoff in hardware */
no_c_cflag_changes: no_c_cflag_changes:
if (cflag & CRTSCTS) { if (cflag & CRTSCTS) {
dbg("%s Setting to CRTSCTS flow control", __func__); dev_dbg(ddev, "%s Setting to CRTSCTS flow control\n", __func__);
if (usb_control_msg(dev, if (usb_control_msg(dev,
usb_sndctrlpipe(dev, 0), usb_sndctrlpipe(dev, 0),
FTDI_SIO_SET_FLOW_CTRL_REQUEST, FTDI_SIO_SET_FLOW_CTRL_REQUEST,
FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
0 , (FTDI_SIO_RTS_CTS_HS | priv->interface), 0 , (FTDI_SIO_RTS_CTS_HS | priv->interface),
NULL, 0, WDR_TIMEOUT) < 0) { NULL, 0, WDR_TIMEOUT) < 0) {
dev_err(&port->dev, dev_err(ddev, "urb failed to set to rts/cts flow control\n");
"urb failed to set to rts/cts flow control\n");
} }
} else { } else {
/* /*
* Xon/Xoff code * Xon/Xoff code
...@@ -2214,7 +2216,7 @@ static void ftdi_set_termios(struct tty_struct *tty, ...@@ -2214,7 +2216,7 @@ static void ftdi_set_termios(struct tty_struct *tty,
* code is executed. * code is executed.
*/ */
if (iflag & IXOFF) { if (iflag & IXOFF) {
dbg("%s request to enable xonxoff iflag=%04x", dev_dbg(ddev, "%s request to enable xonxoff iflag=%04x\n",
__func__, iflag); __func__, iflag);
/* Try to enable the XON/XOFF on the ftdi_sio /* Try to enable the XON/XOFF on the ftdi_sio
* Set the vstart and vstop -- could have been done up * Set the vstart and vstop -- could have been done up
...@@ -2240,18 +2242,16 @@ static void ftdi_set_termios(struct tty_struct *tty, ...@@ -2240,18 +2242,16 @@ static void ftdi_set_termios(struct tty_struct *tty,
/* else clause to only run if cflag ! CRTSCTS and iflag /* else clause to only run if cflag ! CRTSCTS and iflag
* ! XOFF. CHECKME Assuming XON/XOFF handled by tty * ! XOFF. CHECKME Assuming XON/XOFF handled by tty
* stack - not by device */ * stack - not by device */
dbg("%s Turning off hardware flow control", __func__); dev_dbg(ddev, "%s Turning off hardware flow control\n", __func__);
if (usb_control_msg(dev, if (usb_control_msg(dev,
usb_sndctrlpipe(dev, 0), usb_sndctrlpipe(dev, 0),
FTDI_SIO_SET_FLOW_CTRL_REQUEST, FTDI_SIO_SET_FLOW_CTRL_REQUEST,
FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
0, priv->interface, 0, priv->interface,
NULL, 0, WDR_TIMEOUT) < 0) { NULL, 0, WDR_TIMEOUT) < 0) {
dev_err(&port->dev, dev_err(ddev, "urb failed to clear flow control\n");
"urb failed to clear flow control\n");
} }
} }
} }
} }
...@@ -2345,7 +2345,7 @@ static int ftdi_ioctl(struct tty_struct *tty, ...@@ -2345,7 +2345,7 @@ static int ftdi_ioctl(struct tty_struct *tty,
struct async_icount cnow; struct async_icount cnow;
struct async_icount cprev; struct async_icount cprev;
dbg("%s cmd 0x%04x", __func__, cmd); dev_dbg(&port->dev, "%s cmd 0x%04x\n", __func__, cmd);
/* Based on code from acm.c and others */ /* Based on code from acm.c and others */
switch (cmd) { switch (cmd) {
...@@ -2393,7 +2393,8 @@ static int ftdi_ioctl(struct tty_struct *tty, ...@@ -2393,7 +2393,8 @@ static int ftdi_ioctl(struct tty_struct *tty,
/* This is not necessarily an error - turns out the higher layers /* This is not necessarily an error - turns out the higher layers
* will do some ioctls themselves (see comment above) * will do some ioctls themselves (see comment above)
*/ */
dbg("%s arg not supported - it was 0x%04x - check /usr/include/asm/ioctls.h", __func__, cmd); dev_dbg(&port->dev, "%s arg not supported - it was 0x%04x - check /usr/include/asm/ioctls.h\n",
__func__, cmd);
return -ENOIOCTLCMD; return -ENOIOCTLCMD;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment