Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 826575fc authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

USB: serial: keyspan_pda.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.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 255b703a
Loading
Loading
Loading
Loading
+17 −19
Original line number Original line Diff line number Diff line
@@ -137,7 +137,7 @@ static void keyspan_pda_request_unthrottle(struct work_struct *work)
				 0,
				 0,
				 2000);
				 2000);
	if (result < 0)
	if (result < 0)
		dbg("%s - error %d from usb_control_msg",
		dev_dbg(&serial->dev->dev, "%s - error %d from usb_control_msg\n",
			__func__, result);
			__func__, result);
}
}


@@ -160,12 +160,10 @@ static void keyspan_pda_rx_interrupt(struct urb *urb)
	case -ENOENT:
	case -ENOENT:
	case -ESHUTDOWN:
	case -ESHUTDOWN:
		/* this urb is terminated, clean up */
		/* this urb is terminated, clean up */
		dbg("%s - urb shutting down with status: %d",
		dev_dbg(&urb->dev->dev, "%s - urb shutting down with status: %d\n", __func__, status);
		    __func__, status);
		return;
		return;
	default:
	default:
		dbg("%s - nonzero urb status received: %d",
		dev_dbg(&urb->dev->dev, "%s - nonzero urb status received: %d\n", __func__, status);
		    __func__, status);
		goto exit;
		goto exit;
	}
	}


@@ -183,7 +181,7 @@ static void keyspan_pda_rx_interrupt(struct urb *urb)
		break;
		break;
	case 1:
	case 1:
		/* status interrupt */
		/* status interrupt */
		dbg(" rx int, d1=%d, d2=%d", data[1], data[2]);
		dev_dbg(&port->dev, "rx int, d1=%d, d2=%d\n", data[1], data[2]);
		switch (data[1]) {
		switch (data[1]) {
		case 1: /* modemline change */
		case 1: /* modemline change */
			break;
			break;
@@ -229,7 +227,7 @@ static void keyspan_pda_rx_unthrottle(struct tty_struct *tty)
	/* just restart the receive interrupt URB */
	/* just restart the receive interrupt URB */


	if (usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL))
	if (usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL))
		dbg(" usb_submit_urb(read urb) failed");
		dev_dbg(&port->dev, "usb_submit_urb(read urb) failed\n");
}
}




@@ -308,7 +306,7 @@ static void keyspan_pda_break_ctl(struct tty_struct *tty, int break_state)
			USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
			USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
			value, 0, NULL, 0, 2000);
			value, 0, NULL, 0, 2000);
	if (result < 0)
	if (result < 0)
		dbg("%s - error %d from usb_control_msg",
		dev_dbg(&port->dev, "%s - error %d from usb_control_msg\n",
			__func__, result);
			__func__, result);
	/* there is something funky about this.. the TCSBRK that 'cu' performs
	/* there is something funky about this.. the TCSBRK that 'cu' performs
	   ought to translate into a break_ctl(-1),break_ctl(0) pair HZ/4
	   ought to translate into a break_ctl(-1),break_ctl(0) pair HZ/4
@@ -347,7 +345,7 @@ static void keyspan_pda_set_termios(struct tty_struct *tty,
	speed = keyspan_pda_setbaud(serial, speed);
	speed = keyspan_pda_setbaud(serial, speed);


	if (speed == 0) {
	if (speed == 0) {
		dbg("can't handle requested baud rate");
		dev_dbg(&port->dev, "can't handle requested baud rate\n");
		/* It hasn't changed so.. */
		/* It hasn't changed so.. */
		speed = tty_termios_baud_rate(old_termios);
		speed = tty_termios_baud_rate(old_termios);
	}
	}
@@ -459,7 +457,7 @@ static int keyspan_pda_write(struct tty_struct *tty,
	   Block if we can't write anything at all, otherwise write as much as
	   Block if we can't write anything at all, otherwise write as much as
	   we can. */
	   we can. */
	if (count == 0) {
	if (count == 0) {
		dbg(" write request of 0 bytes");
		dev_dbg(&port->dev, "write request of 0 bytes\n");
		return 0;
		return 0;
	}
	}


@@ -505,16 +503,16 @@ static int keyspan_pda_write(struct tty_struct *tty,
				     1,
				     1,
				     2000);
				     2000);
		if (rc > 0) {
		if (rc > 0) {
			dbg(" roomquery says %d", *room);
			dev_dbg(&port->dev, "roomquery says %d\n", *room);
			priv->tx_room = *room;
			priv->tx_room = *room;
		}
		}
		kfree(room);
		kfree(room);
		if (rc < 0) {
		if (rc < 0) {
			dbg(" roomquery failed");
			dev_dbg(&port->dev, "roomquery failed\n");
			goto exit;
			goto exit;
		}
		}
		if (rc == 0) {
		if (rc == 0) {
			dbg(" roomquery returned 0 bytes");
			dev_dbg(&port->dev, "roomquery returned 0 bytes\n");
			rc = -EIO; /* device didn't return any data */
			rc = -EIO; /* device didn't return any data */
			goto exit;
			goto exit;
		}
		}
@@ -536,7 +534,7 @@ static int keyspan_pda_write(struct tty_struct *tty,


		rc = usb_submit_urb(port->write_urb, GFP_ATOMIC);
		rc = usb_submit_urb(port->write_urb, GFP_ATOMIC);
		if (rc) {
		if (rc) {
			dbg(" usb_submit_urb(write bulk) failed");
			dev_dbg(&port->dev, "usb_submit_urb(write bulk) failed\n");
			goto exit;
			goto exit;
		}
		}
	} else {
	} else {
@@ -639,11 +637,11 @@ static int keyspan_pda_open(struct tty_struct *tty,
			     1,
			     1,
			     2000);
			     2000);
	if (rc < 0) {
	if (rc < 0) {
		dbg("%s - roomquery failed", __func__);
		dev_dbg(&port->dev, "%s - roomquery failed\n", __func__);
		goto error;
		goto error;
	}
	}
	if (rc == 0) {
	if (rc == 0) {
		dbg("%s - roomquery returned 0 bytes", __func__);
		dev_dbg(&port->dev, "%s - roomquery returned 0 bytes\n", __func__);
		rc = -EIO;
		rc = -EIO;
		goto error;
		goto error;
	}
	}
@@ -654,7 +652,7 @@ static int keyspan_pda_open(struct tty_struct *tty,
	/*Start reading from the device*/
	/*Start reading from the device*/
	rc = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
	rc = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
	if (rc) {
	if (rc) {
		dbg("%s - usb_submit_urb(read int) failed", __func__);
		dev_dbg(&port->dev, "%s - usb_submit_urb(read int) failed\n", __func__);
		goto error;
		goto error;
	}
	}
error:
error: