aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/serial/mos7840.c59
1 files changed, 2 insertions, 57 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index aaef523955e0..d9086ee16663 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -667,8 +667,6 @@ static void mos7840_interrupt_callback(struct urb *urb)
667 __u16 wval, wreg = 0; 667 __u16 wval, wreg = 0;
668 int status = urb->status; 668 int status = urb->status;
669 669
670 dbg("%s", " : Entering");
671
672 switch (status) { 670 switch (status) {
673 case 0: 671 case 0:
674 /* success */ 672 /* success */
@@ -842,12 +840,8 @@ static void mos7840_bulk_in_callback(struct urb *urb)
842 return; 840 return;
843 } 841 }
844 842
845 dbg("%s", "Entering... ");
846
847 data = urb->transfer_buffer; 843 data = urb->transfer_buffer;
848 844
849 dbg("%s", "Entering ...........");
850
851 if (urb->actual_length) { 845 if (urb->actual_length) {
852 tty = tty_port_tty_get(&mos7840_port->port->port); 846 tty = tty_port_tty_get(&mos7840_port->port->port);
853 if (tty) { 847 if (tty) {
@@ -919,8 +913,6 @@ static void mos7840_bulk_out_data_callback(struct urb *urb)
919 return; 913 return;
920 } 914 }
921 915
922 dbg("%s", "Entering .........");
923
924 tty = tty_port_tty_get(&mos7840_port->port->port); 916 tty = tty_port_tty_get(&mos7840_port->port->port);
925 if (tty && mos7840_port->open) 917 if (tty && mos7840_port->open)
926 tty_wakeup(tty); 918 tty_wakeup(tty);
@@ -962,8 +954,6 @@ static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port)
962 struct moschip_port *mos7840_port; 954 struct moschip_port *mos7840_port;
963 struct moschip_port *port0; 955 struct moschip_port *port0;
964 956
965 dbg ("%s enter", __func__);
966
967 if (mos7840_port_paranoia_check(port, __func__)) { 957 if (mos7840_port_paranoia_check(port, __func__)) {
968 dbg("%s", "Port Paranoia failed"); 958 dbg("%s", "Port Paranoia failed");
969 return -ENODEV; 959 return -ENODEV;
@@ -1235,10 +1225,7 @@ static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port)
1235 dbg("usb_serial serial:%p mos7840_port:%p\n usb_serial_port port:%p", 1225 dbg("usb_serial serial:%p mos7840_port:%p\n usb_serial_port port:%p",
1236 serial, mos7840_port, port); 1226 serial, mos7840_port, port);
1237 1227
1238 dbg ("%s leave", __func__);
1239
1240 return 0; 1228 return 0;
1241
1242} 1229}
1243 1230
1244/***************************************************************************** 1231/*****************************************************************************
@@ -1259,18 +1246,14 @@ static int mos7840_chars_in_buffer(struct tty_struct *tty)
1259 unsigned long flags; 1246 unsigned long flags;
1260 struct moschip_port *mos7840_port; 1247 struct moschip_port *mos7840_port;
1261 1248
1262 dbg("%s", " mos7840_chars_in_buffer:entering ...........");
1263
1264 if (mos7840_port_paranoia_check(port, __func__)) { 1249 if (mos7840_port_paranoia_check(port, __func__)) {
1265 dbg("%s", "Invalid port"); 1250 dbg("%s", "Invalid port");
1266 return 0; 1251 return 0;
1267 } 1252 }
1268 1253
1269 mos7840_port = mos7840_get_port_private(port); 1254 mos7840_port = mos7840_get_port_private(port);
1270 if (mos7840_port == NULL) { 1255 if (mos7840_port == NULL)
1271 dbg("%s", "mos7840_break:leaving ...........");
1272 return 0; 1256 return 0;
1273 }
1274 1257
1275 spin_lock_irqsave(&mos7840_port->pool_lock, flags); 1258 spin_lock_irqsave(&mos7840_port->pool_lock, flags);
1276 for (i = 0; i < NUM_URBS; ++i) 1259 for (i = 0; i < NUM_URBS; ++i)
@@ -1295,8 +1278,6 @@ static void mos7840_close(struct usb_serial_port *port)
1295 int j; 1278 int j;
1296 __u16 Data; 1279 __u16 Data;
1297 1280
1298 dbg("%s", "mos7840_close:entering...");
1299
1300 if (mos7840_port_paranoia_check(port, __func__)) { 1281 if (mos7840_port_paranoia_check(port, __func__)) {
1301 dbg("%s", "Port Paranoia failed"); 1282 dbg("%s", "Port Paranoia failed");
1302 return; 1283 return;
@@ -1371,8 +1352,6 @@ static void mos7840_close(struct usb_serial_port *port)
1371 mos7840_set_uart_reg(port, INTERRUPT_ENABLE_REGISTER, Data); 1352 mos7840_set_uart_reg(port, INTERRUPT_ENABLE_REGISTER, Data);
1372 1353
1373 mos7840_port->open = 0; 1354 mos7840_port->open = 0;
1374
1375 dbg("%s", "Leaving ............");
1376} 1355}
1377 1356
1378/************************************************************************ 1357/************************************************************************
@@ -1427,9 +1406,6 @@ static void mos7840_break(struct tty_struct *tty, int break_state)
1427 struct usb_serial *serial; 1406 struct usb_serial *serial;
1428 struct moschip_port *mos7840_port; 1407 struct moschip_port *mos7840_port;
1429 1408
1430 dbg("%s", "Entering ...........");
1431 dbg("mos7840_break: Start");
1432
1433 if (mos7840_port_paranoia_check(port, __func__)) { 1409 if (mos7840_port_paranoia_check(port, __func__)) {
1434 dbg("%s", "Port Paranoia failed"); 1410 dbg("%s", "Port Paranoia failed");
1435 return; 1411 return;
@@ -1479,8 +1455,6 @@ static int mos7840_write_room(struct tty_struct *tty)
1479 unsigned long flags; 1455 unsigned long flags;
1480 struct moschip_port *mos7840_port; 1456 struct moschip_port *mos7840_port;
1481 1457
1482 dbg("%s", " mos7840_write_room:entering ...........");
1483
1484 if (mos7840_port_paranoia_check(port, __func__)) { 1458 if (mos7840_port_paranoia_check(port, __func__)) {
1485 dbg("%s", "Invalid port"); 1459 dbg("%s", "Invalid port");
1486 dbg("%s", " mos7840_write_room:leaving ..........."); 1460 dbg("%s", " mos7840_write_room:leaving ...........");
@@ -1529,9 +1503,6 @@ static int mos7840_write(struct tty_struct *tty, struct usb_serial_port *port,
1529 /* __u16 Data; */ 1503 /* __u16 Data; */
1530 const unsigned char *current_position = data; 1504 const unsigned char *current_position = data;
1531 unsigned char *data1; 1505 unsigned char *data1;
1532 dbg("%s", "entering ...........");
1533 /* dbg("mos7840_write: mos7840_port->shadowLCR is %x",
1534 mos7840_port->shadowLCR); */
1535 1506
1536#ifdef NOTMOS7840 1507#ifdef NOTMOS7840
1537 Data = 0x00; 1508 Data = 0x00;
@@ -1694,8 +1665,6 @@ static void mos7840_throttle(struct tty_struct *tty)
1694 return; 1665 return;
1695 } 1666 }
1696 1667
1697 dbg("%s", "Entering ..........");
1698
1699 /* if we are implementing XON/XOFF, send the stop character */ 1668 /* if we are implementing XON/XOFF, send the stop character */
1700 if (I_IXOFF(tty)) { 1669 if (I_IXOFF(tty)) {
1701 unsigned char stop_char = STOP_CHAR(tty); 1670 unsigned char stop_char = STOP_CHAR(tty);
@@ -1738,8 +1707,6 @@ static void mos7840_unthrottle(struct tty_struct *tty)
1738 return; 1707 return;
1739 } 1708 }
1740 1709
1741 dbg("%s", "Entering ..........");
1742
1743 /* if we are implementing XON/XOFF, send the start character */ 1710 /* if we are implementing XON/XOFF, send the start character */
1744 if (I_IXOFF(tty)) { 1711 if (I_IXOFF(tty)) {
1745 unsigned char start_char = START_CHAR(tty); 1712 unsigned char start_char = START_CHAR(tty);
@@ -1768,8 +1735,6 @@ static int mos7840_tiocmget(struct tty_struct *tty)
1768 int status; 1735 int status;
1769 mos7840_port = mos7840_get_port_private(port); 1736 mos7840_port = mos7840_get_port_private(port);
1770 1737
1771 dbg("%s - port %d", __func__, port->number);
1772
1773 if (mos7840_port == NULL) 1738 if (mos7840_port == NULL)
1774 return -ENODEV; 1739 return -ENODEV;
1775 1740
@@ -1796,8 +1761,6 @@ static int mos7840_tiocmset(struct tty_struct *tty,
1796 unsigned int mcr; 1761 unsigned int mcr;
1797 int status; 1762 int status;
1798 1763
1799 dbg("%s - port %d", __func__, port->number);
1800
1801 mos7840_port = mos7840_get_port_private(port); 1764 mos7840_port = mos7840_get_port_private(port);
1802 1765
1803 if (mos7840_port == NULL) 1766 if (mos7840_port == NULL)
@@ -1838,7 +1801,6 @@ static int mos7840_tiocmset(struct tty_struct *tty,
1838static int mos7840_calc_baud_rate_divisor(int baudRate, int *divisor, 1801static int mos7840_calc_baud_rate_divisor(int baudRate, int *divisor,
1839 __u16 *clk_sel_val) 1802 __u16 *clk_sel_val)
1840{ 1803{
1841
1842 dbg("%s - %d", __func__, baudRate); 1804 dbg("%s - %d", __func__, baudRate);
1843 1805
1844 if (baudRate <= 115200) { 1806 if (baudRate <= 115200) {
@@ -1931,8 +1893,6 @@ static int mos7840_send_cmd_write_baud_rate(struct moschip_port *mos7840_port,
1931 return -1; 1893 return -1;
1932 } 1894 }
1933 1895
1934 dbg("%s", "Entering ..........");
1935
1936 number = mos7840_port->port->number - mos7840_port->port->serial->minor; 1896 number = mos7840_port->port->number - mos7840_port->port->serial->minor;
1937 1897
1938 dbg("%s - port = %d, baud = %d", __func__, 1898 dbg("%s - port = %d, baud = %d", __func__,
@@ -2058,8 +2018,6 @@ static void mos7840_change_port_settings(struct tty_struct *tty,
2058 return; 2018 return;
2059 } 2019 }
2060 2020
2061 dbg("%s", "Entering ..........");
2062
2063 lData = LCR_BITS_8; 2021 lData = LCR_BITS_8;
2064 lStop = LCR_STOP_1; 2022 lStop = LCR_STOP_1;
2065 lParity = LCR_PAR_NONE; 2023 lParity = LCR_PAR_NONE;
@@ -2200,7 +2158,7 @@ static void mos7840_set_termios(struct tty_struct *tty,
2200 unsigned int cflag; 2158 unsigned int cflag;
2201 struct usb_serial *serial; 2159 struct usb_serial *serial;
2202 struct moschip_port *mos7840_port; 2160 struct moschip_port *mos7840_port;
2203 dbg("mos7840_set_termios: START"); 2161
2204 if (mos7840_port_paranoia_check(port, __func__)) { 2162 if (mos7840_port_paranoia_check(port, __func__)) {
2205 dbg("%s", "Invalid port"); 2163 dbg("%s", "Invalid port");
2206 return; 2164 return;
@@ -2499,9 +2457,7 @@ static int mos7840_startup(struct usb_serial *serial)
2499 struct moschip_port *mos7840_port; 2457 struct moschip_port *mos7840_port;
2500 struct usb_device *dev; 2458 struct usb_device *dev;
2501 int i, status; 2459 int i, status;
2502
2503 __u16 Data; 2460 __u16 Data;
2504 dbg("%s", "mos7840_startup :Entering..........");
2505 2461
2506 if (!serial) { 2462 if (!serial) {
2507 dbg("%s", "Invalid Handler"); 2463 dbg("%s", "Invalid Handler");
@@ -2510,9 +2466,6 @@ static int mos7840_startup(struct usb_serial *serial)
2510 2466
2511 dev = serial->dev; 2467 dev = serial->dev;
2512 2468
2513 dbg("%s", "Entering...");
2514 dbg ("mos7840_startup: serial = %p", serial);
2515
2516 /* we set up the pointers to the endpoints in the mos7840_open * 2469 /* we set up the pointers to the endpoints in the mos7840_open *
2517 * function, as the structures aren't created yet. */ 2470 * function, as the structures aren't created yet. */
2518 2471
@@ -2768,7 +2721,6 @@ static void mos7840_disconnect(struct usb_serial *serial)
2768 int i; 2721 int i;
2769 unsigned long flags; 2722 unsigned long flags;
2770 struct moschip_port *mos7840_port; 2723 struct moschip_port *mos7840_port;
2771 dbg("%s", " disconnect :entering..........");
2772 2724
2773 if (!serial) { 2725 if (!serial) {
2774 dbg("%s", "Invalid Handler"); 2726 dbg("%s", "Invalid Handler");
@@ -2790,9 +2742,6 @@ static void mos7840_disconnect(struct usb_serial *serial)
2790 usb_kill_urb(mos7840_port->control_urb); 2742 usb_kill_urb(mos7840_port->control_urb);
2791 } 2743 }
2792 } 2744 }
2793
2794 dbg("%s", "Thank u :: ");
2795
2796} 2745}
2797 2746
2798/**************************************************************************** 2747/****************************************************************************
@@ -2804,7 +2753,6 @@ static void mos7840_release(struct usb_serial *serial)
2804{ 2753{
2805 int i; 2754 int i;
2806 struct moschip_port *mos7840_port; 2755 struct moschip_port *mos7840_port;
2807 dbg("%s", " release :entering..........");
2808 2756
2809 if (!serial) { 2757 if (!serial) {
2810 dbg("%s", "Invalid Handler"); 2758 dbg("%s", "Invalid Handler");
@@ -2833,9 +2781,6 @@ static void mos7840_release(struct usb_serial *serial)
2833 kfree(mos7840_port); 2781 kfree(mos7840_port);
2834 } 2782 }
2835 } 2783 }
2836
2837 dbg("%s", "Thank u :: ");
2838
2839} 2784}
2840 2785
2841static struct usb_driver io_driver = { 2786static struct usb_driver io_driver = {