aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-03-03 19:08:34 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 00:16:55 -0400
commit441b62c1edb986827154768d89bbac0ba779984f (patch)
tree13724c22d1b190a36f0ddbba38554e6c66bea6af /drivers/usb
parent14722ef4acedc643f0b78b7165ceff2d300dae4d (diff)
USB: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/atm/ueagle-atm.c6
-rw-r--r--drivers/usb/class/cdc-acm.c6
-rw-r--r--drivers/usb/core/devio.c42
-rw-r--r--drivers/usb/core/driver.c30
-rw-r--r--drivers/usb/core/hub.c8
-rw-r--r--drivers/usb/core/inode.c4
-rw-r--r--drivers/usb/core/message.c8
-rw-r--r--drivers/usb/core/urb.c2
-rw-r--r--drivers/usb/gadget/at91_udc.c4
-rw-r--r--drivers/usb/gadget/dummy_hcd.c12
-rw-r--r--drivers/usb/gadget/ether.c12
-rw-r--r--drivers/usb/gadget/file_storage.c8
-rw-r--r--drivers/usb/gadget/fsl_usb2_udc.c4
-rw-r--r--drivers/usb/gadget/fsl_usb2_udc.h2
-rw-r--r--drivers/usb/gadget/goku_udc.c20
-rw-r--r--drivers/usb/gadget/inode.c18
-rw-r--r--drivers/usb/gadget/lh7a40x_udc.c132
-rw-r--r--drivers/usb/gadget/net2280.h2
-rw-r--r--drivers/usb/gadget/omap_udc.c16
-rw-r--r--drivers/usb/gadget/printer.c6
-rw-r--r--drivers/usb/gadget/pxa2xx_udc.c26
-rw-r--r--drivers/usb/gadget/rndis.c146
-rw-r--r--drivers/usb/host/ehci-q.c4
-rw-r--r--drivers/usb/host/ehci-sched.c2
-rw-r--r--drivers/usb/host/pci-quirks.c6
-rw-r--r--drivers/usb/host/sl811-hcd.c4
-rw-r--r--drivers/usb/host/uhci-hcd.c6
-rw-r--r--drivers/usb/host/uhci-q.c2
-rw-r--r--drivers/usb/misc/adutux.c120
-rw-r--r--drivers/usb/misc/appledisplay.c6
-rw-r--r--drivers/usb/misc/auerswald.c8
-rw-r--r--drivers/usb/misc/emi26.c30
-rw-r--r--drivers/usb/misc/emi62.c32
-rw-r--r--drivers/usb/misc/iowarrior.c6
-rw-r--r--drivers/usb/misc/ldusb.c10
-rw-r--r--drivers/usb/misc/legousbtower.c88
-rw-r--r--drivers/usb/misc/phidgetkit.c6
-rw-r--r--drivers/usb/misc/phidgetmotorcontrol.c2
-rw-r--r--drivers/usb/misc/phidgetservo.c6
-rw-r--r--drivers/usb/misc/usblcd.c6
-rw-r--r--drivers/usb/misc/usbtest.c4
-rw-r--r--drivers/usb/serial/aircable.c52
-rw-r--r--drivers/usb/serial/airprime.c34
-rw-r--r--drivers/usb/serial/ark3116.c6
-rw-r--r--drivers/usb/serial/belkin_sa.c18
-rw-r--r--drivers/usb/serial/console.c10
-rw-r--r--drivers/usb/serial/cp2101.c108
-rw-r--r--drivers/usb/serial/cyberjack.c72
-rw-r--r--drivers/usb/serial/cypress_m8.c128
-rw-r--r--drivers/usb/serial/digi_acceleport.c36
-rw-r--r--drivers/usb/serial/empeg.c54
-rw-r--r--drivers/usb/serial/ezusb.c8
-rw-r--r--drivers/usb/serial/ftdi_sio.c156
-rw-r--r--drivers/usb/serial/garmin_gps.c106
-rw-r--r--drivers/usb/serial/generic.c44
-rw-r--r--drivers/usb/serial/io_edgeport.c318
-rw-r--r--drivers/usb/serial/io_ti.c364
-rw-r--r--drivers/usb/serial/ipaq.c44
-rw-r--r--drivers/usb/serial/ipw.c48
-rw-r--r--drivers/usb/serial/ir-usb.c46
-rw-r--r--drivers/usb/serial/iuu_phoenix.c128
-rw-r--r--drivers/usb/serial/keyspan.c234
-rw-r--r--drivers/usb/serial/keyspan_pda.c20
-rw-r--r--drivers/usb/serial/kl5kusb105.c78
-rw-r--r--drivers/usb/serial/kobil_sct.c56
-rw-r--r--drivers/usb/serial/mct_u232.c36
-rw-r--r--drivers/usb/serial/mos7720.c118
-rw-r--r--drivers/usb/serial/mos7840.c150
-rw-r--r--drivers/usb/serial/navman.c18
-rw-r--r--drivers/usb/serial/omninet.c32
-rw-r--r--drivers/usb/serial/option.c64
-rw-r--r--drivers/usb/serial/oti6858.c108
-rw-r--r--drivers/usb/serial/pl2303.c106
-rw-r--r--drivers/usb/serial/safe_serial.c28
-rw-r--r--drivers/usb/serial/sierra.c62
-rw-r--r--drivers/usb/serial/ti_usb_3410_5052.c190
-rw-r--r--drivers/usb/serial/usb-serial.c78
-rw-r--r--drivers/usb/serial/visor.c86
-rw-r--r--drivers/usb/serial/whiteheat.c104
-rw-r--r--drivers/usb/storage/scsiglue.c10
-rw-r--r--drivers/usb/storage/transport.c18
-rw-r--r--drivers/usb/storage/usb.c16
-rw-r--r--drivers/usb/usb-skeleton.c6
83 files changed, 2130 insertions, 2130 deletions
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index c5ec1a55eee3..abb7d7410e63 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -83,7 +83,7 @@
83 if (debug >= 1) \ 83 if (debug >= 1) \
84 dev_dbg(&(usb_dev)->dev, \ 84 dev_dbg(&(usb_dev)->dev, \
85 "[ueagle-atm dbg] %s: " format, \ 85 "[ueagle-atm dbg] %s: " format, \
86 __FUNCTION__, ##args); \ 86 __func__, ##args); \
87 } while (0) 87 } while (0)
88 88
89#define uea_vdbg(usb_dev, format, args...) \ 89#define uea_vdbg(usb_dev, format, args...) \
@@ -94,10 +94,10 @@
94 } while (0) 94 } while (0)
95 95
96#define uea_enters(usb_dev) \ 96#define uea_enters(usb_dev) \
97 uea_vdbg(usb_dev, "entering %s\n", __FUNCTION__) 97 uea_vdbg(usb_dev, "entering %s\n", __func__)
98 98
99#define uea_leaves(usb_dev) \ 99#define uea_leaves(usb_dev) \
100 uea_vdbg(usb_dev, "leaving %s\n", __FUNCTION__) 100 uea_vdbg(usb_dev, "leaving %s\n", __func__)
101 101
102#define uea_err(usb_dev, format,args...) \ 102#define uea_err(usb_dev, format,args...) \
103 dev_err(&(usb_dev)->dev ,"[UEAGLE-ATM] " format , ##args) 103 dev_err(&(usb_dev)->dev ,"[UEAGLE-ATM] " format , ##args)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 6d57413ac0f5..33cdf8fa2f20 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -260,10 +260,10 @@ static void acm_ctrl_irq(struct urb *urb)
260 case -ENOENT: 260 case -ENOENT:
261 case -ESHUTDOWN: 261 case -ESHUTDOWN:
262 /* this urb is terminated, clean up */ 262 /* this urb is terminated, clean up */
263 dbg("%s - urb shutting down with status: %d", __FUNCTION__, status); 263 dbg("%s - urb shutting down with status: %d", __func__, status);
264 return; 264 return;
265 default: 265 default:
266 dbg("%s - nonzero urb status received: %d", __FUNCTION__, status); 266 dbg("%s - nonzero urb status received: %d", __func__, status);
267 goto exit; 267 goto exit;
268 } 268 }
269 269
@@ -307,7 +307,7 @@ exit:
307 retval = usb_submit_urb (urb, GFP_ATOMIC); 307 retval = usb_submit_urb (urb, GFP_ATOMIC);
308 if (retval) 308 if (retval)
309 err ("%s - usb_submit_urb failed with result %d", 309 err ("%s - usb_submit_urb failed with result %d",
310 __FUNCTION__, retval); 310 __func__, retval);
311} 311}
312 312
313/* data interface returns incoming bytes, or we got unthrottled */ 313/* data interface returns incoming bytes, or we got unthrottled */
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 6c4cd82d7d14..de17738f3acb 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1530,60 +1530,60 @@ static int usbdev_ioctl(struct inode *inode, struct file *file,
1530 1530
1531 switch (cmd) { 1531 switch (cmd) {
1532 case USBDEVFS_CONTROL: 1532 case USBDEVFS_CONTROL:
1533 snoop(&dev->dev, "%s: CONTROL\n", __FUNCTION__); 1533 snoop(&dev->dev, "%s: CONTROL\n", __func__);
1534 ret = proc_control(ps, p); 1534 ret = proc_control(ps, p);
1535 if (ret >= 0) 1535 if (ret >= 0)
1536 inode->i_mtime = CURRENT_TIME; 1536 inode->i_mtime = CURRENT_TIME;
1537 break; 1537 break;
1538 1538
1539 case USBDEVFS_BULK: 1539 case USBDEVFS_BULK:
1540 snoop(&dev->dev, "%s: BULK\n", __FUNCTION__); 1540 snoop(&dev->dev, "%s: BULK\n", __func__);
1541 ret = proc_bulk(ps, p); 1541 ret = proc_bulk(ps, p);
1542 if (ret >= 0) 1542 if (ret >= 0)
1543 inode->i_mtime = CURRENT_TIME; 1543 inode->i_mtime = CURRENT_TIME;
1544 break; 1544 break;
1545 1545
1546 case USBDEVFS_RESETEP: 1546 case USBDEVFS_RESETEP:
1547 snoop(&dev->dev, "%s: RESETEP\n", __FUNCTION__); 1547 snoop(&dev->dev, "%s: RESETEP\n", __func__);
1548 ret = proc_resetep(ps, p); 1548 ret = proc_resetep(ps, p);
1549 if (ret >= 0) 1549 if (ret >= 0)
1550 inode->i_mtime = CURRENT_TIME; 1550 inode->i_mtime = CURRENT_TIME;
1551 break; 1551 break;
1552 1552
1553 case USBDEVFS_RESET: 1553 case USBDEVFS_RESET:
1554 snoop(&dev->dev, "%s: RESET\n", __FUNCTION__); 1554 snoop(&dev->dev, "%s: RESET\n", __func__);
1555 ret = proc_resetdevice(ps); 1555 ret = proc_resetdevice(ps);
1556 break; 1556 break;
1557 1557
1558 case USBDEVFS_CLEAR_HALT: 1558 case USBDEVFS_CLEAR_HALT:
1559 snoop(&dev->dev, "%s: CLEAR_HALT\n", __FUNCTION__); 1559 snoop(&dev->dev, "%s: CLEAR_HALT\n", __func__);
1560 ret = proc_clearhalt(ps, p); 1560 ret = proc_clearhalt(ps, p);
1561 if (ret >= 0) 1561 if (ret >= 0)
1562 inode->i_mtime = CURRENT_TIME; 1562 inode->i_mtime = CURRENT_TIME;
1563 break; 1563 break;
1564 1564
1565 case USBDEVFS_GETDRIVER: 1565 case USBDEVFS_GETDRIVER:
1566 snoop(&dev->dev, "%s: GETDRIVER\n", __FUNCTION__); 1566 snoop(&dev->dev, "%s: GETDRIVER\n", __func__);
1567 ret = proc_getdriver(ps, p); 1567 ret = proc_getdriver(ps, p);
1568 break; 1568 break;
1569 1569
1570 case USBDEVFS_CONNECTINFO: 1570 case USBDEVFS_CONNECTINFO:
1571 snoop(&dev->dev, "%s: CONNECTINFO\n", __FUNCTION__); 1571 snoop(&dev->dev, "%s: CONNECTINFO\n", __func__);
1572 ret = proc_connectinfo(ps, p); 1572 ret = proc_connectinfo(ps, p);
1573 break; 1573 break;
1574 1574
1575 case USBDEVFS_SETINTERFACE: 1575 case USBDEVFS_SETINTERFACE:
1576 snoop(&dev->dev, "%s: SETINTERFACE\n", __FUNCTION__); 1576 snoop(&dev->dev, "%s: SETINTERFACE\n", __func__);
1577 ret = proc_setintf(ps, p); 1577 ret = proc_setintf(ps, p);
1578 break; 1578 break;
1579 1579
1580 case USBDEVFS_SETCONFIGURATION: 1580 case USBDEVFS_SETCONFIGURATION:
1581 snoop(&dev->dev, "%s: SETCONFIGURATION\n", __FUNCTION__); 1581 snoop(&dev->dev, "%s: SETCONFIGURATION\n", __func__);
1582 ret = proc_setconfig(ps, p); 1582 ret = proc_setconfig(ps, p);
1583 break; 1583 break;
1584 1584
1585 case USBDEVFS_SUBMITURB: 1585 case USBDEVFS_SUBMITURB:
1586 snoop(&dev->dev, "%s: SUBMITURB\n", __FUNCTION__); 1586 snoop(&dev->dev, "%s: SUBMITURB\n", __func__);
1587 ret = proc_submiturb(ps, p); 1587 ret = proc_submiturb(ps, p);
1588 if (ret >= 0) 1588 if (ret >= 0)
1589 inode->i_mtime = CURRENT_TIME; 1589 inode->i_mtime = CURRENT_TIME;
@@ -1592,60 +1592,60 @@ static int usbdev_ioctl(struct inode *inode, struct file *file,
1592#ifdef CONFIG_COMPAT 1592#ifdef CONFIG_COMPAT
1593 1593
1594 case USBDEVFS_SUBMITURB32: 1594 case USBDEVFS_SUBMITURB32:
1595 snoop(&dev->dev, "%s: SUBMITURB32\n", __FUNCTION__); 1595 snoop(&dev->dev, "%s: SUBMITURB32\n", __func__);
1596 ret = proc_submiturb_compat(ps, p); 1596 ret = proc_submiturb_compat(ps, p);
1597 if (ret >= 0) 1597 if (ret >= 0)
1598 inode->i_mtime = CURRENT_TIME; 1598 inode->i_mtime = CURRENT_TIME;
1599 break; 1599 break;
1600 1600
1601 case USBDEVFS_REAPURB32: 1601 case USBDEVFS_REAPURB32:
1602 snoop(&dev->dev, "%s: REAPURB32\n", __FUNCTION__); 1602 snoop(&dev->dev, "%s: REAPURB32\n", __func__);
1603 ret = proc_reapurb_compat(ps, p); 1603 ret = proc_reapurb_compat(ps, p);
1604 break; 1604 break;
1605 1605
1606 case USBDEVFS_REAPURBNDELAY32: 1606 case USBDEVFS_REAPURBNDELAY32:
1607 snoop(&dev->dev, "%s: REAPURBDELAY32\n", __FUNCTION__); 1607 snoop(&dev->dev, "%s: REAPURBDELAY32\n", __func__);
1608 ret = proc_reapurbnonblock_compat(ps, p); 1608 ret = proc_reapurbnonblock_compat(ps, p);
1609 break; 1609 break;
1610 1610
1611 case USBDEVFS_IOCTL32: 1611 case USBDEVFS_IOCTL32:
1612 snoop(&dev->dev, "%s: IOCTL\n", __FUNCTION__); 1612 snoop(&dev->dev, "%s: IOCTL\n", __func__);
1613 ret = proc_ioctl_compat(ps, ptr_to_compat(p)); 1613 ret = proc_ioctl_compat(ps, ptr_to_compat(p));
1614 break; 1614 break;
1615#endif 1615#endif
1616 1616
1617 case USBDEVFS_DISCARDURB: 1617 case USBDEVFS_DISCARDURB:
1618 snoop(&dev->dev, "%s: DISCARDURB\n", __FUNCTION__); 1618 snoop(&dev->dev, "%s: DISCARDURB\n", __func__);
1619 ret = proc_unlinkurb(ps, p); 1619 ret = proc_unlinkurb(ps, p);
1620 break; 1620 break;
1621 1621
1622 case USBDEVFS_REAPURB: 1622 case USBDEVFS_REAPURB:
1623 snoop(&dev->dev, "%s: REAPURB\n", __FUNCTION__); 1623 snoop(&dev->dev, "%s: REAPURB\n", __func__);
1624 ret = proc_reapurb(ps, p); 1624 ret = proc_reapurb(ps, p);
1625 break; 1625 break;
1626 1626
1627 case USBDEVFS_REAPURBNDELAY: 1627 case USBDEVFS_REAPURBNDELAY:
1628 snoop(&dev->dev, "%s: REAPURBDELAY\n", __FUNCTION__); 1628 snoop(&dev->dev, "%s: REAPURBDELAY\n", __func__);
1629 ret = proc_reapurbnonblock(ps, p); 1629 ret = proc_reapurbnonblock(ps, p);
1630 break; 1630 break;
1631 1631
1632 case USBDEVFS_DISCSIGNAL: 1632 case USBDEVFS_DISCSIGNAL:
1633 snoop(&dev->dev, "%s: DISCSIGNAL\n", __FUNCTION__); 1633 snoop(&dev->dev, "%s: DISCSIGNAL\n", __func__);
1634 ret = proc_disconnectsignal(ps, p); 1634 ret = proc_disconnectsignal(ps, p);
1635 break; 1635 break;
1636 1636
1637 case USBDEVFS_CLAIMINTERFACE: 1637 case USBDEVFS_CLAIMINTERFACE:
1638 snoop(&dev->dev, "%s: CLAIMINTERFACE\n", __FUNCTION__); 1638 snoop(&dev->dev, "%s: CLAIMINTERFACE\n", __func__);
1639 ret = proc_claiminterface(ps, p); 1639 ret = proc_claiminterface(ps, p);
1640 break; 1640 break;
1641 1641
1642 case USBDEVFS_RELEASEINTERFACE: 1642 case USBDEVFS_RELEASEINTERFACE:
1643 snoop(&dev->dev, "%s: RELEASEINTERFACE\n", __FUNCTION__); 1643 snoop(&dev->dev, "%s: RELEASEINTERFACE\n", __func__);
1644 ret = proc_releaseinterface(ps, p); 1644 ret = proc_releaseinterface(ps, p);
1645 break; 1645 break;
1646 1646
1647 case USBDEVFS_IOCTL: 1647 case USBDEVFS_IOCTL:
1648 snoop(&dev->dev, "%s: IOCTL\n", __FUNCTION__); 1648 snoop(&dev->dev, "%s: IOCTL\n", __func__);
1649 ret = proc_ioctl_default(ps, p); 1649 ret = proc_ioctl_default(ps, p);
1650 break; 1650 break;
1651 } 1651 }
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index edc31e13e95e..1e56f1cfa6dc 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -157,7 +157,7 @@ static int usb_probe_device(struct device *dev)
157 struct usb_device *udev; 157 struct usb_device *udev;
158 int error = -ENODEV; 158 int error = -ENODEV;
159 159
160 dev_dbg(dev, "%s\n", __FUNCTION__); 160 dev_dbg(dev, "%s\n", __func__);
161 161
162 if (!is_usb_device(dev)) /* Sanity check */ 162 if (!is_usb_device(dev)) /* Sanity check */
163 return error; 163 return error;
@@ -194,7 +194,7 @@ static int usb_probe_interface(struct device *dev)
194 const struct usb_device_id *id; 194 const struct usb_device_id *id;
195 int error = -ENODEV; 195 int error = -ENODEV;
196 196
197 dev_dbg(dev, "%s\n", __FUNCTION__); 197 dev_dbg(dev, "%s\n", __func__);
198 198
199 if (is_usb_device(dev)) /* Sanity check */ 199 if (is_usb_device(dev)) /* Sanity check */
200 return error; 200 return error;
@@ -211,7 +211,7 @@ static int usb_probe_interface(struct device *dev)
211 if (!id) 211 if (!id)
212 id = usb_match_dynamic_id(intf, driver); 212 id = usb_match_dynamic_id(intf, driver);
213 if (id) { 213 if (id) {
214 dev_dbg(dev, "%s - got id\n", __FUNCTION__); 214 dev_dbg(dev, "%s - got id\n", __func__);
215 215
216 error = usb_autoresume_device(udev); 216 error = usb_autoresume_device(udev);
217 if (error) 217 if (error)
@@ -793,7 +793,7 @@ static int usb_suspend_device(struct usb_device *udev, pm_message_t msg)
793 status = udriver->suspend(udev, msg); 793 status = udriver->suspend(udev, msg);
794 794
795 done: 795 done:
796 dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status); 796 dev_vdbg(&udev->dev, "%s: status %d\n", __func__, status);
797 return status; 797 return status;
798} 798}
799 799
@@ -821,7 +821,7 @@ static int usb_resume_device(struct usb_device *udev)
821 status = udriver->resume(udev); 821 status = udriver->resume(udev);
822 822
823 done: 823 done:
824 dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status); 824 dev_vdbg(&udev->dev, "%s: status %d\n", __func__, status);
825 if (status == 0) 825 if (status == 0)
826 udev->autoresume_disabled = 0; 826 udev->autoresume_disabled = 0;
827 return status; 827 return status;
@@ -860,7 +860,7 @@ static int usb_suspend_interface(struct usb_interface *intf, pm_message_t msg)
860 } 860 }
861 861
862 done: 862 done:
863 dev_vdbg(&intf->dev, "%s: status %d\n", __FUNCTION__, status); 863 dev_vdbg(&intf->dev, "%s: status %d\n", __func__, status);
864 return status; 864 return status;
865} 865}
866 866
@@ -910,7 +910,7 @@ static int usb_resume_interface(struct usb_interface *intf, int reset_resume)
910 } 910 }
911 911
912done: 912done:
913 dev_vdbg(&intf->dev, "%s: status %d\n", __FUNCTION__, status); 913 dev_vdbg(&intf->dev, "%s: status %d\n", __func__, status);
914 if (status == 0) 914 if (status == 0)
915 mark_active(intf); 915 mark_active(intf);
916 916
@@ -1093,7 +1093,7 @@ static int usb_suspend_both(struct usb_device *udev, pm_message_t msg)
1093 } 1093 }
1094 1094
1095 done: 1095 done:
1096 dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status); 1096 dev_vdbg(&udev->dev, "%s: status %d\n", __func__, status);
1097 return status; 1097 return status;
1098} 1098}
1099 1099
@@ -1187,7 +1187,7 @@ static int usb_resume_both(struct usb_device *udev)
1187 } 1187 }
1188 1188
1189 done: 1189 done:
1190 dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status); 1190 dev_vdbg(&udev->dev, "%s: status %d\n", __func__, status);
1191 if (!status) 1191 if (!status)
1192 udev->reset_resume = 0; 1192 udev->reset_resume = 0;
1193 return status; 1193 return status;
@@ -1257,7 +1257,7 @@ void usb_autosuspend_device(struct usb_device *udev)
1257 1257
1258 status = usb_autopm_do_device(udev, -1); 1258 status = usb_autopm_do_device(udev, -1);
1259 dev_vdbg(&udev->dev, "%s: cnt %d\n", 1259 dev_vdbg(&udev->dev, "%s: cnt %d\n",
1260 __FUNCTION__, udev->pm_usage_cnt); 1260 __func__, udev->pm_usage_cnt);
1261} 1261}
1262 1262
1263/** 1263/**
@@ -1277,7 +1277,7 @@ void usb_try_autosuspend_device(struct usb_device *udev)
1277{ 1277{
1278 usb_autopm_do_device(udev, 0); 1278 usb_autopm_do_device(udev, 0);
1279 dev_vdbg(&udev->dev, "%s: cnt %d\n", 1279 dev_vdbg(&udev->dev, "%s: cnt %d\n",
1280 __FUNCTION__, udev->pm_usage_cnt); 1280 __func__, udev->pm_usage_cnt);
1281} 1281}
1282 1282
1283/** 1283/**
@@ -1305,7 +1305,7 @@ int usb_autoresume_device(struct usb_device *udev)
1305 1305
1306 status = usb_autopm_do_device(udev, 1); 1306 status = usb_autopm_do_device(udev, 1);
1307 dev_vdbg(&udev->dev, "%s: status %d cnt %d\n", 1307 dev_vdbg(&udev->dev, "%s: status %d cnt %d\n",
1308 __FUNCTION__, status, udev->pm_usage_cnt); 1308 __func__, status, udev->pm_usage_cnt);
1309 return status; 1309 return status;
1310} 1310}
1311 1311
@@ -1377,7 +1377,7 @@ void usb_autopm_put_interface(struct usb_interface *intf)
1377 1377
1378 status = usb_autopm_do_interface(intf, -1); 1378 status = usb_autopm_do_interface(intf, -1);
1379 dev_vdbg(&intf->dev, "%s: status %d cnt %d\n", 1379 dev_vdbg(&intf->dev, "%s: status %d cnt %d\n",
1380 __FUNCTION__, status, intf->pm_usage_cnt); 1380 __func__, status, intf->pm_usage_cnt);
1381} 1381}
1382EXPORT_SYMBOL_GPL(usb_autopm_put_interface); 1382EXPORT_SYMBOL_GPL(usb_autopm_put_interface);
1383 1383
@@ -1421,7 +1421,7 @@ int usb_autopm_get_interface(struct usb_interface *intf)
1421 1421
1422 status = usb_autopm_do_interface(intf, 1); 1422 status = usb_autopm_do_interface(intf, 1);
1423 dev_vdbg(&intf->dev, "%s: status %d cnt %d\n", 1423 dev_vdbg(&intf->dev, "%s: status %d cnt %d\n",
1424 __FUNCTION__, status, intf->pm_usage_cnt); 1424 __func__, status, intf->pm_usage_cnt);
1425 return status; 1425 return status;
1426} 1426}
1427EXPORT_SYMBOL_GPL(usb_autopm_get_interface); 1427EXPORT_SYMBOL_GPL(usb_autopm_get_interface);
@@ -1443,7 +1443,7 @@ int usb_autopm_set_interface(struct usb_interface *intf)
1443 1443
1444 status = usb_autopm_do_interface(intf, 0); 1444 status = usb_autopm_do_interface(intf, 0);
1445 dev_vdbg(&intf->dev, "%s: status %d cnt %d\n", 1445 dev_vdbg(&intf->dev, "%s: status %d cnt %d\n",
1446 __FUNCTION__, status, intf->pm_usage_cnt); 1446 __func__, status, intf->pm_usage_cnt);
1447 return status; 1447 return status;
1448} 1448}
1449EXPORT_SYMBOL_GPL(usb_autopm_set_interface); 1449EXPORT_SYMBOL_GPL(usb_autopm_set_interface);
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 5a338a5d4fe7..06c3acb161ee 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -575,7 +575,7 @@ static int hub_hub_status(struct usb_hub *hub,
575 ret = get_hub_status(hub->hdev, &hub->status->hub); 575 ret = get_hub_status(hub->hdev, &hub->status->hub);
576 if (ret < 0) 576 if (ret < 0)
577 dev_err (hub->intfdev, 577 dev_err (hub->intfdev,
578 "%s failed (err = %d)\n", __FUNCTION__, ret); 578 "%s failed (err = %d)\n", __func__, ret);
579 else { 579 else {
580 *status = le16_to_cpu(hub->status->hub.wHubStatus); 580 *status = le16_to_cpu(hub->status->hub.wHubStatus);
581 *change = le16_to_cpu(hub->status->hub.wHubChange); 581 *change = le16_to_cpu(hub->status->hub.wHubChange);
@@ -1270,7 +1270,7 @@ void usb_disconnect(struct usb_device **pdev)
1270 int i; 1270 int i;
1271 1271
1272 if (!udev) { 1272 if (!udev) {
1273 pr_debug ("%s nodev\n", __FUNCTION__); 1273 pr_debug ("%s nodev\n", __func__);
1274 return; 1274 return;
1275 } 1275 }
1276 1276
@@ -2072,7 +2072,7 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
2072 } 2072 }
2073 } 2073 }
2074 2074
2075 dev_dbg(&intf->dev, "%s\n", __FUNCTION__); 2075 dev_dbg(&intf->dev, "%s\n", __func__);
2076 2076
2077 /* stop khubd and related activity */ 2077 /* stop khubd and related activity */
2078 hub_quiesce(hub); 2078 hub_quiesce(hub);
@@ -3125,7 +3125,7 @@ int usb_reset_device(struct usb_device *udev)
3125 3125
3126 if (!parent_hdev) { 3126 if (!parent_hdev) {
3127 /* this requires hcd-specific logic; see OHCI hc_restart() */ 3127 /* this requires hcd-specific logic; see OHCI hc_restart() */
3128 dev_dbg(&udev->dev, "%s for root hub!\n", __FUNCTION__); 3128 dev_dbg(&udev->dev, "%s for root hub!\n", __func__);
3129 return -EISDIR; 3129 return -EISDIR;
3130 } 3130 }
3131 parent_hub = hdev_to_hub(parent_hdev); 3131 parent_hub = hdev_to_hub(parent_hdev);
diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c
index 83a373e9cc36..8607846e3c3f 100644
--- a/drivers/usb/core/inode.c
+++ b/drivers/usb/core/inode.c
@@ -463,13 +463,13 @@ static int usbfs_fill_super(struct super_block *sb, void *data, int silent)
463 inode = usbfs_get_inode(sb, S_IFDIR | 0755, 0); 463 inode = usbfs_get_inode(sb, S_IFDIR | 0755, 0);
464 464
465 if (!inode) { 465 if (!inode) {
466 dbg("%s: could not get inode!",__FUNCTION__); 466 dbg("%s: could not get inode!",__func__);
467 return -ENOMEM; 467 return -ENOMEM;
468 } 468 }
469 469
470 root = d_alloc_root(inode); 470 root = d_alloc_root(inode);
471 if (!root) { 471 if (!root) {
472 dbg("%s: could not get root dentry!",__FUNCTION__); 472 dbg("%s: could not get root dentry!",__func__);
473 iput(inode); 473 iput(inode);
474 return -ENOMEM; 474 return -ENOMEM;
475 } 475 }
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index 5b23f6b017d7..e819e5359d57 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -312,7 +312,7 @@ static void sg_complete(struct urb *urb)
312 retval != -EBUSY) 312 retval != -EBUSY)
313 dev_err(&io->dev->dev, 313 dev_err(&io->dev->dev,
314 "%s, unlink --> %d\n", 314 "%s, unlink --> %d\n",
315 __FUNCTION__, retval); 315 __func__, retval);
316 } else if (urb == io->urbs [i]) 316 } else if (urb == io->urbs [i])
317 found = 1; 317 found = 1;
318 } 318 }
@@ -550,7 +550,7 @@ void usb_sg_wait(struct usb_sg_request *io)
550 io->urbs[i]->dev = NULL; 550 io->urbs[i]->dev = NULL;
551 io->urbs[i]->status = retval; 551 io->urbs[i]->status = retval;
552 dev_dbg(&io->dev->dev, "%s, submit --> %d\n", 552 dev_dbg(&io->dev->dev, "%s, submit --> %d\n",
553 __FUNCTION__, retval); 553 __func__, retval);
554 usb_sg_cancel(io); 554 usb_sg_cancel(io);
555 } 555 }
556 spin_lock_irq(&io->lock); 556 spin_lock_irq(&io->lock);
@@ -600,7 +600,7 @@ void usb_sg_cancel(struct usb_sg_request *io)
600 retval = usb_unlink_urb(io->urbs [i]); 600 retval = usb_unlink_urb(io->urbs [i]);
601 if (retval != -EINPROGRESS && retval != -EBUSY) 601 if (retval != -EINPROGRESS && retval != -EBUSY)
602 dev_warn(&io->dev->dev, "%s, unlink --> %d\n", 602 dev_warn(&io->dev->dev, "%s, unlink --> %d\n",
603 __FUNCTION__, retval); 603 __func__, retval);
604 } 604 }
605 spin_lock(&io->lock); 605 spin_lock(&io->lock);
606 } 606 }
@@ -1068,7 +1068,7 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0)
1068{ 1068{
1069 int i; 1069 int i;
1070 1070
1071 dev_dbg(&dev->dev, "%s nuking %s URBs\n", __FUNCTION__, 1071 dev_dbg(&dev->dev, "%s nuking %s URBs\n", __func__,
1072 skip_ep0 ? "non-ep0" : "all"); 1072 skip_ep0 ? "non-ep0" : "all");
1073 for (i = skip_ep0; i < 16; ++i) { 1073 for (i = skip_ep0; i < 16; ++i) {
1074 usb_disable_endpoint(dev, i); 1074 usb_disable_endpoint(dev, i);
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index 1d3ed1322fbe..c0b1ae25ae2a 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -334,7 +334,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
334 dev_dbg(&dev->dev, 334 dev_dbg(&dev->dev,
335 "bogus endpoint ep%d%s in %s (bad maxpacket %d)\n", 335 "bogus endpoint ep%d%s in %s (bad maxpacket %d)\n",
336 usb_endpoint_num(&ep->desc), is_out ? "out" : "in", 336 usb_endpoint_num(&ep->desc), is_out ? "out" : "in",
337 __FUNCTION__, max); 337 __func__, max);
338 return -EMSGSIZE; 338 return -EMSGSIZE;
339 } 339 }
340 340
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 5d352c900d2c..9b913afb2e6d 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -460,7 +460,7 @@ static void nuke(struct at91_ep *ep, int status)
460 if (list_empty(&ep->queue)) 460 if (list_empty(&ep->queue))
461 return; 461 return;
462 462
463 VDBG("%s %s\n", __FUNCTION__, ep->ep.name); 463 VDBG("%s %s\n", __func__, ep->ep.name);
464 while (!list_empty(&ep->queue)) { 464 while (!list_empty(&ep->queue)) {
465 req = list_entry(ep->queue.next, struct at91_request, queue); 465 req = list_entry(ep->queue.next, struct at91_request, queue);
466 done(ep, req, status); 466 done(ep, req, status);
@@ -795,7 +795,7 @@ static int at91_wakeup(struct usb_gadget *gadget)
795 int status = -EINVAL; 795 int status = -EINVAL;
796 unsigned long flags; 796 unsigned long flags;
797 797
798 DBG("%s\n", __FUNCTION__ ); 798 DBG("%s\n", __func__ );
799 local_irq_save(flags); 799 local_irq_save(flags);
800 800
801 if (!udc->clocked || !udc->suspended) 801 if (!udc->clocked || !udc->suspended)
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 74f51a703b42..66293105d136 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -892,7 +892,7 @@ static int dummy_udc_suspend (struct platform_device *pdev, pm_message_t state)
892{ 892{
893 struct dummy *dum = platform_get_drvdata(pdev); 893 struct dummy *dum = platform_get_drvdata(pdev);
894 894
895 dev_dbg (&pdev->dev, "%s\n", __FUNCTION__); 895 dev_dbg (&pdev->dev, "%s\n", __func__);
896 spin_lock_irq (&dum->lock); 896 spin_lock_irq (&dum->lock);
897 dum->udc_suspended = 1; 897 dum->udc_suspended = 1;
898 set_link_state (dum); 898 set_link_state (dum);
@@ -906,7 +906,7 @@ static int dummy_udc_resume (struct platform_device *pdev)
906{ 906{
907 struct dummy *dum = platform_get_drvdata(pdev); 907 struct dummy *dum = platform_get_drvdata(pdev);
908 908
909 dev_dbg (&pdev->dev, "%s\n", __FUNCTION__); 909 dev_dbg (&pdev->dev, "%s\n", __func__);
910 spin_lock_irq (&dum->lock); 910 spin_lock_irq (&dum->lock);
911 dum->udc_suspended = 0; 911 dum->udc_suspended = 0;
912 set_link_state (dum); 912 set_link_state (dum);
@@ -1707,7 +1707,7 @@ static int dummy_bus_suspend (struct usb_hcd *hcd)
1707{ 1707{
1708 struct dummy *dum = hcd_to_dummy (hcd); 1708 struct dummy *dum = hcd_to_dummy (hcd);
1709 1709
1710 dev_dbg (&hcd->self.root_hub->dev, "%s\n", __FUNCTION__); 1710 dev_dbg (&hcd->self.root_hub->dev, "%s\n", __func__);
1711 1711
1712 spin_lock_irq (&dum->lock); 1712 spin_lock_irq (&dum->lock);
1713 dum->rh_state = DUMMY_RH_SUSPENDED; 1713 dum->rh_state = DUMMY_RH_SUSPENDED;
@@ -1722,7 +1722,7 @@ static int dummy_bus_resume (struct usb_hcd *hcd)
1722 struct dummy *dum = hcd_to_dummy (hcd); 1722 struct dummy *dum = hcd_to_dummy (hcd);
1723 int rc = 0; 1723 int rc = 0;
1724 1724
1725 dev_dbg (&hcd->self.root_hub->dev, "%s\n", __FUNCTION__); 1725 dev_dbg (&hcd->self.root_hub->dev, "%s\n", __func__);
1726 1726
1727 spin_lock_irq (&dum->lock); 1727 spin_lock_irq (&dum->lock);
1728 if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) { 1728 if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) {
@@ -1896,7 +1896,7 @@ static int dummy_hcd_suspend (struct platform_device *pdev, pm_message_t state)
1896 struct dummy *dum; 1896 struct dummy *dum;
1897 int rc = 0; 1897 int rc = 0;
1898 1898
1899 dev_dbg (&pdev->dev, "%s\n", __FUNCTION__); 1899 dev_dbg (&pdev->dev, "%s\n", __func__);
1900 1900
1901 hcd = platform_get_drvdata (pdev); 1901 hcd = platform_get_drvdata (pdev);
1902 dum = hcd_to_dummy (hcd); 1902 dum = hcd_to_dummy (hcd);
@@ -1912,7 +1912,7 @@ static int dummy_hcd_resume (struct platform_device *pdev)
1912{ 1912{
1913 struct usb_hcd *hcd; 1913 struct usb_hcd *hcd;
1914 1914
1915 dev_dbg (&pdev->dev, "%s\n", __FUNCTION__); 1915 dev_dbg (&pdev->dev, "%s\n", __func__);
1916 1916
1917 hcd = platform_get_drvdata (pdev); 1917 hcd = platform_get_drvdata (pdev);
1918 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); 1918 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 92b9bf78071f..bb93bdd76593 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -1102,7 +1102,7 @@ static void eth_reset_config (struct eth_dev *dev)
1102 if (dev->config == 0) 1102 if (dev->config == 0)
1103 return; 1103 return;
1104 1104
1105 DEBUG (dev, "%s\n", __FUNCTION__); 1105 DEBUG (dev, "%s\n", __func__);
1106 1106
1107 netif_stop_queue (dev->net); 1107 netif_stop_queue (dev->net);
1108 netif_carrier_off (dev->net); 1108 netif_carrier_off (dev->net);
@@ -1263,7 +1263,7 @@ static void issue_start_status (struct eth_dev *dev)
1263 struct usb_cdc_notification *event; 1263 struct usb_cdc_notification *event;
1264 int value; 1264 int value;
1265 1265
1266 DEBUG (dev, "%s, flush old status first\n", __FUNCTION__); 1266 DEBUG (dev, "%s, flush old status first\n", __func__);
1267 1267
1268 /* flush old status 1268 /* flush old status
1269 * 1269 *
@@ -1329,7 +1329,7 @@ static void rndis_command_complete (struct usb_ep *ep, struct usb_request *req)
1329 spin_lock(&dev->lock); 1329 spin_lock(&dev->lock);
1330 status = rndis_msg_parser (dev->rndis_config, (u8 *) req->buf); 1330 status = rndis_msg_parser (dev->rndis_config, (u8 *) req->buf);
1331 if (status < 0) 1331 if (status < 0)
1332 ERROR(dev, "%s: rndis parse error %d\n", __FUNCTION__, status); 1332 ERROR(dev, "%s: rndis parse error %d\n", __func__, status);
1333 spin_unlock(&dev->lock); 1333 spin_unlock(&dev->lock);
1334} 1334}
1335 1335
@@ -2113,7 +2113,7 @@ static int rndis_control_ack (struct net_device *net)
2113 2113
2114static void eth_start (struct eth_dev *dev, gfp_t gfp_flags) 2114static void eth_start (struct eth_dev *dev, gfp_t gfp_flags)
2115{ 2115{
2116 DEBUG (dev, "%s\n", __FUNCTION__); 2116 DEBUG (dev, "%s\n", __func__);
2117 2117
2118 /* fill the rx queue */ 2118 /* fill the rx queue */
2119 rx_fill (dev, gfp_flags); 2119 rx_fill (dev, gfp_flags);
@@ -2133,7 +2133,7 @@ static int eth_open (struct net_device *net)
2133{ 2133{
2134 struct eth_dev *dev = netdev_priv(net); 2134 struct eth_dev *dev = netdev_priv(net);
2135 2135
2136 DEBUG (dev, "%s\n", __FUNCTION__); 2136 DEBUG (dev, "%s\n", __func__);
2137 if (netif_carrier_ok (dev->net)) 2137 if (netif_carrier_ok (dev->net))
2138 eth_start (dev, GFP_KERNEL); 2138 eth_start (dev, GFP_KERNEL);
2139 return 0; 2139 return 0;
@@ -2143,7 +2143,7 @@ static int eth_stop (struct net_device *net)
2143{ 2143{
2144 struct eth_dev *dev = netdev_priv(net); 2144 struct eth_dev *dev = netdev_priv(net);
2145 2145
2146 VDEBUG (dev, "%s\n", __FUNCTION__); 2146 VDEBUG (dev, "%s\n", __func__);
2147 netif_stop_queue (net); 2147 netif_stop_queue (net);
2148 2148
2149 DEBUG (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld\n", 2149 DEBUG (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld\n",
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
index 0a726e106ccd..bf3f946fd455 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -1104,7 +1104,7 @@ static void ep0_complete(struct usb_ep *ep, struct usb_request *req)
1104 if (req->actual > 0) 1104 if (req->actual > 0)
1105 dump_msg(fsg, fsg->ep0req_name, req->buf, req->actual); 1105 dump_msg(fsg, fsg->ep0req_name, req->buf, req->actual);
1106 if (req->status || req->actual != req->length) 1106 if (req->status || req->actual != req->length)
1107 DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__, 1107 DBG(fsg, "%s --> %d, %u/%u\n", __func__,
1108 req->status, req->actual, req->length); 1108 req->status, req->actual, req->length);
1109 if (req->status == -ECONNRESET) // Request was cancelled 1109 if (req->status == -ECONNRESET) // Request was cancelled
1110 usb_ep_fifo_flush(ep); 1110 usb_ep_fifo_flush(ep);
@@ -1125,7 +1125,7 @@ static void bulk_in_complete(struct usb_ep *ep, struct usb_request *req)
1125 struct fsg_buffhd *bh = req->context; 1125 struct fsg_buffhd *bh = req->context;
1126 1126
1127 if (req->status || req->actual != req->length) 1127 if (req->status || req->actual != req->length)
1128 DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__, 1128 DBG(fsg, "%s --> %d, %u/%u\n", __func__,
1129 req->status, req->actual, req->length); 1129 req->status, req->actual, req->length);
1130 if (req->status == -ECONNRESET) // Request was cancelled 1130 if (req->status == -ECONNRESET) // Request was cancelled
1131 usb_ep_fifo_flush(ep); 1131 usb_ep_fifo_flush(ep);
@@ -1146,7 +1146,7 @@ static void bulk_out_complete(struct usb_ep *ep, struct usb_request *req)
1146 1146
1147 dump_msg(fsg, "bulk-out", req->buf, req->actual); 1147 dump_msg(fsg, "bulk-out", req->buf, req->actual);
1148 if (req->status || req->actual != bh->bulk_out_intended_length) 1148 if (req->status || req->actual != bh->bulk_out_intended_length)
1149 DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__, 1149 DBG(fsg, "%s --> %d, %u/%u\n", __func__,
1150 req->status, req->actual, 1150 req->status, req->actual,
1151 bh->bulk_out_intended_length); 1151 bh->bulk_out_intended_length);
1152 if (req->status == -ECONNRESET) // Request was cancelled 1152 if (req->status == -ECONNRESET) // Request was cancelled
@@ -1169,7 +1169,7 @@ static void intr_in_complete(struct usb_ep *ep, struct usb_request *req)
1169 struct fsg_buffhd *bh = req->context; 1169 struct fsg_buffhd *bh = req->context;
1170 1170
1171 if (req->status || req->actual != req->length) 1171 if (req->status || req->actual != req->length)
1172 DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__, 1172 DBG(fsg, "%s --> %d, %u/%u\n", __func__,
1173 req->status, req->actual, req->length); 1173 req->status, req->actual, req->length);
1174 if (req->status == -ECONNRESET) // Request was cancelled 1174 if (req->status == -ECONNRESET) // Request was cancelled
1175 usb_ep_fifo_flush(ep); 1175 usb_ep_fifo_flush(ep);
diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c
index 254012ad2b91..651b82701394 100644
--- a/drivers/usb/gadget/fsl_usb2_udc.c
+++ b/drivers/usb/gadget/fsl_usb2_udc.c
@@ -773,11 +773,11 @@ fsl_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
773 /* catch various bogus parameters */ 773 /* catch various bogus parameters */
774 if (!_req || !req->req.complete || !req->req.buf 774 if (!_req || !req->req.complete || !req->req.buf
775 || !list_empty(&req->queue)) { 775 || !list_empty(&req->queue)) {
776 VDBG("%s, bad params\n", __FUNCTION__); 776 VDBG("%s, bad params\n", __func__);
777 return -EINVAL; 777 return -EINVAL;
778 } 778 }
779 if (unlikely(!_ep || !ep->desc)) { 779 if (unlikely(!_ep || !ep->desc)) {
780 VDBG("%s, bad ep\n", __FUNCTION__); 780 VDBG("%s, bad ep\n", __func__);
781 return -EINVAL; 781 return -EINVAL;
782 } 782 }
783 if (ep->desc->bmAttributes == USB_ENDPOINT_XFER_ISOC) { 783 if (ep->desc->bmAttributes == USB_ENDPOINT_XFER_ISOC) {
diff --git a/drivers/usb/gadget/fsl_usb2_udc.h b/drivers/usb/gadget/fsl_usb2_udc.h
index 9fb0b1ec8526..98b1483ef6a5 100644
--- a/drivers/usb/gadget/fsl_usb2_udc.h
+++ b/drivers/usb/gadget/fsl_usb2_udc.h
@@ -512,7 +512,7 @@ struct fsl_udc {
512 512
513#ifdef DEBUG 513#ifdef DEBUG
514#define DBG(fmt, args...) printk(KERN_DEBUG "[%s] " fmt "\n", \ 514#define DBG(fmt, args...) printk(KERN_DEBUG "[%s] " fmt "\n", \
515 __FUNCTION__, ## args) 515 __func__, ## args)
516#else 516#else
517#define DBG(fmt, args...) do{}while(0) 517#define DBG(fmt, args...) do{}while(0)
518#endif 518#endif
diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c
index d3e702576de6..64a592cbbe7b 100644
--- a/drivers/usb/gadget/goku_udc.c
+++ b/drivers/usb/gadget/goku_udc.c
@@ -692,7 +692,7 @@ static void abort_dma(struct goku_ep *ep, int status)
692 req->req.actual = (curr - req->req.dma) + 1; 692 req->req.actual = (curr - req->req.dma) + 1;
693 req->req.status = status; 693 req->req.status = status;
694 694
695 VDBG(ep->dev, "%s %s %s %d/%d\n", __FUNCTION__, ep->ep.name, 695 VDBG(ep->dev, "%s %s %s %d/%d\n", __func__, ep->ep.name,
696 ep->is_in ? "IN" : "OUT", 696 ep->is_in ? "IN" : "OUT",
697 req->req.actual, req->req.length); 697 req->req.actual, req->req.length);
698 698
@@ -826,7 +826,7 @@ static int goku_dequeue(struct usb_ep *_ep, struct usb_request *_req)
826 if (dev->ep0state == EP0_SUSPEND) 826 if (dev->ep0state == EP0_SUSPEND)
827 return -EBUSY; 827 return -EBUSY;
828 828
829 VDBG(dev, "%s %s %s %s %p\n", __FUNCTION__, _ep->name, 829 VDBG(dev, "%s %s %s %s %p\n", __func__, _ep->name,
830 ep->is_in ? "IN" : "OUT", 830 ep->is_in ? "IN" : "OUT",
831 ep->dma ? "dma" : "pio", 831 ep->dma ? "dma" : "pio",
832 _req); 832 _req);
@@ -898,7 +898,7 @@ static int goku_set_halt(struct usb_ep *_ep, int value)
898 898
899 /* don't change EPxSTATUS_EP_INVALID to READY */ 899 /* don't change EPxSTATUS_EP_INVALID to READY */
900 } else if (!ep->desc) { 900 } else if (!ep->desc) {
901 DBG(ep->dev, "%s %s inactive?\n", __FUNCTION__, ep->ep.name); 901 DBG(ep->dev, "%s %s inactive?\n", __func__, ep->ep.name);
902 return -EINVAL; 902 return -EINVAL;
903 } 903 }
904 904
@@ -940,7 +940,7 @@ static int goku_fifo_status(struct usb_ep *_ep)
940 regs = ep->dev->regs; 940 regs = ep->dev->regs;
941 size = readl(&regs->EPxSizeLA[ep->num]) & DATASIZE; 941 size = readl(&regs->EPxSizeLA[ep->num]) & DATASIZE;
942 size += readl(&regs->EPxSizeLB[ep->num]) & DATASIZE; 942 size += readl(&regs->EPxSizeLB[ep->num]) & DATASIZE;
943 VDBG(ep->dev, "%s %s %u\n", __FUNCTION__, ep->ep.name, size); 943 VDBG(ep->dev, "%s %s %u\n", __func__, ep->ep.name, size);
944 return size; 944 return size;
945} 945}
946 946
@@ -953,11 +953,11 @@ static void goku_fifo_flush(struct usb_ep *_ep)
953 if (!_ep) 953 if (!_ep)
954 return; 954 return;
955 ep = container_of(_ep, struct goku_ep, ep); 955 ep = container_of(_ep, struct goku_ep, ep);
956 VDBG(ep->dev, "%s %s\n", __FUNCTION__, ep->ep.name); 956 VDBG(ep->dev, "%s %s\n", __func__, ep->ep.name);
957 957
958 /* don't change EPxSTATUS_EP_INVALID to READY */ 958 /* don't change EPxSTATUS_EP_INVALID to READY */
959 if (!ep->desc && ep->num != 0) { 959 if (!ep->desc && ep->num != 0) {
960 DBG(ep->dev, "%s %s inactive?\n", __FUNCTION__, ep->ep.name); 960 DBG(ep->dev, "%s %s inactive?\n", __func__, ep->ep.name);
961 return; 961 return;
962 } 962 }
963 963
@@ -1286,7 +1286,7 @@ static void ep0_start(struct goku_udc *dev)
1286 struct goku_udc_regs __iomem *regs = dev->regs; 1286 struct goku_udc_regs __iomem *regs = dev->regs;
1287 unsigned i; 1287 unsigned i;
1288 1288
1289 VDBG(dev, "%s\n", __FUNCTION__); 1289 VDBG(dev, "%s\n", __func__);
1290 1290
1291 udc_reset(dev); 1291 udc_reset(dev);
1292 udc_reinit (dev); 1292 udc_reinit (dev);
@@ -1322,7 +1322,7 @@ static void udc_enable(struct goku_udc *dev)
1322 if (readl(&dev->regs->power_detect) & PW_DETECT) 1322 if (readl(&dev->regs->power_detect) & PW_DETECT)
1323 ep0_start(dev); 1323 ep0_start(dev);
1324 else { 1324 else {
1325 DBG(dev, "%s\n", __FUNCTION__); 1325 DBG(dev, "%s\n", __func__);
1326 dev->int_enable = INT_PWRDETECT; 1326 dev->int_enable = INT_PWRDETECT;
1327 writel(dev->int_enable, &dev->regs->int_enable); 1327 writel(dev->int_enable, &dev->regs->int_enable);
1328 } 1328 }
@@ -1387,7 +1387,7 @@ stop_activity(struct goku_udc *dev, struct usb_gadget_driver *driver)
1387{ 1387{
1388 unsigned i; 1388 unsigned i;
1389 1389
1390 DBG (dev, "%s\n", __FUNCTION__); 1390 DBG (dev, "%s\n", __func__);
1391 1391
1392 if (dev->gadget.speed == USB_SPEED_UNKNOWN) 1392 if (dev->gadget.speed == USB_SPEED_UNKNOWN)
1393 driver = NULL; 1393 driver = NULL;
@@ -1726,7 +1726,7 @@ static void goku_remove(struct pci_dev *pdev)
1726{ 1726{
1727 struct goku_udc *dev = pci_get_drvdata(pdev); 1727 struct goku_udc *dev = pci_get_drvdata(pdev);
1728 1728
1729 DBG(dev, "%s\n", __FUNCTION__); 1729 DBG(dev, "%s\n", __func__);
1730 1730
1731 BUG_ON(dev->driver); 1731 BUG_ON(dev->driver);
1732 1732
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
index 0a6feafc8d28..69b0a2754f2a 100644
--- a/drivers/usb/gadget/inode.c
+++ b/drivers/usb/gadget/inode.c
@@ -1107,13 +1107,13 @@ scan:
1107 1107
1108 switch (state) { 1108 switch (state) {
1109 default: 1109 default:
1110 DBG (dev, "fail %s, state %d\n", __FUNCTION__, state); 1110 DBG (dev, "fail %s, state %d\n", __func__, state);
1111 retval = -ESRCH; 1111 retval = -ESRCH;
1112 break; 1112 break;
1113 case STATE_DEV_UNCONNECTED: 1113 case STATE_DEV_UNCONNECTED:
1114 case STATE_DEV_CONNECTED: 1114 case STATE_DEV_CONNECTED:
1115 spin_unlock_irq (&dev->lock); 1115 spin_unlock_irq (&dev->lock);
1116 DBG (dev, "%s wait\n", __FUNCTION__); 1116 DBG (dev, "%s wait\n", __func__);
1117 1117
1118 /* wait for events */ 1118 /* wait for events */
1119 retval = wait_event_interruptible (dev->wait, 1119 retval = wait_event_interruptible (dev->wait,
@@ -1222,7 +1222,7 @@ ep0_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
1222 DBG(dev, "bogus ep0out stall!\n"); 1222 DBG(dev, "bogus ep0out stall!\n");
1223 } 1223 }
1224 } else 1224 } else
1225 DBG (dev, "fail %s, state %d\n", __FUNCTION__, dev->state); 1225 DBG (dev, "fail %s, state %d\n", __func__, dev->state);
1226 1226
1227 spin_unlock_irq (&dev->lock); 1227 spin_unlock_irq (&dev->lock);
1228 return retval; 1228 return retval;
@@ -1233,7 +1233,7 @@ ep0_fasync (int f, struct file *fd, int on)
1233{ 1233{
1234 struct dev_data *dev = fd->private_data; 1234 struct dev_data *dev = fd->private_data;
1235 // caller must F_SETOWN before signal delivery happens 1235 // caller must F_SETOWN before signal delivery happens
1236 VDEBUG (dev, "%s %s\n", __FUNCTION__, on ? "on" : "off"); 1236 VDEBUG (dev, "%s %s\n", __func__, on ? "on" : "off");
1237 return fasync_helper (f, fd, on, &dev->fasync); 1237 return fasync_helper (f, fd, on, &dev->fasync);
1238} 1238}
1239 1239
@@ -1575,7 +1575,7 @@ static void destroy_ep_files (struct dev_data *dev)
1575{ 1575{
1576 struct list_head *entry, *tmp; 1576 struct list_head *entry, *tmp;
1577 1577
1578 DBG (dev, "%s %d\n", __FUNCTION__, dev->state); 1578 DBG (dev, "%s %d\n", __func__, dev->state);
1579 1579
1580 /* dev->state must prevent interference */ 1580 /* dev->state must prevent interference */
1581restart: 1581restart:
@@ -1662,7 +1662,7 @@ enomem1:
1662 put_dev (dev); 1662 put_dev (dev);
1663 kfree (data); 1663 kfree (data);
1664enomem0: 1664enomem0:
1665 DBG (dev, "%s enomem\n", __FUNCTION__); 1665 DBG (dev, "%s enomem\n", __func__);
1666 destroy_ep_files (dev); 1666 destroy_ep_files (dev);
1667 return -ENOMEM; 1667 return -ENOMEM;
1668} 1668}
@@ -1672,7 +1672,7 @@ gadgetfs_unbind (struct usb_gadget *gadget)
1672{ 1672{
1673 struct dev_data *dev = get_gadget_data (gadget); 1673 struct dev_data *dev = get_gadget_data (gadget);
1674 1674
1675 DBG (dev, "%s\n", __FUNCTION__); 1675 DBG (dev, "%s\n", __func__);
1676 1676
1677 spin_lock_irq (&dev->lock); 1677 spin_lock_irq (&dev->lock);
1678 dev->state = STATE_DEV_UNBOUND; 1678 dev->state = STATE_DEV_UNBOUND;
@@ -1685,7 +1685,7 @@ gadgetfs_unbind (struct usb_gadget *gadget)
1685 /* we've already been disconnected ... no i/o is active */ 1685 /* we've already been disconnected ... no i/o is active */
1686 if (dev->req) 1686 if (dev->req)
1687 usb_ep_free_request (gadget->ep0, dev->req); 1687 usb_ep_free_request (gadget->ep0, dev->req);
1688 DBG (dev, "%s done\n", __FUNCTION__); 1688 DBG (dev, "%s done\n", __func__);
1689 put_dev (dev); 1689 put_dev (dev);
1690} 1690}
1691 1691
@@ -1933,7 +1933,7 @@ dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
1933 1933
1934fail: 1934fail:
1935 spin_unlock_irq (&dev->lock); 1935 spin_unlock_irq (&dev->lock);
1936 pr_debug ("%s: %s fail %Zd, %p\n", shortname, __FUNCTION__, value, dev); 1936 pr_debug ("%s: %s fail %Zd, %p\n", shortname, __func__, value, dev);
1937 kfree (dev->buf); 1937 kfree (dev->buf);
1938 dev->buf = NULL; 1938 dev->buf = NULL;
1939 return value; 1939 return value;
diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c
index 078f72467671..825abd2621b3 100644
--- a/drivers/usb/gadget/lh7a40x_udc.c
+++ b/drivers/usb/gadget/lh7a40x_udc.c
@@ -253,7 +253,7 @@ udc_proc_read(char *page, char **start, off_t off, int count,
253 */ 253 */
254static void udc_disable(struct lh7a40x_udc *dev) 254static void udc_disable(struct lh7a40x_udc *dev)
255{ 255{
256 DEBUG("%s, %p\n", __FUNCTION__, dev); 256 DEBUG("%s, %p\n", __func__, dev);
257 257
258 udc_set_address(dev, 0); 258 udc_set_address(dev, 0);
259 259
@@ -285,7 +285,7 @@ static void udc_reinit(struct lh7a40x_udc *dev)
285{ 285{
286 u32 i; 286 u32 i;
287 287
288 DEBUG("%s, %p\n", __FUNCTION__, dev); 288 DEBUG("%s, %p\n", __func__, dev);
289 289
290 /* device/ep0 records init */ 290 /* device/ep0 records init */
291 INIT_LIST_HEAD(&dev->gadget.ep_list); 291 INIT_LIST_HEAD(&dev->gadget.ep_list);
@@ -318,7 +318,7 @@ static void udc_enable(struct lh7a40x_udc *dev)
318{ 318{
319 int ep; 319 int ep;
320 320
321 DEBUG("%s, %p\n", __FUNCTION__, dev); 321 DEBUG("%s, %p\n", __func__, dev);
322 322
323 dev->gadget.speed = USB_SPEED_UNKNOWN; 323 dev->gadget.speed = USB_SPEED_UNKNOWN;
324 324
@@ -412,7 +412,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
412 struct lh7a40x_udc *dev = the_controller; 412 struct lh7a40x_udc *dev = the_controller;
413 int retval; 413 int retval;
414 414
415 DEBUG("%s: %s\n", __FUNCTION__, driver->driver.name); 415 DEBUG("%s: %s\n", __func__, driver->driver.name);
416 416
417 if (!driver 417 if (!driver
418 || driver->speed != USB_SPEED_FULL 418 || driver->speed != USB_SPEED_FULL
@@ -521,7 +521,7 @@ static int write_fifo(struct lh7a40x_ep *ep, struct lh7a40x_request *req)
521 is_short = unlikely(max < ep_maxpacket(ep)); 521 is_short = unlikely(max < ep_maxpacket(ep));
522 } 522 }
523 523
524 DEBUG("%s: wrote %s %d bytes%s%s %d left %p\n", __FUNCTION__, 524 DEBUG("%s: wrote %s %d bytes%s%s %d left %p\n", __func__,
525 ep->ep.name, count, 525 ep->ep.name, count,
526 is_last ? "/L" : "", is_short ? "/S" : "", 526 is_last ? "/L" : "", is_short ? "/S" : "",
527 req->req.length - req->req.actual, req); 527 req->req.length - req->req.actual, req);
@@ -555,7 +555,7 @@ static int read_fifo(struct lh7a40x_ep *ep, struct lh7a40x_request *req)
555 /* make sure there's a packet in the FIFO. */ 555 /* make sure there's a packet in the FIFO. */
556 csr = usb_read(ep->csr1); 556 csr = usb_read(ep->csr1);
557 if (!(csr & USB_OUT_CSR1_OUT_PKT_RDY)) { 557 if (!(csr & USB_OUT_CSR1_OUT_PKT_RDY)) {
558 DEBUG("%s: Packet NOT ready!\n", __FUNCTION__); 558 DEBUG("%s: Packet NOT ready!\n", __func__);
559 return -EINVAL; 559 return -EINVAL;
560 } 560 }
561 561
@@ -614,7 +614,7 @@ static void done(struct lh7a40x_ep *ep, struct lh7a40x_request *req, int status)
614 unsigned int stopped = ep->stopped; 614 unsigned int stopped = ep->stopped;
615 u32 index; 615 u32 index;
616 616
617 DEBUG("%s, %p\n", __FUNCTION__, ep); 617 DEBUG("%s, %p\n", __func__, ep);
618 list_del_init(&req->queue); 618 list_del_init(&req->queue);
619 619
620 if (likely(req->req.status == -EINPROGRESS)) 620 if (likely(req->req.status == -EINPROGRESS))
@@ -644,7 +644,7 @@ static void done(struct lh7a40x_ep *ep, struct lh7a40x_request *req, int status)
644/** Enable EP interrupt */ 644/** Enable EP interrupt */
645static void pio_irq_enable(int ep) 645static void pio_irq_enable(int ep)
646{ 646{
647 DEBUG("%s: %d\n", __FUNCTION__, ep); 647 DEBUG("%s: %d\n", __func__, ep);
648 648
649 switch (ep) { 649 switch (ep) {
650 case 1: 650 case 1:
@@ -665,7 +665,7 @@ static void pio_irq_enable(int ep)
665/** Disable EP interrupt */ 665/** Disable EP interrupt */
666static void pio_irq_disable(int ep) 666static void pio_irq_disable(int ep)
667{ 667{
668 DEBUG("%s: %d\n", __FUNCTION__, ep); 668 DEBUG("%s: %d\n", __func__, ep);
669 669
670 switch (ep) { 670 switch (ep) {
671 case 1: 671 case 1:
@@ -690,7 +690,7 @@ void nuke(struct lh7a40x_ep *ep, int status)
690{ 690{
691 struct lh7a40x_request *req; 691 struct lh7a40x_request *req;
692 692
693 DEBUG("%s, %p\n", __FUNCTION__, ep); 693 DEBUG("%s, %p\n", __func__, ep);
694 694
695 /* Flush FIFO */ 695 /* Flush FIFO */
696 flush(ep); 696 flush(ep);
@@ -734,7 +734,7 @@ static void flush_all(struct lh7a40x_udc *dev)
734 */ 734 */
735static void flush(struct lh7a40x_ep *ep) 735static void flush(struct lh7a40x_ep *ep)
736{ 736{
737 DEBUG("%s, %p\n", __FUNCTION__, ep); 737 DEBUG("%s, %p\n", __func__, ep);
738 738
739 switch (ep->ep_type) { 739 switch (ep->ep_type) {
740 case ep_control: 740 case ep_control:
@@ -766,7 +766,7 @@ static void lh7a40x_in_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr)
766 usb_set_index(ep_idx); 766 usb_set_index(ep_idx);
767 767
768 csr = usb_read(ep->csr1); 768 csr = usb_read(ep->csr1);
769 DEBUG("%s: %d, csr %x\n", __FUNCTION__, ep_idx, csr); 769 DEBUG("%s: %d, csr %x\n", __func__, ep_idx, csr);
770 770
771 if (csr & USB_IN_CSR1_SENT_STALL) { 771 if (csr & USB_IN_CSR1_SENT_STALL) {
772 DEBUG("USB_IN_CSR1_SENT_STALL\n"); 772 DEBUG("USB_IN_CSR1_SENT_STALL\n");
@@ -776,7 +776,7 @@ static void lh7a40x_in_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr)
776 } 776 }
777 777
778 if (!ep->desc) { 778 if (!ep->desc) {
779 DEBUG("%s: NO EP DESC\n", __FUNCTION__); 779 DEBUG("%s: NO EP DESC\n", __func__);
780 return; 780 return;
781 } 781 }
782 782
@@ -802,7 +802,7 @@ static void lh7a40x_out_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr)
802 struct lh7a40x_ep *ep = &dev->ep[ep_idx]; 802 struct lh7a40x_ep *ep = &dev->ep[ep_idx];
803 struct lh7a40x_request *req; 803 struct lh7a40x_request *req;
804 804
805 DEBUG("%s: %d\n", __FUNCTION__, ep_idx); 805 DEBUG("%s: %d\n", __func__, ep_idx);
806 806
807 usb_set_index(ep_idx); 807 usb_set_index(ep_idx);
808 808
@@ -814,11 +814,11 @@ static void lh7a40x_out_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr)
814 usb_read(ep-> 814 usb_read(ep->
815 csr1)) & (USB_OUT_CSR1_OUT_PKT_RDY | 815 csr1)) & (USB_OUT_CSR1_OUT_PKT_RDY |
816 USB_OUT_CSR1_SENT_STALL)) { 816 USB_OUT_CSR1_SENT_STALL)) {
817 DEBUG("%s: %x\n", __FUNCTION__, csr); 817 DEBUG("%s: %x\n", __func__, csr);
818 818
819 if (csr & USB_OUT_CSR1_SENT_STALL) { 819 if (csr & USB_OUT_CSR1_SENT_STALL) {
820 DEBUG("%s: stall sent, flush fifo\n", 820 DEBUG("%s: stall sent, flush fifo\n",
821 __FUNCTION__); 821 __func__);
822 /* usb_set(USB_OUT_CSR1_FIFO_FLUSH, ep->csr1); */ 822 /* usb_set(USB_OUT_CSR1_FIFO_FLUSH, ep->csr1); */
823 flush(ep); 823 flush(ep);
824 } else if (csr & USB_OUT_CSR1_OUT_PKT_RDY) { 824 } else if (csr & USB_OUT_CSR1_OUT_PKT_RDY) {
@@ -832,7 +832,7 @@ static void lh7a40x_out_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr)
832 832
833 if (!req) { 833 if (!req) {
834 printk("%s: NULL REQ %d\n", 834 printk("%s: NULL REQ %d\n",
835 __FUNCTION__, ep_idx); 835 __func__, ep_idx);
836 flush(ep); 836 flush(ep);
837 break; 837 break;
838 } else { 838 } else {
@@ -844,7 +844,7 @@ static void lh7a40x_out_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr)
844 844
845 } else { 845 } else {
846 /* Throw packet away.. */ 846 /* Throw packet away.. */
847 printk("%s: No descriptor?!?\n", __FUNCTION__); 847 printk("%s: No descriptor?!?\n", __func__);
848 flush(ep); 848 flush(ep);
849 } 849 }
850} 850}
@@ -886,7 +886,7 @@ static void lh7a40x_reset_intr(struct lh7a40x_udc *dev)
886#if 0 /* def CONFIG_ARCH_LH7A404 */ 886#if 0 /* def CONFIG_ARCH_LH7A404 */
887 /* Does not work always... */ 887 /* Does not work always... */
888 888
889 DEBUG("%s: %d\n", __FUNCTION__, dev->usb_address); 889 DEBUG("%s: %d\n", __func__, dev->usb_address);
890 890
891 if (!dev->usb_address) { 891 if (!dev->usb_address) {
892 /*usb_set(USB_RESET_IO, USB_RESET); 892 /*usb_set(USB_RESET_IO, USB_RESET);
@@ -936,7 +936,7 @@ static irqreturn_t lh7a40x_udc_irq(int irq, void *_dev)
936 if (!intr_out && !intr_in && !intr_int) 936 if (!intr_out && !intr_in && !intr_int)
937 break; 937 break;
938 938
939 DEBUG("%s (on state %s)\n", __FUNCTION__, 939 DEBUG("%s (on state %s)\n", __func__,
940 state_names[dev->ep0state]); 940 state_names[dev->ep0state]);
941 DEBUG("intr_out = %x\n", intr_out); 941 DEBUG("intr_out = %x\n", intr_out);
942 DEBUG("intr_in = %x\n", intr_in); 942 DEBUG("intr_in = %x\n", intr_in);
@@ -1016,14 +1016,14 @@ static int lh7a40x_ep_enable(struct usb_ep *_ep,
1016 struct lh7a40x_udc *dev; 1016 struct lh7a40x_udc *dev;
1017 unsigned long flags; 1017 unsigned long flags;
1018 1018
1019 DEBUG("%s, %p\n", __FUNCTION__, _ep); 1019 DEBUG("%s, %p\n", __func__, _ep);
1020 1020
1021 ep = container_of(_ep, struct lh7a40x_ep, ep); 1021 ep = container_of(_ep, struct lh7a40x_ep, ep);
1022 if (!_ep || !desc || ep->desc || _ep->name == ep0name 1022 if (!_ep || !desc || ep->desc || _ep->name == ep0name
1023 || desc->bDescriptorType != USB_DT_ENDPOINT 1023 || desc->bDescriptorType != USB_DT_ENDPOINT
1024 || ep->bEndpointAddress != desc->bEndpointAddress 1024 || ep->bEndpointAddress != desc->bEndpointAddress
1025 || ep_maxpacket(ep) < le16_to_cpu(desc->wMaxPacketSize)) { 1025 || ep_maxpacket(ep) < le16_to_cpu(desc->wMaxPacketSize)) {
1026 DEBUG("%s, bad ep or descriptor\n", __FUNCTION__); 1026 DEBUG("%s, bad ep or descriptor\n", __func__);
1027 return -EINVAL; 1027 return -EINVAL;
1028 } 1028 }
1029 1029
@@ -1031,7 +1031,7 @@ static int lh7a40x_ep_enable(struct usb_ep *_ep,
1031 if (ep->bmAttributes != desc->bmAttributes 1031 if (ep->bmAttributes != desc->bmAttributes
1032 && ep->bmAttributes != USB_ENDPOINT_XFER_BULK 1032 && ep->bmAttributes != USB_ENDPOINT_XFER_BULK
1033 && desc->bmAttributes != USB_ENDPOINT_XFER_INT) { 1033 && desc->bmAttributes != USB_ENDPOINT_XFER_INT) {
1034 DEBUG("%s, %s type mismatch\n", __FUNCTION__, _ep->name); 1034 DEBUG("%s, %s type mismatch\n", __func__, _ep->name);
1035 return -EINVAL; 1035 return -EINVAL;
1036 } 1036 }
1037 1037
@@ -1039,13 +1039,13 @@ static int lh7a40x_ep_enable(struct usb_ep *_ep,
1039 if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK 1039 if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK
1040 && le16_to_cpu(desc->wMaxPacketSize) != ep_maxpacket(ep)) 1040 && le16_to_cpu(desc->wMaxPacketSize) != ep_maxpacket(ep))
1041 || !desc->wMaxPacketSize) { 1041 || !desc->wMaxPacketSize) {
1042 DEBUG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name); 1042 DEBUG("%s, bad %s maxpacket\n", __func__, _ep->name);
1043 return -ERANGE; 1043 return -ERANGE;
1044 } 1044 }
1045 1045
1046 dev = ep->dev; 1046 dev = ep->dev;
1047 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) { 1047 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) {
1048 DEBUG("%s, bogus device state\n", __FUNCTION__); 1048 DEBUG("%s, bogus device state\n", __func__);
1049 return -ESHUTDOWN; 1049 return -ESHUTDOWN;
1050 } 1050 }
1051 1051
@@ -1061,7 +1061,7 @@ static int lh7a40x_ep_enable(struct usb_ep *_ep,
1061 /* Reset halt state (does flush) */ 1061 /* Reset halt state (does flush) */
1062 lh7a40x_set_halt(_ep, 0); 1062 lh7a40x_set_halt(_ep, 0);
1063 1063
1064 DEBUG("%s: enabled %s\n", __FUNCTION__, _ep->name); 1064 DEBUG("%s: enabled %s\n", __func__, _ep->name);
1065 return 0; 1065 return 0;
1066} 1066}
1067 1067
@@ -1073,11 +1073,11 @@ static int lh7a40x_ep_disable(struct usb_ep *_ep)
1073 struct lh7a40x_ep *ep; 1073 struct lh7a40x_ep *ep;
1074 unsigned long flags; 1074 unsigned long flags;
1075 1075
1076 DEBUG("%s, %p\n", __FUNCTION__, _ep); 1076 DEBUG("%s, %p\n", __func__, _ep);
1077 1077
1078 ep = container_of(_ep, struct lh7a40x_ep, ep); 1078 ep = container_of(_ep, struct lh7a40x_ep, ep);
1079 if (!_ep || !ep->desc) { 1079 if (!_ep || !ep->desc) {
1080 DEBUG("%s, %s not enabled\n", __FUNCTION__, 1080 DEBUG("%s, %s not enabled\n", __func__,
1081 _ep ? ep->ep.name : NULL); 1081 _ep ? ep->ep.name : NULL);
1082 return -EINVAL; 1082 return -EINVAL;
1083 } 1083 }
@@ -1097,7 +1097,7 @@ static int lh7a40x_ep_disable(struct usb_ep *_ep)
1097 1097
1098 spin_unlock_irqrestore(&ep->dev->lock, flags); 1098 spin_unlock_irqrestore(&ep->dev->lock, flags);
1099 1099
1100 DEBUG("%s: disabled %s\n", __FUNCTION__, _ep->name); 1100 DEBUG("%s: disabled %s\n", __func__, _ep->name);
1101 return 0; 1101 return 0;
1102} 1102}
1103 1103
@@ -1106,7 +1106,7 @@ static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep,
1106{ 1106{
1107 struct lh7a40x_request *req; 1107 struct lh7a40x_request *req;
1108 1108
1109 DEBUG("%s, %p\n", __FUNCTION__, ep); 1109 DEBUG("%s, %p\n", __func__, ep);
1110 1110
1111 req = kzalloc(sizeof(*req), gfp_flags); 1111 req = kzalloc(sizeof(*req), gfp_flags);
1112 if (!req) 1112 if (!req)
@@ -1121,7 +1121,7 @@ static void lh7a40x_free_request(struct usb_ep *ep, struct usb_request *_req)
1121{ 1121{
1122 struct lh7a40x_request *req; 1122 struct lh7a40x_request *req;
1123 1123
1124 DEBUG("%s, %p\n", __FUNCTION__, ep); 1124 DEBUG("%s, %p\n", __func__, ep);
1125 1125
1126 req = container_of(_req, struct lh7a40x_request, req); 1126 req = container_of(_req, struct lh7a40x_request, req);
1127 WARN_ON(!list_empty(&req->queue)); 1127 WARN_ON(!list_empty(&req->queue));
@@ -1140,25 +1140,25 @@ static int lh7a40x_queue(struct usb_ep *_ep, struct usb_request *_req,
1140 struct lh7a40x_udc *dev; 1140 struct lh7a40x_udc *dev;
1141 unsigned long flags; 1141 unsigned long flags;
1142 1142
1143 DEBUG("\n\n\n%s, %p\n", __FUNCTION__, _ep); 1143 DEBUG("\n\n\n%s, %p\n", __func__, _ep);
1144 1144
1145 req = container_of(_req, struct lh7a40x_request, req); 1145 req = container_of(_req, struct lh7a40x_request, req);
1146 if (unlikely 1146 if (unlikely
1147 (!_req || !_req->complete || !_req->buf 1147 (!_req || !_req->complete || !_req->buf
1148 || !list_empty(&req->queue))) { 1148 || !list_empty(&req->queue))) {
1149 DEBUG("%s, bad params\n", __FUNCTION__); 1149 DEBUG("%s, bad params\n", __func__);
1150 return -EINVAL; 1150 return -EINVAL;
1151 } 1151 }
1152 1152
1153 ep = container_of(_ep, struct lh7a40x_ep, ep); 1153 ep = container_of(_ep, struct lh7a40x_ep, ep);
1154 if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) { 1154 if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) {
1155 DEBUG("%s, bad ep\n", __FUNCTION__); 1155 DEBUG("%s, bad ep\n", __func__);
1156 return -EINVAL; 1156 return -EINVAL;
1157 } 1157 }
1158 1158
1159 dev = ep->dev; 1159 dev = ep->dev;
1160 if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)) { 1160 if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)) {
1161 DEBUG("%s, bogus device state %p\n", __FUNCTION__, dev->driver); 1161 DEBUG("%s, bogus device state %p\n", __func__, dev->driver);
1162 return -ESHUTDOWN; 1162 return -ESHUTDOWN;
1163 } 1163 }
1164 1164
@@ -1218,7 +1218,7 @@ static int lh7a40x_dequeue(struct usb_ep *_ep, struct usb_request *_req)
1218 struct lh7a40x_request *req; 1218 struct lh7a40x_request *req;
1219 unsigned long flags; 1219 unsigned long flags;
1220 1220
1221 DEBUG("%s, %p\n", __FUNCTION__, _ep); 1221 DEBUG("%s, %p\n", __func__, _ep);
1222 1222
1223 ep = container_of(_ep, struct lh7a40x_ep, ep); 1223 ep = container_of(_ep, struct lh7a40x_ep, ep);
1224 if (!_ep || ep->ep.name == ep0name) 1224 if (!_ep || ep->ep.name == ep0name)
@@ -1253,13 +1253,13 @@ static int lh7a40x_set_halt(struct usb_ep *_ep, int value)
1253 1253
1254 ep = container_of(_ep, struct lh7a40x_ep, ep); 1254 ep = container_of(_ep, struct lh7a40x_ep, ep);
1255 if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) { 1255 if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) {
1256 DEBUG("%s, bad ep\n", __FUNCTION__); 1256 DEBUG("%s, bad ep\n", __func__);
1257 return -EINVAL; 1257 return -EINVAL;
1258 } 1258 }
1259 1259
1260 usb_set_index(ep_index(ep)); 1260 usb_set_index(ep_index(ep));
1261 1261
1262 DEBUG("%s, ep %d, val %d\n", __FUNCTION__, ep_index(ep), value); 1262 DEBUG("%s, ep %d, val %d\n", __func__, ep_index(ep), value);
1263 1263
1264 spin_lock_irqsave(&ep->dev->lock, flags); 1264 spin_lock_irqsave(&ep->dev->lock, flags);
1265 1265
@@ -1325,11 +1325,11 @@ static int lh7a40x_fifo_status(struct usb_ep *_ep)
1325 1325
1326 ep = container_of(_ep, struct lh7a40x_ep, ep); 1326 ep = container_of(_ep, struct lh7a40x_ep, ep);
1327 if (!_ep) { 1327 if (!_ep) {
1328 DEBUG("%s, bad ep\n", __FUNCTION__); 1328 DEBUG("%s, bad ep\n", __func__);
1329 return -ENODEV; 1329 return -ENODEV;
1330 } 1330 }
1331 1331
1332 DEBUG("%s, %d\n", __FUNCTION__, ep_index(ep)); 1332 DEBUG("%s, %d\n", __func__, ep_index(ep));
1333 1333
1334 /* LPD can't report unclaimed bytes from IN fifos */ 1334 /* LPD can't report unclaimed bytes from IN fifos */
1335 if (ep_is_in(ep)) 1335 if (ep_is_in(ep))
@@ -1355,7 +1355,7 @@ static void lh7a40x_fifo_flush(struct usb_ep *_ep)
1355 1355
1356 ep = container_of(_ep, struct lh7a40x_ep, ep); 1356 ep = container_of(_ep, struct lh7a40x_ep, ep);
1357 if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) { 1357 if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) {
1358 DEBUG("%s, bad ep\n", __FUNCTION__); 1358 DEBUG("%s, bad ep\n", __func__);
1359 return; 1359 return;
1360 } 1360 }
1361 1361
@@ -1376,7 +1376,7 @@ static int write_fifo_ep0(struct lh7a40x_ep *ep, struct lh7a40x_request *req)
1376 1376
1377 max = ep_maxpacket(ep); 1377 max = ep_maxpacket(ep);
1378 1378
1379 DEBUG_EP0("%s\n", __FUNCTION__); 1379 DEBUG_EP0("%s\n", __func__);
1380 1380
1381 count = write_packet(ep, req, max); 1381 count = write_packet(ep, req, max);
1382 1382
@@ -1390,7 +1390,7 @@ static int write_fifo_ep0(struct lh7a40x_ep *ep, struct lh7a40x_request *req)
1390 is_last = 1; 1390 is_last = 1;
1391 } 1391 }
1392 1392
1393 DEBUG_EP0("%s: wrote %s %d bytes%s %d left %p\n", __FUNCTION__, 1393 DEBUG_EP0("%s: wrote %s %d bytes%s %d left %p\n", __func__,
1394 ep->ep.name, count, 1394 ep->ep.name, count,
1395 is_last ? "/L" : "", req->req.length - req->req.actual, req); 1395 is_last ? "/L" : "", req->req.length - req->req.actual, req);
1396 1396
@@ -1434,7 +1434,7 @@ static int read_fifo_ep0(struct lh7a40x_ep *ep, struct lh7a40x_request *req)
1434 unsigned bufferspace, count, is_short; 1434 unsigned bufferspace, count, is_short;
1435 volatile u32 *fifo = (volatile u32 *)ep->fifo; 1435 volatile u32 *fifo = (volatile u32 *)ep->fifo;
1436 1436
1437 DEBUG_EP0("%s\n", __FUNCTION__); 1437 DEBUG_EP0("%s\n", __func__);
1438 1438
1439 csr = usb_read(USB_EP0_CSR); 1439 csr = usb_read(USB_EP0_CSR);
1440 if (!(csr & USB_OUT_CSR1_OUT_PKT_RDY)) 1440 if (!(csr & USB_OUT_CSR1_OUT_PKT_RDY))
@@ -1492,7 +1492,7 @@ static int read_fifo_ep0(struct lh7a40x_ep *ep, struct lh7a40x_request *req)
1492 */ 1492 */
1493static void udc_set_address(struct lh7a40x_udc *dev, unsigned char address) 1493static void udc_set_address(struct lh7a40x_udc *dev, unsigned char address)
1494{ 1494{
1495 DEBUG_EP0("%s: %d\n", __FUNCTION__, address); 1495 DEBUG_EP0("%s: %d\n", __func__, address);
1496 /* c.f. 15.1.2.2 Table 15-4 address will be used after DATA_END is set */ 1496 /* c.f. 15.1.2.2 Table 15-4 address will be used after DATA_END is set */
1497 dev->usb_address = address; 1497 dev->usb_address = address;
1498 usb_set((address & USB_FA_FUNCTION_ADDR), USB_FA); 1498 usb_set((address & USB_FA_FUNCTION_ADDR), USB_FA);
@@ -1514,7 +1514,7 @@ static void lh7a40x_ep0_out(struct lh7a40x_udc *dev, u32 csr)
1514 struct lh7a40x_ep *ep = &dev->ep[0]; 1514 struct lh7a40x_ep *ep = &dev->ep[0];
1515 int ret; 1515 int ret;
1516 1516
1517 DEBUG_EP0("%s: %x\n", __FUNCTION__, csr); 1517 DEBUG_EP0("%s: %x\n", __func__, csr);
1518 1518
1519 if (list_empty(&ep->queue)) 1519 if (list_empty(&ep->queue))
1520 req = 0; 1520 req = 0;
@@ -1533,13 +1533,13 @@ static void lh7a40x_ep0_out(struct lh7a40x_udc *dev, u32 csr)
1533 if (ret) { 1533 if (ret) {
1534 /* Done! */ 1534 /* Done! */
1535 DEBUG_EP0("%s: finished, waiting for status\n", 1535 DEBUG_EP0("%s: finished, waiting for status\n",
1536 __FUNCTION__); 1536 __func__);
1537 1537
1538 usb_set((EP0_CLR_OUT | EP0_DATA_END), USB_EP0_CSR); 1538 usb_set((EP0_CLR_OUT | EP0_DATA_END), USB_EP0_CSR);
1539 dev->ep0state = WAIT_FOR_SETUP; 1539 dev->ep0state = WAIT_FOR_SETUP;
1540 } else { 1540 } else {
1541 /* Not done yet.. */ 1541 /* Not done yet.. */
1542 DEBUG_EP0("%s: not finished\n", __FUNCTION__); 1542 DEBUG_EP0("%s: not finished\n", __func__);
1543 usb_set(EP0_CLR_OUT, USB_EP0_CSR); 1543 usb_set(EP0_CLR_OUT, USB_EP0_CSR);
1544 } 1544 }
1545 } else { 1545 } else {
@@ -1556,7 +1556,7 @@ static int lh7a40x_ep0_in(struct lh7a40x_udc *dev, u32 csr)
1556 struct lh7a40x_ep *ep = &dev->ep[0]; 1556 struct lh7a40x_ep *ep = &dev->ep[0];
1557 int ret, need_zlp = 0; 1557 int ret, need_zlp = 0;
1558 1558
1559 DEBUG_EP0("%s: %x\n", __FUNCTION__, csr); 1559 DEBUG_EP0("%s: %x\n", __func__, csr);
1560 1560
1561 if (list_empty(&ep->queue)) 1561 if (list_empty(&ep->queue))
1562 req = 0; 1562 req = 0;
@@ -1564,7 +1564,7 @@ static int lh7a40x_ep0_in(struct lh7a40x_udc *dev, u32 csr)
1564 req = list_entry(ep->queue.next, struct lh7a40x_request, queue); 1564 req = list_entry(ep->queue.next, struct lh7a40x_request, queue);
1565 1565
1566 if (!req) { 1566 if (!req) {
1567 DEBUG_EP0("%s: NULL REQ\n", __FUNCTION__); 1567 DEBUG_EP0("%s: NULL REQ\n", __func__);
1568 return 0; 1568 return 0;
1569 } 1569 }
1570 1570
@@ -1585,17 +1585,17 @@ static int lh7a40x_ep0_in(struct lh7a40x_udc *dev, u32 csr)
1585 1585
1586 if (ret == 1 && !need_zlp) { 1586 if (ret == 1 && !need_zlp) {
1587 /* Last packet */ 1587 /* Last packet */
1588 DEBUG_EP0("%s: finished, waiting for status\n", __FUNCTION__); 1588 DEBUG_EP0("%s: finished, waiting for status\n", __func__);
1589 1589
1590 usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR); 1590 usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR);
1591 dev->ep0state = WAIT_FOR_SETUP; 1591 dev->ep0state = WAIT_FOR_SETUP;
1592 } else { 1592 } else {
1593 DEBUG_EP0("%s: not finished\n", __FUNCTION__); 1593 DEBUG_EP0("%s: not finished\n", __func__);
1594 usb_set(EP0_IN_PKT_RDY, USB_EP0_CSR); 1594 usb_set(EP0_IN_PKT_RDY, USB_EP0_CSR);
1595 } 1595 }
1596 1596
1597 if (need_zlp) { 1597 if (need_zlp) {
1598 DEBUG_EP0("%s: Need ZLP!\n", __FUNCTION__); 1598 DEBUG_EP0("%s: Need ZLP!\n", __func__);
1599 usb_set(EP0_IN_PKT_RDY, USB_EP0_CSR); 1599 usb_set(EP0_IN_PKT_RDY, USB_EP0_CSR);
1600 dev->ep0state = DATA_STATE_NEED_ZLP; 1600 dev->ep0state = DATA_STATE_NEED_ZLP;
1601 } 1601 }
@@ -1694,7 +1694,7 @@ static void lh7a40x_ep0_setup(struct lh7a40x_udc *dev, u32 csr)
1694 struct usb_ctrlrequest ctrl; 1694 struct usb_ctrlrequest ctrl;
1695 int i, bytes, is_in; 1695 int i, bytes, is_in;
1696 1696
1697 DEBUG_SETUP("%s: %x\n", __FUNCTION__, csr); 1697 DEBUG_SETUP("%s: %x\n", __func__, csr);
1698 1698
1699 /* Nuke all previous transfers */ 1699 /* Nuke all previous transfers */
1700 nuke(ep, -EPROTO); 1700 nuke(ep, -EPROTO);
@@ -1799,7 +1799,7 @@ static void lh7a40x_ep0_setup(struct lh7a40x_udc *dev, u32 csr)
1799 */ 1799 */
1800static void lh7a40x_ep0_in_zlp(struct lh7a40x_udc *dev, u32 csr) 1800static void lh7a40x_ep0_in_zlp(struct lh7a40x_udc *dev, u32 csr)
1801{ 1801{
1802 DEBUG_EP0("%s: %x\n", __FUNCTION__, csr); 1802 DEBUG_EP0("%s: %x\n", __func__, csr);
1803 1803
1804 /* c.f. Table 15-14 */ 1804 /* c.f. Table 15-14 */
1805 usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR); 1805 usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR);
@@ -1818,7 +1818,7 @@ static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr)
1818 usb_set_index(0); 1818 usb_set_index(0);
1819 csr = usb_read(USB_EP0_CSR); 1819 csr = usb_read(USB_EP0_CSR);
1820 1820
1821 DEBUG_EP0("%s: csr = %x\n", __FUNCTION__, csr); 1821 DEBUG_EP0("%s: csr = %x\n", __func__, csr);
1822 1822
1823 /* 1823 /*
1824 * For overview of what we should be doing see c.f. Chapter 18.1.2.4 1824 * For overview of what we should be doing see c.f. Chapter 18.1.2.4
@@ -1832,7 +1832,7 @@ static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr)
1832 * - clear the SENT_STALL bit 1832 * - clear the SENT_STALL bit
1833 */ 1833 */
1834 if (csr & EP0_SENT_STALL) { 1834 if (csr & EP0_SENT_STALL) {
1835 DEBUG_EP0("%s: EP0_SENT_STALL is set: %x\n", __FUNCTION__, csr); 1835 DEBUG_EP0("%s: EP0_SENT_STALL is set: %x\n", __func__, csr);
1836 usb_clear((EP0_SENT_STALL | EP0_SEND_STALL), USB_EP0_CSR); 1836 usb_clear((EP0_SENT_STALL | EP0_SEND_STALL), USB_EP0_CSR);
1837 nuke(ep, -ECONNABORTED); 1837 nuke(ep, -ECONNABORTED);
1838 dev->ep0state = WAIT_FOR_SETUP; 1838 dev->ep0state = WAIT_FOR_SETUP;
@@ -1849,7 +1849,7 @@ static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr)
1849 */ 1849 */
1850 if (!(csr & (EP0_IN_PKT_RDY | EP0_OUT_PKT_RDY))) { 1850 if (!(csr & (EP0_IN_PKT_RDY | EP0_OUT_PKT_RDY))) {
1851 DEBUG_EP0("%s: IN_PKT_RDY and OUT_PKT_RDY are clear\n", 1851 DEBUG_EP0("%s: IN_PKT_RDY and OUT_PKT_RDY are clear\n",
1852 __FUNCTION__); 1852 __func__);
1853 1853
1854 switch (dev->ep0state) { 1854 switch (dev->ep0state) {
1855 case DATA_STATE_XMIT: 1855 case DATA_STATE_XMIT:
@@ -1877,7 +1877,7 @@ static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr)
1877 * - set SERVICED_SETUP_END_BIT 1877 * - set SERVICED_SETUP_END_BIT
1878 */ 1878 */
1879 if (csr & EP0_SETUP_END) { 1879 if (csr & EP0_SETUP_END) {
1880 DEBUG_EP0("%s: EP0_SETUP_END is set: %x\n", __FUNCTION__, csr); 1880 DEBUG_EP0("%s: EP0_SETUP_END is set: %x\n", __func__, csr);
1881 1881
1882 usb_set(EP0_CLR_SETUP_END, USB_EP0_CSR); 1882 usb_set(EP0_CLR_SETUP_END, USB_EP0_CSR);
1883 1883
@@ -1896,7 +1896,7 @@ static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr)
1896 */ 1896 */
1897 if (csr & EP0_OUT_PKT_RDY) { 1897 if (csr & EP0_OUT_PKT_RDY) {
1898 1898
1899 DEBUG_EP0("%s: EP0_OUT_PKT_RDY is set: %x\n", __FUNCTION__, 1899 DEBUG_EP0("%s: EP0_OUT_PKT_RDY is set: %x\n", __func__,
1900 csr); 1900 csr);
1901 1901
1902 switch (dev->ep0state) { 1902 switch (dev->ep0state) {
@@ -1926,7 +1926,7 @@ static void lh7a40x_ep0_kick(struct lh7a40x_udc *dev, struct lh7a40x_ep *ep)
1926 usb_set_index(0); 1926 usb_set_index(0);
1927 csr = usb_read(USB_EP0_CSR); 1927 csr = usb_read(USB_EP0_CSR);
1928 1928
1929 DEBUG_EP0("%s: %x\n", __FUNCTION__, csr); 1929 DEBUG_EP0("%s: %x\n", __func__, csr);
1930 1930
1931 /* Clear "out packet ready" */ 1931 /* Clear "out packet ready" */
1932 usb_set(EP0_CLR_OUT, USB_EP0_CSR); 1932 usb_set(EP0_CLR_OUT, USB_EP0_CSR);
@@ -1949,7 +1949,7 @@ static int lh7a40x_udc_get_frame(struct usb_gadget *_gadget)
1949{ 1949{
1950 u32 frame1 = usb_read(USB_FRM_NUM1); /* Least significant 8 bits */ 1950 u32 frame1 = usb_read(USB_FRM_NUM1); /* Least significant 8 bits */
1951 u32 frame2 = usb_read(USB_FRM_NUM2); /* Most significant 3 bits */ 1951 u32 frame2 = usb_read(USB_FRM_NUM2); /* Most significant 3 bits */
1952 DEBUG("%s, %p\n", __FUNCTION__, _gadget); 1952 DEBUG("%s, %p\n", __func__, _gadget);
1953 return ((frame2 & 0x07) << 8) | (frame1 & 0xff); 1953 return ((frame2 & 0x07) << 8) | (frame1 & 0xff);
1954} 1954}
1955 1955
@@ -1970,7 +1970,7 @@ static const struct usb_gadget_ops lh7a40x_udc_ops = {
1970 1970
1971static void nop_release(struct device *dev) 1971static void nop_release(struct device *dev)
1972{ 1972{
1973 DEBUG("%s %s\n", __FUNCTION__, dev->bus_id); 1973 DEBUG("%s %s\n", __func__, dev->bus_id);
1974} 1974}
1975 1975
1976static struct lh7a40x_udc memory = { 1976static struct lh7a40x_udc memory = {
@@ -2065,7 +2065,7 @@ static int lh7a40x_udc_probe(struct platform_device *pdev)
2065 struct lh7a40x_udc *dev = &memory; 2065 struct lh7a40x_udc *dev = &memory;
2066 int retval; 2066 int retval;
2067 2067
2068 DEBUG("%s: %p\n", __FUNCTION__, pdev); 2068 DEBUG("%s: %p\n", __func__, pdev);
2069 2069
2070 spin_lock_init(&dev->lock); 2070 spin_lock_init(&dev->lock);
2071 dev->dev = &pdev->dev; 2071 dev->dev = &pdev->dev;
@@ -2098,7 +2098,7 @@ static int lh7a40x_udc_remove(struct platform_device *pdev)
2098{ 2098{
2099 struct lh7a40x_udc *dev = platform_get_drvdata(pdev); 2099 struct lh7a40x_udc *dev = platform_get_drvdata(pdev);
2100 2100
2101 DEBUG("%s: %p\n", __FUNCTION__, pdev); 2101 DEBUG("%s: %p\n", __func__, pdev);
2102 2102
2103 if (dev->driver) 2103 if (dev->driver)
2104 return -EBUSY; 2104 return -EBUSY;
@@ -2131,7 +2131,7 @@ static struct platform_driver udc_driver = {
2131 2131
2132static int __init udc_init(void) 2132static int __init udc_init(void)
2133{ 2133{
2134 DEBUG("%s: %s version %s\n", __FUNCTION__, driver_name, DRIVER_VERSION); 2134 DEBUG("%s: %s version %s\n", __func__, driver_name, DRIVER_VERSION);
2135 return platform_driver_register(&udc_driver); 2135 return platform_driver_register(&udc_driver);
2136} 2136}
2137 2137
diff --git a/drivers/usb/gadget/net2280.h b/drivers/usb/gadget/net2280.h
index 44ca139983d8..1f2af398a9a4 100644
--- a/drivers/usb/gadget/net2280.h
+++ b/drivers/usb/gadget/net2280.h
@@ -299,7 +299,7 @@ static inline void assert_out_naking (struct net2280_ep *ep, const char *where)
299 &ep->regs->ep_rsp); 299 &ep->regs->ep_rsp);
300 } 300 }
301} 301}
302#define ASSERT_OUT_NAKING(ep) assert_out_naking(ep,__FUNCTION__) 302#define ASSERT_OUT_NAKING(ep) assert_out_naking(ep,__func__)
303#else 303#else
304#define ASSERT_OUT_NAKING(ep) do {} while (0) 304#define ASSERT_OUT_NAKING(ep) do {} while (0)
305#endif 305#endif
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c
index 56277d24f041..95f7662376f1 100644
--- a/drivers/usb/gadget/omap_udc.c
+++ b/drivers/usb/gadget/omap_udc.c
@@ -163,7 +163,7 @@ static int omap_ep_enable(struct usb_ep *_ep,
163 || ep->bEndpointAddress != desc->bEndpointAddress 163 || ep->bEndpointAddress != desc->bEndpointAddress
164 || ep->maxpacket < le16_to_cpu 164 || ep->maxpacket < le16_to_cpu
165 (desc->wMaxPacketSize)) { 165 (desc->wMaxPacketSize)) {
166 DBG("%s, bad ep or descriptor\n", __FUNCTION__); 166 DBG("%s, bad ep or descriptor\n", __func__);
167 return -EINVAL; 167 return -EINVAL;
168 } 168 }
169 maxp = le16_to_cpu (desc->wMaxPacketSize); 169 maxp = le16_to_cpu (desc->wMaxPacketSize);
@@ -171,7 +171,7 @@ static int omap_ep_enable(struct usb_ep *_ep,
171 && maxp != ep->maxpacket) 171 && maxp != ep->maxpacket)
172 || le16_to_cpu(desc->wMaxPacketSize) > ep->maxpacket 172 || le16_to_cpu(desc->wMaxPacketSize) > ep->maxpacket
173 || !desc->wMaxPacketSize) { 173 || !desc->wMaxPacketSize) {
174 DBG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name); 174 DBG("%s, bad %s maxpacket\n", __func__, _ep->name);
175 return -ERANGE; 175 return -ERANGE;
176 } 176 }
177 177
@@ -194,13 +194,13 @@ static int omap_ep_enable(struct usb_ep *_ep,
194 if (ep->bmAttributes != desc->bmAttributes 194 if (ep->bmAttributes != desc->bmAttributes
195 && ep->bmAttributes != USB_ENDPOINT_XFER_BULK 195 && ep->bmAttributes != USB_ENDPOINT_XFER_BULK
196 && desc->bmAttributes != USB_ENDPOINT_XFER_INT) { 196 && desc->bmAttributes != USB_ENDPOINT_XFER_INT) {
197 DBG("%s, %s type mismatch\n", __FUNCTION__, _ep->name); 197 DBG("%s, %s type mismatch\n", __func__, _ep->name);
198 return -EINVAL; 198 return -EINVAL;
199 } 199 }
200 200
201 udc = ep->udc; 201 udc = ep->udc;
202 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { 202 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) {
203 DBG("%s, bogus device state\n", __FUNCTION__); 203 DBG("%s, bogus device state\n", __func__);
204 return -ESHUTDOWN; 204 return -ESHUTDOWN;
205 } 205 }
206 206
@@ -249,7 +249,7 @@ static int omap_ep_disable(struct usb_ep *_ep)
249 unsigned long flags; 249 unsigned long flags;
250 250
251 if (!_ep || !ep->desc) { 251 if (!_ep || !ep->desc) {
252 DBG("%s, %s not enabled\n", __FUNCTION__, 252 DBG("%s, %s not enabled\n", __func__,
253 _ep ? ep->ep.name : NULL); 253 _ep ? ep->ep.name : NULL);
254 return -EINVAL; 254 return -EINVAL;
255 } 255 }
@@ -936,11 +936,11 @@ omap_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
936 /* catch various bogus parameters */ 936 /* catch various bogus parameters */
937 if (!_req || !req->req.complete || !req->req.buf 937 if (!_req || !req->req.complete || !req->req.buf
938 || !list_empty(&req->queue)) { 938 || !list_empty(&req->queue)) {
939 DBG("%s, bad params\n", __FUNCTION__); 939 DBG("%s, bad params\n", __func__);
940 return -EINVAL; 940 return -EINVAL;
941 } 941 }
942 if (!_ep || (!ep->desc && ep->bEndpointAddress)) { 942 if (!_ep || (!ep->desc && ep->bEndpointAddress)) {
943 DBG("%s, bad ep\n", __FUNCTION__); 943 DBG("%s, bad ep\n", __func__);
944 return -EINVAL; 944 return -EINVAL;
945 } 945 }
946 if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) { 946 if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) {
@@ -959,7 +959,7 @@ omap_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
959 && (ep->bEndpointAddress & USB_DIR_IN) == 0 959 && (ep->bEndpointAddress & USB_DIR_IN) == 0
960 && !cpu_class_is_omap2() 960 && !cpu_class_is_omap2()
961 && (req->req.length % ep->ep.maxpacket) != 0) { 961 && (req->req.length % ep->ep.maxpacket) != 0) {
962 DBG("%s, no partial packet OUT reads\n", __FUNCTION__); 962 DBG("%s, no partial packet OUT reads\n", __func__);
963 return -EMSGSIZE; 963 return -EMSGSIZE;
964 } 964 }
965 965
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c
index ecc1410073f4..76be75e3ab8f 100644
--- a/drivers/usb/gadget/printer.c
+++ b/drivers/usb/gadget/printer.c
@@ -915,7 +915,7 @@ static void printer_reset_interface(struct printer_dev *dev)
915 if (dev->interface < 0) 915 if (dev->interface < 0)
916 return; 916 return;
917 917
918 DBG(dev, "%s\n", __FUNCTION__); 918 DBG(dev, "%s\n", __func__);
919 919
920 if (dev->in) 920 if (dev->in)
921 usb_ep_disable(dev->in_ep); 921 usb_ep_disable(dev->in_ep);
@@ -1284,7 +1284,7 @@ printer_disconnect(struct usb_gadget *gadget)
1284 struct printer_dev *dev = get_gadget_data(gadget); 1284 struct printer_dev *dev = get_gadget_data(gadget);
1285 unsigned long flags; 1285 unsigned long flags;
1286 1286
1287 DBG(dev, "%s\n", __FUNCTION__); 1287 DBG(dev, "%s\n", __func__);
1288 1288
1289 spin_lock_irqsave(&dev->lock, flags); 1289 spin_lock_irqsave(&dev->lock, flags);
1290 1290
@@ -1300,7 +1300,7 @@ printer_unbind(struct usb_gadget *gadget)
1300 struct usb_request *req; 1300 struct usb_request *req;
1301 1301
1302 1302
1303 DBG(dev, "%s\n", __FUNCTION__); 1303 DBG(dev, "%s\n", __func__);
1304 1304
1305 /* Remove sysfs files */ 1305 /* Remove sysfs files */
1306 device_destroy(usb_gadget_class, g_printer_devno); 1306 device_destroy(usb_gadget_class, g_printer_devno);
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c
index c00cd8b9d3d1..08f699b1fc57 100644
--- a/drivers/usb/gadget/pxa2xx_udc.c
+++ b/drivers/usb/gadget/pxa2xx_udc.c
@@ -235,7 +235,7 @@ static int pxa2xx_ep_enable (struct usb_ep *_ep,
235 || ep->bEndpointAddress != desc->bEndpointAddress 235 || ep->bEndpointAddress != desc->bEndpointAddress
236 || ep->fifo_size < le16_to_cpu 236 || ep->fifo_size < le16_to_cpu
237 (desc->wMaxPacketSize)) { 237 (desc->wMaxPacketSize)) {
238 DMSG("%s, bad ep or descriptor\n", __FUNCTION__); 238 DMSG("%s, bad ep or descriptor\n", __func__);
239 return -EINVAL; 239 return -EINVAL;
240 } 240 }
241 241
@@ -243,7 +243,7 @@ static int pxa2xx_ep_enable (struct usb_ep *_ep,
243 if (ep->bmAttributes != desc->bmAttributes 243 if (ep->bmAttributes != desc->bmAttributes
244 && ep->bmAttributes != USB_ENDPOINT_XFER_BULK 244 && ep->bmAttributes != USB_ENDPOINT_XFER_BULK
245 && desc->bmAttributes != USB_ENDPOINT_XFER_INT) { 245 && desc->bmAttributes != USB_ENDPOINT_XFER_INT) {
246 DMSG("%s, %s type mismatch\n", __FUNCTION__, _ep->name); 246 DMSG("%s, %s type mismatch\n", __func__, _ep->name);
247 return -EINVAL; 247 return -EINVAL;
248 } 248 }
249 249
@@ -252,13 +252,13 @@ static int pxa2xx_ep_enable (struct usb_ep *_ep,
252 && le16_to_cpu (desc->wMaxPacketSize) 252 && le16_to_cpu (desc->wMaxPacketSize)
253 != BULK_FIFO_SIZE) 253 != BULK_FIFO_SIZE)
254 || !desc->wMaxPacketSize) { 254 || !desc->wMaxPacketSize) {
255 DMSG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name); 255 DMSG("%s, bad %s maxpacket\n", __func__, _ep->name);
256 return -ERANGE; 256 return -ERANGE;
257 } 257 }
258 258
259 dev = ep->dev; 259 dev = ep->dev;
260 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) { 260 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) {
261 DMSG("%s, bogus device state\n", __FUNCTION__); 261 DMSG("%s, bogus device state\n", __func__);
262 return -ESHUTDOWN; 262 return -ESHUTDOWN;
263 } 263 }
264 264
@@ -283,7 +283,7 @@ static int pxa2xx_ep_disable (struct usb_ep *_ep)
283 283
284 ep = container_of (_ep, struct pxa2xx_ep, ep); 284 ep = container_of (_ep, struct pxa2xx_ep, ep);
285 if (!_ep || !ep->desc) { 285 if (!_ep || !ep->desc) {
286 DMSG("%s, %s not enabled\n", __FUNCTION__, 286 DMSG("%s, %s not enabled\n", __func__,
287 _ep ? ep->ep.name : NULL); 287 _ep ? ep->ep.name : NULL);
288 return -EINVAL; 288 return -EINVAL;
289 } 289 }
@@ -461,7 +461,7 @@ void ep0start(struct pxa2xx_udc *dev, u32 flags, const char *tag)
461 USIR0 = USIR0_IR0; 461 USIR0 = USIR0_IR0;
462 dev->req_pending = 0; 462 dev->req_pending = 0;
463 DBG(DBG_VERY_NOISY, "%s %s, %02x/%02x\n", 463 DBG(DBG_VERY_NOISY, "%s %s, %02x/%02x\n",
464 __FUNCTION__, tag, UDCCS0, flags); 464 __func__, tag, UDCCS0, flags);
465} 465}
466 466
467static int 467static int
@@ -651,20 +651,20 @@ pxa2xx_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
651 req = container_of(_req, struct pxa2xx_request, req); 651 req = container_of(_req, struct pxa2xx_request, req);
652 if (unlikely (!_req || !_req->complete || !_req->buf 652 if (unlikely (!_req || !_req->complete || !_req->buf
653 || !list_empty(&req->queue))) { 653 || !list_empty(&req->queue))) {
654 DMSG("%s, bad params\n", __FUNCTION__); 654 DMSG("%s, bad params\n", __func__);
655 return -EINVAL; 655 return -EINVAL;
656 } 656 }
657 657
658 ep = container_of(_ep, struct pxa2xx_ep, ep); 658 ep = container_of(_ep, struct pxa2xx_ep, ep);
659 if (unlikely (!_ep || (!ep->desc && ep->ep.name != ep0name))) { 659 if (unlikely (!_ep || (!ep->desc && ep->ep.name != ep0name))) {
660 DMSG("%s, bad ep\n", __FUNCTION__); 660 DMSG("%s, bad ep\n", __func__);
661 return -EINVAL; 661 return -EINVAL;
662 } 662 }
663 663
664 dev = ep->dev; 664 dev = ep->dev;
665 if (unlikely (!dev->driver 665 if (unlikely (!dev->driver
666 || dev->gadget.speed == USB_SPEED_UNKNOWN)) { 666 || dev->gadget.speed == USB_SPEED_UNKNOWN)) {
667 DMSG("%s, bogus device state\n", __FUNCTION__); 667 DMSG("%s, bogus device state\n", __func__);
668 return -ESHUTDOWN; 668 return -ESHUTDOWN;
669 } 669 }
670 670
@@ -807,7 +807,7 @@ static int pxa2xx_ep_set_halt(struct usb_ep *_ep, int value)
807 if (unlikely (!_ep 807 if (unlikely (!_ep
808 || (!ep->desc && ep->ep.name != ep0name)) 808 || (!ep->desc && ep->ep.name != ep0name))
809 || ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) { 809 || ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) {
810 DMSG("%s, bad ep\n", __FUNCTION__); 810 DMSG("%s, bad ep\n", __func__);
811 return -EINVAL; 811 return -EINVAL;
812 } 812 }
813 if (value == 0) { 813 if (value == 0) {
@@ -859,7 +859,7 @@ static int pxa2xx_ep_fifo_status(struct usb_ep *_ep)
859 859
860 ep = container_of(_ep, struct pxa2xx_ep, ep); 860 ep = container_of(_ep, struct pxa2xx_ep, ep);
861 if (!_ep) { 861 if (!_ep) {
862 DMSG("%s, bad ep\n", __FUNCTION__); 862 DMSG("%s, bad ep\n", __func__);
863 return -ENODEV; 863 return -ENODEV;
864 } 864 }
865 /* pxa can't report unclaimed bytes from IN fifos */ 865 /* pxa can't report unclaimed bytes from IN fifos */
@@ -878,7 +878,7 @@ static void pxa2xx_ep_fifo_flush(struct usb_ep *_ep)
878 878
879 ep = container_of(_ep, struct pxa2xx_ep, ep); 879 ep = container_of(_ep, struct pxa2xx_ep, ep);
880 if (!_ep || ep->ep.name == ep0name || !list_empty(&ep->queue)) { 880 if (!_ep || ep->ep.name == ep0name || !list_empty(&ep->queue)) {
881 DMSG("%s, bad ep\n", __FUNCTION__); 881 DMSG("%s, bad ep\n", __func__);
882 return; 882 return;
883 } 883 }
884 884
@@ -1813,7 +1813,7 @@ pxa2xx_udc_irq(int irq, void *_dev)
1813 1813
1814static void nop_release (struct device *dev) 1814static void nop_release (struct device *dev)
1815{ 1815{
1816 DMSG("%s %s\n", __FUNCTION__, dev->bus_id); 1816 DMSG("%s %s\n", __func__, dev->bus_id);
1817} 1817}
1818 1818
1819/* this uses load-time allocation and initialization (instead of 1819/* this uses load-time allocation and initialization (instead of
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
index 934911ee5c72..bd58dd504f6f 100644
--- a/drivers/usb/gadget/rndis.c
+++ b/drivers/usb/gadget/rndis.c
@@ -204,7 +204,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
204 204
205 /* mandatory */ 205 /* mandatory */
206 case OID_GEN_SUPPORTED_LIST: 206 case OID_GEN_SUPPORTED_LIST:
207 DBG("%s: OID_GEN_SUPPORTED_LIST\n", __FUNCTION__); 207 DBG("%s: OID_GEN_SUPPORTED_LIST\n", __func__);
208 length = sizeof (oid_supported_list); 208 length = sizeof (oid_supported_list);
209 count = length / sizeof (u32); 209 count = length / sizeof (u32);
210 for (i = 0; i < count; i++) 210 for (i = 0; i < count; i++)
@@ -214,7 +214,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
214 214
215 /* mandatory */ 215 /* mandatory */
216 case OID_GEN_HARDWARE_STATUS: 216 case OID_GEN_HARDWARE_STATUS:
217 DBG("%s: OID_GEN_HARDWARE_STATUS\n", __FUNCTION__); 217 DBG("%s: OID_GEN_HARDWARE_STATUS\n", __func__);
218 /* Bogus question! 218 /* Bogus question!
219 * Hardware must be ready to receive high level protocols. 219 * Hardware must be ready to receive high level protocols.
220 * BTW: 220 * BTW:
@@ -227,14 +227,14 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
227 227
228 /* mandatory */ 228 /* mandatory */
229 case OID_GEN_MEDIA_SUPPORTED: 229 case OID_GEN_MEDIA_SUPPORTED:
230 DBG("%s: OID_GEN_MEDIA_SUPPORTED\n", __FUNCTION__); 230 DBG("%s: OID_GEN_MEDIA_SUPPORTED\n", __func__);
231 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium); 231 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium);
232 retval = 0; 232 retval = 0;
233 break; 233 break;
234 234
235 /* mandatory */ 235 /* mandatory */
236 case OID_GEN_MEDIA_IN_USE: 236 case OID_GEN_MEDIA_IN_USE:
237 DBG("%s: OID_GEN_MEDIA_IN_USE\n", __FUNCTION__); 237 DBG("%s: OID_GEN_MEDIA_IN_USE\n", __func__);
238 /* one medium, one transport... (maybe you do it better) */ 238 /* one medium, one transport... (maybe you do it better) */
239 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium); 239 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium);
240 retval = 0; 240 retval = 0;
@@ -242,7 +242,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
242 242
243 /* mandatory */ 243 /* mandatory */
244 case OID_GEN_MAXIMUM_FRAME_SIZE: 244 case OID_GEN_MAXIMUM_FRAME_SIZE:
245 DBG("%s: OID_GEN_MAXIMUM_FRAME_SIZE\n", __FUNCTION__); 245 DBG("%s: OID_GEN_MAXIMUM_FRAME_SIZE\n", __func__);
246 if (rndis_per_dev_params [configNr].dev) { 246 if (rndis_per_dev_params [configNr].dev) {
247 *outbuf = cpu_to_le32 ( 247 *outbuf = cpu_to_le32 (
248 rndis_per_dev_params [configNr].dev->mtu); 248 rndis_per_dev_params [configNr].dev->mtu);
@@ -253,7 +253,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
253 /* mandatory */ 253 /* mandatory */
254 case OID_GEN_LINK_SPEED: 254 case OID_GEN_LINK_SPEED:
255 if (rndis_debug > 1) 255 if (rndis_debug > 1)
256 DBG("%s: OID_GEN_LINK_SPEED\n", __FUNCTION__); 256 DBG("%s: OID_GEN_LINK_SPEED\n", __func__);
257 if (rndis_per_dev_params [configNr].media_state 257 if (rndis_per_dev_params [configNr].media_state
258 == NDIS_MEDIA_STATE_DISCONNECTED) 258 == NDIS_MEDIA_STATE_DISCONNECTED)
259 *outbuf = __constant_cpu_to_le32 (0); 259 *outbuf = __constant_cpu_to_le32 (0);
@@ -265,7 +265,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
265 265
266 /* mandatory */ 266 /* mandatory */
267 case OID_GEN_TRANSMIT_BLOCK_SIZE: 267 case OID_GEN_TRANSMIT_BLOCK_SIZE:
268 DBG("%s: OID_GEN_TRANSMIT_BLOCK_SIZE\n", __FUNCTION__); 268 DBG("%s: OID_GEN_TRANSMIT_BLOCK_SIZE\n", __func__);
269 if (rndis_per_dev_params [configNr].dev) { 269 if (rndis_per_dev_params [configNr].dev) {
270 *outbuf = cpu_to_le32 ( 270 *outbuf = cpu_to_le32 (
271 rndis_per_dev_params [configNr].dev->mtu); 271 rndis_per_dev_params [configNr].dev->mtu);
@@ -275,7 +275,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
275 275
276 /* mandatory */ 276 /* mandatory */
277 case OID_GEN_RECEIVE_BLOCK_SIZE: 277 case OID_GEN_RECEIVE_BLOCK_SIZE:
278 DBG("%s: OID_GEN_RECEIVE_BLOCK_SIZE\n", __FUNCTION__); 278 DBG("%s: OID_GEN_RECEIVE_BLOCK_SIZE\n", __func__);
279 if (rndis_per_dev_params [configNr].dev) { 279 if (rndis_per_dev_params [configNr].dev) {
280 *outbuf = cpu_to_le32 ( 280 *outbuf = cpu_to_le32 (
281 rndis_per_dev_params [configNr].dev->mtu); 281 rndis_per_dev_params [configNr].dev->mtu);
@@ -285,7 +285,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
285 285
286 /* mandatory */ 286 /* mandatory */
287 case OID_GEN_VENDOR_ID: 287 case OID_GEN_VENDOR_ID:
288 DBG("%s: OID_GEN_VENDOR_ID\n", __FUNCTION__); 288 DBG("%s: OID_GEN_VENDOR_ID\n", __func__);
289 *outbuf = cpu_to_le32 ( 289 *outbuf = cpu_to_le32 (
290 rndis_per_dev_params [configNr].vendorID); 290 rndis_per_dev_params [configNr].vendorID);
291 retval = 0; 291 retval = 0;
@@ -293,7 +293,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
293 293
294 /* mandatory */ 294 /* mandatory */
295 case OID_GEN_VENDOR_DESCRIPTION: 295 case OID_GEN_VENDOR_DESCRIPTION:
296 DBG("%s: OID_GEN_VENDOR_DESCRIPTION\n", __FUNCTION__); 296 DBG("%s: OID_GEN_VENDOR_DESCRIPTION\n", __func__);
297 length = strlen (rndis_per_dev_params [configNr].vendorDescr); 297 length = strlen (rndis_per_dev_params [configNr].vendorDescr);
298 memcpy (outbuf, 298 memcpy (outbuf,
299 rndis_per_dev_params [configNr].vendorDescr, length); 299 rndis_per_dev_params [configNr].vendorDescr, length);
@@ -301,7 +301,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
301 break; 301 break;
302 302
303 case OID_GEN_VENDOR_DRIVER_VERSION: 303 case OID_GEN_VENDOR_DRIVER_VERSION:
304 DBG("%s: OID_GEN_VENDOR_DRIVER_VERSION\n", __FUNCTION__); 304 DBG("%s: OID_GEN_VENDOR_DRIVER_VERSION\n", __func__);
305 /* Created as LE */ 305 /* Created as LE */
306 *outbuf = rndis_driver_version; 306 *outbuf = rndis_driver_version;
307 retval = 0; 307 retval = 0;
@@ -309,14 +309,14 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
309 309
310 /* mandatory */ 310 /* mandatory */
311 case OID_GEN_CURRENT_PACKET_FILTER: 311 case OID_GEN_CURRENT_PACKET_FILTER:
312 DBG("%s: OID_GEN_CURRENT_PACKET_FILTER\n", __FUNCTION__); 312 DBG("%s: OID_GEN_CURRENT_PACKET_FILTER\n", __func__);
313 *outbuf = cpu_to_le32 (*rndis_per_dev_params[configNr].filter); 313 *outbuf = cpu_to_le32 (*rndis_per_dev_params[configNr].filter);
314 retval = 0; 314 retval = 0;
315 break; 315 break;
316 316
317 /* mandatory */ 317 /* mandatory */
318 case OID_GEN_MAXIMUM_TOTAL_SIZE: 318 case OID_GEN_MAXIMUM_TOTAL_SIZE:
319 DBG("%s: OID_GEN_MAXIMUM_TOTAL_SIZE\n", __FUNCTION__); 319 DBG("%s: OID_GEN_MAXIMUM_TOTAL_SIZE\n", __func__);
320 *outbuf = __constant_cpu_to_le32(RNDIS_MAX_TOTAL_SIZE); 320 *outbuf = __constant_cpu_to_le32(RNDIS_MAX_TOTAL_SIZE);
321 retval = 0; 321 retval = 0;
322 break; 322 break;
@@ -324,14 +324,14 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
324 /* mandatory */ 324 /* mandatory */
325 case OID_GEN_MEDIA_CONNECT_STATUS: 325 case OID_GEN_MEDIA_CONNECT_STATUS:
326 if (rndis_debug > 1) 326 if (rndis_debug > 1)
327 DBG("%s: OID_GEN_MEDIA_CONNECT_STATUS\n", __FUNCTION__); 327 DBG("%s: OID_GEN_MEDIA_CONNECT_STATUS\n", __func__);
328 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] 328 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
329 .media_state); 329 .media_state);
330 retval = 0; 330 retval = 0;
331 break; 331 break;
332 332
333 case OID_GEN_PHYSICAL_MEDIUM: 333 case OID_GEN_PHYSICAL_MEDIUM:
334 DBG("%s: OID_GEN_PHYSICAL_MEDIUM\n", __FUNCTION__); 334 DBG("%s: OID_GEN_PHYSICAL_MEDIUM\n", __func__);
335 *outbuf = __constant_cpu_to_le32 (0); 335 *outbuf = __constant_cpu_to_le32 (0);
336 retval = 0; 336 retval = 0;
337 break; 337 break;
@@ -341,7 +341,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
341 * versions emit undefined RNDIS messages. DOCUMENT ALL THESE! 341 * versions emit undefined RNDIS messages. DOCUMENT ALL THESE!
342 */ 342 */
343 case OID_GEN_MAC_OPTIONS: /* from WinME */ 343 case OID_GEN_MAC_OPTIONS: /* from WinME */
344 DBG("%s: OID_GEN_MAC_OPTIONS\n", __FUNCTION__); 344 DBG("%s: OID_GEN_MAC_OPTIONS\n", __func__);
345 *outbuf = __constant_cpu_to_le32( 345 *outbuf = __constant_cpu_to_le32(
346 NDIS_MAC_OPTION_RECEIVE_SERIALIZED 346 NDIS_MAC_OPTION_RECEIVE_SERIALIZED
347 | NDIS_MAC_OPTION_FULL_DUPLEX); 347 | NDIS_MAC_OPTION_FULL_DUPLEX);
@@ -353,7 +353,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
353 /* mandatory */ 353 /* mandatory */
354 case OID_GEN_XMIT_OK: 354 case OID_GEN_XMIT_OK:
355 if (rndis_debug > 1) 355 if (rndis_debug > 1)
356 DBG("%s: OID_GEN_XMIT_OK\n", __FUNCTION__); 356 DBG("%s: OID_GEN_XMIT_OK\n", __func__);
357 if (rndis_per_dev_params [configNr].stats) { 357 if (rndis_per_dev_params [configNr].stats) {
358 *outbuf = cpu_to_le32 ( 358 *outbuf = cpu_to_le32 (
359 rndis_per_dev_params [configNr].stats->tx_packets - 359 rndis_per_dev_params [configNr].stats->tx_packets -
@@ -366,7 +366,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
366 /* mandatory */ 366 /* mandatory */
367 case OID_GEN_RCV_OK: 367 case OID_GEN_RCV_OK:
368 if (rndis_debug > 1) 368 if (rndis_debug > 1)
369 DBG("%s: OID_GEN_RCV_OK\n", __FUNCTION__); 369 DBG("%s: OID_GEN_RCV_OK\n", __func__);
370 if (rndis_per_dev_params [configNr].stats) { 370 if (rndis_per_dev_params [configNr].stats) {
371 *outbuf = cpu_to_le32 ( 371 *outbuf = cpu_to_le32 (
372 rndis_per_dev_params [configNr].stats->rx_packets - 372 rndis_per_dev_params [configNr].stats->rx_packets -
@@ -379,7 +379,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
379 /* mandatory */ 379 /* mandatory */
380 case OID_GEN_XMIT_ERROR: 380 case OID_GEN_XMIT_ERROR:
381 if (rndis_debug > 1) 381 if (rndis_debug > 1)
382 DBG("%s: OID_GEN_XMIT_ERROR\n", __FUNCTION__); 382 DBG("%s: OID_GEN_XMIT_ERROR\n", __func__);
383 if (rndis_per_dev_params [configNr].stats) { 383 if (rndis_per_dev_params [configNr].stats) {
384 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] 384 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
385 .stats->tx_errors); 385 .stats->tx_errors);
@@ -390,7 +390,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
390 /* mandatory */ 390 /* mandatory */
391 case OID_GEN_RCV_ERROR: 391 case OID_GEN_RCV_ERROR:
392 if (rndis_debug > 1) 392 if (rndis_debug > 1)
393 DBG("%s: OID_GEN_RCV_ERROR\n", __FUNCTION__); 393 DBG("%s: OID_GEN_RCV_ERROR\n", __func__);
394 if (rndis_per_dev_params [configNr].stats) { 394 if (rndis_per_dev_params [configNr].stats) {
395 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] 395 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
396 .stats->rx_errors); 396 .stats->rx_errors);
@@ -400,7 +400,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
400 400
401 /* mandatory */ 401 /* mandatory */
402 case OID_GEN_RCV_NO_BUFFER: 402 case OID_GEN_RCV_NO_BUFFER:
403 DBG("%s: OID_GEN_RCV_NO_BUFFER\n", __FUNCTION__); 403 DBG("%s: OID_GEN_RCV_NO_BUFFER\n", __func__);
404 if (rndis_per_dev_params [configNr].stats) { 404 if (rndis_per_dev_params [configNr].stats) {
405 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] 405 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
406 .stats->rx_dropped); 406 .stats->rx_dropped);
@@ -410,7 +410,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
410 410
411#ifdef RNDIS_OPTIONAL_STATS 411#ifdef RNDIS_OPTIONAL_STATS
412 case OID_GEN_DIRECTED_BYTES_XMIT: 412 case OID_GEN_DIRECTED_BYTES_XMIT:
413 DBG("%s: OID_GEN_DIRECTED_BYTES_XMIT\n", __FUNCTION__); 413 DBG("%s: OID_GEN_DIRECTED_BYTES_XMIT\n", __func__);
414 /* 414 /*
415 * Aunt Tilly's size of shoes 415 * Aunt Tilly's size of shoes
416 * minus antarctica count of penguins 416 * minus antarctica count of penguins
@@ -430,7 +430,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
430 break; 430 break;
431 431
432 case OID_GEN_DIRECTED_FRAMES_XMIT: 432 case OID_GEN_DIRECTED_FRAMES_XMIT:
433 DBG("%s: OID_GEN_DIRECTED_FRAMES_XMIT\n", __FUNCTION__); 433 DBG("%s: OID_GEN_DIRECTED_FRAMES_XMIT\n", __func__);
434 /* dito */ 434 /* dito */
435 if (rndis_per_dev_params [configNr].stats) { 435 if (rndis_per_dev_params [configNr].stats) {
436 *outbuf = cpu_to_le32 ( 436 *outbuf = cpu_to_le32 (
@@ -446,7 +446,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
446 break; 446 break;
447 447
448 case OID_GEN_MULTICAST_BYTES_XMIT: 448 case OID_GEN_MULTICAST_BYTES_XMIT:
449 DBG("%s: OID_GEN_MULTICAST_BYTES_XMIT\n", __FUNCTION__); 449 DBG("%s: OID_GEN_MULTICAST_BYTES_XMIT\n", __func__);
450 if (rndis_per_dev_params [configNr].stats) { 450 if (rndis_per_dev_params [configNr].stats) {
451 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] 451 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
452 .stats->multicast*1234); 452 .stats->multicast*1234);
@@ -455,7 +455,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
455 break; 455 break;
456 456
457 case OID_GEN_MULTICAST_FRAMES_XMIT: 457 case OID_GEN_MULTICAST_FRAMES_XMIT:
458 DBG("%s: OID_GEN_MULTICAST_FRAMES_XMIT\n", __FUNCTION__); 458 DBG("%s: OID_GEN_MULTICAST_FRAMES_XMIT\n", __func__);
459 if (rndis_per_dev_params [configNr].stats) { 459 if (rndis_per_dev_params [configNr].stats) {
460 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] 460 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
461 .stats->multicast); 461 .stats->multicast);
@@ -464,7 +464,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
464 break; 464 break;
465 465
466 case OID_GEN_BROADCAST_BYTES_XMIT: 466 case OID_GEN_BROADCAST_BYTES_XMIT:
467 DBG("%s: OID_GEN_BROADCAST_BYTES_XMIT\n", __FUNCTION__); 467 DBG("%s: OID_GEN_BROADCAST_BYTES_XMIT\n", __func__);
468 if (rndis_per_dev_params [configNr].stats) { 468 if (rndis_per_dev_params [configNr].stats) {
469 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] 469 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
470 .stats->tx_packets/42*255); 470 .stats->tx_packets/42*255);
@@ -473,7 +473,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
473 break; 473 break;
474 474
475 case OID_GEN_BROADCAST_FRAMES_XMIT: 475 case OID_GEN_BROADCAST_FRAMES_XMIT:
476 DBG("%s: OID_GEN_BROADCAST_FRAMES_XMIT\n", __FUNCTION__); 476 DBG("%s: OID_GEN_BROADCAST_FRAMES_XMIT\n", __func__);
477 if (rndis_per_dev_params [configNr].stats) { 477 if (rndis_per_dev_params [configNr].stats) {
478 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] 478 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
479 .stats->tx_packets/42); 479 .stats->tx_packets/42);
@@ -482,19 +482,19 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
482 break; 482 break;
483 483
484 case OID_GEN_DIRECTED_BYTES_RCV: 484 case OID_GEN_DIRECTED_BYTES_RCV:
485 DBG("%s: OID_GEN_DIRECTED_BYTES_RCV\n", __FUNCTION__); 485 DBG("%s: OID_GEN_DIRECTED_BYTES_RCV\n", __func__);
486 *outbuf = __constant_cpu_to_le32 (0); 486 *outbuf = __constant_cpu_to_le32 (0);
487 retval = 0; 487 retval = 0;
488 break; 488 break;
489 489
490 case OID_GEN_DIRECTED_FRAMES_RCV: 490 case OID_GEN_DIRECTED_FRAMES_RCV:
491 DBG("%s: OID_GEN_DIRECTED_FRAMES_RCV\n", __FUNCTION__); 491 DBG("%s: OID_GEN_DIRECTED_FRAMES_RCV\n", __func__);
492 *outbuf = __constant_cpu_to_le32 (0); 492 *outbuf = __constant_cpu_to_le32 (0);
493 retval = 0; 493 retval = 0;
494 break; 494 break;
495 495
496 case OID_GEN_MULTICAST_BYTES_RCV: 496 case OID_GEN_MULTICAST_BYTES_RCV:
497 DBG("%s: OID_GEN_MULTICAST_BYTES_RCV\n", __FUNCTION__); 497 DBG("%s: OID_GEN_MULTICAST_BYTES_RCV\n", __func__);
498 if (rndis_per_dev_params [configNr].stats) { 498 if (rndis_per_dev_params [configNr].stats) {
499 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] 499 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
500 .stats->multicast * 1111); 500 .stats->multicast * 1111);
@@ -503,7 +503,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
503 break; 503 break;
504 504
505 case OID_GEN_MULTICAST_FRAMES_RCV: 505 case OID_GEN_MULTICAST_FRAMES_RCV:
506 DBG("%s: OID_GEN_MULTICAST_FRAMES_RCV\n", __FUNCTION__); 506 DBG("%s: OID_GEN_MULTICAST_FRAMES_RCV\n", __func__);
507 if (rndis_per_dev_params [configNr].stats) { 507 if (rndis_per_dev_params [configNr].stats) {
508 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] 508 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
509 .stats->multicast); 509 .stats->multicast);
@@ -512,7 +512,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
512 break; 512 break;
513 513
514 case OID_GEN_BROADCAST_BYTES_RCV: 514 case OID_GEN_BROADCAST_BYTES_RCV:
515 DBG("%s: OID_GEN_BROADCAST_BYTES_RCV\n", __FUNCTION__); 515 DBG("%s: OID_GEN_BROADCAST_BYTES_RCV\n", __func__);
516 if (rndis_per_dev_params [configNr].stats) { 516 if (rndis_per_dev_params [configNr].stats) {
517 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] 517 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
518 .stats->rx_packets/42*255); 518 .stats->rx_packets/42*255);
@@ -521,7 +521,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
521 break; 521 break;
522 522
523 case OID_GEN_BROADCAST_FRAMES_RCV: 523 case OID_GEN_BROADCAST_FRAMES_RCV:
524 DBG("%s: OID_GEN_BROADCAST_FRAMES_RCV\n", __FUNCTION__); 524 DBG("%s: OID_GEN_BROADCAST_FRAMES_RCV\n", __func__);
525 if (rndis_per_dev_params [configNr].stats) { 525 if (rndis_per_dev_params [configNr].stats) {
526 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] 526 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
527 .stats->rx_packets/42); 527 .stats->rx_packets/42);
@@ -530,7 +530,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
530 break; 530 break;
531 531
532 case OID_GEN_RCV_CRC_ERROR: 532 case OID_GEN_RCV_CRC_ERROR:
533 DBG("%s: OID_GEN_RCV_CRC_ERROR\n", __FUNCTION__); 533 DBG("%s: OID_GEN_RCV_CRC_ERROR\n", __func__);
534 if (rndis_per_dev_params [configNr].stats) { 534 if (rndis_per_dev_params [configNr].stats) {
535 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] 535 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
536 .stats->rx_crc_errors); 536 .stats->rx_crc_errors);
@@ -539,7 +539,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
539 break; 539 break;
540 540
541 case OID_GEN_TRANSMIT_QUEUE_LENGTH: 541 case OID_GEN_TRANSMIT_QUEUE_LENGTH:
542 DBG("%s: OID_GEN_TRANSMIT_QUEUE_LENGTH\n", __FUNCTION__); 542 DBG("%s: OID_GEN_TRANSMIT_QUEUE_LENGTH\n", __func__);
543 *outbuf = __constant_cpu_to_le32 (0); 543 *outbuf = __constant_cpu_to_le32 (0);
544 retval = 0; 544 retval = 0;
545 break; 545 break;
@@ -549,7 +549,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
549 549
550 /* mandatory */ 550 /* mandatory */
551 case OID_802_3_PERMANENT_ADDRESS: 551 case OID_802_3_PERMANENT_ADDRESS:
552 DBG("%s: OID_802_3_PERMANENT_ADDRESS\n", __FUNCTION__); 552 DBG("%s: OID_802_3_PERMANENT_ADDRESS\n", __func__);
553 if (rndis_per_dev_params [configNr].dev) { 553 if (rndis_per_dev_params [configNr].dev) {
554 length = ETH_ALEN; 554 length = ETH_ALEN;
555 memcpy (outbuf, 555 memcpy (outbuf,
@@ -561,7 +561,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
561 561
562 /* mandatory */ 562 /* mandatory */
563 case OID_802_3_CURRENT_ADDRESS: 563 case OID_802_3_CURRENT_ADDRESS:
564 DBG("%s: OID_802_3_CURRENT_ADDRESS\n", __FUNCTION__); 564 DBG("%s: OID_802_3_CURRENT_ADDRESS\n", __func__);
565 if (rndis_per_dev_params [configNr].dev) { 565 if (rndis_per_dev_params [configNr].dev) {
566 length = ETH_ALEN; 566 length = ETH_ALEN;
567 memcpy (outbuf, 567 memcpy (outbuf,
@@ -573,7 +573,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
573 573
574 /* mandatory */ 574 /* mandatory */
575 case OID_802_3_MULTICAST_LIST: 575 case OID_802_3_MULTICAST_LIST:
576 DBG("%s: OID_802_3_MULTICAST_LIST\n", __FUNCTION__); 576 DBG("%s: OID_802_3_MULTICAST_LIST\n", __func__);
577 /* Multicast base address only */ 577 /* Multicast base address only */
578 *outbuf = __constant_cpu_to_le32 (0xE0000000); 578 *outbuf = __constant_cpu_to_le32 (0xE0000000);
579 retval = 0; 579 retval = 0;
@@ -581,21 +581,21 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
581 581
582 /* mandatory */ 582 /* mandatory */
583 case OID_802_3_MAXIMUM_LIST_SIZE: 583 case OID_802_3_MAXIMUM_LIST_SIZE:
584 DBG("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __FUNCTION__); 584 DBG("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __func__);
585 /* Multicast base address only */ 585 /* Multicast base address only */
586 *outbuf = __constant_cpu_to_le32 (1); 586 *outbuf = __constant_cpu_to_le32 (1);
587 retval = 0; 587 retval = 0;
588 break; 588 break;
589 589
590 case OID_802_3_MAC_OPTIONS: 590 case OID_802_3_MAC_OPTIONS:
591 DBG("%s: OID_802_3_MAC_OPTIONS\n", __FUNCTION__); 591 DBG("%s: OID_802_3_MAC_OPTIONS\n", __func__);
592 break; 592 break;
593 593
594 /* ieee802.3 statistics OIDs (table 4-4) */ 594 /* ieee802.3 statistics OIDs (table 4-4) */
595 595
596 /* mandatory */ 596 /* mandatory */
597 case OID_802_3_RCV_ERROR_ALIGNMENT: 597 case OID_802_3_RCV_ERROR_ALIGNMENT:
598 DBG("%s: OID_802_3_RCV_ERROR_ALIGNMENT\n", __FUNCTION__); 598 DBG("%s: OID_802_3_RCV_ERROR_ALIGNMENT\n", __func__);
599 if (rndis_per_dev_params [configNr].stats) { 599 if (rndis_per_dev_params [configNr].stats) {
600 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr] 600 *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
601 .stats->rx_frame_errors); 601 .stats->rx_frame_errors);
@@ -605,51 +605,51 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
605 605
606 /* mandatory */ 606 /* mandatory */
607 case OID_802_3_XMIT_ONE_COLLISION: 607 case OID_802_3_XMIT_ONE_COLLISION:
608 DBG("%s: OID_802_3_XMIT_ONE_COLLISION\n", __FUNCTION__); 608 DBG("%s: OID_802_3_XMIT_ONE_COLLISION\n", __func__);
609 *outbuf = __constant_cpu_to_le32 (0); 609 *outbuf = __constant_cpu_to_le32 (0);
610 retval = 0; 610 retval = 0;
611 break; 611 break;
612 612
613 /* mandatory */ 613 /* mandatory */
614 case OID_802_3_XMIT_MORE_COLLISIONS: 614 case OID_802_3_XMIT_MORE_COLLISIONS:
615 DBG("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __FUNCTION__); 615 DBG("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __func__);
616 *outbuf = __constant_cpu_to_le32 (0); 616 *outbuf = __constant_cpu_to_le32 (0);
617 retval = 0; 617 retval = 0;
618 break; 618 break;
619 619
620#ifdef RNDIS_OPTIONAL_STATS 620#ifdef RNDIS_OPTIONAL_STATS
621 case OID_802_3_XMIT_DEFERRED: 621 case OID_802_3_XMIT_DEFERRED:
622 DBG("%s: OID_802_3_XMIT_DEFERRED\n", __FUNCTION__); 622 DBG("%s: OID_802_3_XMIT_DEFERRED\n", __func__);
623 /* TODO */ 623 /* TODO */
624 break; 624 break;
625 625
626 case OID_802_3_XMIT_MAX_COLLISIONS: 626 case OID_802_3_XMIT_MAX_COLLISIONS:
627 DBG("%s: OID_802_3_XMIT_MAX_COLLISIONS\n", __FUNCTION__); 627 DBG("%s: OID_802_3_XMIT_MAX_COLLISIONS\n", __func__);
628 /* TODO */ 628 /* TODO */
629 break; 629 break;
630 630
631 case OID_802_3_RCV_OVERRUN: 631 case OID_802_3_RCV_OVERRUN:
632 DBG("%s: OID_802_3_RCV_OVERRUN\n", __FUNCTION__); 632 DBG("%s: OID_802_3_RCV_OVERRUN\n", __func__);
633 /* TODO */ 633 /* TODO */
634 break; 634 break;
635 635
636 case OID_802_3_XMIT_UNDERRUN: 636 case OID_802_3_XMIT_UNDERRUN:
637 DBG("%s: OID_802_3_XMIT_UNDERRUN\n", __FUNCTION__); 637 DBG("%s: OID_802_3_XMIT_UNDERRUN\n", __func__);
638 /* TODO */ 638 /* TODO */
639 break; 639 break;
640 640
641 case OID_802_3_XMIT_HEARTBEAT_FAILURE: 641 case OID_802_3_XMIT_HEARTBEAT_FAILURE:
642 DBG("%s: OID_802_3_XMIT_HEARTBEAT_FAILURE\n", __FUNCTION__); 642 DBG("%s: OID_802_3_XMIT_HEARTBEAT_FAILURE\n", __func__);
643 /* TODO */ 643 /* TODO */
644 break; 644 break;
645 645
646 case OID_802_3_XMIT_TIMES_CRS_LOST: 646 case OID_802_3_XMIT_TIMES_CRS_LOST:
647 DBG("%s: OID_802_3_XMIT_TIMES_CRS_LOST\n", __FUNCTION__); 647 DBG("%s: OID_802_3_XMIT_TIMES_CRS_LOST\n", __func__);
648 /* TODO */ 648 /* TODO */
649 break; 649 break;
650 650
651 case OID_802_3_XMIT_LATE_COLLISIONS: 651 case OID_802_3_XMIT_LATE_COLLISIONS:
652 DBG("%s: OID_802_3_XMIT_LATE_COLLISIONS\n", __FUNCTION__); 652 DBG("%s: OID_802_3_XMIT_LATE_COLLISIONS\n", __func__);
653 /* TODO */ 653 /* TODO */
654 break; 654 break;
655#endif /* RNDIS_OPTIONAL_STATS */ 655#endif /* RNDIS_OPTIONAL_STATS */
@@ -657,7 +657,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
657#ifdef RNDIS_PM 657#ifdef RNDIS_PM
658 /* power management OIDs (table 4-5) */ 658 /* power management OIDs (table 4-5) */
659 case OID_PNP_CAPABILITIES: 659 case OID_PNP_CAPABILITIES:
660 DBG("%s: OID_PNP_CAPABILITIES\n", __FUNCTION__); 660 DBG("%s: OID_PNP_CAPABILITIES\n", __func__);
661 661
662 /* for now, no wakeup capabilities */ 662 /* for now, no wakeup capabilities */
663 length = sizeof (struct NDIS_PNP_CAPABILITIES); 663 length = sizeof (struct NDIS_PNP_CAPABILITIES);
@@ -665,7 +665,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
665 retval = 0; 665 retval = 0;
666 break; 666 break;
667 case OID_PNP_QUERY_POWER: 667 case OID_PNP_QUERY_POWER:
668 DBG("%s: OID_PNP_QUERY_POWER D%d\n", __FUNCTION__, 668 DBG("%s: OID_PNP_QUERY_POWER D%d\n", __func__,
669 le32_to_cpu(get_unaligned((__le32 *)buf)) - 1); 669 le32_to_cpu(get_unaligned((__le32 *)buf)) - 1);
670 /* only suspend is a real power state, and 670 /* only suspend is a real power state, and
671 * it can't be entered by OID_PNP_SET_POWER... 671 * it can't be entered by OID_PNP_SET_POWER...
@@ -677,7 +677,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
677 677
678 default: 678 default:
679 pr_warning("%s: query unknown OID 0x%08X\n", 679 pr_warning("%s: query unknown OID 0x%08X\n",
680 __FUNCTION__, OID); 680 __func__, OID);
681 } 681 }
682 if (retval < 0) 682 if (retval < 0)
683 length = 0; 683 length = 0;
@@ -729,7 +729,7 @@ static int gen_ndis_set_resp (u8 configNr, u32 OID, u8 *buf, u32 buf_len,
729 *params->filter = (u16) le32_to_cpu(get_unaligned( 729 *params->filter = (u16) le32_to_cpu(get_unaligned(
730 (__le32 *)buf)); 730 (__le32 *)buf));
731 DBG("%s: OID_GEN_CURRENT_PACKET_FILTER %08x\n", 731 DBG("%s: OID_GEN_CURRENT_PACKET_FILTER %08x\n",
732 __FUNCTION__, *params->filter); 732 __func__, *params->filter);
733 733
734 /* this call has a significant side effect: it's 734 /* this call has a significant side effect: it's
735 * what makes the packet flow start and stop, like 735 * what makes the packet flow start and stop, like
@@ -753,7 +753,7 @@ update_linkstate:
753 753
754 case OID_802_3_MULTICAST_LIST: 754 case OID_802_3_MULTICAST_LIST:
755 /* I think we can ignore this */ 755 /* I think we can ignore this */
756 DBG("%s: OID_802_3_MULTICAST_LIST\n", __FUNCTION__); 756 DBG("%s: OID_802_3_MULTICAST_LIST\n", __func__);
757 retval = 0; 757 retval = 0;
758 break; 758 break;
759#if 0 759#if 0
@@ -762,7 +762,7 @@ update_linkstate:
762 struct rndis_config_parameter *param; 762 struct rndis_config_parameter *param;
763 param = (struct rndis_config_parameter *) buf; 763 param = (struct rndis_config_parameter *) buf;
764 DBG("%s: OID_GEN_RNDIS_CONFIG_PARAMETER '%*s'\n", 764 DBG("%s: OID_GEN_RNDIS_CONFIG_PARAMETER '%*s'\n",
765 __FUNCTION__, 765 __func__,
766 min(cpu_to_le32(param->ParameterNameLength),80), 766 min(cpu_to_le32(param->ParameterNameLength),80),
767 buf + param->ParameterNameOffset); 767 buf + param->ParameterNameOffset);
768 retval = 0; 768 retval = 0;
@@ -778,7 +778,7 @@ update_linkstate:
778 * FIXME ... then things go batty; Windows wedges itself. 778 * FIXME ... then things go batty; Windows wedges itself.
779 */ 779 */
780 i = le32_to_cpu(get_unaligned((__le32 *)buf)); 780 i = le32_to_cpu(get_unaligned((__le32 *)buf));
781 DBG("%s: OID_PNP_SET_POWER D%d\n", __FUNCTION__, i - 1); 781 DBG("%s: OID_PNP_SET_POWER D%d\n", __func__, i - 1);
782 switch (i) { 782 switch (i) {
783 case NdisDeviceStateD0: 783 case NdisDeviceStateD0:
784 *params->filter = params->saved_filter; 784 *params->filter = params->saved_filter;
@@ -802,7 +802,7 @@ update_linkstate:
802 802
803 default: 803 default:
804 pr_warning("%s: set unknown OID 0x%08X, size %d\n", 804 pr_warning("%s: set unknown OID 0x%08X, size %d\n",
805 __FUNCTION__, OID, buf_len); 805 __func__, OID, buf_len);
806 } 806 }
807 807
808 return retval; 808 return retval;
@@ -855,7 +855,7 @@ static int rndis_query_response (int configNr, rndis_query_msg_type *buf)
855 rndis_query_cmplt_type *resp; 855 rndis_query_cmplt_type *resp;
856 rndis_resp_t *r; 856 rndis_resp_t *r;
857 857
858 // DBG("%s: OID = %08X\n", __FUNCTION__, cpu_to_le32(buf->OID)); 858 // DBG("%s: OID = %08X\n", __func__, cpu_to_le32(buf->OID));
859 if (!rndis_per_dev_params [configNr].dev) return -ENOTSUPP; 859 if (!rndis_per_dev_params [configNr].dev) return -ENOTSUPP;
860 860
861 /* 861 /*
@@ -908,9 +908,9 @@ static int rndis_set_response (int configNr, rndis_set_msg_type *buf)
908 BufOffset = le32_to_cpu (buf->InformationBufferOffset); 908 BufOffset = le32_to_cpu (buf->InformationBufferOffset);
909 909
910#ifdef VERBOSE 910#ifdef VERBOSE
911 DBG("%s: Length: %d\n", __FUNCTION__, BufLength); 911 DBG("%s: Length: %d\n", __func__, BufLength);
912 DBG("%s: Offset: %d\n", __FUNCTION__, BufOffset); 912 DBG("%s: Offset: %d\n", __func__, BufOffset);
913 DBG("%s: InfoBuffer: ", __FUNCTION__); 913 DBG("%s: InfoBuffer: ", __func__);
914 914
915 for (i = 0; i < BufLength; i++) { 915 for (i = 0; i < BufLength; i++) {
916 DBG("%02x ", *(((u8 *) buf) + i + 8 + BufOffset)); 916 DBG("%02x ", *(((u8 *) buf) + i + 8 + BufOffset));
@@ -1080,14 +1080,14 @@ int rndis_msg_parser (u8 configNr, u8 *buf)
1080 switch (MsgType) { 1080 switch (MsgType) {
1081 case REMOTE_NDIS_INITIALIZE_MSG: 1081 case REMOTE_NDIS_INITIALIZE_MSG:
1082 DBG("%s: REMOTE_NDIS_INITIALIZE_MSG\n", 1082 DBG("%s: REMOTE_NDIS_INITIALIZE_MSG\n",
1083 __FUNCTION__ ); 1083 __func__ );
1084 params->state = RNDIS_INITIALIZED; 1084 params->state = RNDIS_INITIALIZED;
1085 return rndis_init_response (configNr, 1085 return rndis_init_response (configNr,
1086 (rndis_init_msg_type *) buf); 1086 (rndis_init_msg_type *) buf);
1087 1087
1088 case REMOTE_NDIS_HALT_MSG: 1088 case REMOTE_NDIS_HALT_MSG:
1089 DBG("%s: REMOTE_NDIS_HALT_MSG\n", 1089 DBG("%s: REMOTE_NDIS_HALT_MSG\n",
1090 __FUNCTION__ ); 1090 __func__ );
1091 params->state = RNDIS_UNINITIALIZED; 1091 params->state = RNDIS_UNINITIALIZED;
1092 if (params->dev) { 1092 if (params->dev) {
1093 netif_carrier_off (params->dev); 1093 netif_carrier_off (params->dev);
@@ -1105,7 +1105,7 @@ int rndis_msg_parser (u8 configNr, u8 *buf)
1105 1105
1106 case REMOTE_NDIS_RESET_MSG: 1106 case REMOTE_NDIS_RESET_MSG:
1107 DBG("%s: REMOTE_NDIS_RESET_MSG\n", 1107 DBG("%s: REMOTE_NDIS_RESET_MSG\n",
1108 __FUNCTION__ ); 1108 __func__ );
1109 return rndis_reset_response (configNr, 1109 return rndis_reset_response (configNr,
1110 (rndis_reset_msg_type *) buf); 1110 (rndis_reset_msg_type *) buf);
1111 1111
@@ -1113,7 +1113,7 @@ int rndis_msg_parser (u8 configNr, u8 *buf)
1113 /* For USB: host does this every 5 seconds */ 1113 /* For USB: host does this every 5 seconds */
1114 if (rndis_debug > 1) 1114 if (rndis_debug > 1)
1115 DBG("%s: REMOTE_NDIS_KEEPALIVE_MSG\n", 1115 DBG("%s: REMOTE_NDIS_KEEPALIVE_MSG\n",
1116 __FUNCTION__ ); 1116 __func__ );
1117 return rndis_keepalive_response (configNr, 1117 return rndis_keepalive_response (configNr,
1118 (rndis_keepalive_msg_type *) 1118 (rndis_keepalive_msg_type *)
1119 buf); 1119 buf);
@@ -1124,7 +1124,7 @@ int rndis_msg_parser (u8 configNr, u8 *buf)
1124 * suspending itself. 1124 * suspending itself.
1125 */ 1125 */
1126 pr_warning("%s: unknown RNDIS message 0x%08X len %d\n", 1126 pr_warning("%s: unknown RNDIS message 0x%08X len %d\n",
1127 __FUNCTION__ , MsgType, MsgLength); 1127 __func__ , MsgType, MsgLength);
1128 { 1128 {
1129 unsigned i; 1129 unsigned i;
1130 for (i = 0; i < MsgLength; i += 16) { 1130 for (i = 0; i < MsgLength; i += 16) {
@@ -1159,7 +1159,7 @@ int rndis_register (int (* rndis_control_ack) (struct net_device *))
1159 if (!rndis_per_dev_params [i].used) { 1159 if (!rndis_per_dev_params [i].used) {
1160 rndis_per_dev_params [i].used = 1; 1160 rndis_per_dev_params [i].used = 1;
1161 rndis_per_dev_params [i].ack = rndis_control_ack; 1161 rndis_per_dev_params [i].ack = rndis_control_ack;
1162 DBG("%s: configNr = %d\n", __FUNCTION__, i); 1162 DBG("%s: configNr = %d\n", __func__, i);
1163 return i; 1163 return i;
1164 } 1164 }
1165 } 1165 }
@@ -1170,7 +1170,7 @@ int rndis_register (int (* rndis_control_ack) (struct net_device *))
1170 1170
1171void rndis_deregister (int configNr) 1171void rndis_deregister (int configNr)
1172{ 1172{
1173 DBG("%s: \n", __FUNCTION__ ); 1173 DBG("%s: \n", __func__ );
1174 1174
1175 if (configNr >= RNDIS_MAX_CONFIGS) return; 1175 if (configNr >= RNDIS_MAX_CONFIGS) return;
1176 rndis_per_dev_params [configNr].used = 0; 1176 rndis_per_dev_params [configNr].used = 0;
@@ -1182,7 +1182,7 @@ int rndis_set_param_dev (u8 configNr, struct net_device *dev,
1182 struct net_device_stats *stats, 1182 struct net_device_stats *stats,
1183 u16 *cdc_filter) 1183 u16 *cdc_filter)
1184{ 1184{
1185 DBG("%s:\n", __FUNCTION__ ); 1185 DBG("%s:\n", __func__ );
1186 if (!dev || !stats) return -1; 1186 if (!dev || !stats) return -1;
1187 if (configNr >= RNDIS_MAX_CONFIGS) return -1; 1187 if (configNr >= RNDIS_MAX_CONFIGS) return -1;
1188 1188
@@ -1195,7 +1195,7 @@ int rndis_set_param_dev (u8 configNr, struct net_device *dev,
1195 1195
1196int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr) 1196int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr)
1197{ 1197{
1198 DBG("%s:\n", __FUNCTION__ ); 1198 DBG("%s:\n", __func__ );
1199 if (!vendorDescr) return -1; 1199 if (!vendorDescr) return -1;
1200 if (configNr >= RNDIS_MAX_CONFIGS) return -1; 1200 if (configNr >= RNDIS_MAX_CONFIGS) return -1;
1201 1201
@@ -1207,7 +1207,7 @@ int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr)
1207 1207
1208int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed) 1208int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed)
1209{ 1209{
1210 DBG("%s: %u %u\n", __FUNCTION__, medium, speed); 1210 DBG("%s: %u %u\n", __func__, medium, speed);
1211 if (configNr >= RNDIS_MAX_CONFIGS) return -1; 1211 if (configNr >= RNDIS_MAX_CONFIGS) return -1;
1212 1212
1213 rndis_per_dev_params [configNr].medium = medium; 1213 rndis_per_dev_params [configNr].medium = medium;
@@ -1415,7 +1415,7 @@ int __init rndis_init (void)
1415 if (!(rndis_connect_state [i] 1415 if (!(rndis_connect_state [i]
1416 = create_proc_entry (name, 0660, NULL))) 1416 = create_proc_entry (name, 0660, NULL)))
1417 { 1417 {
1418 DBG("%s :remove entries", __FUNCTION__); 1418 DBG("%s :remove entries", __func__);
1419 while (i) { 1419 while (i) {
1420 sprintf (name, NAME_TEMPLATE, --i); 1420 sprintf (name, NAME_TEMPLATE, --i);
1421 remove_proc_entry (name, NULL); 1421 remove_proc_entry (name, NULL);
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index 315c7c14aaa8..5ae689139dd0 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -251,7 +251,7 @@ __acquires(ehci->lock)
251#ifdef EHCI_URB_TRACE 251#ifdef EHCI_URB_TRACE
252 ehci_dbg (ehci, 252 ehci_dbg (ehci,
253 "%s %s urb %p ep%d%s status %d len %d/%d\n", 253 "%s %s urb %p ep%d%s status %d len %d/%d\n",
254 __FUNCTION__, urb->dev->devpath, urb, 254 __func__, urb->dev->devpath, urb,
255 usb_pipeendpoint (urb->pipe), 255 usb_pipeendpoint (urb->pipe),
256 usb_pipein (urb->pipe) ? "in" : "out", 256 usb_pipein (urb->pipe) ? "in" : "out",
257 status, 257 status,
@@ -974,7 +974,7 @@ submit_async (
974#ifdef EHCI_URB_TRACE 974#ifdef EHCI_URB_TRACE
975 ehci_dbg (ehci, 975 ehci_dbg (ehci,
976 "%s %s urb %p ep%d%s len %d, qtd %p [qh %p]\n", 976 "%s %s urb %p ep%d%s len %d, qtd %p [qh %p]\n",
977 __FUNCTION__, urb->dev->devpath, urb, 977 __func__, urb->dev->devpath, urb,
978 epnum & 0x0f, (epnum & USB_DIR_IN) ? "in" : "out", 978 epnum & 0x0f, (epnum & USB_DIR_IN) ? "in" : "out",
979 urb->transfer_buffer_length, 979 urb->transfer_buffer_length,
980 qtd, urb->ep->hcpriv); 980 qtd, urb->ep->hcpriv);
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index e3cfe0a03552..be575e46eac3 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -1677,7 +1677,7 @@ static int itd_submit (struct ehci_hcd *ehci, struct urb *urb,
1677#ifdef EHCI_URB_TRACE 1677#ifdef EHCI_URB_TRACE
1678 ehci_dbg (ehci, 1678 ehci_dbg (ehci,
1679 "%s %s urb %p ep%d%s len %d, %d pkts %d uframes [%p]\n", 1679 "%s %s urb %p ep%d%s len %d, %d pkts %d uframes [%p]\n",
1680 __FUNCTION__, urb->dev->devpath, urb, 1680 __func__, urb->dev->devpath, urb,
1681 usb_pipeendpoint (urb->pipe), 1681 usb_pipeendpoint (urb->pipe),
1682 usb_pipein (urb->pipe) ? "in" : "out", 1682 usb_pipein (urb->pipe) ? "in" : "out",
1683 urb->transfer_buffer_length, 1683 urb->transfer_buffer_length,
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 0ee694f043cc..ae6e70edd745 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -106,7 +106,7 @@ int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base)
106 pci_read_config_word(pdev, UHCI_USBLEGSUP, &legsup); 106 pci_read_config_word(pdev, UHCI_USBLEGSUP, &legsup);
107 if (legsup & ~(UHCI_USBLEGSUP_RO | UHCI_USBLEGSUP_RWC)) { 107 if (legsup & ~(UHCI_USBLEGSUP_RO | UHCI_USBLEGSUP_RWC)) {
108 dev_dbg(&pdev->dev, "%s: legsup = 0x%04x\n", 108 dev_dbg(&pdev->dev, "%s: legsup = 0x%04x\n",
109 __FUNCTION__, legsup); 109 __func__, legsup);
110 goto reset_needed; 110 goto reset_needed;
111 } 111 }
112 112
@@ -114,14 +114,14 @@ int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base)
114 if ((cmd & UHCI_USBCMD_RUN) || !(cmd & UHCI_USBCMD_CONFIGURE) || 114 if ((cmd & UHCI_USBCMD_RUN) || !(cmd & UHCI_USBCMD_CONFIGURE) ||
115 !(cmd & UHCI_USBCMD_EGSM)) { 115 !(cmd & UHCI_USBCMD_EGSM)) {
116 dev_dbg(&pdev->dev, "%s: cmd = 0x%04x\n", 116 dev_dbg(&pdev->dev, "%s: cmd = 0x%04x\n",
117 __FUNCTION__, cmd); 117 __func__, cmd);
118 goto reset_needed; 118 goto reset_needed;
119 } 119 }
120 120
121 intr = inw(base + UHCI_USBINTR); 121 intr = inw(base + UHCI_USBINTR);
122 if (intr & (~UHCI_USBINTR_RESUME)) { 122 if (intr & (~UHCI_USBINTR_RESUME)) {
123 dev_dbg(&pdev->dev, "%s: intr = 0x%04x\n", 123 dev_dbg(&pdev->dev, "%s: intr = 0x%04x\n",
124 __FUNCTION__, intr); 124 __func__, intr);
125 goto reset_needed; 125 goto reset_needed;
126 } 126 }
127 return 0; 127 return 0;
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index df256d61e2c6..274276cf8621 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -1335,7 +1335,7 @@ static int
1335sl811h_bus_suspend(struct usb_hcd *hcd) 1335sl811h_bus_suspend(struct usb_hcd *hcd)
1336{ 1336{
1337 // SOFs off 1337 // SOFs off
1338 DBG("%s\n", __FUNCTION__); 1338 DBG("%s\n", __func__);
1339 return 0; 1339 return 0;
1340} 1340}
1341 1341
@@ -1343,7 +1343,7 @@ static int
1343sl811h_bus_resume(struct usb_hcd *hcd) 1343sl811h_bus_resume(struct usb_hcd *hcd)
1344{ 1344{
1345 // SOFs on 1345 // SOFs on
1346 DBG("%s\n", __FUNCTION__); 1346 DBG("%s\n", __func__);
1347 return 0; 1347 return 0;
1348} 1348}
1349 1349
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index f65d5a858733..d3e0d8aa3980 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -335,7 +335,7 @@ __releases(uhci->lock)
335__acquires(uhci->lock) 335__acquires(uhci->lock)
336{ 336{
337 dev_dbg(&uhci_to_hcd(uhci)->self.root_hub->dev, 337 dev_dbg(&uhci_to_hcd(uhci)->self.root_hub->dev,
338 "%s%s\n", __FUNCTION__, 338 "%s%s\n", __func__,
339 uhci->rh_state == UHCI_RH_AUTO_STOPPED ? 339 uhci->rh_state == UHCI_RH_AUTO_STOPPED ?
340 " (auto-start)" : ""); 340 " (auto-start)" : "");
341 341
@@ -735,7 +735,7 @@ static int uhci_pci_suspend(struct usb_hcd *hcd, pm_message_t message)
735 struct uhci_hcd *uhci = hcd_to_uhci(hcd); 735 struct uhci_hcd *uhci = hcd_to_uhci(hcd);
736 int rc = 0; 736 int rc = 0;
737 737
738 dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__); 738 dev_dbg(uhci_dev(uhci), "%s\n", __func__);
739 739
740 spin_lock_irq(&uhci->lock); 740 spin_lock_irq(&uhci->lock);
741 if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) || uhci->dead) 741 if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) || uhci->dead)
@@ -771,7 +771,7 @@ static int uhci_pci_resume(struct usb_hcd *hcd)
771{ 771{
772 struct uhci_hcd *uhci = hcd_to_uhci(hcd); 772 struct uhci_hcd *uhci = hcd_to_uhci(hcd);
773 773
774 dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__); 774 dev_dbg(uhci_dev(uhci), "%s\n", __func__);
775 775
776 /* Since we aren't in D3 any more, it's safe to set this flag 776 /* Since we aren't in D3 any more, it's safe to set this flag
777 * even if the controller was dead. 777 * even if the controller was dead.
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c
index 60379b17bbc1..db645936eedd 100644
--- a/drivers/usb/host/uhci-q.c
+++ b/drivers/usb/host/uhci-q.c
@@ -1171,7 +1171,7 @@ static int uhci_result_common(struct uhci_hcd *uhci, struct urb *urb)
1171 /* Some debugging code */ 1171 /* Some debugging code */
1172 dev_dbg(&urb->dev->dev, 1172 dev_dbg(&urb->dev->dev,
1173 "%s: failed with status %x\n", 1173 "%s: failed with status %x\n",
1174 __FUNCTION__, status); 1174 __func__, status);
1175 1175
1176 if (debug > 1 && errbuf) { 1176 if (debug > 1 && errbuf) {
1177 /* Print the chain for debugging */ 1177 /* Print the chain for debugging */
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c
index 5a2c44e4c1f7..965f6eaea6a0 100644
--- a/drivers/usb/misc/adutux.c
+++ b/drivers/usb/misc/adutux.c
@@ -147,10 +147,10 @@ static void adu_abort_transfers(struct adu_device *dev)
147{ 147{
148 unsigned long flags; 148 unsigned long flags;
149 149
150 dbg(2," %s : enter", __FUNCTION__); 150 dbg(2," %s : enter", __func__);
151 151
152 if (dev->udev == NULL) { 152 if (dev->udev == NULL) {
153 dbg(1," %s : udev is null", __FUNCTION__); 153 dbg(1," %s : udev is null", __func__);
154 goto exit; 154 goto exit;
155 } 155 }
156 156
@@ -172,12 +172,12 @@ static void adu_abort_transfers(struct adu_device *dev)
172 spin_unlock_irqrestore(&dev->buflock, flags); 172 spin_unlock_irqrestore(&dev->buflock, flags);
173 173
174exit: 174exit:
175 dbg(2," %s : leave", __FUNCTION__); 175 dbg(2," %s : leave", __func__);
176} 176}
177 177
178static void adu_delete(struct adu_device *dev) 178static void adu_delete(struct adu_device *dev)
179{ 179{
180 dbg(2, "%s enter", __FUNCTION__); 180 dbg(2, "%s enter", __func__);
181 181
182 /* free data structures */ 182 /* free data structures */
183 usb_free_urb(dev->interrupt_in_urb); 183 usb_free_urb(dev->interrupt_in_urb);
@@ -188,7 +188,7 @@ static void adu_delete(struct adu_device *dev)
188 kfree(dev->interrupt_out_buffer); 188 kfree(dev->interrupt_out_buffer);
189 kfree(dev); 189 kfree(dev);
190 190
191 dbg(2, "%s : leave", __FUNCTION__); 191 dbg(2, "%s : leave", __func__);
192} 192}
193 193
194static void adu_interrupt_in_callback(struct urb *urb) 194static void adu_interrupt_in_callback(struct urb *urb)
@@ -196,8 +196,8 @@ static void adu_interrupt_in_callback(struct urb *urb)
196 struct adu_device *dev = urb->context; 196 struct adu_device *dev = urb->context;
197 int status = urb->status; 197 int status = urb->status;
198 198
199 dbg(4," %s : enter, status %d", __FUNCTION__, status); 199 dbg(4," %s : enter, status %d", __func__, status);
200 adu_debug_data(5, __FUNCTION__, urb->actual_length, 200 adu_debug_data(5, __func__, urb->actual_length,
201 urb->transfer_buffer); 201 urb->transfer_buffer);
202 202
203 spin_lock(&dev->buflock); 203 spin_lock(&dev->buflock);
@@ -206,7 +206,7 @@ static void adu_interrupt_in_callback(struct urb *urb)
206 if ((status != -ENOENT) && (status != -ECONNRESET) && 206 if ((status != -ENOENT) && (status != -ECONNRESET) &&
207 (status != -ESHUTDOWN)) { 207 (status != -ESHUTDOWN)) {
208 dbg(1," %s : nonzero status received: %d", 208 dbg(1," %s : nonzero status received: %d",
209 __FUNCTION__, status); 209 __func__, status);
210 } 210 }
211 goto exit; 211 goto exit;
212 } 212 }
@@ -220,10 +220,10 @@ static void adu_interrupt_in_callback(struct urb *urb)
220 dev->interrupt_in_buffer, urb->actual_length); 220 dev->interrupt_in_buffer, urb->actual_length);
221 221
222 dev->read_buffer_length += urb->actual_length; 222 dev->read_buffer_length += urb->actual_length;
223 dbg(2," %s reading %d ", __FUNCTION__, 223 dbg(2," %s reading %d ", __func__,
224 urb->actual_length); 224 urb->actual_length);
225 } else { 225 } else {
226 dbg(1," %s : read_buffer overflow", __FUNCTION__); 226 dbg(1," %s : read_buffer overflow", __func__);
227 } 227 }
228 } 228 }
229 229
@@ -232,9 +232,9 @@ exit:
232 spin_unlock(&dev->buflock); 232 spin_unlock(&dev->buflock);
233 /* always wake up so we recover from errors */ 233 /* always wake up so we recover from errors */
234 wake_up_interruptible(&dev->read_wait); 234 wake_up_interruptible(&dev->read_wait);
235 adu_debug_data(5, __FUNCTION__, urb->actual_length, 235 adu_debug_data(5, __func__, urb->actual_length,
236 urb->transfer_buffer); 236 urb->transfer_buffer);
237 dbg(4," %s : leave, status %d", __FUNCTION__, status); 237 dbg(4," %s : leave, status %d", __func__, status);
238} 238}
239 239
240static void adu_interrupt_out_callback(struct urb *urb) 240static void adu_interrupt_out_callback(struct urb *urb)
@@ -242,14 +242,14 @@ static void adu_interrupt_out_callback(struct urb *urb)
242 struct adu_device *dev = urb->context; 242 struct adu_device *dev = urb->context;
243 int status = urb->status; 243 int status = urb->status;
244 244
245 dbg(4," %s : enter, status %d", __FUNCTION__, status); 245 dbg(4," %s : enter, status %d", __func__, status);
246 adu_debug_data(5,__FUNCTION__, urb->actual_length, urb->transfer_buffer); 246 adu_debug_data(5,__func__, urb->actual_length, urb->transfer_buffer);
247 247
248 if (status != 0) { 248 if (status != 0) {
249 if ((status != -ENOENT) && 249 if ((status != -ENOENT) &&
250 (status != -ECONNRESET)) { 250 (status != -ECONNRESET)) {
251 dbg(1, " %s :nonzero status received: %d", 251 dbg(1, " %s :nonzero status received: %d",
252 __FUNCTION__, status); 252 __func__, status);
253 } 253 }
254 goto exit; 254 goto exit;
255 } 255 }
@@ -260,9 +260,9 @@ static void adu_interrupt_out_callback(struct urb *urb)
260 spin_unlock(&dev->buflock); 260 spin_unlock(&dev->buflock);
261exit: 261exit:
262 262
263 adu_debug_data(5, __FUNCTION__, urb->actual_length, 263 adu_debug_data(5, __func__, urb->actual_length,
264 urb->transfer_buffer); 264 urb->transfer_buffer);
265 dbg(4," %s : leave, status %d", __FUNCTION__, status); 265 dbg(4," %s : leave, status %d", __func__, status);
266} 266}
267 267
268static int adu_open(struct inode *inode, struct file *file) 268static int adu_open(struct inode *inode, struct file *file)
@@ -272,19 +272,19 @@ static int adu_open(struct inode *inode, struct file *file)
272 int subminor; 272 int subminor;
273 int retval; 273 int retval;
274 274
275 dbg(2,"%s : enter", __FUNCTION__); 275 dbg(2,"%s : enter", __func__);
276 276
277 subminor = iminor(inode); 277 subminor = iminor(inode);
278 278
279 if ((retval = mutex_lock_interruptible(&adutux_mutex))) { 279 if ((retval = mutex_lock_interruptible(&adutux_mutex))) {
280 dbg(2, "%s : mutex lock failed", __FUNCTION__); 280 dbg(2, "%s : mutex lock failed", __func__);
281 goto exit_no_lock; 281 goto exit_no_lock;
282 } 282 }
283 283
284 interface = usb_find_interface(&adu_driver, subminor); 284 interface = usb_find_interface(&adu_driver, subminor);
285 if (!interface) { 285 if (!interface) {
286 err("%s - error, can't find device for minor %d", 286 err("%s - error, can't find device for minor %d",
287 __FUNCTION__, subminor); 287 __func__, subminor);
288 retval = -ENODEV; 288 retval = -ENODEV;
289 goto exit_no_device; 289 goto exit_no_device;
290 } 290 }
@@ -302,7 +302,7 @@ static int adu_open(struct inode *inode, struct file *file)
302 } 302 }
303 303
304 ++dev->open_count; 304 ++dev->open_count;
305 dbg(2,"%s : open count %d", __FUNCTION__, dev->open_count); 305 dbg(2,"%s : open count %d", __func__, dev->open_count);
306 306
307 /* save device in the file's private structure */ 307 /* save device in the file's private structure */
308 file->private_data = dev; 308 file->private_data = dev;
@@ -332,23 +332,23 @@ static int adu_open(struct inode *inode, struct file *file)
332exit_no_device: 332exit_no_device:
333 mutex_unlock(&adutux_mutex); 333 mutex_unlock(&adutux_mutex);
334exit_no_lock: 334exit_no_lock:
335 dbg(2,"%s : leave, return value %d ", __FUNCTION__, retval); 335 dbg(2,"%s : leave, return value %d ", __func__, retval);
336 return retval; 336 return retval;
337} 337}
338 338
339static void adu_release_internal(struct adu_device *dev) 339static void adu_release_internal(struct adu_device *dev)
340{ 340{
341 dbg(2," %s : enter", __FUNCTION__); 341 dbg(2," %s : enter", __func__);
342 342
343 /* decrement our usage count for the device */ 343 /* decrement our usage count for the device */
344 --dev->open_count; 344 --dev->open_count;
345 dbg(2," %s : open count %d", __FUNCTION__, dev->open_count); 345 dbg(2," %s : open count %d", __func__, dev->open_count);
346 if (dev->open_count <= 0) { 346 if (dev->open_count <= 0) {
347 adu_abort_transfers(dev); 347 adu_abort_transfers(dev);
348 dev->open_count = 0; 348 dev->open_count = 0;
349 } 349 }
350 350
351 dbg(2," %s : leave", __FUNCTION__); 351 dbg(2," %s : leave", __func__);
352} 352}
353 353
354static int adu_release(struct inode *inode, struct file *file) 354static int adu_release(struct inode *inode, struct file *file)
@@ -356,17 +356,17 @@ static int adu_release(struct inode *inode, struct file *file)
356 struct adu_device *dev; 356 struct adu_device *dev;
357 int retval = 0; 357 int retval = 0;
358 358
359 dbg(2," %s : enter", __FUNCTION__); 359 dbg(2," %s : enter", __func__);
360 360
361 if (file == NULL) { 361 if (file == NULL) {
362 dbg(1," %s : file is NULL", __FUNCTION__); 362 dbg(1," %s : file is NULL", __func__);
363 retval = -ENODEV; 363 retval = -ENODEV;
364 goto exit; 364 goto exit;
365 } 365 }
366 366
367 dev = file->private_data; 367 dev = file->private_data;
368 if (dev == NULL) { 368 if (dev == NULL) {
369 dbg(1," %s : object is NULL", __FUNCTION__); 369 dbg(1," %s : object is NULL", __func__);
370 retval = -ENODEV; 370 retval = -ENODEV;
371 goto exit; 371 goto exit;
372 } 372 }
@@ -374,7 +374,7 @@ static int adu_release(struct inode *inode, struct file *file)
374 mutex_lock(&adutux_mutex); /* not interruptible */ 374 mutex_lock(&adutux_mutex); /* not interruptible */
375 375
376 if (dev->open_count <= 0) { 376 if (dev->open_count <= 0) {
377 dbg(1," %s : device not opened", __FUNCTION__); 377 dbg(1," %s : device not opened", __func__);
378 retval = -ENODEV; 378 retval = -ENODEV;
379 goto exit; 379 goto exit;
380 } 380 }
@@ -388,7 +388,7 @@ static int adu_release(struct inode *inode, struct file *file)
388 388
389exit: 389exit:
390 mutex_unlock(&adutux_mutex); 390 mutex_unlock(&adutux_mutex);
391 dbg(2," %s : leave, return value %d", __FUNCTION__, retval); 391 dbg(2," %s : leave, return value %d", __func__, retval);
392 return retval; 392 return retval;
393} 393}
394 394
@@ -405,10 +405,10 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count,
405 unsigned long flags; 405 unsigned long flags;
406 DECLARE_WAITQUEUE(wait, current); 406 DECLARE_WAITQUEUE(wait, current);
407 407
408 dbg(2," %s : enter, count = %Zd, file=%p", __FUNCTION__, count, file); 408 dbg(2," %s : enter, count = %Zd, file=%p", __func__, count, file);
409 409
410 dev = file->private_data; 410 dev = file->private_data;
411 dbg(2," %s : dev=%p", __FUNCTION__, dev); 411 dbg(2," %s : dev=%p", __func__, dev);
412 412
413 if (mutex_lock_interruptible(&dev->mtx)) 413 if (mutex_lock_interruptible(&dev->mtx))
414 return -ERESTARTSYS; 414 return -ERESTARTSYS;
@@ -422,16 +422,16 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count,
422 422
423 /* verify that some data was requested */ 423 /* verify that some data was requested */
424 if (count == 0) { 424 if (count == 0) {
425 dbg(1," %s : read request of 0 bytes", __FUNCTION__); 425 dbg(1," %s : read request of 0 bytes", __func__);
426 goto exit; 426 goto exit;
427 } 427 }
428 428
429 timeout = COMMAND_TIMEOUT; 429 timeout = COMMAND_TIMEOUT;
430 dbg(2," %s : about to start looping", __FUNCTION__); 430 dbg(2," %s : about to start looping", __func__);
431 while (bytes_to_read) { 431 while (bytes_to_read) {
432 int data_in_secondary = dev->secondary_tail - dev->secondary_head; 432 int data_in_secondary = dev->secondary_tail - dev->secondary_head;
433 dbg(2," %s : while, data_in_secondary=%d, status=%d", 433 dbg(2," %s : while, data_in_secondary=%d, status=%d",
434 __FUNCTION__, data_in_secondary, 434 __func__, data_in_secondary,
435 dev->interrupt_in_urb->status); 435 dev->interrupt_in_urb->status);
436 436
437 if (data_in_secondary) { 437 if (data_in_secondary) {
@@ -456,7 +456,7 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count,
456 /* we secure access to the primary */ 456 /* we secure access to the primary */
457 char *tmp; 457 char *tmp;
458 dbg(2," %s : swap, read_buffer_length = %d", 458 dbg(2," %s : swap, read_buffer_length = %d",
459 __FUNCTION__, dev->read_buffer_length); 459 __func__, dev->read_buffer_length);
460 tmp = dev->read_buffer_secondary; 460 tmp = dev->read_buffer_secondary;
461 dev->read_buffer_secondary = dev->read_buffer_primary; 461 dev->read_buffer_secondary = dev->read_buffer_primary;
462 dev->read_buffer_primary = tmp; 462 dev->read_buffer_primary = tmp;
@@ -471,10 +471,10 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count,
471 if (!dev->read_urb_finished) { 471 if (!dev->read_urb_finished) {
472 /* somebody is doing IO */ 472 /* somebody is doing IO */
473 spin_unlock_irqrestore(&dev->buflock, flags); 473 spin_unlock_irqrestore(&dev->buflock, flags);
474 dbg(2," %s : submitted already", __FUNCTION__); 474 dbg(2," %s : submitted already", __func__);
475 } else { 475 } else {
476 /* we must initiate input */ 476 /* we must initiate input */
477 dbg(2," %s : initiate input", __FUNCTION__); 477 dbg(2," %s : initiate input", __func__);
478 dev->read_urb_finished = 0; 478 dev->read_urb_finished = 0;
479 spin_unlock_irqrestore(&dev->buflock, flags); 479 spin_unlock_irqrestore(&dev->buflock, flags);
480 480
@@ -492,7 +492,7 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count,
492 if (retval == -ENOMEM) { 492 if (retval == -ENOMEM) {
493 retval = bytes_read ? bytes_read : -ENOMEM; 493 retval = bytes_read ? bytes_read : -ENOMEM;
494 } 494 }
495 dbg(2," %s : submit failed", __FUNCTION__); 495 dbg(2," %s : submit failed", __func__);
496 goto exit; 496 goto exit;
497 } 497 }
498 } 498 }
@@ -511,13 +511,13 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count,
511 remove_wait_queue(&dev->read_wait, &wait); 511 remove_wait_queue(&dev->read_wait, &wait);
512 512
513 if (timeout <= 0) { 513 if (timeout <= 0) {
514 dbg(2," %s : timeout", __FUNCTION__); 514 dbg(2," %s : timeout", __func__);
515 retval = bytes_read ? bytes_read : -ETIMEDOUT; 515 retval = bytes_read ? bytes_read : -ETIMEDOUT;
516 goto exit; 516 goto exit;
517 } 517 }
518 518
519 if (signal_pending(current)) { 519 if (signal_pending(current)) {
520 dbg(2," %s : signal pending", __FUNCTION__); 520 dbg(2," %s : signal pending", __func__);
521 retval = bytes_read ? bytes_read : -EINTR; 521 retval = bytes_read ? bytes_read : -EINTR;
522 goto exit; 522 goto exit;
523 } 523 }
@@ -550,7 +550,7 @@ exit:
550 /* unlock the device */ 550 /* unlock the device */
551 mutex_unlock(&dev->mtx); 551 mutex_unlock(&dev->mtx);
552 552
553 dbg(2," %s : leave, return value %d", __FUNCTION__, retval); 553 dbg(2," %s : leave, return value %d", __func__, retval);
554 return retval; 554 return retval;
555} 555}
556 556
@@ -565,7 +565,7 @@ static ssize_t adu_write(struct file *file, const __user char *buffer,
565 unsigned long flags; 565 unsigned long flags;
566 int retval; 566 int retval;
567 567
568 dbg(2," %s : enter, count = %Zd", __FUNCTION__, count); 568 dbg(2," %s : enter, count = %Zd", __func__, count);
569 569
570 dev = file->private_data; 570 dev = file->private_data;
571 571
@@ -582,7 +582,7 @@ static ssize_t adu_write(struct file *file, const __user char *buffer,
582 582
583 /* verify that we actually have some data to write */ 583 /* verify that we actually have some data to write */
584 if (count == 0) { 584 if (count == 0) {
585 dbg(1," %s : write request of 0 bytes", __FUNCTION__); 585 dbg(1," %s : write request of 0 bytes", __func__);
586 goto exit; 586 goto exit;
587 } 587 }
588 588
@@ -595,13 +595,13 @@ static ssize_t adu_write(struct file *file, const __user char *buffer,
595 595
596 mutex_unlock(&dev->mtx); 596 mutex_unlock(&dev->mtx);
597 if (signal_pending(current)) { 597 if (signal_pending(current)) {
598 dbg(1," %s : interrupted", __FUNCTION__); 598 dbg(1," %s : interrupted", __func__);
599 set_current_state(TASK_RUNNING); 599 set_current_state(TASK_RUNNING);
600 retval = -EINTR; 600 retval = -EINTR;
601 goto exit_onqueue; 601 goto exit_onqueue;
602 } 602 }
603 if (schedule_timeout(COMMAND_TIMEOUT) == 0) { 603 if (schedule_timeout(COMMAND_TIMEOUT) == 0) {
604 dbg(1, "%s - command timed out.", __FUNCTION__); 604 dbg(1, "%s - command timed out.", __func__);
605 retval = -ETIMEDOUT; 605 retval = -ETIMEDOUT;
606 goto exit_onqueue; 606 goto exit_onqueue;
607 } 607 }
@@ -612,18 +612,18 @@ static ssize_t adu_write(struct file *file, const __user char *buffer,
612 goto exit_nolock; 612 goto exit_nolock;
613 } 613 }
614 614
615 dbg(4," %s : in progress, count = %Zd", __FUNCTION__, count); 615 dbg(4," %s : in progress, count = %Zd", __func__, count);
616 } else { 616 } else {
617 spin_unlock_irqrestore(&dev->buflock, flags); 617 spin_unlock_irqrestore(&dev->buflock, flags);
618 set_current_state(TASK_RUNNING); 618 set_current_state(TASK_RUNNING);
619 remove_wait_queue(&dev->write_wait, &waita); 619 remove_wait_queue(&dev->write_wait, &waita);
620 dbg(4," %s : sending, count = %Zd", __FUNCTION__, count); 620 dbg(4," %s : sending, count = %Zd", __func__, count);
621 621
622 /* write the data into interrupt_out_buffer from userspace */ 622 /* write the data into interrupt_out_buffer from userspace */
623 buffer_size = le16_to_cpu(dev->interrupt_out_endpoint->wMaxPacketSize); 623 buffer_size = le16_to_cpu(dev->interrupt_out_endpoint->wMaxPacketSize);
624 bytes_to_write = count > buffer_size ? buffer_size : count; 624 bytes_to_write = count > buffer_size ? buffer_size : count;
625 dbg(4," %s : buffer_size = %Zd, count = %Zd, bytes_to_write = %Zd", 625 dbg(4," %s : buffer_size = %Zd, count = %Zd, bytes_to_write = %Zd",
626 __FUNCTION__, buffer_size, count, bytes_to_write); 626 __func__, buffer_size, count, bytes_to_write);
627 627
628 if (copy_from_user(dev->interrupt_out_buffer, buffer, bytes_to_write) != 0) { 628 if (copy_from_user(dev->interrupt_out_buffer, buffer, bytes_to_write) != 0) {
629 retval = -EFAULT; 629 retval = -EFAULT;
@@ -661,7 +661,7 @@ static ssize_t adu_write(struct file *file, const __user char *buffer,
661exit: 661exit:
662 mutex_unlock(&dev->mtx); 662 mutex_unlock(&dev->mtx);
663exit_nolock: 663exit_nolock:
664 dbg(2," %s : leave, return value %d", __FUNCTION__, retval); 664 dbg(2," %s : leave, return value %d", __func__, retval);
665 return retval; 665 return retval;
666 666
667exit_onqueue: 667exit_onqueue:
@@ -706,7 +706,7 @@ static int adu_probe(struct usb_interface *interface,
706 int out_end_size; 706 int out_end_size;
707 int i; 707 int i;
708 708
709 dbg(2," %s : enter", __FUNCTION__); 709 dbg(2," %s : enter", __func__);
710 710
711 if (udev == NULL) { 711 if (udev == NULL) {
712 dev_err(&interface->dev, "udev is NULL.\n"); 712 dev_err(&interface->dev, "udev is NULL.\n");
@@ -807,7 +807,7 @@ static int adu_probe(struct usb_interface *interface,
807 dev_err(&interface->dev, "Could not retrieve serial number\n"); 807 dev_err(&interface->dev, "Could not retrieve serial number\n");
808 goto error; 808 goto error;
809 } 809 }
810 dbg(2," %s : serial_number=%s", __FUNCTION__, dev->serial_number); 810 dbg(2," %s : serial_number=%s", __func__, dev->serial_number);
811 811
812 /* we can register the device now, as it is ready */ 812 /* we can register the device now, as it is ready */
813 usb_set_intfdata(interface, dev); 813 usb_set_intfdata(interface, dev);
@@ -828,7 +828,7 @@ static int adu_probe(struct usb_interface *interface,
828 udev->descriptor.idProduct, dev->serial_number, 828 udev->descriptor.idProduct, dev->serial_number,
829 (dev->minor - ADU_MINOR_BASE)); 829 (dev->minor - ADU_MINOR_BASE));
830exit: 830exit:
831 dbg(2," %s : leave, return value %p (dev)", __FUNCTION__, dev); 831 dbg(2," %s : leave, return value %p (dev)", __func__, dev);
832 832
833 return retval; 833 return retval;
834 834
@@ -847,7 +847,7 @@ static void adu_disconnect(struct usb_interface *interface)
847 struct adu_device *dev; 847 struct adu_device *dev;
848 int minor; 848 int minor;
849 849
850 dbg(2," %s : enter", __FUNCTION__); 850 dbg(2," %s : enter", __func__);
851 851
852 dev = usb_get_intfdata(interface); 852 dev = usb_get_intfdata(interface);
853 853
@@ -861,7 +861,7 @@ static void adu_disconnect(struct usb_interface *interface)
861 usb_set_intfdata(interface, NULL); 861 usb_set_intfdata(interface, NULL);
862 862
863 /* if the device is not opened, then we clean up right now */ 863 /* if the device is not opened, then we clean up right now */
864 dbg(2," %s : open count %d", __FUNCTION__, dev->open_count); 864 dbg(2," %s : open count %d", __func__, dev->open_count);
865 if (!dev->open_count) 865 if (!dev->open_count)
866 adu_delete(dev); 866 adu_delete(dev);
867 867
@@ -870,7 +870,7 @@ static void adu_disconnect(struct usb_interface *interface)
870 dev_info(&interface->dev, "ADU device adutux%d now disconnected\n", 870 dev_info(&interface->dev, "ADU device adutux%d now disconnected\n",
871 (minor - ADU_MINOR_BASE)); 871 (minor - ADU_MINOR_BASE));
872 872
873 dbg(2," %s : leave", __FUNCTION__); 873 dbg(2," %s : leave", __func__);
874} 874}
875 875
876/* usb specific object needed to register this driver with the usb subsystem */ 876/* usb specific object needed to register this driver with the usb subsystem */
@@ -885,7 +885,7 @@ static int __init adu_init(void)
885{ 885{
886 int result; 886 int result;
887 887
888 dbg(2," %s : enter", __FUNCTION__); 888 dbg(2," %s : enter", __func__);
889 889
890 /* register this driver with the USB subsystem */ 890 /* register this driver with the USB subsystem */
891 result = usb_register(&adu_driver); 891 result = usb_register(&adu_driver);
@@ -899,17 +899,17 @@ static int __init adu_init(void)
899 info("adutux is an experimental driver. Use at your own risk"); 899 info("adutux is an experimental driver. Use at your own risk");
900 900
901exit: 901exit:
902 dbg(2," %s : leave, return value %d", __FUNCTION__, result); 902 dbg(2," %s : leave, return value %d", __func__, result);
903 903
904 return result; 904 return result;
905} 905}
906 906
907static void __exit adu_exit(void) 907static void __exit adu_exit(void)
908{ 908{
909 dbg(2," %s : enter", __FUNCTION__); 909 dbg(2," %s : enter", __func__);
910 /* deregister this driver with the USB subsystem */ 910 /* deregister this driver with the USB subsystem */
911 usb_deregister(&adu_driver); 911 usb_deregister(&adu_driver);
912 dbg(2," %s : leave", __FUNCTION__); 912 dbg(2," %s : leave", __func__);
913} 913}
914 914
915module_init(adu_init); 915module_init(adu_init);
diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c
index a5e4c3545c72..a076c24a312a 100644
--- a/drivers/usb/misc/appledisplay.c
+++ b/drivers/usb/misc/appledisplay.c
@@ -103,11 +103,11 @@ static void appledisplay_complete(struct urb *urb)
103 case -ESHUTDOWN: 103 case -ESHUTDOWN:
104 /* This urb is terminated, clean up */ 104 /* This urb is terminated, clean up */
105 dbg("%s - urb shuttingdown with status: %d", 105 dbg("%s - urb shuttingdown with status: %d",
106 __FUNCTION__, status); 106 __func__, status);
107 return; 107 return;
108 default: 108 default:
109 dbg("%s - nonzero urb status received: %d", 109 dbg("%s - nonzero urb status received: %d",
110 __FUNCTION__, status); 110 __func__, status);
111 goto exit; 111 goto exit;
112 } 112 }
113 113
@@ -131,7 +131,7 @@ exit:
131 retval = usb_submit_urb(pdata->urb, GFP_ATOMIC); 131 retval = usb_submit_urb(pdata->urb, GFP_ATOMIC);
132 if (retval) { 132 if (retval) {
133 err("%s - usb_submit_urb failed with result %d", 133 err("%s - usb_submit_urb failed with result %d",
134 __FUNCTION__, retval); 134 __func__, retval);
135 } 135 }
136} 136}
137 137
diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
index 81d051ca2291..309c743a09d5 100644
--- a/drivers/usb/misc/auerswald.c
+++ b/drivers/usb/misc/auerswald.c
@@ -983,7 +983,7 @@ static void auerswald_int_complete (struct urb * urb)
983 pauerbuf_t bp = NULL; 983 pauerbuf_t bp = NULL;
984 pauerswald_t cp = (pauerswald_t) urb->context; 984 pauerswald_t cp = (pauerswald_t) urb->context;
985 985
986 dbg ("%s called", __FUNCTION__); 986 dbg ("%s called", __func__);
987 987
988 switch (status) { 988 switch (status) {
989 case 0: 989 case 0:
@@ -993,10 +993,10 @@ static void auerswald_int_complete (struct urb * urb)
993 case -ENOENT: 993 case -ENOENT:
994 case -ESHUTDOWN: 994 case -ESHUTDOWN:
995 /* this urb is terminated, clean up */ 995 /* this urb is terminated, clean up */
996 dbg("%s - urb shutting down with status: %d", __FUNCTION__, status); 996 dbg("%s - urb shutting down with status: %d", __func__, status);
997 return; 997 return;
998 default: 998 default:
999 dbg("%s - nonzero urb status received: %d", __FUNCTION__, status); 999 dbg("%s - nonzero urb status received: %d", __func__, status);
1000 goto exit; 1000 goto exit;
1001 } 1001 }
1002 1002
@@ -1081,7 +1081,7 @@ exit:
1081 ret = usb_submit_urb (urb, GFP_ATOMIC); 1081 ret = usb_submit_urb (urb, GFP_ATOMIC);
1082 if (ret) 1082 if (ret)
1083 err ("%s - usb_submit_urb failed with result %d", 1083 err ("%s - usb_submit_urb failed with result %d",
1084 __FUNCTION__, ret); 1084 __func__, ret);
1085} 1085}
1086 1086
1087/* int memory deallocation 1087/* int memory deallocation
diff --git a/drivers/usb/misc/emi26.c b/drivers/usb/misc/emi26.c
index 4a09b87bdd28..4b9dc81b8453 100644
--- a/drivers/usb/misc/emi26.c
+++ b/drivers/usb/misc/emi26.c
@@ -70,8 +70,8 @@ static int emi26_writememory (struct usb_device *dev, int address, unsigned char
70static int emi26_set_reset (struct usb_device *dev, unsigned char reset_bit) 70static int emi26_set_reset (struct usb_device *dev, unsigned char reset_bit)
71{ 71{
72 int response; 72 int response;
73 info("%s - %d", __FUNCTION__, reset_bit); 73 info("%s - %d", __func__, reset_bit);
74 /* printk(KERN_DEBUG "%s - %d", __FUNCTION__, reset_bit); */ 74 /* printk(KERN_DEBUG "%s - %d", __func__, reset_bit); */
75 response = emi26_writememory (dev, CPUCS_REG, &reset_bit, 1, 0xa0); 75 response = emi26_writememory (dev, CPUCS_REG, &reset_bit, 1, 0xa0);
76 if (response < 0) { 76 if (response < 0) {
77 err("emi26: set_reset (%d) failed", reset_bit); 77 err("emi26: set_reset (%d) failed", reset_bit);
@@ -91,7 +91,7 @@ static int emi26_load_firmware (struct usb_device *dev)
91 91
92 buf = kmalloc(FW_LOAD_SIZE, GFP_KERNEL); 92 buf = kmalloc(FW_LOAD_SIZE, GFP_KERNEL);
93 if (!buf) { 93 if (!buf) {
94 err( "%s - error loading firmware: error = %d", __FUNCTION__, -ENOMEM); 94 err( "%s - error loading firmware: error = %d", __func__, -ENOMEM);
95 err = -ENOMEM; 95 err = -ENOMEM;
96 goto wraperr; 96 goto wraperr;
97 } 97 }
@@ -99,7 +99,7 @@ static int emi26_load_firmware (struct usb_device *dev)
99 /* Assert reset (stop the CPU in the EMI) */ 99 /* Assert reset (stop the CPU in the EMI) */
100 err = emi26_set_reset(dev,1); 100 err = emi26_set_reset(dev,1);
101 if (err < 0) { 101 if (err < 0) {
102 err( "%s - error loading firmware: error = %d", __FUNCTION__, err); 102 err( "%s - error loading firmware: error = %d", __func__, err);
103 goto wraperr; 103 goto wraperr;
104 } 104 }
105 105
@@ -107,7 +107,7 @@ static int emi26_load_firmware (struct usb_device *dev)
107 for (i=0; g_Loader[i].type == 0; i++) { 107 for (i=0; g_Loader[i].type == 0; i++) {
108 err = emi26_writememory(dev, g_Loader[i].address, g_Loader[i].data, g_Loader[i].length, ANCHOR_LOAD_INTERNAL); 108 err = emi26_writememory(dev, g_Loader[i].address, g_Loader[i].data, g_Loader[i].length, ANCHOR_LOAD_INTERNAL);
109 if (err < 0) { 109 if (err < 0) {
110 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 110 err("%s - error loading firmware: error = %d", __func__, err);
111 goto wraperr; 111 goto wraperr;
112 } 112 }
113 } 113 }
@@ -115,7 +115,7 @@ static int emi26_load_firmware (struct usb_device *dev)
115 /* De-assert reset (let the CPU run) */ 115 /* De-assert reset (let the CPU run) */
116 err = emi26_set_reset(dev,0); 116 err = emi26_set_reset(dev,0);
117 if (err < 0) { 117 if (err < 0) {
118 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 118 err("%s - error loading firmware: error = %d", __func__, err);
119 goto wraperr; 119 goto wraperr;
120 } 120 }
121 msleep(250); /* let device settle */ 121 msleep(250); /* let device settle */
@@ -135,7 +135,7 @@ static int emi26_load_firmware (struct usb_device *dev)
135 } 135 }
136 err = emi26_writememory(dev, addr, buf, i, ANCHOR_LOAD_FPGA); 136 err = emi26_writememory(dev, addr, buf, i, ANCHOR_LOAD_FPGA);
137 if (err < 0) { 137 if (err < 0) {
138 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 138 err("%s - error loading firmware: error = %d", __func__, err);
139 goto wraperr; 139 goto wraperr;
140 } 140 }
141 } while (i > 0); 141 } while (i > 0);
@@ -143,7 +143,7 @@ static int emi26_load_firmware (struct usb_device *dev)
143 /* Assert reset (stop the CPU in the EMI) */ 143 /* Assert reset (stop the CPU in the EMI) */
144 err = emi26_set_reset(dev,1); 144 err = emi26_set_reset(dev,1);
145 if (err < 0) { 145 if (err < 0) {
146 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 146 err("%s - error loading firmware: error = %d", __func__, err);
147 goto wraperr; 147 goto wraperr;
148 } 148 }
149 149
@@ -151,7 +151,7 @@ static int emi26_load_firmware (struct usb_device *dev)
151 for (i=0; g_Loader[i].type == 0; i++) { 151 for (i=0; g_Loader[i].type == 0; i++) {
152 err = emi26_writememory(dev, g_Loader[i].address, g_Loader[i].data, g_Loader[i].length, ANCHOR_LOAD_INTERNAL); 152 err = emi26_writememory(dev, g_Loader[i].address, g_Loader[i].data, g_Loader[i].length, ANCHOR_LOAD_INTERNAL);
153 if (err < 0) { 153 if (err < 0) {
154 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 154 err("%s - error loading firmware: error = %d", __func__, err);
155 goto wraperr; 155 goto wraperr;
156 } 156 }
157 } 157 }
@@ -160,7 +160,7 @@ static int emi26_load_firmware (struct usb_device *dev)
160 /* De-assert reset (let the CPU run) */ 160 /* De-assert reset (let the CPU run) */
161 err = emi26_set_reset(dev,0); 161 err = emi26_set_reset(dev,0);
162 if (err < 0) { 162 if (err < 0) {
163 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 163 err("%s - error loading firmware: error = %d", __func__, err);
164 goto wraperr; 164 goto wraperr;
165 } 165 }
166 166
@@ -169,7 +169,7 @@ static int emi26_load_firmware (struct usb_device *dev)
169 if (!INTERNAL_RAM(g_Firmware[i].address)) { 169 if (!INTERNAL_RAM(g_Firmware[i].address)) {
170 err = emi26_writememory(dev, g_Firmware[i].address, g_Firmware[i].data, g_Firmware[i].length, ANCHOR_LOAD_EXTERNAL); 170 err = emi26_writememory(dev, g_Firmware[i].address, g_Firmware[i].data, g_Firmware[i].length, ANCHOR_LOAD_EXTERNAL);
171 if (err < 0) { 171 if (err < 0) {
172 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 172 err("%s - error loading firmware: error = %d", __func__, err);
173 goto wraperr; 173 goto wraperr;
174 } 174 }
175 } 175 }
@@ -178,7 +178,7 @@ static int emi26_load_firmware (struct usb_device *dev)
178 /* Assert reset (stop the CPU in the EMI) */ 178 /* Assert reset (stop the CPU in the EMI) */
179 err = emi26_set_reset(dev,1); 179 err = emi26_set_reset(dev,1);
180 if (err < 0) { 180 if (err < 0) {
181 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 181 err("%s - error loading firmware: error = %d", __func__, err);
182 goto wraperr; 182 goto wraperr;
183 } 183 }
184 184
@@ -186,7 +186,7 @@ static int emi26_load_firmware (struct usb_device *dev)
186 if (INTERNAL_RAM(g_Firmware[i].address)) { 186 if (INTERNAL_RAM(g_Firmware[i].address)) {
187 err = emi26_writememory(dev, g_Firmware[i].address, g_Firmware[i].data, g_Firmware[i].length, ANCHOR_LOAD_INTERNAL); 187 err = emi26_writememory(dev, g_Firmware[i].address, g_Firmware[i].data, g_Firmware[i].length, ANCHOR_LOAD_INTERNAL);
188 if (err < 0) { 188 if (err < 0) {
189 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 189 err("%s - error loading firmware: error = %d", __func__, err);
190 goto wraperr; 190 goto wraperr;
191 } 191 }
192 } 192 }
@@ -195,7 +195,7 @@ static int emi26_load_firmware (struct usb_device *dev)
195 /* De-assert reset (let the CPU run) */ 195 /* De-assert reset (let the CPU run) */
196 err = emi26_set_reset(dev,0); 196 err = emi26_set_reset(dev,0);
197 if (err < 0) { 197 if (err < 0) {
198 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 198 err("%s - error loading firmware: error = %d", __func__, err);
199 goto wraperr; 199 goto wraperr;
200 } 200 }
201 msleep(250); /* let device settle */ 201 msleep(250); /* let device settle */
@@ -221,7 +221,7 @@ static int emi26_probe(struct usb_interface *intf, const struct usb_device_id *i
221{ 221{
222 struct usb_device *dev = interface_to_usbdev(intf); 222 struct usb_device *dev = interface_to_usbdev(intf);
223 223
224 info("%s start", __FUNCTION__); 224 info("%s start", __func__);
225 225
226 emi26_load_firmware(dev); 226 emi26_load_firmware(dev);
227 227
diff --git a/drivers/usb/misc/emi62.c b/drivers/usb/misc/emi62.c
index d1362415922c..1a2b79ac5e10 100644
--- a/drivers/usb/misc/emi62.c
+++ b/drivers/usb/misc/emi62.c
@@ -78,7 +78,7 @@ static int emi62_writememory (struct usb_device *dev, int address, unsigned char
78static int emi62_set_reset (struct usb_device *dev, unsigned char reset_bit) 78static int emi62_set_reset (struct usb_device *dev, unsigned char reset_bit)
79{ 79{
80 int response; 80 int response;
81 info("%s - %d", __FUNCTION__, reset_bit); 81 info("%s - %d", __func__, reset_bit);
82 82
83 response = emi62_writememory (dev, CPUCS_REG, &reset_bit, 1, 0xa0); 83 response = emi62_writememory (dev, CPUCS_REG, &reset_bit, 1, 0xa0);
84 if (response < 0) { 84 if (response < 0) {
@@ -100,7 +100,7 @@ static int emi62_load_firmware (struct usb_device *dev)
100 dev_dbg(&dev->dev, "load_firmware\n"); 100 dev_dbg(&dev->dev, "load_firmware\n");
101 buf = kmalloc(FW_LOAD_SIZE, GFP_KERNEL); 101 buf = kmalloc(FW_LOAD_SIZE, GFP_KERNEL);
102 if (!buf) { 102 if (!buf) {
103 err( "%s - error loading firmware: error = %d", __FUNCTION__, -ENOMEM); 103 err( "%s - error loading firmware: error = %d", __func__, -ENOMEM);
104 err = -ENOMEM; 104 err = -ENOMEM;
105 goto wraperr; 105 goto wraperr;
106 } 106 }
@@ -108,7 +108,7 @@ static int emi62_load_firmware (struct usb_device *dev)
108 /* Assert reset (stop the CPU in the EMI) */ 108 /* Assert reset (stop the CPU in the EMI) */
109 err = emi62_set_reset(dev,1); 109 err = emi62_set_reset(dev,1);
110 if (err < 0) { 110 if (err < 0) {
111 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 111 err("%s - error loading firmware: error = %d", __func__, err);
112 goto wraperr; 112 goto wraperr;
113 } 113 }
114 114
@@ -116,7 +116,7 @@ static int emi62_load_firmware (struct usb_device *dev)
116 for (i=0; g_emi62_loader[i].type == 0; i++) { 116 for (i=0; g_emi62_loader[i].type == 0; i++) {
117 err = emi62_writememory(dev, g_emi62_loader[i].address, g_emi62_loader[i].data, g_emi62_loader[i].length, ANCHOR_LOAD_INTERNAL); 117 err = emi62_writememory(dev, g_emi62_loader[i].address, g_emi62_loader[i].data, g_emi62_loader[i].length, ANCHOR_LOAD_INTERNAL);
118 if (err < 0) { 118 if (err < 0) {
119 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 119 err("%s - error loading firmware: error = %d", __func__, err);
120 goto wraperr; 120 goto wraperr;
121 } 121 }
122 } 122 }
@@ -124,7 +124,7 @@ static int emi62_load_firmware (struct usb_device *dev)
124 /* De-assert reset (let the CPU run) */ 124 /* De-assert reset (let the CPU run) */
125 err = emi62_set_reset(dev,0); 125 err = emi62_set_reset(dev,0);
126 if (err < 0) { 126 if (err < 0) {
127 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 127 err("%s - error loading firmware: error = %d", __func__, err);
128 goto wraperr; 128 goto wraperr;
129 } 129 }
130 msleep(250); /* let device settle */ 130 msleep(250); /* let device settle */
@@ -144,7 +144,7 @@ static int emi62_load_firmware (struct usb_device *dev)
144 } 144 }
145 err = emi62_writememory(dev, addr, buf, i, ANCHOR_LOAD_FPGA); 145 err = emi62_writememory(dev, addr, buf, i, ANCHOR_LOAD_FPGA);
146 if (err < 0) { 146 if (err < 0) {
147 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 147 err("%s - error loading firmware: error = %d", __func__, err);
148 goto wraperr; 148 goto wraperr;
149 } 149 }
150 } while (i > 0); 150 } while (i > 0);
@@ -152,7 +152,7 @@ static int emi62_load_firmware (struct usb_device *dev)
152 /* Assert reset (stop the CPU in the EMI) */ 152 /* Assert reset (stop the CPU in the EMI) */
153 err = emi62_set_reset(dev,1); 153 err = emi62_set_reset(dev,1);
154 if (err < 0) { 154 if (err < 0) {
155 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 155 err("%s - error loading firmware: error = %d", __func__, err);
156 goto wraperr; 156 goto wraperr;
157 } 157 }
158 158
@@ -160,7 +160,7 @@ static int emi62_load_firmware (struct usb_device *dev)
160 for (i=0; g_emi62_loader[i].type == 0; i++) { 160 for (i=0; g_emi62_loader[i].type == 0; i++) {
161 err = emi62_writememory(dev, g_emi62_loader[i].address, g_emi62_loader[i].data, g_emi62_loader[i].length, ANCHOR_LOAD_INTERNAL); 161 err = emi62_writememory(dev, g_emi62_loader[i].address, g_emi62_loader[i].data, g_emi62_loader[i].length, ANCHOR_LOAD_INTERNAL);
162 if (err < 0) { 162 if (err < 0) {
163 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 163 err("%s - error loading firmware: error = %d", __func__, err);
164 goto wraperr; 164 goto wraperr;
165 } 165 }
166 } 166 }
@@ -168,7 +168,7 @@ static int emi62_load_firmware (struct usb_device *dev)
168 /* De-assert reset (let the CPU run) */ 168 /* De-assert reset (let the CPU run) */
169 err = emi62_set_reset(dev,0); 169 err = emi62_set_reset(dev,0);
170 if (err < 0) { 170 if (err < 0) {
171 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 171 err("%s - error loading firmware: error = %d", __func__, err);
172 goto wraperr; 172 goto wraperr;
173 } 173 }
174 msleep(250); /* let device settle */ 174 msleep(250); /* let device settle */
@@ -181,7 +181,7 @@ static int emi62_load_firmware (struct usb_device *dev)
181 if (!INTERNAL_RAM(g_HexSpdifFw62[i].address)) { 181 if (!INTERNAL_RAM(g_HexSpdifFw62[i].address)) {
182 err = emi62_writememory(dev, g_HexSpdifFw62[i].address, g_HexSpdifFw62[i].data, g_HexSpdifFw62[i].length, ANCHOR_LOAD_EXTERNAL); 182 err = emi62_writememory(dev, g_HexSpdifFw62[i].address, g_HexSpdifFw62[i].data, g_HexSpdifFw62[i].length, ANCHOR_LOAD_EXTERNAL);
183 if (err < 0) { 183 if (err < 0) {
184 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 184 err("%s - error loading firmware: error = %d", __func__, err);
185 goto wraperr; 185 goto wraperr;
186 } 186 }
187 } 187 }
@@ -191,7 +191,7 @@ static int emi62_load_firmware (struct usb_device *dev)
191 if (!INTERNAL_RAM(g_HexMidiFw62[i].address)) { 191 if (!INTERNAL_RAM(g_HexMidiFw62[i].address)) {
192 err = emi62_writememory(dev, g_HexMidiFw62[i].address, g_HexMidiFw62[i].data, g_HexMidiFw62[i].length, ANCHOR_LOAD_EXTERNAL); 192 err = emi62_writememory(dev, g_HexMidiFw62[i].address, g_HexMidiFw62[i].data, g_HexMidiFw62[i].length, ANCHOR_LOAD_EXTERNAL);
193 if (err < 0) { 193 if (err < 0) {
194 err("%s - error loading firmware: error = %d\n", __FUNCTION__, err); 194 err("%s - error loading firmware: error = %d\n", __func__, err);
195 goto wraperr; 195 goto wraperr;
196 return err; 196 return err;
197 } 197 }
@@ -201,7 +201,7 @@ static int emi62_load_firmware (struct usb_device *dev)
201 /* Assert reset (stop the CPU in the EMI) */ 201 /* Assert reset (stop the CPU in the EMI) */
202 err = emi62_set_reset(dev,1); 202 err = emi62_set_reset(dev,1);
203 if (err < 0) { 203 if (err < 0) {
204 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 204 err("%s - error loading firmware: error = %d", __func__, err);
205 goto wraperr; 205 goto wraperr;
206 } 206 }
207 207
@@ -211,7 +211,7 @@ static int emi62_load_firmware (struct usb_device *dev)
211 if (INTERNAL_RAM(g_HexSpdifFw62[i].address)) { 211 if (INTERNAL_RAM(g_HexSpdifFw62[i].address)) {
212 err = emi62_writememory(dev, g_HexSpdifFw62[i].address, g_HexSpdifFw62[i].data, g_HexSpdifFw62[i].length, ANCHOR_LOAD_INTERNAL); 212 err = emi62_writememory(dev, g_HexSpdifFw62[i].address, g_HexSpdifFw62[i].data, g_HexSpdifFw62[i].length, ANCHOR_LOAD_INTERNAL);
213 if (err < 0) { 213 if (err < 0) {
214 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 214 err("%s - error loading firmware: error = %d", __func__, err);
215 goto wraperr; 215 goto wraperr;
216 } 216 }
217 } 217 }
@@ -221,7 +221,7 @@ static int emi62_load_firmware (struct usb_device *dev)
221 if (INTERNAL_RAM(g_HexMidiFw62[i].address)) { 221 if (INTERNAL_RAM(g_HexMidiFw62[i].address)) {
222 err = emi62_writememory(dev, g_HexMidiFw62[i].address, g_HexMidiFw62[i].data, g_HexMidiFw62[i].length, ANCHOR_LOAD_INTERNAL); 222 err = emi62_writememory(dev, g_HexMidiFw62[i].address, g_HexMidiFw62[i].data, g_HexMidiFw62[i].length, ANCHOR_LOAD_INTERNAL);
223 if (err < 0) { 223 if (err < 0) {
224 err("%s - error loading firmware: error = %d\n", __FUNCTION__, err); 224 err("%s - error loading firmware: error = %d\n", __func__, err);
225 goto wraperr; 225 goto wraperr;
226 } 226 }
227 } 227 }
@@ -231,7 +231,7 @@ static int emi62_load_firmware (struct usb_device *dev)
231 /* De-assert reset (let the CPU run) */ 231 /* De-assert reset (let the CPU run) */
232 err = emi62_set_reset(dev,0); 232 err = emi62_set_reset(dev,0);
233 if (err < 0) { 233 if (err < 0) {
234 err("%s - error loading firmware: error = %d", __FUNCTION__, err); 234 err("%s - error loading firmware: error = %d", __func__, err);
235 goto wraperr; 235 goto wraperr;
236 } 236 }
237 msleep(250); /* let device settle */ 237 msleep(250); /* let device settle */
@@ -260,7 +260,7 @@ static int emi62_probe(struct usb_interface *intf, const struct usb_device_id *i
260 struct usb_device *dev = interface_to_usbdev(intf); 260 struct usb_device *dev = interface_to_usbdev(intf);
261 dev_dbg(&intf->dev, "emi62_probe\n"); 261 dev_dbg(&intf->dev, "emi62_probe\n");
262 262
263 info("%s start", __FUNCTION__); 263 info("%s start", __func__);
264 264
265 emi62_load_firmware(dev); 265 emi62_load_firmware(dev);
266 266
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
index 801070502cc1..0a2549bc0540 100644
--- a/drivers/usb/misc/iowarrior.c
+++ b/drivers/usb/misc/iowarrior.c
@@ -218,7 +218,7 @@ exit:
218 retval = usb_submit_urb(urb, GFP_ATOMIC); 218 retval = usb_submit_urb(urb, GFP_ATOMIC);
219 if (retval) 219 if (retval)
220 dev_err(&dev->interface->dev, "%s - usb_submit_urb failed with result %d\n", 220 dev_err(&dev->interface->dev, "%s - usb_submit_urb failed with result %d\n",
221 __FUNCTION__, retval); 221 __func__, retval);
222 222
223} 223}
224 224
@@ -453,7 +453,7 @@ static ssize_t iowarrior_write(struct file *file,
453 default: 453 default:
454 /* what do we have here ? An unsupported Product-ID ? */ 454 /* what do we have here ? An unsupported Product-ID ? */
455 dev_err(&dev->interface->dev, "%s - not supported for product=0x%x\n", 455 dev_err(&dev->interface->dev, "%s - not supported for product=0x%x\n",
456 __FUNCTION__, dev->product_id); 456 __func__, dev->product_id);
457 retval = -EFAULT; 457 retval = -EFAULT;
458 goto exit; 458 goto exit;
459 break; 459 break;
@@ -604,7 +604,7 @@ static int iowarrior_open(struct inode *inode, struct file *file)
604 604
605 interface = usb_find_interface(&iowarrior_driver, subminor); 605 interface = usb_find_interface(&iowarrior_driver, subminor);
606 if (!interface) { 606 if (!interface) {
607 err("%s - error, can't find device for minor %d", __FUNCTION__, 607 err("%s - error, can't find device for minor %d", __func__,
608 subminor); 608 subminor);
609 return -ENODEV; 609 return -ENODEV;
610 } 610 }
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c
index c730d20eec66..11580e81e2c6 100644
--- a/drivers/usb/misc/ldusb.c
+++ b/drivers/usb/misc/ldusb.c
@@ -231,7 +231,7 @@ static void ld_usb_interrupt_in_callback(struct urb *urb)
231 goto exit; 231 goto exit;
232 } else { 232 } else {
233 dbg_info(&dev->intf->dev, "%s: nonzero status received: %d\n", 233 dbg_info(&dev->intf->dev, "%s: nonzero status received: %d\n",
234 __FUNCTION__, status); 234 __func__, status);
235 spin_lock(&dev->rbsl); 235 spin_lock(&dev->rbsl);
236 goto resubmit; /* maybe we can recover */ 236 goto resubmit; /* maybe we can recover */
237 } 237 }
@@ -247,7 +247,7 @@ static void ld_usb_interrupt_in_callback(struct urb *urb)
247 memcpy(actual_buffer+1, dev->interrupt_in_buffer, urb->actual_length); 247 memcpy(actual_buffer+1, dev->interrupt_in_buffer, urb->actual_length);
248 dev->ring_head = next_ring_head; 248 dev->ring_head = next_ring_head;
249 dbg_info(&dev->intf->dev, "%s: received %d bytes\n", 249 dbg_info(&dev->intf->dev, "%s: received %d bytes\n",
250 __FUNCTION__, urb->actual_length); 250 __func__, urb->actual_length);
251 } else { 251 } else {
252 dev_warn(&dev->intf->dev, 252 dev_warn(&dev->intf->dev,
253 "Ring buffer overflow, %d bytes dropped\n", 253 "Ring buffer overflow, %d bytes dropped\n",
@@ -286,7 +286,7 @@ static void ld_usb_interrupt_out_callback(struct urb *urb)
286 status == -ESHUTDOWN)) 286 status == -ESHUTDOWN))
287 dbg_info(&dev->intf->dev, 287 dbg_info(&dev->intf->dev,
288 "%s - nonzero write interrupt status received: %d\n", 288 "%s - nonzero write interrupt status received: %d\n",
289 __FUNCTION__, status); 289 __func__, status);
290 290
291 dev->interrupt_out_busy = 0; 291 dev->interrupt_out_busy = 0;
292 wake_up_interruptible(&dev->write_wait); 292 wake_up_interruptible(&dev->write_wait);
@@ -309,7 +309,7 @@ static int ld_usb_open(struct inode *inode, struct file *file)
309 309
310 if (!interface) { 310 if (!interface) {
311 err("%s - error, can't find device for minor %d\n", 311 err("%s - error, can't find device for minor %d\n",
312 __FUNCTION__, subminor); 312 __func__, subminor);
313 return -ENODEV; 313 return -ENODEV;
314 } 314 }
315 315
@@ -556,7 +556,7 @@ static ssize_t ld_usb_write(struct file *file, const char __user *buffer,
556 bytes_to_write = min(count, write_buffer_size*dev->interrupt_out_endpoint_size); 556 bytes_to_write = min(count, write_buffer_size*dev->interrupt_out_endpoint_size);
557 if (bytes_to_write < count) 557 if (bytes_to_write < count)
558 dev_warn(&dev->intf->dev, "Write buffer overflow, %zd bytes dropped\n",count-bytes_to_write); 558 dev_warn(&dev->intf->dev, "Write buffer overflow, %zd bytes dropped\n",count-bytes_to_write);
559 dbg_info(&dev->intf->dev, "%s: count = %zd, bytes_to_write = %zd\n", __FUNCTION__, count, bytes_to_write); 559 dbg_info(&dev->intf->dev, "%s: count = %zd, bytes_to_write = %zd\n", __func__, count, bytes_to_write);
560 560
561 if (copy_from_user(dev->interrupt_out_buffer, buffer, bytes_to_write)) { 561 if (copy_from_user(dev->interrupt_out_buffer, buffer, bytes_to_write)) {
562 retval = -EFAULT; 562 retval = -EFAULT;
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
index 6664043f4645..fae5b1730ba2 100644
--- a/drivers/usb/misc/legousbtower.c
+++ b/drivers/usb/misc/legousbtower.c
@@ -31,7 +31,7 @@
31 * - imported into lejos project 31 * - imported into lejos project
32 * - changed wake_up to wake_up_interruptible 32 * - changed wake_up to wake_up_interruptible
33 * - changed to use lego0 rather than tower0 33 * - changed to use lego0 rather than tower0
34 * - changed dbg() to use __func__ rather than deprecated __FUNCTION__ 34 * - changed dbg() to use __func__ rather than deprecated __func__
35 * 2003-01-12 - 0.53 david (david@csse.uwa.edu.au) 35 * 2003-01-12 - 0.53 david (david@csse.uwa.edu.au)
36 * - changed read and write to write everything or 36 * - changed read and write to write everything or
37 * timeout (from a patch by Chris Riesen and Brett Thaeler driver) 37 * timeout (from a patch by Chris Riesen and Brett Thaeler driver)
@@ -49,7 +49,7 @@
49 * - added poll 49 * - added poll
50 * - forbid seeking 50 * - forbid seeking
51 * - added nonblocking I/O 51 * - added nonblocking I/O
52 * - changed back __func__ to __FUNCTION__ 52 * - changed back __func__ to __func__
53 * - read and log tower firmware version 53 * - read and log tower firmware version
54 * - reset tower on probe, avoids failure of first write 54 * - reset tower on probe, avoids failure of first write
55 * 2004-03-09 - 0.7 Juergen Stuber <starblue@users.sourceforge.net> 55 * 2004-03-09 - 0.7 Juergen Stuber <starblue@users.sourceforge.net>
@@ -309,7 +309,7 @@ static inline void lego_usb_tower_debug_data (int level, const char *function, i
309 */ 309 */
310static inline void tower_delete (struct lego_usb_tower *dev) 310static inline void tower_delete (struct lego_usb_tower *dev)
311{ 311{
312 dbg(2, "%s: enter", __FUNCTION__); 312 dbg(2, "%s: enter", __func__);
313 313
314 tower_abort_transfers (dev); 314 tower_abort_transfers (dev);
315 315
@@ -321,7 +321,7 @@ static inline void tower_delete (struct lego_usb_tower *dev)
321 kfree (dev->interrupt_out_buffer); 321 kfree (dev->interrupt_out_buffer);
322 kfree (dev); 322 kfree (dev);
323 323
324 dbg(2, "%s: leave", __FUNCTION__); 324 dbg(2, "%s: leave", __func__);
325} 325}
326 326
327 327
@@ -337,7 +337,7 @@ static int tower_open (struct inode *inode, struct file *file)
337 struct tower_reset_reply reset_reply; 337 struct tower_reset_reply reset_reply;
338 int result; 338 int result;
339 339
340 dbg(2, "%s: enter", __FUNCTION__); 340 dbg(2, "%s: enter", __func__);
341 341
342 nonseekable_open(inode, file); 342 nonseekable_open(inode, file);
343 subminor = iminor(inode); 343 subminor = iminor(inode);
@@ -346,7 +346,7 @@ static int tower_open (struct inode *inode, struct file *file)
346 346
347 if (!interface) { 347 if (!interface) {
348 err ("%s - error, can't find device for minor %d", 348 err ("%s - error, can't find device for minor %d",
349 __FUNCTION__, subminor); 349 __func__, subminor);
350 retval = -ENODEV; 350 retval = -ENODEV;
351 goto exit; 351 goto exit;
352 } 352 }
@@ -424,7 +424,7 @@ unlock_exit:
424 mutex_unlock(&dev->lock); 424 mutex_unlock(&dev->lock);
425 425
426exit: 426exit:
427 dbg(2, "%s: leave, return value %d ", __FUNCTION__, retval); 427 dbg(2, "%s: leave, return value %d ", __func__, retval);
428 428
429 return retval; 429 return retval;
430} 430}
@@ -437,12 +437,12 @@ static int tower_release (struct inode *inode, struct file *file)
437 struct lego_usb_tower *dev; 437 struct lego_usb_tower *dev;
438 int retval = 0; 438 int retval = 0;
439 439
440 dbg(2, "%s: enter", __FUNCTION__); 440 dbg(2, "%s: enter", __func__);
441 441
442 dev = (struct lego_usb_tower *)file->private_data; 442 dev = (struct lego_usb_tower *)file->private_data;
443 443
444 if (dev == NULL) { 444 if (dev == NULL) {
445 dbg(1, "%s: object is NULL", __FUNCTION__); 445 dbg(1, "%s: object is NULL", __func__);
446 retval = -ENODEV; 446 retval = -ENODEV;
447 goto exit_nolock; 447 goto exit_nolock;
448 } 448 }
@@ -454,7 +454,7 @@ static int tower_release (struct inode *inode, struct file *file)
454 } 454 }
455 455
456 if (dev->open_count != 1) { 456 if (dev->open_count != 1) {
457 dbg(1, "%s: device not opened exactly once", __FUNCTION__); 457 dbg(1, "%s: device not opened exactly once", __func__);
458 retval = -ENODEV; 458 retval = -ENODEV;
459 goto unlock_exit; 459 goto unlock_exit;
460 } 460 }
@@ -480,7 +480,7 @@ unlock_exit:
480exit: 480exit:
481 mutex_unlock(&open_disc_mutex); 481 mutex_unlock(&open_disc_mutex);
482exit_nolock: 482exit_nolock:
483 dbg(2, "%s: leave, return value %d", __FUNCTION__, retval); 483 dbg(2, "%s: leave, return value %d", __func__, retval);
484 return retval; 484 return retval;
485} 485}
486 486
@@ -491,10 +491,10 @@ exit_nolock:
491 */ 491 */
492static void tower_abort_transfers (struct lego_usb_tower *dev) 492static void tower_abort_transfers (struct lego_usb_tower *dev)
493{ 493{
494 dbg(2, "%s: enter", __FUNCTION__); 494 dbg(2, "%s: enter", __func__);
495 495
496 if (dev == NULL) { 496 if (dev == NULL) {
497 dbg(1, "%s: dev is null", __FUNCTION__); 497 dbg(1, "%s: dev is null", __func__);
498 goto exit; 498 goto exit;
499 } 499 }
500 500
@@ -509,7 +509,7 @@ static void tower_abort_transfers (struct lego_usb_tower *dev)
509 usb_kill_urb(dev->interrupt_out_urb); 509 usb_kill_urb(dev->interrupt_out_urb);
510 510
511exit: 511exit:
512 dbg(2, "%s: leave", __FUNCTION__); 512 dbg(2, "%s: leave", __func__);
513} 513}
514 514
515 515
@@ -542,7 +542,7 @@ static unsigned int tower_poll (struct file *file, poll_table *wait)
542 struct lego_usb_tower *dev; 542 struct lego_usb_tower *dev;
543 unsigned int mask = 0; 543 unsigned int mask = 0;
544 544
545 dbg(2, "%s: enter", __FUNCTION__); 545 dbg(2, "%s: enter", __func__);
546 546
547 dev = file->private_data; 547 dev = file->private_data;
548 548
@@ -557,7 +557,7 @@ static unsigned int tower_poll (struct file *file, poll_table *wait)
557 mask |= POLLOUT | POLLWRNORM; 557 mask |= POLLOUT | POLLWRNORM;
558 } 558 }
559 559
560 dbg(2, "%s: leave, mask = %d", __FUNCTION__, mask); 560 dbg(2, "%s: leave, mask = %d", __func__, mask);
561 561
562 return mask; 562 return mask;
563} 563}
@@ -583,7 +583,7 @@ static ssize_t tower_read (struct file *file, char __user *buffer, size_t count,
583 int retval = 0; 583 int retval = 0;
584 unsigned long timeout = 0; 584 unsigned long timeout = 0;
585 585
586 dbg(2, "%s: enter, count = %Zd", __FUNCTION__, count); 586 dbg(2, "%s: enter, count = %Zd", __func__, count);
587 587
588 dev = (struct lego_usb_tower *)file->private_data; 588 dev = (struct lego_usb_tower *)file->private_data;
589 589
@@ -602,7 +602,7 @@ static ssize_t tower_read (struct file *file, char __user *buffer, size_t count,
602 602
603 /* verify that we actually have some data to read */ 603 /* verify that we actually have some data to read */
604 if (count == 0) { 604 if (count == 0) {
605 dbg(1, "%s: read request of 0 bytes", __FUNCTION__); 605 dbg(1, "%s: read request of 0 bytes", __func__);
606 goto unlock_exit; 606 goto unlock_exit;
607 } 607 }
608 608
@@ -658,7 +658,7 @@ unlock_exit:
658 mutex_unlock(&dev->lock); 658 mutex_unlock(&dev->lock);
659 659
660exit: 660exit:
661 dbg(2, "%s: leave, return value %d", __FUNCTION__, retval); 661 dbg(2, "%s: leave, return value %d", __func__, retval);
662 return retval; 662 return retval;
663} 663}
664 664
@@ -672,7 +672,7 @@ static ssize_t tower_write (struct file *file, const char __user *buffer, size_t
672 size_t bytes_to_write; 672 size_t bytes_to_write;
673 int retval = 0; 673 int retval = 0;
674 674
675 dbg(2, "%s: enter, count = %Zd", __FUNCTION__, count); 675 dbg(2, "%s: enter, count = %Zd", __func__, count);
676 676
677 dev = (struct lego_usb_tower *)file->private_data; 677 dev = (struct lego_usb_tower *)file->private_data;
678 678
@@ -691,7 +691,7 @@ static ssize_t tower_write (struct file *file, const char __user *buffer, size_t
691 691
692 /* verify that we actually have some data to write */ 692 /* verify that we actually have some data to write */
693 if (count == 0) { 693 if (count == 0) {
694 dbg(1, "%s: write request of 0 bytes", __FUNCTION__); 694 dbg(1, "%s: write request of 0 bytes", __func__);
695 goto unlock_exit; 695 goto unlock_exit;
696 } 696 }
697 697
@@ -709,7 +709,7 @@ static ssize_t tower_write (struct file *file, const char __user *buffer, size_t
709 709
710 /* write the data into interrupt_out_buffer from userspace */ 710 /* write the data into interrupt_out_buffer from userspace */
711 bytes_to_write = min_t(int, count, write_buffer_size); 711 bytes_to_write = min_t(int, count, write_buffer_size);
712 dbg(4, "%s: count = %Zd, bytes_to_write = %Zd", __FUNCTION__, count, bytes_to_write); 712 dbg(4, "%s: count = %Zd, bytes_to_write = %Zd", __func__, count, bytes_to_write);
713 713
714 if (copy_from_user (dev->interrupt_out_buffer, buffer, bytes_to_write)) { 714 if (copy_from_user (dev->interrupt_out_buffer, buffer, bytes_to_write)) {
715 retval = -EFAULT; 715 retval = -EFAULT;
@@ -742,7 +742,7 @@ unlock_exit:
742 mutex_unlock(&dev->lock); 742 mutex_unlock(&dev->lock);
743 743
744exit: 744exit:
745 dbg(2, "%s: leave, return value %d", __FUNCTION__, retval); 745 dbg(2, "%s: leave, return value %d", __func__, retval);
746 746
747 return retval; 747 return retval;
748} 748}
@@ -757,9 +757,9 @@ static void tower_interrupt_in_callback (struct urb *urb)
757 int status = urb->status; 757 int status = urb->status;
758 int retval; 758 int retval;
759 759
760 dbg(4, "%s: enter, status %d", __FUNCTION__, status); 760 dbg(4, "%s: enter, status %d", __func__, status);
761 761
762 lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer); 762 lego_usb_tower_debug_data(5, __func__, urb->actual_length, urb->transfer_buffer);
763 763
764 if (status) { 764 if (status) {
765 if (status == -ENOENT || 765 if (status == -ENOENT ||
@@ -767,7 +767,7 @@ static void tower_interrupt_in_callback (struct urb *urb)
767 status == -ESHUTDOWN) { 767 status == -ESHUTDOWN) {
768 goto exit; 768 goto exit;
769 } else { 769 } else {
770 dbg(1, "%s: nonzero status received: %d", __FUNCTION__, status); 770 dbg(1, "%s: nonzero status received: %d", __func__, status);
771 goto resubmit; /* maybe we can recover */ 771 goto resubmit; /* maybe we can recover */
772 } 772 }
773 } 773 }
@@ -780,9 +780,9 @@ static void tower_interrupt_in_callback (struct urb *urb)
780 urb->actual_length); 780 urb->actual_length);
781 dev->read_buffer_length += urb->actual_length; 781 dev->read_buffer_length += urb->actual_length;
782 dev->read_last_arrival = jiffies; 782 dev->read_last_arrival = jiffies;
783 dbg(3, "%s: received %d bytes", __FUNCTION__, urb->actual_length); 783 dbg(3, "%s: received %d bytes", __func__, urb->actual_length);
784 } else { 784 } else {
785 printk(KERN_WARNING "%s: read_buffer overflow, %d bytes dropped", __FUNCTION__, urb->actual_length); 785 printk(KERN_WARNING "%s: read_buffer overflow, %d bytes dropped", __func__, urb->actual_length);
786 } 786 }
787 spin_unlock (&dev->read_buffer_lock); 787 spin_unlock (&dev->read_buffer_lock);
788 } 788 }
@@ -792,7 +792,7 @@ resubmit:
792 if (dev->interrupt_in_running && dev->udev) { 792 if (dev->interrupt_in_running && dev->udev) {
793 retval = usb_submit_urb (dev->interrupt_in_urb, GFP_ATOMIC); 793 retval = usb_submit_urb (dev->interrupt_in_urb, GFP_ATOMIC);
794 if (retval) { 794 if (retval) {
795 err("%s: usb_submit_urb failed (%d)", __FUNCTION__, retval); 795 err("%s: usb_submit_urb failed (%d)", __func__, retval);
796 } 796 }
797 } 797 }
798 798
@@ -800,8 +800,8 @@ exit:
800 dev->interrupt_in_done = 1; 800 dev->interrupt_in_done = 1;
801 wake_up_interruptible (&dev->read_wait); 801 wake_up_interruptible (&dev->read_wait);
802 802
803 lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer); 803 lego_usb_tower_debug_data(5, __func__, urb->actual_length, urb->transfer_buffer);
804 dbg(4, "%s: leave, status %d", __FUNCTION__, status); 804 dbg(4, "%s: leave, status %d", __func__, status);
805} 805}
806 806
807 807
@@ -813,22 +813,22 @@ static void tower_interrupt_out_callback (struct urb *urb)
813 struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context; 813 struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context;
814 int status = urb->status; 814 int status = urb->status;
815 815
816 dbg(4, "%s: enter, status %d", __FUNCTION__, status); 816 dbg(4, "%s: enter, status %d", __func__, status);
817 lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer); 817 lego_usb_tower_debug_data(5, __func__, urb->actual_length, urb->transfer_buffer);
818 818
819 /* sync/async unlink faults aren't errors */ 819 /* sync/async unlink faults aren't errors */
820 if (status && !(status == -ENOENT || 820 if (status && !(status == -ENOENT ||
821 status == -ECONNRESET || 821 status == -ECONNRESET ||
822 status == -ESHUTDOWN)) { 822 status == -ESHUTDOWN)) {
823 dbg(1, "%s - nonzero write bulk status received: %d", 823 dbg(1, "%s - nonzero write bulk status received: %d",
824 __FUNCTION__, status); 824 __func__, status);
825 } 825 }
826 826
827 dev->interrupt_out_busy = 0; 827 dev->interrupt_out_busy = 0;
828 wake_up_interruptible(&dev->write_wait); 828 wake_up_interruptible(&dev->write_wait);
829 829
830 lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer); 830 lego_usb_tower_debug_data(5, __func__, urb->actual_length, urb->transfer_buffer);
831 dbg(4, "%s: leave, status %d", __FUNCTION__, status); 831 dbg(4, "%s: leave, status %d", __func__, status);
832} 832}
833 833
834 834
@@ -849,7 +849,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
849 int retval = -ENOMEM; 849 int retval = -ENOMEM;
850 int result; 850 int result;
851 851
852 dbg(2, "%s: enter", __FUNCTION__); 852 dbg(2, "%s: enter", __func__);
853 853
854 if (udev == NULL) { 854 if (udev == NULL) {
855 info ("udev is NULL."); 855 info ("udev is NULL.");
@@ -978,7 +978,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
978 978
979 979
980exit: 980exit:
981 dbg(2, "%s: leave, return value 0x%.8lx (dev)", __FUNCTION__, (long) dev); 981 dbg(2, "%s: leave, return value 0x%.8lx (dev)", __func__, (long) dev);
982 982
983 return retval; 983 return retval;
984 984
@@ -998,7 +998,7 @@ static void tower_disconnect (struct usb_interface *interface)
998 struct lego_usb_tower *dev; 998 struct lego_usb_tower *dev;
999 int minor; 999 int minor;
1000 1000
1001 dbg(2, "%s: enter", __FUNCTION__); 1001 dbg(2, "%s: enter", __func__);
1002 1002
1003 dev = usb_get_intfdata (interface); 1003 dev = usb_get_intfdata (interface);
1004 mutex_lock(&open_disc_mutex); 1004 mutex_lock(&open_disc_mutex);
@@ -1023,7 +1023,7 @@ static void tower_disconnect (struct usb_interface *interface)
1023 1023
1024 info("LEGO USB Tower #%d now disconnected", (minor - LEGO_USB_TOWER_MINOR_BASE)); 1024 info("LEGO USB Tower #%d now disconnected", (minor - LEGO_USB_TOWER_MINOR_BASE));
1025 1025
1026 dbg(2, "%s: leave", __FUNCTION__); 1026 dbg(2, "%s: leave", __func__);
1027} 1027}
1028 1028
1029 1029
@@ -1036,7 +1036,7 @@ static int __init lego_usb_tower_init(void)
1036 int result; 1036 int result;
1037 int retval = 0; 1037 int retval = 0;
1038 1038
1039 dbg(2, "%s: enter", __FUNCTION__); 1039 dbg(2, "%s: enter", __func__);
1040 1040
1041 /* register this driver with the USB subsystem */ 1041 /* register this driver with the USB subsystem */
1042 result = usb_register(&tower_driver); 1042 result = usb_register(&tower_driver);
@@ -1049,7 +1049,7 @@ static int __init lego_usb_tower_init(void)
1049 info(DRIVER_DESC " " DRIVER_VERSION); 1049 info(DRIVER_DESC " " DRIVER_VERSION);
1050 1050
1051exit: 1051exit:
1052 dbg(2, "%s: leave, return value %d", __FUNCTION__, retval); 1052 dbg(2, "%s: leave, return value %d", __func__, retval);
1053 1053
1054 return retval; 1054 return retval;
1055} 1055}
@@ -1060,12 +1060,12 @@ exit:
1060 */ 1060 */
1061static void __exit lego_usb_tower_exit(void) 1061static void __exit lego_usb_tower_exit(void)
1062{ 1062{
1063 dbg(2, "%s: enter", __FUNCTION__); 1063 dbg(2, "%s: enter", __func__);
1064 1064
1065 /* deregister this driver with the USB subsystem */ 1065 /* deregister this driver with the USB subsystem */
1066 usb_deregister (&tower_driver); 1066 usb_deregister (&tower_driver);
1067 1067
1068 dbg(2, "%s: leave", __FUNCTION__); 1068 dbg(2, "%s: leave", __func__);
1069} 1069}
1070 1070
1071module_init (lego_usb_tower_init); 1071module_init (lego_usb_tower_init);
diff --git a/drivers/usb/misc/phidgetkit.c b/drivers/usb/misc/phidgetkit.c
index aa9bcceabe74..24230c638b8e 100644
--- a/drivers/usb/misc/phidgetkit.c
+++ b/drivers/usb/misc/phidgetkit.c
@@ -113,7 +113,7 @@ static int set_outputs(struct interfacekit *kit)
113 113
114 buffer = kzalloc(4, GFP_KERNEL); 114 buffer = kzalloc(4, GFP_KERNEL);
115 if (!buffer) { 115 if (!buffer) {
116 dev_err(&kit->udev->dev, "%s - out of memory\n", __FUNCTION__); 116 dev_err(&kit->udev->dev, "%s - out of memory\n", __func__);
117 return -ENOMEM; 117 return -ENOMEM;
118 } 118 }
119 buffer[0] = (u8)kit->outputs; 119 buffer[0] = (u8)kit->outputs;
@@ -146,7 +146,7 @@ static int change_string(struct interfacekit *kit, const char *display, unsigned
146 buffer = kmalloc(8, GFP_KERNEL); 146 buffer = kmalloc(8, GFP_KERNEL);
147 form_buffer = kmalloc(30, GFP_KERNEL); 147 form_buffer = kmalloc(30, GFP_KERNEL);
148 if ((!buffer) || (!form_buffer)) { 148 if ((!buffer) || (!form_buffer)) {
149 dev_err(&kit->udev->dev, "%s - out of memory\n", __FUNCTION__); 149 dev_err(&kit->udev->dev, "%s - out of memory\n", __func__);
150 goto exit; 150 goto exit;
151 } 151 }
152 152
@@ -216,7 +216,7 @@ static ssize_t set_backlight(struct device *dev, struct device_attribute *attr,
216 216
217 buffer = kzalloc(8, GFP_KERNEL); 217 buffer = kzalloc(8, GFP_KERNEL);
218 if (!buffer) { 218 if (!buffer) {
219 dev_err(&kit->udev->dev, "%s - out of memory\n", __FUNCTION__); 219 dev_err(&kit->udev->dev, "%s - out of memory\n", __func__);
220 goto exit; 220 goto exit;
221 } 221 }
222 222
diff --git a/drivers/usb/misc/phidgetmotorcontrol.c b/drivers/usb/misc/phidgetmotorcontrol.c
index 2ad09b1f4848..f0113c17cc5a 100644
--- a/drivers/usb/misc/phidgetmotorcontrol.c
+++ b/drivers/usb/misc/phidgetmotorcontrol.c
@@ -61,7 +61,7 @@ static int set_motor(struct motorcontrol *mc, int motor)
61 61
62 buffer = kzalloc(8, GFP_KERNEL); 62 buffer = kzalloc(8, GFP_KERNEL);
63 if (!buffer) { 63 if (!buffer) {
64 dev_err(&mc->intf->dev, "%s - out of memory\n", __FUNCTION__); 64 dev_err(&mc->intf->dev, "%s - out of memory\n", __func__);
65 return -ENOMEM; 65 return -ENOMEM;
66 } 66 }
67 67
diff --git a/drivers/usb/misc/phidgetservo.c b/drivers/usb/misc/phidgetservo.c
index 0d9de2f73930..7d590c09434a 100644
--- a/drivers/usb/misc/phidgetservo.c
+++ b/drivers/usb/misc/phidgetservo.c
@@ -89,7 +89,7 @@ change_position_v30(struct phidget_servo *servo, int servo_no, int degrees,
89 buffer = kmalloc(6, GFP_KERNEL); 89 buffer = kmalloc(6, GFP_KERNEL);
90 if (!buffer) { 90 if (!buffer) {
91 dev_err(&servo->udev->dev, "%s - out of memory\n", 91 dev_err(&servo->udev->dev, "%s - out of memory\n",
92 __FUNCTION__); 92 __func__);
93 return -ENOMEM; 93 return -ENOMEM;
94 } 94 }
95 95
@@ -162,7 +162,7 @@ change_position_v20(struct phidget_servo *servo, int servo_no, int degrees,
162 buffer = kmalloc(2, GFP_KERNEL); 162 buffer = kmalloc(2, GFP_KERNEL);
163 if (!buffer) { 163 if (!buffer) {
164 dev_err(&servo->udev->dev, "%s - out of memory\n", 164 dev_err(&servo->udev->dev, "%s - out of memory\n",
165 __FUNCTION__); 165 __func__);
166 return -ENOMEM; 166 return -ENOMEM;
167 } 167 }
168 168
@@ -259,7 +259,7 @@ servo_probe(struct usb_interface *interface, const struct usb_device_id *id)
259 259
260 dev = kzalloc(sizeof (struct phidget_servo), GFP_KERNEL); 260 dev = kzalloc(sizeof (struct phidget_servo), GFP_KERNEL);
261 if (dev == NULL) { 261 if (dev == NULL) {
262 dev_err(&interface->dev, "%s - out of memory\n", __FUNCTION__); 262 dev_err(&interface->dev, "%s - out of memory\n", __func__);
263 rc = -ENOMEM; 263 rc = -ENOMEM;
264 goto out; 264 goto out;
265 } 265 }
diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c
index 20777d01db62..ada7bf898fe9 100644
--- a/drivers/usb/misc/usblcd.c
+++ b/drivers/usb/misc/usblcd.c
@@ -78,7 +78,7 @@ static int lcd_open(struct inode *inode, struct file *file)
78 interface = usb_find_interface(&lcd_driver, subminor); 78 interface = usb_find_interface(&lcd_driver, subminor);
79 if (!interface) { 79 if (!interface) {
80 err ("USBLCD: %s - error, can't find device for minor %d", 80 err ("USBLCD: %s - error, can't find device for minor %d",
81 __FUNCTION__, subminor); 81 __func__, subminor);
82 return -ENODEV; 82 return -ENODEV;
83 } 83 }
84 84
@@ -193,7 +193,7 @@ static void lcd_write_bulk_callback(struct urb *urb)
193 status == -ECONNRESET || 193 status == -ECONNRESET ||
194 status == -ESHUTDOWN)) { 194 status == -ESHUTDOWN)) {
195 dbg("USBLCD: %s - nonzero write bulk status received: %d", 195 dbg("USBLCD: %s - nonzero write bulk status received: %d",
196 __FUNCTION__, status); 196 __func__, status);
197 } 197 }
198 198
199 /* free up our allocated buffer */ 199 /* free up our allocated buffer */
@@ -248,7 +248,7 @@ static ssize_t lcd_write(struct file *file, const char __user * user_buffer, siz
248 /* send the data out the bulk port */ 248 /* send the data out the bulk port */
249 retval = usb_submit_urb(urb, GFP_KERNEL); 249 retval = usb_submit_urb(urb, GFP_KERNEL);
250 if (retval) { 250 if (retval) {
251 err("USBLCD: %s - failed submitting write urb, error %d", __FUNCTION__, retval); 251 err("USBLCD: %s - failed submitting write urb, error %d", __func__, retval);
252 goto error_unanchor; 252 goto error_unanchor;
253 } 253 }
254 254
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index 2c4fd4d6df95..678fac86c467 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -1136,7 +1136,7 @@ static int verify_not_halted (int ep, struct urb *urb)
1136 dbg ("ep %02x bogus status: %04x != 0", ep, status); 1136 dbg ("ep %02x bogus status: %04x != 0", ep, status);
1137 return -EINVAL; 1137 return -EINVAL;
1138 } 1138 }
1139 retval = simple_io (urb, 1, 0, 0, __FUNCTION__); 1139 retval = simple_io (urb, 1, 0, 0, __func__);
1140 if (retval != 0) 1140 if (retval != 0)
1141 return -EINVAL; 1141 return -EINVAL;
1142 return 0; 1142 return 0;
@@ -1158,7 +1158,7 @@ static int verify_halted (int ep, struct urb *urb)
1158 dbg ("ep %02x bogus status: %04x != 1", ep, status); 1158 dbg ("ep %02x bogus status: %04x != 1", ep, status);
1159 return -EINVAL; 1159 return -EINVAL;
1160 } 1160 }
1161 retval = simple_io (urb, 1, 0, -EPIPE, __FUNCTION__); 1161 retval = simple_io (urb, 1, 0, -EPIPE, __func__);
1162 if (retval != -EPIPE) 1162 if (retval != -EPIPE)
1163 return -EINVAL; 1163 return -EINVAL;
1164 retval = simple_io (urb, 1, 0, -EPIPE, "verify_still_halted"); 1164 retval = simple_io (urb, 1, 0, -EPIPE, "verify_still_halted");
diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c
index 1cd29cd6bd00..a238817762ad 100644
--- a/drivers/usb/serial/aircable.c
+++ b/drivers/usb/serial/aircable.c
@@ -210,7 +210,7 @@ static void aircable_send(struct usb_serial_port *port)
210 struct aircable_private *priv = usb_get_serial_port_data(port); 210 struct aircable_private *priv = usb_get_serial_port_data(port);
211 unsigned char* buf; 211 unsigned char* buf;
212 u16 *dbuf; 212 u16 *dbuf;
213 dbg("%s - port %d", __FUNCTION__, port->number); 213 dbg("%s - port %d", __func__, port->number);
214 if (port->write_urb_busy) 214 if (port->write_urb_busy)
215 return; 215 return;
216 216
@@ -220,7 +220,7 @@ static void aircable_send(struct usb_serial_port *port)
220 220
221 buf = kzalloc(count + HCI_HEADER_LENGTH, GFP_ATOMIC); 221 buf = kzalloc(count + HCI_HEADER_LENGTH, GFP_ATOMIC);
222 if (!buf) { 222 if (!buf) {
223 err("%s- kzalloc(%d) failed.", __FUNCTION__, 223 err("%s- kzalloc(%d) failed.", __func__,
224 count + HCI_HEADER_LENGTH); 224 count + HCI_HEADER_LENGTH);
225 return; 225 return;
226 } 226 }
@@ -236,7 +236,7 @@ static void aircable_send(struct usb_serial_port *port)
236 236
237 kfree(buf); 237 kfree(buf);
238 port->write_urb_busy = 1; 238 port->write_urb_busy = 1;
239 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, 239 usb_serial_debug_data(debug, &port->dev, __func__,
240 count + HCI_HEADER_LENGTH, 240 count + HCI_HEADER_LENGTH,
241 port->write_urb->transfer_buffer); 241 port->write_urb->transfer_buffer);
242 port->write_urb->transfer_buffer_length = count + HCI_HEADER_LENGTH; 242 port->write_urb->transfer_buffer_length = count + HCI_HEADER_LENGTH;
@@ -246,7 +246,7 @@ static void aircable_send(struct usb_serial_port *port)
246 if (result) { 246 if (result) {
247 dev_err(&port->dev, 247 dev_err(&port->dev,
248 "%s - failed submitting write urb, error %d\n", 248 "%s - failed submitting write urb, error %d\n",
249 __FUNCTION__, result); 249 __func__, result);
250 port->write_urb_busy = 0; 250 port->write_urb_busy = 0;
251 } 251 }
252 252
@@ -275,7 +275,7 @@ static void aircable_read(struct work_struct *work)
275 275
276 if (!tty) { 276 if (!tty) {
277 schedule_work(&priv->rx_work); 277 schedule_work(&priv->rx_work);
278 err("%s - No tty available", __FUNCTION__); 278 err("%s - No tty available", __func__);
279 return ; 279 return ;
280 } 280 }
281 281
@@ -286,7 +286,7 @@ static void aircable_read(struct work_struct *work)
286 286
287 tty_prepare_flip_string(tty, &data, count); 287 tty_prepare_flip_string(tty, &data, count);
288 if (!data){ 288 if (!data){
289 err("%s- kzalloc(%d) failed.", __FUNCTION__, count); 289 err("%s- kzalloc(%d) failed.", __func__, count);
290 return; 290 return;
291 } 291 }
292 292
@@ -332,7 +332,7 @@ static int aircable_attach (struct usb_serial *serial)
332 332
333 priv = kzalloc(sizeof(struct aircable_private), GFP_KERNEL); 333 priv = kzalloc(sizeof(struct aircable_private), GFP_KERNEL);
334 if (!priv){ 334 if (!priv){
335 err("%s- kmalloc(%Zd) failed.", __FUNCTION__, 335 err("%s- kmalloc(%Zd) failed.", __func__,
336 sizeof(struct aircable_private)); 336 sizeof(struct aircable_private));
337 return -ENOMEM; 337 return -ENOMEM;
338 } 338 }
@@ -366,7 +366,7 @@ static void aircable_shutdown(struct usb_serial *serial)
366 struct usb_serial_port *port = serial->port[0]; 366 struct usb_serial_port *port = serial->port[0];
367 struct aircable_private *priv = usb_get_serial_port_data(port); 367 struct aircable_private *priv = usb_get_serial_port_data(port);
368 368
369 dbg("%s", __FUNCTION__); 369 dbg("%s", __func__);
370 370
371 if (priv) { 371 if (priv) {
372 serial_buf_free(priv->tx_buf); 372 serial_buf_free(priv->tx_buf);
@@ -388,12 +388,12 @@ static int aircable_write(struct usb_serial_port *port,
388 struct aircable_private *priv = usb_get_serial_port_data(port); 388 struct aircable_private *priv = usb_get_serial_port_data(port);
389 int temp; 389 int temp;
390 390
391 dbg("%s - port %d, %d bytes", __FUNCTION__, port->number, count); 391 dbg("%s - port %d, %d bytes", __func__, port->number, count);
392 392
393 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, source); 393 usb_serial_debug_data(debug, &port->dev, __func__, count, source);
394 394
395 if (!count){ 395 if (!count){
396 dbg("%s - write request of 0 bytes", __FUNCTION__); 396 dbg("%s - write request of 0 bytes", __func__);
397 return count; 397 return count;
398 } 398 }
399 399
@@ -414,7 +414,7 @@ static void aircable_write_bulk_callback(struct urb *urb)
414 int status = urb->status; 414 int status = urb->status;
415 int result; 415 int result;
416 416
417 dbg("%s - urb status: %d", __FUNCTION__ , status); 417 dbg("%s - urb status: %d", __func__ , status);
418 418
419 /* This has been taken from cypress_m8.c cypress_write_int_callback */ 419 /* This has been taken from cypress_m8.c cypress_write_int_callback */
420 switch (status) { 420 switch (status) {
@@ -426,21 +426,21 @@ static void aircable_write_bulk_callback(struct urb *urb)
426 case -ESHUTDOWN: 426 case -ESHUTDOWN:
427 /* this urb is terminated, clean up */ 427 /* this urb is terminated, clean up */
428 dbg("%s - urb shutting down with status: %d", 428 dbg("%s - urb shutting down with status: %d",
429 __FUNCTION__, status); 429 __func__, status);
430 port->write_urb_busy = 0; 430 port->write_urb_busy = 0;
431 return; 431 return;
432 default: 432 default:
433 /* error in the urb, so we have to resubmit it */ 433 /* error in the urb, so we have to resubmit it */
434 dbg("%s - Overflow in write", __FUNCTION__); 434 dbg("%s - Overflow in write", __func__);
435 dbg("%s - nonzero write bulk status received: %d", 435 dbg("%s - nonzero write bulk status received: %d",
436 __FUNCTION__, status); 436 __func__, status);
437 port->write_urb->transfer_buffer_length = 1; 437 port->write_urb->transfer_buffer_length = 1;
438 port->write_urb->dev = port->serial->dev; 438 port->write_urb->dev = port->serial->dev;
439 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 439 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
440 if (result) 440 if (result)
441 dev_err(&urb->dev->dev, 441 dev_err(&urb->dev->dev,
442 "%s - failed resubmitting write urb, error %d\n", 442 "%s - failed resubmitting write urb, error %d\n",
443 __FUNCTION__, result); 443 __func__, result);
444 else 444 else
445 return; 445 return;
446 } 446 }
@@ -460,17 +460,17 @@ static void aircable_read_bulk_callback(struct urb *urb)
460 unsigned char *temp; 460 unsigned char *temp;
461 int status = urb->status; 461 int status = urb->status;
462 462
463 dbg("%s - port %d", __FUNCTION__, port->number); 463 dbg("%s - port %d", __func__, port->number);
464 464
465 if (status) { 465 if (status) {
466 dbg("%s - urb status = %d", __FUNCTION__, status); 466 dbg("%s - urb status = %d", __func__, status);
467 if (!port->open_count) { 467 if (!port->open_count) {
468 dbg("%s - port is closed, exiting.", __FUNCTION__); 468 dbg("%s - port is closed, exiting.", __func__);
469 return; 469 return;
470 } 470 }
471 if (status == -EPROTO) { 471 if (status == -EPROTO) {
472 dbg("%s - caught -EPROTO, resubmitting the urb", 472 dbg("%s - caught -EPROTO, resubmitting the urb",
473 __FUNCTION__); 473 __func__);
474 usb_fill_bulk_urb(port->read_urb, port->serial->dev, 474 usb_fill_bulk_urb(port->read_urb, port->serial->dev,
475 usb_rcvbulkpipe(port->serial->dev, 475 usb_rcvbulkpipe(port->serial->dev,
476 port->bulk_in_endpointAddress), 476 port->bulk_in_endpointAddress),
@@ -482,14 +482,14 @@ static void aircable_read_bulk_callback(struct urb *urb)
482 if (result) 482 if (result)
483 dev_err(&urb->dev->dev, 483 dev_err(&urb->dev->dev,
484 "%s - failed resubmitting read urb, error %d\n", 484 "%s - failed resubmitting read urb, error %d\n",
485 __FUNCTION__, result); 485 __func__, result);
486 return; 486 return;
487 } 487 }
488 dbg("%s - unable to handle the error, exiting.", __FUNCTION__); 488 dbg("%s - unable to handle the error, exiting.", __func__);
489 return; 489 return;
490 } 490 }
491 491
492 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, 492 usb_serial_debug_data(debug, &port->dev, __func__,
493 urb->actual_length,urb->transfer_buffer); 493 urb->actual_length,urb->transfer_buffer);
494 494
495 tty = port->tty; 495 tty = port->tty;
@@ -538,7 +538,7 @@ static void aircable_read_bulk_callback(struct urb *urb)
538 if (result) 538 if (result)
539 dev_err(&urb->dev->dev, 539 dev_err(&urb->dev->dev,
540 "%s - failed resubmitting read urb, error %d\n", 540 "%s - failed resubmitting read urb, error %d\n",
541 __FUNCTION__, result); 541 __func__, result);
542 } 542 }
543 543
544 return; 544 return;
@@ -550,7 +550,7 @@ static void aircable_throttle(struct usb_serial_port *port)
550 struct aircable_private *priv = usb_get_serial_port_data(port); 550 struct aircable_private *priv = usb_get_serial_port_data(port);
551 unsigned long flags; 551 unsigned long flags;
552 552
553 dbg("%s - port %d", __FUNCTION__, port->number); 553 dbg("%s - port %d", __func__, port->number);
554 554
555 spin_lock_irqsave(&priv->rx_lock, flags); 555 spin_lock_irqsave(&priv->rx_lock, flags);
556 priv->rx_flags |= THROTTLED; 556 priv->rx_flags |= THROTTLED;
@@ -564,7 +564,7 @@ static void aircable_unthrottle(struct usb_serial_port *port)
564 int actually_throttled; 564 int actually_throttled;
565 unsigned long flags; 565 unsigned long flags;
566 566
567 dbg("%s - port %d", __FUNCTION__, port->number); 567 dbg("%s - port %d", __func__, port->number);
568 568
569 spin_lock_irqsave(&priv->rx_lock, flags); 569 spin_lock_irqsave(&priv->rx_lock, flags);
570 actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED; 570 actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED;
diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c
index d5bcb3774034..725b6b94c274 100644
--- a/drivers/usb/serial/airprime.c
+++ b/drivers/usb/serial/airprime.c
@@ -53,7 +53,7 @@ static int airprime_send_setup(struct usb_serial_port *port)
53 struct usb_serial *serial = port->serial; 53 struct usb_serial *serial = port->serial;
54 struct airprime_private *priv; 54 struct airprime_private *priv;
55 55
56 dbg("%s", __FUNCTION__); 56 dbg("%s", __func__);
57 57
58 if (port->number != 0) 58 if (port->number != 0)
59 return 0; 59 return 0;
@@ -83,14 +83,14 @@ static void airprime_read_bulk_callback(struct urb *urb)
83 int result; 83 int result;
84 int status = urb->status; 84 int status = urb->status;
85 85
86 dbg("%s - port %d", __FUNCTION__, port->number); 86 dbg("%s - port %d", __func__, port->number);
87 87
88 if (status) { 88 if (status) {
89 dbg("%s - nonzero read bulk status received: %d", 89 dbg("%s - nonzero read bulk status received: %d",
90 __FUNCTION__, status); 90 __func__, status);
91 return; 91 return;
92 } 92 }
93 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 93 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
94 94
95 tty = port->tty; 95 tty = port->tty;
96 if (tty && urb->actual_length) { 96 if (tty && urb->actual_length) {
@@ -101,7 +101,7 @@ static void airprime_read_bulk_callback(struct urb *urb)
101 result = usb_submit_urb (urb, GFP_ATOMIC); 101 result = usb_submit_urb (urb, GFP_ATOMIC);
102 if (result) 102 if (result)
103 dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", 103 dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n",
104 __FUNCTION__, result); 104 __func__, result);
105 return; 105 return;
106} 106}
107 107
@@ -112,14 +112,14 @@ static void airprime_write_bulk_callback(struct urb *urb)
112 int status = urb->status; 112 int status = urb->status;
113 unsigned long flags; 113 unsigned long flags;
114 114
115 dbg("%s - port %d", __FUNCTION__, port->number); 115 dbg("%s - port %d", __func__, port->number);
116 116
117 /* free up the transfer buffer, as usb_free_urb() does not do this */ 117 /* free up the transfer buffer, as usb_free_urb() does not do this */
118 kfree (urb->transfer_buffer); 118 kfree (urb->transfer_buffer);
119 119
120 if (status) 120 if (status)
121 dbg("%s - nonzero write bulk status received: %d", 121 dbg("%s - nonzero write bulk status received: %d",
122 __FUNCTION__, status); 122 __func__, status);
123 spin_lock_irqsave(&priv->lock, flags); 123 spin_lock_irqsave(&priv->lock, flags);
124 --priv->outstanding_urbs; 124 --priv->outstanding_urbs;
125 spin_unlock_irqrestore(&priv->lock, flags); 125 spin_unlock_irqrestore(&priv->lock, flags);
@@ -136,7 +136,7 @@ static int airprime_open(struct usb_serial_port *port, struct file *filp)
136 int i; 136 int i;
137 int result = 0; 137 int result = 0;
138 138
139 dbg("%s - port %d", __FUNCTION__, port->number); 139 dbg("%s - port %d", __func__, port->number);
140 140
141 /* initialize our private data structure if it isn't already created */ 141 /* initialize our private data structure if it isn't already created */
142 if (!priv) { 142 if (!priv) {
@@ -157,7 +157,7 @@ static int airprime_open(struct usb_serial_port *port, struct file *filp)
157 buffer = kmalloc(buffer_size, GFP_KERNEL); 157 buffer = kmalloc(buffer_size, GFP_KERNEL);
158 if (!buffer) { 158 if (!buffer) {
159 dev_err(&port->dev, "%s - out of memory.\n", 159 dev_err(&port->dev, "%s - out of memory.\n",
160 __FUNCTION__); 160 __func__);
161 result = -ENOMEM; 161 result = -ENOMEM;
162 goto errout; 162 goto errout;
163 } 163 }
@@ -165,7 +165,7 @@ static int airprime_open(struct usb_serial_port *port, struct file *filp)
165 if (!urb) { 165 if (!urb) {
166 kfree(buffer); 166 kfree(buffer);
167 dev_err(&port->dev, "%s - no more urbs?\n", 167 dev_err(&port->dev, "%s - no more urbs?\n",
168 __FUNCTION__); 168 __func__);
169 result = -ENOMEM; 169 result = -ENOMEM;
170 goto errout; 170 goto errout;
171 } 171 }
@@ -180,7 +180,7 @@ static int airprime_open(struct usb_serial_port *port, struct file *filp)
180 kfree(buffer); 180 kfree(buffer);
181 dev_err(&port->dev, 181 dev_err(&port->dev,
182 "%s - failed submitting read urb %d for port %d, error %d\n", 182 "%s - failed submitting read urb %d for port %d, error %d\n",
183 __FUNCTION__, i, port->number, result); 183 __func__, i, port->number, result);
184 goto errout; 184 goto errout;
185 } 185 }
186 /* remember this urb so we can kill it when the port is closed */ 186 /* remember this urb so we can kill it when the port is closed */
@@ -212,7 +212,7 @@ static void airprime_close(struct usb_serial_port *port, struct file * filp)
212 struct airprime_private *priv = usb_get_serial_port_data(port); 212 struct airprime_private *priv = usb_get_serial_port_data(port);
213 int i; 213 int i;
214 214
215 dbg("%s - port %d", __FUNCTION__, port->number); 215 dbg("%s - port %d", __func__, port->number);
216 216
217 priv->rts_state = 0; 217 priv->rts_state = 0;
218 priv->dtr_state = 0; 218 priv->dtr_state = 0;
@@ -242,12 +242,12 @@ static int airprime_write(struct usb_serial_port *port,
242 unsigned char *buffer; 242 unsigned char *buffer;
243 unsigned long flags; 243 unsigned long flags;
244 int status; 244 int status;
245 dbg("%s - port %d", __FUNCTION__, port->number); 245 dbg("%s - port %d", __func__, port->number);
246 246
247 spin_lock_irqsave(&priv->lock, flags); 247 spin_lock_irqsave(&priv->lock, flags);
248 if (priv->outstanding_urbs > NUM_WRITE_URBS) { 248 if (priv->outstanding_urbs > NUM_WRITE_URBS) {
249 spin_unlock_irqrestore(&priv->lock, flags); 249 spin_unlock_irqrestore(&priv->lock, flags);
250 dbg("%s - write limit hit\n", __FUNCTION__); 250 dbg("%s - write limit hit\n", __func__);
251 return 0; 251 return 0;
252 } 252 }
253 spin_unlock_irqrestore(&priv->lock, flags); 253 spin_unlock_irqrestore(&priv->lock, flags);
@@ -264,7 +264,7 @@ static int airprime_write(struct usb_serial_port *port,
264 } 264 }
265 memcpy (buffer, buf, count); 265 memcpy (buffer, buf, count);
266 266
267 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buffer); 267 usb_serial_debug_data(debug, &port->dev, __func__, count, buffer);
268 268
269 usb_fill_bulk_urb(urb, serial->dev, 269 usb_fill_bulk_urb(urb, serial->dev,
270 usb_sndbulkpipe(serial->dev, 270 usb_sndbulkpipe(serial->dev,
@@ -277,7 +277,7 @@ static int airprime_write(struct usb_serial_port *port,
277 if (status) { 277 if (status) {
278 dev_err(&port->dev, 278 dev_err(&port->dev,
279 "%s - usb_submit_urb(write bulk) failed with status = %d\n", 279 "%s - usb_submit_urb(write bulk) failed with status = %d\n",
280 __FUNCTION__, status); 280 __func__, status);
281 count = status; 281 count = status;
282 kfree (buffer); 282 kfree (buffer);
283 } else { 283 } else {
@@ -328,7 +328,7 @@ static int __init airprime_init(void)
328 328
329static void __exit airprime_exit(void) 329static void __exit airprime_exit(void)
330{ 330{
331 dbg("%s", __FUNCTION__); 331 dbg("%s", __func__);
332 332
333 usb_deregister(&airprime_driver); 333 usb_deregister(&airprime_driver);
334 usb_serial_deregister(&airprime_device); 334 usb_serial_deregister(&airprime_device);
diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
index aa7a6838a3d4..9d708b22e955 100644
--- a/drivers/usb/serial/ark3116.c
+++ b/drivers/usb/serial/ark3116.c
@@ -173,7 +173,7 @@ static void ark3116_set_termios(struct usb_serial_port *port,
173 173
174 config = 0; 174 config = 0;
175 175
176 dbg("%s - port %d", __FUNCTION__, port->number); 176 dbg("%s - port %d", __func__, port->number);
177 177
178 spin_lock_irqsave(&priv->lock, flags); 178 spin_lock_irqsave(&priv->lock, flags);
179 if (!priv->termios_initialized) { 179 if (!priv->termios_initialized) {
@@ -323,7 +323,7 @@ static int ark3116_open(struct usb_serial_port *port, struct file *filp)
323 char *buf; 323 char *buf;
324 int result = 0; 324 int result = 0;
325 325
326 dbg("%s - port %d", __FUNCTION__, port->number); 326 dbg("%s - port %d", __func__, port->number);
327 327
328 buf = kmalloc(1, GFP_KERNEL); 328 buf = kmalloc(1, GFP_KERNEL);
329 if (!buf) { 329 if (!buf) {
@@ -395,7 +395,7 @@ static int ark3116_ioctl(struct usb_serial_port *port, struct file *file,
395 return -EFAULT; 395 return -EFAULT;
396 return 0; 396 return 0;
397 default: 397 default:
398 dbg("%s cmd 0x%04x not supported", __FUNCTION__, cmd); 398 dbg("%s cmd 0x%04x not supported", __func__, cmd);
399 break; 399 break;
400 } 400 }
401 401
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
index b6950648804f..5a2877c22129 100644
--- a/drivers/usb/serial/belkin_sa.c
+++ b/drivers/usb/serial/belkin_sa.c
@@ -195,7 +195,7 @@ static void belkin_sa_shutdown (struct usb_serial *serial)
195 struct belkin_sa_private *priv; 195 struct belkin_sa_private *priv;
196 int i; 196 int i;
197 197
198 dbg ("%s", __FUNCTION__); 198 dbg ("%s", __func__);
199 199
200 /* stop reads and writes on all ports */ 200 /* stop reads and writes on all ports */
201 for (i=0; i < serial->num_ports; ++i) { 201 for (i=0; i < serial->num_ports; ++i) {
@@ -210,7 +210,7 @@ static int belkin_sa_open (struct usb_serial_port *port, struct file *filp)
210{ 210{
211 int retval = 0; 211 int retval = 0;
212 212
213 dbg("%s port %d", __FUNCTION__, port->number); 213 dbg("%s port %d", __func__, port->number);
214 214
215 /*Start reading from the device*/ 215 /*Start reading from the device*/
216 /* TODO: Look at possibility of submitting multiple URBs to device to 216 /* TODO: Look at possibility of submitting multiple URBs to device to
@@ -237,7 +237,7 @@ exit:
237 237
238static void belkin_sa_close (struct usb_serial_port *port, struct file *filp) 238static void belkin_sa_close (struct usb_serial_port *port, struct file *filp)
239{ 239{
240 dbg("%s port %d", __FUNCTION__, port->number); 240 dbg("%s port %d", __func__, port->number);
241 241
242 /* shutdown our bulk reads and writes */ 242 /* shutdown our bulk reads and writes */
243 usb_kill_urb(port->write_urb); 243 usb_kill_urb(port->write_urb);
@@ -264,15 +264,15 @@ static void belkin_sa_read_int_callback (struct urb *urb)
264 case -ESHUTDOWN: 264 case -ESHUTDOWN:
265 /* this urb is terminated, clean up */ 265 /* this urb is terminated, clean up */
266 dbg("%s - urb shutting down with status: %d", 266 dbg("%s - urb shutting down with status: %d",
267 __FUNCTION__, status); 267 __func__, status);
268 return; 268 return;
269 default: 269 default:
270 dbg("%s - nonzero urb status received: %d", 270 dbg("%s - nonzero urb status received: %d",
271 __FUNCTION__, status); 271 __func__, status);
272 goto exit; 272 goto exit;
273 } 273 }
274 274
275 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 275 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
276 276
277 /* Handle known interrupt data */ 277 /* Handle known interrupt data */
278 /* ignore data[0] and data[1] */ 278 /* ignore data[0] and data[1] */
@@ -331,7 +331,7 @@ exit:
331 retval = usb_submit_urb (urb, GFP_ATOMIC); 331 retval = usb_submit_urb (urb, GFP_ATOMIC);
332 if (retval) 332 if (retval)
333 err ("%s - usb_submit_urb failed with result %d", 333 err ("%s - usb_submit_urb failed with result %d",
334 __FUNCTION__, retval); 334 __func__, retval);
335} 335}
336 336
337static void belkin_sa_set_termios (struct usb_serial_port *port, struct ktermios *old_termios) 337static void belkin_sa_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
@@ -478,7 +478,7 @@ static int belkin_sa_tiocmget (struct usb_serial_port *port, struct file *file)
478 unsigned long control_state; 478 unsigned long control_state;
479 unsigned long flags; 479 unsigned long flags;
480 480
481 dbg("%s", __FUNCTION__); 481 dbg("%s", __func__);
482 482
483 spin_lock_irqsave(&priv->lock, flags); 483 spin_lock_irqsave(&priv->lock, flags);
484 control_state = priv->control_state; 484 control_state = priv->control_state;
@@ -499,7 +499,7 @@ static int belkin_sa_tiocmset (struct usb_serial_port *port, struct file *file,
499 int rts = 0; 499 int rts = 0;
500 int dtr = 0; 500 int dtr = 0;
501 501
502 dbg("%s", __FUNCTION__); 502 dbg("%s", __func__);
503 503
504 spin_lock_irqsave(&priv->lock, flags); 504 spin_lock_irqsave(&priv->lock, flags);
505 control_state = priv->control_state; 505 control_state = priv->control_state;
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
index 66ce30c1b75b..201184c3fb87 100644
--- a/drivers/usb/serial/console.c
+++ b/drivers/usb/serial/console.c
@@ -67,7 +67,7 @@ static int usb_console_setup(struct console *co, char *options)
67 struct tty_struct *tty = NULL; 67 struct tty_struct *tty = NULL;
68 struct ktermios *termios = NULL, dummy; 68 struct ktermios *termios = NULL, dummy;
69 69
70 dbg ("%s", __FUNCTION__); 70 dbg ("%s", __func__);
71 71
72 if (options) { 72 if (options) {
73 baud = simple_strtoul(options, NULL, 10); 73 baud = simple_strtoul(options, NULL, 10);
@@ -225,10 +225,10 @@ static void usb_console_write(struct console *co, const char *buf, unsigned coun
225 if (count == 0) 225 if (count == 0)
226 return; 226 return;
227 227
228 dbg("%s - port %d, %d byte(s)", __FUNCTION__, port->number, count); 228 dbg("%s - port %d, %d byte(s)", __func__, port->number, count);
229 229
230 if (!port->open_count) { 230 if (!port->open_count) {
231 dbg ("%s - port not opened", __FUNCTION__); 231 dbg ("%s - port not opened", __func__);
232 return; 232 return;
233 } 233 }
234 234
@@ -248,7 +248,7 @@ static void usb_console_write(struct console *co, const char *buf, unsigned coun
248 retval = serial->type->write(port, buf, i); 248 retval = serial->type->write(port, buf, i);
249 else 249 else
250 retval = usb_serial_generic_write(port, buf, i); 250 retval = usb_serial_generic_write(port, buf, i);
251 dbg("%s - return value : %d", __FUNCTION__, retval); 251 dbg("%s - return value : %d", __func__, retval);
252 if (lf) { 252 if (lf) {
253 /* append CR after LF */ 253 /* append CR after LF */
254 unsigned char cr = 13; 254 unsigned char cr = 13;
@@ -256,7 +256,7 @@ static void usb_console_write(struct console *co, const char *buf, unsigned coun
256 retval = serial->type->write(port, &cr, 1); 256 retval = serial->type->write(port, &cr, 1);
257 else 257 else
258 retval = usb_serial_generic_write(port, &cr, 1); 258 retval = usb_serial_generic_write(port, &cr, 1);
259 dbg("%s - return value : %d", __FUNCTION__, retval); 259 dbg("%s - return value : %d", __func__, retval);
260 } 260 }
261 buf += i; 261 buf += i;
262 count -= i; 262 count -= i;
diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c
index 2af8d21bb121..dc0ea08ed231 100644
--- a/drivers/usb/serial/cp2101.c
+++ b/drivers/usb/serial/cp2101.c
@@ -193,7 +193,7 @@ static int cp2101_get_config(struct usb_serial_port* port, u8 request,
193 193
194 buf = kcalloc(length, sizeof(__le32), GFP_KERNEL); 194 buf = kcalloc(length, sizeof(__le32), GFP_KERNEL);
195 if (!buf) { 195 if (!buf) {
196 dev_err(&port->dev, "%s - out of memory.\n", __FUNCTION__); 196 dev_err(&port->dev, "%s - out of memory.\n", __func__);
197 return -ENOMEM; 197 return -ENOMEM;
198 } 198 }
199 199
@@ -214,7 +214,7 @@ static int cp2101_get_config(struct usb_serial_port* port, u8 request,
214 if (result != size) { 214 if (result != size) {
215 dev_err(&port->dev, "%s - Unable to send config request, " 215 dev_err(&port->dev, "%s - Unable to send config request, "
216 "request=0x%x size=%d result=%d\n", 216 "request=0x%x size=%d result=%d\n",
217 __FUNCTION__, request, size, result); 217 __func__, request, size, result);
218 return -EPROTO; 218 return -EPROTO;
219 } 219 }
220 220
@@ -240,7 +240,7 @@ static int cp2101_set_config(struct usb_serial_port* port, u8 request,
240 buf = kmalloc(length * sizeof(__le32), GFP_KERNEL); 240 buf = kmalloc(length * sizeof(__le32), GFP_KERNEL);
241 if (!buf) { 241 if (!buf) {
242 dev_err(&port->dev, "%s - out of memory.\n", 242 dev_err(&port->dev, "%s - out of memory.\n",
243 __FUNCTION__); 243 __func__);
244 return -ENOMEM; 244 return -ENOMEM;
245 } 245 }
246 246
@@ -265,7 +265,7 @@ static int cp2101_set_config(struct usb_serial_port* port, u8 request,
265 if ((size > 2 && result != size) || result < 0) { 265 if ((size > 2 && result != size) || result < 0) {
266 dev_err(&port->dev, "%s - Unable to send request, " 266 dev_err(&port->dev, "%s - Unable to send request, "
267 "request=0x%x size=%d result=%d\n", 267 "request=0x%x size=%d result=%d\n",
268 __FUNCTION__, request, size, result); 268 __func__, request, size, result);
269 return -EPROTO; 269 return -EPROTO;
270 } 270 }
271 271
@@ -293,11 +293,11 @@ static int cp2101_open (struct usb_serial_port *port, struct file *filp)
293 struct usb_serial *serial = port->serial; 293 struct usb_serial *serial = port->serial;
294 int result; 294 int result;
295 295
296 dbg("%s - port %d", __FUNCTION__, port->number); 296 dbg("%s - port %d", __func__, port->number);
297 297
298 if (cp2101_set_config_single(port, CP2101_UART, UART_ENABLE)) { 298 if (cp2101_set_config_single(port, CP2101_UART, UART_ENABLE)) {
299 dev_err(&port->dev, "%s - Unable to enable UART\n", 299 dev_err(&port->dev, "%s - Unable to enable UART\n",
300 __FUNCTION__); 300 __func__);
301 return -EPROTO; 301 return -EPROTO;
302 } 302 }
303 303
@@ -312,7 +312,7 @@ static int cp2101_open (struct usb_serial_port *port, struct file *filp)
312 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 312 result = usb_submit_urb(port->read_urb, GFP_KERNEL);
313 if (result) { 313 if (result) {
314 dev_err(&port->dev, "%s - failed resubmitting read urb, " 314 dev_err(&port->dev, "%s - failed resubmitting read urb, "
315 "error %d\n", __FUNCTION__, result); 315 "error %d\n", __func__, result);
316 return result; 316 return result;
317 } 317 }
318 318
@@ -329,7 +329,7 @@ static void cp2101_cleanup (struct usb_serial_port *port)
329{ 329{
330 struct usb_serial *serial = port->serial; 330 struct usb_serial *serial = port->serial;
331 331
332 dbg("%s - port %d", __FUNCTION__, port->number); 332 dbg("%s - port %d", __func__, port->number);
333 333
334 if (serial->dev) { 334 if (serial->dev) {
335 /* shutdown any bulk reads that might be going on */ 335 /* shutdown any bulk reads that might be going on */
@@ -342,10 +342,10 @@ static void cp2101_cleanup (struct usb_serial_port *port)
342 342
343static void cp2101_close (struct usb_serial_port *port, struct file * filp) 343static void cp2101_close (struct usb_serial_port *port, struct file * filp)
344{ 344{
345 dbg("%s - port %d", __FUNCTION__, port->number); 345 dbg("%s - port %d", __func__, port->number);
346 346
347 /* shutdown our urbs */ 347 /* shutdown our urbs */
348 dbg("%s - shutting down urbs", __FUNCTION__); 348 dbg("%s - shutting down urbs", __func__);
349 usb_kill_urb(port->write_urb); 349 usb_kill_urb(port->write_urb);
350 usb_kill_urb(port->read_urb); 350 usb_kill_urb(port->read_urb);
351 351
@@ -367,10 +367,10 @@ static void cp2101_get_termios (struct usb_serial_port *port)
367 int baud; 367 int baud;
368 int bits; 368 int bits;
369 369
370 dbg("%s - port %d", __FUNCTION__, port->number); 370 dbg("%s - port %d", __func__, port->number);
371 371
372 if (!port->tty || !port->tty->termios) { 372 if (!port->tty || !port->tty->termios) {
373 dbg("%s - no tty structures", __FUNCTION__); 373 dbg("%s - no tty structures", __func__);
374 return; 374 return;
375 } 375 }
376 376
@@ -379,7 +379,7 @@ static void cp2101_get_termios (struct usb_serial_port *port)
379 if (baud) 379 if (baud)
380 baud = BAUD_RATE_GEN_FREQ / baud; 380 baud = BAUD_RATE_GEN_FREQ / baud;
381 381
382 dbg("%s - baud rate = %d", __FUNCTION__, baud); 382 dbg("%s - baud rate = %d", __func__, baud);
383 383
384 tty_encode_baud_rate(port->tty, baud, baud); 384 tty_encode_baud_rate(port->tty, baud, baud);
385 cflag = port->tty->termios->c_cflag; 385 cflag = port->tty->termios->c_cflag;
@@ -388,24 +388,24 @@ static void cp2101_get_termios (struct usb_serial_port *port)
388 cflag &= ~CSIZE; 388 cflag &= ~CSIZE;
389 switch(bits & BITS_DATA_MASK) { 389 switch(bits & BITS_DATA_MASK) {
390 case BITS_DATA_5: 390 case BITS_DATA_5:
391 dbg("%s - data bits = 5", __FUNCTION__); 391 dbg("%s - data bits = 5", __func__);
392 cflag |= CS5; 392 cflag |= CS5;
393 break; 393 break;
394 case BITS_DATA_6: 394 case BITS_DATA_6:
395 dbg("%s - data bits = 6", __FUNCTION__); 395 dbg("%s - data bits = 6", __func__);
396 cflag |= CS6; 396 cflag |= CS6;
397 break; 397 break;
398 case BITS_DATA_7: 398 case BITS_DATA_7:
399 dbg("%s - data bits = 7", __FUNCTION__); 399 dbg("%s - data bits = 7", __func__);
400 cflag |= CS7; 400 cflag |= CS7;
401 break; 401 break;
402 case BITS_DATA_8: 402 case BITS_DATA_8:
403 dbg("%s - data bits = 8", __FUNCTION__); 403 dbg("%s - data bits = 8", __func__);
404 cflag |= CS8; 404 cflag |= CS8;
405 break; 405 break;
406 case BITS_DATA_9: 406 case BITS_DATA_9:
407 dbg("%s - data bits = 9 (not supported, " 407 dbg("%s - data bits = 9 (not supported, "
408 "using 8 data bits)", __FUNCTION__); 408 "using 8 data bits)", __func__);
409 cflag |= CS8; 409 cflag |= CS8;
410 bits &= ~BITS_DATA_MASK; 410 bits &= ~BITS_DATA_MASK;
411 bits |= BITS_DATA_8; 411 bits |= BITS_DATA_8;
@@ -413,7 +413,7 @@ static void cp2101_get_termios (struct usb_serial_port *port)
413 break; 413 break;
414 default: 414 default:
415 dbg("%s - Unknown number of data bits, " 415 dbg("%s - Unknown number of data bits, "
416 "using 8", __FUNCTION__); 416 "using 8", __func__);
417 cflag |= CS8; 417 cflag |= CS8;
418 bits &= ~BITS_DATA_MASK; 418 bits &= ~BITS_DATA_MASK;
419 bits |= BITS_DATA_8; 419 bits |= BITS_DATA_8;
@@ -423,35 +423,35 @@ static void cp2101_get_termios (struct usb_serial_port *port)
423 423
424 switch(bits & BITS_PARITY_MASK) { 424 switch(bits & BITS_PARITY_MASK) {
425 case BITS_PARITY_NONE: 425 case BITS_PARITY_NONE:
426 dbg("%s - parity = NONE", __FUNCTION__); 426 dbg("%s - parity = NONE", __func__);
427 cflag &= ~PARENB; 427 cflag &= ~PARENB;
428 break; 428 break;
429 case BITS_PARITY_ODD: 429 case BITS_PARITY_ODD:
430 dbg("%s - parity = ODD", __FUNCTION__); 430 dbg("%s - parity = ODD", __func__);
431 cflag |= (PARENB|PARODD); 431 cflag |= (PARENB|PARODD);
432 break; 432 break;
433 case BITS_PARITY_EVEN: 433 case BITS_PARITY_EVEN:
434 dbg("%s - parity = EVEN", __FUNCTION__); 434 dbg("%s - parity = EVEN", __func__);
435 cflag &= ~PARODD; 435 cflag &= ~PARODD;
436 cflag |= PARENB; 436 cflag |= PARENB;
437 break; 437 break;
438 case BITS_PARITY_MARK: 438 case BITS_PARITY_MARK:
439 dbg("%s - parity = MARK (not supported, " 439 dbg("%s - parity = MARK (not supported, "
440 "disabling parity)", __FUNCTION__); 440 "disabling parity)", __func__);
441 cflag &= ~PARENB; 441 cflag &= ~PARENB;
442 bits &= ~BITS_PARITY_MASK; 442 bits &= ~BITS_PARITY_MASK;
443 cp2101_set_config(port, CP2101_BITS, &bits, 2); 443 cp2101_set_config(port, CP2101_BITS, &bits, 2);
444 break; 444 break;
445 case BITS_PARITY_SPACE: 445 case BITS_PARITY_SPACE:
446 dbg("%s - parity = SPACE (not supported, " 446 dbg("%s - parity = SPACE (not supported, "
447 "disabling parity)", __FUNCTION__); 447 "disabling parity)", __func__);
448 cflag &= ~PARENB; 448 cflag &= ~PARENB;
449 bits &= ~BITS_PARITY_MASK; 449 bits &= ~BITS_PARITY_MASK;
450 cp2101_set_config(port, CP2101_BITS, &bits, 2); 450 cp2101_set_config(port, CP2101_BITS, &bits, 2);
451 break; 451 break;
452 default: 452 default:
453 dbg("%s - Unknown parity mode, " 453 dbg("%s - Unknown parity mode, "
454 "disabling parity", __FUNCTION__); 454 "disabling parity", __func__);
455 cflag &= ~PARENB; 455 cflag &= ~PARENB;
456 bits &= ~BITS_PARITY_MASK; 456 bits &= ~BITS_PARITY_MASK;
457 cp2101_set_config(port, CP2101_BITS, &bits, 2); 457 cp2101_set_config(port, CP2101_BITS, &bits, 2);
@@ -461,21 +461,21 @@ static void cp2101_get_termios (struct usb_serial_port *port)
461 cflag &= ~CSTOPB; 461 cflag &= ~CSTOPB;
462 switch(bits & BITS_STOP_MASK) { 462 switch(bits & BITS_STOP_MASK) {
463 case BITS_STOP_1: 463 case BITS_STOP_1:
464 dbg("%s - stop bits = 1", __FUNCTION__); 464 dbg("%s - stop bits = 1", __func__);
465 break; 465 break;
466 case BITS_STOP_1_5: 466 case BITS_STOP_1_5:
467 dbg("%s - stop bits = 1.5 (not supported, " 467 dbg("%s - stop bits = 1.5 (not supported, "
468 "using 1 stop bit)", __FUNCTION__); 468 "using 1 stop bit)", __func__);
469 bits &= ~BITS_STOP_MASK; 469 bits &= ~BITS_STOP_MASK;
470 cp2101_set_config(port, CP2101_BITS, &bits, 2); 470 cp2101_set_config(port, CP2101_BITS, &bits, 2);
471 break; 471 break;
472 case BITS_STOP_2: 472 case BITS_STOP_2:
473 dbg("%s - stop bits = 2", __FUNCTION__); 473 dbg("%s - stop bits = 2", __func__);
474 cflag |= CSTOPB; 474 cflag |= CSTOPB;
475 break; 475 break;
476 default: 476 default:
477 dbg("%s - Unknown number of stop bits, " 477 dbg("%s - Unknown number of stop bits, "
478 "using 1 stop bit", __FUNCTION__); 478 "using 1 stop bit", __func__);
479 bits &= ~BITS_STOP_MASK; 479 bits &= ~BITS_STOP_MASK;
480 cp2101_set_config(port, CP2101_BITS, &bits, 2); 480 cp2101_set_config(port, CP2101_BITS, &bits, 2);
481 break; 481 break;
@@ -483,10 +483,10 @@ static void cp2101_get_termios (struct usb_serial_port *port)
483 483
484 cp2101_get_config(port, CP2101_MODEMCTL, modem_ctl, 16); 484 cp2101_get_config(port, CP2101_MODEMCTL, modem_ctl, 16);
485 if (modem_ctl[0] & 0x0008) { 485 if (modem_ctl[0] & 0x0008) {
486 dbg("%s - flow control = CRTSCTS", __FUNCTION__); 486 dbg("%s - flow control = CRTSCTS", __func__);
487 cflag |= CRTSCTS; 487 cflag |= CRTSCTS;
488 } else { 488 } else {
489 dbg("%s - flow control = NONE", __FUNCTION__); 489 dbg("%s - flow control = NONE", __func__);
490 cflag &= ~CRTSCTS; 490 cflag &= ~CRTSCTS;
491 } 491 }
492 492
@@ -500,10 +500,10 @@ static void cp2101_set_termios (struct usb_serial_port *port,
500 int baud=0, bits; 500 int baud=0, bits;
501 unsigned int modem_ctl[4]; 501 unsigned int modem_ctl[4];
502 502
503 dbg("%s - port %d", __FUNCTION__, port->number); 503 dbg("%s - port %d", __func__, port->number);
504 504
505 if (!port->tty || !port->tty->termios) { 505 if (!port->tty || !port->tty->termios) {
506 dbg("%s - no tty structures", __FUNCTION__); 506 dbg("%s - no tty structures", __func__);
507 return; 507 return;
508 } 508 }
509 port->tty->termios->c_cflag &= ~CMSPAR; 509 port->tty->termios->c_cflag &= ~CMSPAR;
@@ -542,7 +542,7 @@ static void cp2101_set_termios (struct usb_serial_port *port,
542 } 542 }
543 543
544 if (baud) { 544 if (baud) {
545 dbg("%s - Setting baud rate to %d baud", __FUNCTION__, 545 dbg("%s - Setting baud rate to %d baud", __func__,
546 baud); 546 baud);
547 if (cp2101_set_config_single(port, CP2101_BAUDRATE, 547 if (cp2101_set_config_single(port, CP2101_BAUDRATE,
548 (BAUD_RATE_GEN_FREQ / baud))) { 548 (BAUD_RATE_GEN_FREQ / baud))) {
@@ -562,23 +562,23 @@ static void cp2101_set_termios (struct usb_serial_port *port,
562 switch (cflag & CSIZE) { 562 switch (cflag & CSIZE) {
563 case CS5: 563 case CS5:
564 bits |= BITS_DATA_5; 564 bits |= BITS_DATA_5;
565 dbg("%s - data bits = 5", __FUNCTION__); 565 dbg("%s - data bits = 5", __func__);
566 break; 566 break;
567 case CS6: 567 case CS6:
568 bits |= BITS_DATA_6; 568 bits |= BITS_DATA_6;
569 dbg("%s - data bits = 6", __FUNCTION__); 569 dbg("%s - data bits = 6", __func__);
570 break; 570 break;
571 case CS7: 571 case CS7:
572 bits |= BITS_DATA_7; 572 bits |= BITS_DATA_7;
573 dbg("%s - data bits = 7", __FUNCTION__); 573 dbg("%s - data bits = 7", __func__);
574 break; 574 break;
575 case CS8: 575 case CS8:
576 bits |= BITS_DATA_8; 576 bits |= BITS_DATA_8;
577 dbg("%s - data bits = 8", __FUNCTION__); 577 dbg("%s - data bits = 8", __func__);
578 break; 578 break;
579 /*case CS9: 579 /*case CS9:
580 bits |= BITS_DATA_9; 580 bits |= BITS_DATA_9;
581 dbg("%s - data bits = 9", __FUNCTION__); 581 dbg("%s - data bits = 9", __func__);
582 break;*/ 582 break;*/
583 default: 583 default:
584 dev_err(&port->dev, "cp2101 driver does not " 584 dev_err(&port->dev, "cp2101 driver does not "
@@ -598,10 +598,10 @@ static void cp2101_set_termios (struct usb_serial_port *port,
598 if (cflag & PARENB) { 598 if (cflag & PARENB) {
599 if (cflag & PARODD) { 599 if (cflag & PARODD) {
600 bits |= BITS_PARITY_ODD; 600 bits |= BITS_PARITY_ODD;
601 dbg("%s - parity = ODD", __FUNCTION__); 601 dbg("%s - parity = ODD", __func__);
602 } else { 602 } else {
603 bits |= BITS_PARITY_EVEN; 603 bits |= BITS_PARITY_EVEN;
604 dbg("%s - parity = EVEN", __FUNCTION__); 604 dbg("%s - parity = EVEN", __func__);
605 } 605 }
606 } 606 }
607 if (cp2101_set_config(port, CP2101_BITS, &bits, 2)) 607 if (cp2101_set_config(port, CP2101_BITS, &bits, 2))
@@ -614,10 +614,10 @@ static void cp2101_set_termios (struct usb_serial_port *port,
614 bits &= ~BITS_STOP_MASK; 614 bits &= ~BITS_STOP_MASK;
615 if (cflag & CSTOPB) { 615 if (cflag & CSTOPB) {
616 bits |= BITS_STOP_2; 616 bits |= BITS_STOP_2;
617 dbg("%s - stop bits = 2", __FUNCTION__); 617 dbg("%s - stop bits = 2", __func__);
618 } else { 618 } else {
619 bits |= BITS_STOP_1; 619 bits |= BITS_STOP_1;
620 dbg("%s - stop bits = 1", __FUNCTION__); 620 dbg("%s - stop bits = 1", __func__);
621 } 621 }
622 if (cp2101_set_config(port, CP2101_BITS, &bits, 2)) 622 if (cp2101_set_config(port, CP2101_BITS, &bits, 2))
623 dev_err(&port->dev, "Number of stop bits requested " 623 dev_err(&port->dev, "Number of stop bits requested "
@@ -627,23 +627,23 @@ static void cp2101_set_termios (struct usb_serial_port *port,
627 if ((cflag & CRTSCTS) != (old_cflag & CRTSCTS)) { 627 if ((cflag & CRTSCTS) != (old_cflag & CRTSCTS)) {
628 cp2101_get_config(port, CP2101_MODEMCTL, modem_ctl, 16); 628 cp2101_get_config(port, CP2101_MODEMCTL, modem_ctl, 16);
629 dbg("%s - read modem controls = 0x%.4x 0x%.4x 0x%.4x 0x%.4x", 629 dbg("%s - read modem controls = 0x%.4x 0x%.4x 0x%.4x 0x%.4x",
630 __FUNCTION__, modem_ctl[0], modem_ctl[1], 630 __func__, modem_ctl[0], modem_ctl[1],
631 modem_ctl[2], modem_ctl[3]); 631 modem_ctl[2], modem_ctl[3]);
632 632
633 if (cflag & CRTSCTS) { 633 if (cflag & CRTSCTS) {
634 modem_ctl[0] &= ~0x7B; 634 modem_ctl[0] &= ~0x7B;
635 modem_ctl[0] |= 0x09; 635 modem_ctl[0] |= 0x09;
636 modem_ctl[1] = 0x80; 636 modem_ctl[1] = 0x80;
637 dbg("%s - flow control = CRTSCTS", __FUNCTION__); 637 dbg("%s - flow control = CRTSCTS", __func__);
638 } else { 638 } else {
639 modem_ctl[0] &= ~0x7B; 639 modem_ctl[0] &= ~0x7B;
640 modem_ctl[0] |= 0x01; 640 modem_ctl[0] |= 0x01;
641 modem_ctl[1] |= 0x40; 641 modem_ctl[1] |= 0x40;
642 dbg("%s - flow control = NONE", __FUNCTION__); 642 dbg("%s - flow control = NONE", __func__);
643 } 643 }
644 644
645 dbg("%s - write modem controls = 0x%.4x 0x%.4x 0x%.4x 0x%.4x", 645 dbg("%s - write modem controls = 0x%.4x 0x%.4x 0x%.4x 0x%.4x",
646 __FUNCTION__, modem_ctl[0], modem_ctl[1], 646 __func__, modem_ctl[0], modem_ctl[1],
647 modem_ctl[2], modem_ctl[3]); 647 modem_ctl[2], modem_ctl[3]);
648 cp2101_set_config(port, CP2101_MODEMCTL, modem_ctl, 16); 648 cp2101_set_config(port, CP2101_MODEMCTL, modem_ctl, 16);
649 } 649 }
@@ -655,7 +655,7 @@ static int cp2101_tiocmset (struct usb_serial_port *port, struct file *file,
655{ 655{
656 int control = 0; 656 int control = 0;
657 657
658 dbg("%s - port %d", __FUNCTION__, port->number); 658 dbg("%s - port %d", __func__, port->number);
659 659
660 if (set & TIOCM_RTS) { 660 if (set & TIOCM_RTS) {
661 control |= CONTROL_RTS; 661 control |= CONTROL_RTS;
@@ -674,7 +674,7 @@ static int cp2101_tiocmset (struct usb_serial_port *port, struct file *file,
674 control |= CONTROL_WRITE_DTR; 674 control |= CONTROL_WRITE_DTR;
675 } 675 }
676 676
677 dbg("%s - control = 0x%.4x", __FUNCTION__, control); 677 dbg("%s - control = 0x%.4x", __func__, control);
678 678
679 return cp2101_set_config(port, CP2101_CONTROL, &control, 2); 679 return cp2101_set_config(port, CP2101_CONTROL, &control, 2);
680 680
@@ -684,7 +684,7 @@ static int cp2101_tiocmget (struct usb_serial_port *port, struct file *file)
684{ 684{
685 int control, result; 685 int control, result;
686 686
687 dbg("%s - port %d", __FUNCTION__, port->number); 687 dbg("%s - port %d", __func__, port->number);
688 688
689 cp2101_get_config(port, CP2101_CONTROL, &control, 1); 689 cp2101_get_config(port, CP2101_CONTROL, &control, 1);
690 690
@@ -695,7 +695,7 @@ static int cp2101_tiocmget (struct usb_serial_port *port, struct file *file)
695 |((control & CONTROL_RING)? TIOCM_RI : 0) 695 |((control & CONTROL_RING)? TIOCM_RI : 0)
696 |((control & CONTROL_DCD) ? TIOCM_CD : 0); 696 |((control & CONTROL_DCD) ? TIOCM_CD : 0);
697 697
698 dbg("%s - control = 0x%.2x", __FUNCTION__, control); 698 dbg("%s - control = 0x%.2x", __func__, control);
699 699
700 return result; 700 return result;
701} 701}
@@ -704,12 +704,12 @@ static void cp2101_break_ctl (struct usb_serial_port *port, int break_state)
704{ 704{
705 int state; 705 int state;
706 706
707 dbg("%s - port %d", __FUNCTION__, port->number); 707 dbg("%s - port %d", __func__, port->number);
708 if (break_state == 0) 708 if (break_state == 0)
709 state = BREAK_OFF; 709 state = BREAK_OFF;
710 else 710 else
711 state = BREAK_ON; 711 state = BREAK_ON;
712 dbg("%s - turning break %s", __FUNCTION__, 712 dbg("%s - turning break %s", __func__,
713 state==BREAK_OFF ? "off" : "on"); 713 state==BREAK_OFF ? "off" : "on");
714 cp2101_set_config(port, CP2101_BREAK, &state, 2); 714 cp2101_set_config(port, CP2101_BREAK, &state, 2);
715} 715}
@@ -725,7 +725,7 @@ static void cp2101_shutdown (struct usb_serial *serial)
725{ 725{
726 int i; 726 int i;
727 727
728 dbg("%s", __FUNCTION__); 728 dbg("%s", __func__);
729 729
730 /* Stop reads and writes on all ports */ 730 /* Stop reads and writes on all ports */
731 for (i=0; i < serial->num_ports; ++i) { 731 for (i=0; i < serial->num_ports; ++i) {
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
index cbae876cd678..5348e97b52b5 100644
--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
@@ -116,7 +116,7 @@ static int cyberjack_startup (struct usb_serial *serial)
116 struct cyberjack_private *priv; 116 struct cyberjack_private *priv;
117 int i; 117 int i;
118 118
119 dbg("%s", __FUNCTION__); 119 dbg("%s", __func__);
120 120
121 /* allocate the private data structure */ 121 /* allocate the private data structure */
122 priv = kmalloc(sizeof(struct cyberjack_private), GFP_KERNEL); 122 priv = kmalloc(sizeof(struct cyberjack_private), GFP_KERNEL);
@@ -139,7 +139,7 @@ static int cyberjack_startup (struct usb_serial *serial)
139 GFP_KERNEL); 139 GFP_KERNEL);
140 if (result) 140 if (result)
141 err(" usb_submit_urb(read int) failed"); 141 err(" usb_submit_urb(read int) failed");
142 dbg("%s - usb_submit_urb(int urb)", __FUNCTION__); 142 dbg("%s - usb_submit_urb(int urb)", __func__);
143 } 143 }
144 144
145 return( 0 ); 145 return( 0 );
@@ -149,7 +149,7 @@ static void cyberjack_shutdown (struct usb_serial *serial)
149{ 149{
150 int i; 150 int i;
151 151
152 dbg("%s", __FUNCTION__); 152 dbg("%s", __func__);
153 153
154 for (i=0; i < serial->num_ports; ++i) { 154 for (i=0; i < serial->num_ports; ++i) {
155 usb_kill_urb(serial->port[i]->interrupt_in_urb); 155 usb_kill_urb(serial->port[i]->interrupt_in_urb);
@@ -165,9 +165,9 @@ static int cyberjack_open (struct usb_serial_port *port, struct file *filp)
165 unsigned long flags; 165 unsigned long flags;
166 int result = 0; 166 int result = 0;
167 167
168 dbg("%s - port %d", __FUNCTION__, port->number); 168 dbg("%s - port %d", __func__, port->number);
169 169
170 dbg("%s - usb_clear_halt", __FUNCTION__ ); 170 dbg("%s - usb_clear_halt", __func__ );
171 usb_clear_halt(port->serial->dev, port->write_urb->pipe); 171 usb_clear_halt(port->serial->dev, port->write_urb->pipe);
172 172
173 /* force low_latency on so that our tty_push actually forces 173 /* force low_latency on so that our tty_push actually forces
@@ -188,7 +188,7 @@ static int cyberjack_open (struct usb_serial_port *port, struct file *filp)
188 188
189static void cyberjack_close (struct usb_serial_port *port, struct file *filp) 189static void cyberjack_close (struct usb_serial_port *port, struct file *filp)
190{ 190{
191 dbg("%s - port %d", __FUNCTION__, port->number); 191 dbg("%s - port %d", __func__, port->number);
192 192
193 if (port->serial->dev) { 193 if (port->serial->dev) {
194 /* shutdown any bulk reads that might be going on */ 194 /* shutdown any bulk reads that might be going on */
@@ -205,17 +205,17 @@ static int cyberjack_write (struct usb_serial_port *port, const unsigned char *b
205 int result; 205 int result;
206 int wrexpected; 206 int wrexpected;
207 207
208 dbg("%s - port %d", __FUNCTION__, port->number); 208 dbg("%s - port %d", __func__, port->number);
209 209
210 if (count == 0) { 210 if (count == 0) {
211 dbg("%s - write request of 0 bytes", __FUNCTION__); 211 dbg("%s - write request of 0 bytes", __func__);
212 return (0); 212 return (0);
213 } 213 }
214 214
215 spin_lock_bh(&port->lock); 215 spin_lock_bh(&port->lock);
216 if (port->write_urb_busy) { 216 if (port->write_urb_busy) {
217 spin_unlock_bh(&port->lock); 217 spin_unlock_bh(&port->lock);
218 dbg("%s - already writing", __FUNCTION__); 218 dbg("%s - already writing", __func__);
219 return 0; 219 return 0;
220 } 220 }
221 port->write_urb_busy = 1; 221 port->write_urb_busy = 1;
@@ -234,13 +234,13 @@ static int cyberjack_write (struct usb_serial_port *port, const unsigned char *b
234 /* Copy data */ 234 /* Copy data */
235 memcpy (priv->wrbuf+priv->wrfilled, buf, count); 235 memcpy (priv->wrbuf+priv->wrfilled, buf, count);
236 236
237 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, 237 usb_serial_debug_data(debug, &port->dev, __func__, count,
238 priv->wrbuf+priv->wrfilled); 238 priv->wrbuf+priv->wrfilled);
239 priv->wrfilled += count; 239 priv->wrfilled += count;
240 240
241 if( priv->wrfilled >= 3 ) { 241 if( priv->wrfilled >= 3 ) {
242 wrexpected = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3; 242 wrexpected = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3;
243 dbg("%s - expected data: %d", __FUNCTION__, wrexpected); 243 dbg("%s - expected data: %d", __func__, wrexpected);
244 } else { 244 } else {
245 wrexpected = sizeof(priv->wrbuf); 245 wrexpected = sizeof(priv->wrbuf);
246 } 246 }
@@ -249,7 +249,7 @@ static int cyberjack_write (struct usb_serial_port *port, const unsigned char *b
249 /* We have enough data to begin transmission */ 249 /* We have enough data to begin transmission */
250 int length; 250 int length;
251 251
252 dbg("%s - transmitting data (frame 1)", __FUNCTION__); 252 dbg("%s - transmitting data (frame 1)", __func__);
253 length = (wrexpected > port->bulk_out_size) ? port->bulk_out_size : wrexpected; 253 length = (wrexpected > port->bulk_out_size) ? port->bulk_out_size : wrexpected;
254 254
255 memcpy (port->write_urb->transfer_buffer, priv->wrbuf, length ); 255 memcpy (port->write_urb->transfer_buffer, priv->wrbuf, length );
@@ -267,7 +267,7 @@ static int cyberjack_write (struct usb_serial_port *port, const unsigned char *b
267 /* send the data out the bulk port */ 267 /* send the data out the bulk port */
268 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 268 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
269 if (result) { 269 if (result) {
270 err("%s - failed submitting write urb, error %d", __FUNCTION__, result); 270 err("%s - failed submitting write urb, error %d", __func__, result);
271 /* Throw away data. No better idea what to do with it. */ 271 /* Throw away data. No better idea what to do with it. */
272 priv->wrfilled=0; 272 priv->wrfilled=0;
273 priv->wrsent=0; 273 priv->wrsent=0;
@@ -276,11 +276,11 @@ static int cyberjack_write (struct usb_serial_port *port, const unsigned char *b
276 return 0; 276 return 0;
277 } 277 }
278 278
279 dbg("%s - priv->wrsent=%d", __FUNCTION__,priv->wrsent); 279 dbg("%s - priv->wrsent=%d", __func__,priv->wrsent);
280 dbg("%s - priv->wrfilled=%d", __FUNCTION__,priv->wrfilled); 280 dbg("%s - priv->wrfilled=%d", __func__,priv->wrfilled);
281 281
282 if( priv->wrsent>=priv->wrfilled ) { 282 if( priv->wrsent>=priv->wrfilled ) {
283 dbg("%s - buffer cleaned", __FUNCTION__); 283 dbg("%s - buffer cleaned", __func__);
284 memset( priv->wrbuf, 0, sizeof(priv->wrbuf) ); 284 memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
285 priv->wrfilled=0; 285 priv->wrfilled=0;
286 priv->wrsent=0; 286 priv->wrsent=0;
@@ -305,13 +305,13 @@ static void cyberjack_read_int_callback( struct urb *urb )
305 int status = urb->status; 305 int status = urb->status;
306 int result; 306 int result;
307 307
308 dbg("%s - port %d", __FUNCTION__, port->number); 308 dbg("%s - port %d", __func__, port->number);
309 309
310 /* the urb might have been killed. */ 310 /* the urb might have been killed. */
311 if (status) 311 if (status)
312 return; 312 return;
313 313
314 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 314 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
315 315
316 /* React only to interrupts signaling a bulk_in transfer */ 316 /* React only to interrupts signaling a bulk_in transfer */
317 if( (urb->actual_length==4) && (data[0]==0x01) ) { 317 if( (urb->actual_length==4) && (data[0]==0x01) ) {
@@ -333,7 +333,7 @@ static void cyberjack_read_int_callback( struct urb *urb )
333 /* "+=" is probably more fault tollerant than "=" */ 333 /* "+=" is probably more fault tollerant than "=" */
334 priv->rdtodo += size; 334 priv->rdtodo += size;
335 335
336 dbg("%s - rdtodo: %d", __FUNCTION__, priv->rdtodo); 336 dbg("%s - rdtodo: %d", __func__, priv->rdtodo);
337 337
338 spin_unlock(&priv->lock); 338 spin_unlock(&priv->lock);
339 339
@@ -341,8 +341,8 @@ static void cyberjack_read_int_callback( struct urb *urb )
341 port->read_urb->dev = port->serial->dev; 341 port->read_urb->dev = port->serial->dev;
342 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 342 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
343 if( result ) 343 if( result )
344 err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); 344 err("%s - failed resubmitting read urb, error %d", __func__, result);
345 dbg("%s - usb_submit_urb(read urb)", __FUNCTION__); 345 dbg("%s - usb_submit_urb(read urb)", __func__);
346 } 346 }
347 } 347 }
348 348
@@ -351,7 +351,7 @@ resubmit:
351 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); 351 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
352 if (result) 352 if (result)
353 err(" usb_submit_urb(read int) failed"); 353 err(" usb_submit_urb(read int) failed");
354 dbg("%s - usb_submit_urb(int urb)", __FUNCTION__); 354 dbg("%s - usb_submit_urb(int urb)", __func__);
355} 355}
356 356
357static void cyberjack_read_bulk_callback (struct urb *urb) 357static void cyberjack_read_bulk_callback (struct urb *urb)
@@ -364,18 +364,18 @@ static void cyberjack_read_bulk_callback (struct urb *urb)
364 int result; 364 int result;
365 int status = urb->status; 365 int status = urb->status;
366 366
367 dbg("%s - port %d", __FUNCTION__, port->number); 367 dbg("%s - port %d", __func__, port->number);
368 368
369 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 369 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
370 if (status) { 370 if (status) {
371 dbg("%s - nonzero read bulk status received: %d", 371 dbg("%s - nonzero read bulk status received: %d",
372 __FUNCTION__, status); 372 __func__, status);
373 return; 373 return;
374 } 374 }
375 375
376 tty = port->tty; 376 tty = port->tty;
377 if (!tty) { 377 if (!tty) {
378 dbg("%s - ignoring since device not open\n", __FUNCTION__); 378 dbg("%s - ignoring since device not open\n", __func__);
379 return; 379 return;
380 } 380 }
381 if (urb->actual_length) { 381 if (urb->actual_length) {
@@ -394,15 +394,15 @@ static void cyberjack_read_bulk_callback (struct urb *urb)
394 394
395 spin_unlock(&priv->lock); 395 spin_unlock(&priv->lock);
396 396
397 dbg("%s - rdtodo: %d", __FUNCTION__, todo); 397 dbg("%s - rdtodo: %d", __func__, todo);
398 398
399 /* Continue to read if we have still urbs to do. */ 399 /* Continue to read if we have still urbs to do. */
400 if( todo /* || (urb->actual_length==port->bulk_in_endpointAddress)*/ ) { 400 if( todo /* || (urb->actual_length==port->bulk_in_endpointAddress)*/ ) {
401 port->read_urb->dev = port->serial->dev; 401 port->read_urb->dev = port->serial->dev;
402 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 402 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
403 if (result) 403 if (result)
404 err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); 404 err("%s - failed resubmitting read urb, error %d", __func__, result);
405 dbg("%s - usb_submit_urb(read urb)", __FUNCTION__); 405 dbg("%s - usb_submit_urb(read urb)", __func__);
406 } 406 }
407} 407}
408 408
@@ -412,12 +412,12 @@ static void cyberjack_write_bulk_callback (struct urb *urb)
412 struct cyberjack_private *priv = usb_get_serial_port_data(port); 412 struct cyberjack_private *priv = usb_get_serial_port_data(port);
413 int status = urb->status; 413 int status = urb->status;
414 414
415 dbg("%s - port %d", __FUNCTION__, port->number); 415 dbg("%s - port %d", __func__, port->number);
416 416
417 port->write_urb_busy = 0; 417 port->write_urb_busy = 0;
418 if (status) { 418 if (status) {
419 dbg("%s - nonzero write bulk status received: %d", 419 dbg("%s - nonzero write bulk status received: %d",
420 __FUNCTION__, status); 420 __func__, status);
421 return; 421 return;
422 } 422 }
423 423
@@ -427,7 +427,7 @@ static void cyberjack_write_bulk_callback (struct urb *urb)
427 if( priv->wrfilled ) { 427 if( priv->wrfilled ) {
428 int length, blksize, result; 428 int length, blksize, result;
429 429
430 dbg("%s - transmitting data (frame n)", __FUNCTION__); 430 dbg("%s - transmitting data (frame n)", __func__);
431 431
432 length = ((priv->wrfilled - priv->wrsent) > port->bulk_out_size) ? 432 length = ((priv->wrfilled - priv->wrsent) > port->bulk_out_size) ?
433 port->bulk_out_size : (priv->wrfilled - priv->wrsent); 433 port->bulk_out_size : (priv->wrfilled - priv->wrsent);
@@ -448,20 +448,20 @@ static void cyberjack_write_bulk_callback (struct urb *urb)
448 /* send the data out the bulk port */ 448 /* send the data out the bulk port */
449 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 449 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
450 if (result) { 450 if (result) {
451 err("%s - failed submitting write urb, error %d", __FUNCTION__, result); 451 err("%s - failed submitting write urb, error %d", __func__, result);
452 /* Throw away data. No better idea what to do with it. */ 452 /* Throw away data. No better idea what to do with it. */
453 priv->wrfilled=0; 453 priv->wrfilled=0;
454 priv->wrsent=0; 454 priv->wrsent=0;
455 goto exit; 455 goto exit;
456 } 456 }
457 457
458 dbg("%s - priv->wrsent=%d", __FUNCTION__,priv->wrsent); 458 dbg("%s - priv->wrsent=%d", __func__,priv->wrsent);
459 dbg("%s - priv->wrfilled=%d", __FUNCTION__,priv->wrfilled); 459 dbg("%s - priv->wrfilled=%d", __func__,priv->wrfilled);
460 460
461 blksize = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3; 461 blksize = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3;
462 462
463 if( (priv->wrsent>=priv->wrfilled) || (priv->wrsent>=blksize) ) { 463 if( (priv->wrsent>=priv->wrfilled) || (priv->wrsent>=blksize) ) {
464 dbg("%s - buffer cleaned", __FUNCTION__); 464 dbg("%s - buffer cleaned", __func__);
465 memset( priv->wrbuf, 0, sizeof(priv->wrbuf) ); 465 memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
466 priv->wrfilled=0; 466 priv->wrfilled=0;
467 priv->wrsent=0; 467 priv->wrsent=0;
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index d8304eaf34c4..01dfc0afc654 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -330,7 +330,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra
330 __u8 feature_buffer[5]; 330 __u8 feature_buffer[5];
331 unsigned long flags; 331 unsigned long flags;
332 332
333 dbg("%s", __FUNCTION__); 333 dbg("%s", __func__);
334 334
335 priv = usb_get_serial_port_data(port); 335 priv = usb_get_serial_port_data(port);
336 336
@@ -345,7 +345,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra
345 new_baudrate = priv->baud_rate; 345 new_baudrate = priv->baud_rate;
346 /* Change of speed ? */ 346 /* Change of speed ? */
347 else if (baud_rate != priv->baud_rate) { 347 else if (baud_rate != priv->baud_rate) {
348 dbg("%s - baud rate is changing", __FUNCTION__); 348 dbg("%s - baud rate is changing", __func__);
349 retval = analyze_baud_rate(port, baud_rate); 349 retval = analyze_baud_rate(port, baud_rate);
350 if (retval >= 0) { 350 if (retval >= 0) {
351 new_baudrate = retval; 351 new_baudrate = retval;
@@ -353,7 +353,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra
353 __func__, new_baudrate); 353 __func__, new_baudrate);
354 } 354 }
355 } 355 }
356 dbg("%s - baud rate is being sent as %d", __FUNCTION__, new_baudrate); 356 dbg("%s - baud rate is being sent as %d", __func__, new_baudrate);
357 357
358 memset(feature_buffer, 0, sizeof(feature_buffer)); 358 memset(feature_buffer, 0, sizeof(feature_buffer));
359 /* fill the feature_buffer with new configuration */ 359 /* fill the feature_buffer with new configuration */
@@ -367,8 +367,8 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra
367 /* 1 bit gap */ 367 /* 1 bit gap */
368 feature_buffer[4] |= (reset << 7); /* assign reset at end of byte, 1 bit space */ 368 feature_buffer[4] |= (reset << 7); /* assign reset at end of byte, 1 bit space */
369 369
370 dbg("%s - device is being sent this feature report:", __FUNCTION__); 370 dbg("%s - device is being sent this feature report:", __func__);
371 dbg("%s - %02X - %02X - %02X - %02X - %02X", __FUNCTION__, feature_buffer[0], feature_buffer[1], 371 dbg("%s - %02X - %02X - %02X - %02X - %02X", __func__, feature_buffer[0], feature_buffer[1],
372 feature_buffer[2], feature_buffer[3], feature_buffer[4]); 372 feature_buffer[2], feature_buffer[3], feature_buffer[4]);
373 373
374 do { 374 do {
@@ -386,7 +386,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra
386 retval != -ENODEV); 386 retval != -ENODEV);
387 387
388 if (retval != sizeof(feature_buffer)) { 388 if (retval != sizeof(feature_buffer)) {
389 err("%s - failed sending serial line settings - %d", __FUNCTION__, retval); 389 err("%s - failed sending serial line settings - %d", __func__, retval);
390 cypress_set_dead(port); 390 cypress_set_dead(port);
391 } else { 391 } else {
392 spin_lock_irqsave(&priv->lock, flags); 392 spin_lock_irqsave(&priv->lock, flags);
@@ -406,7 +406,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra
406 to crash the hardware. */ 406 to crash the hardware. */
407 return -ENOTTY; 407 return -ENOTTY;
408 } 408 }
409 dbg("%s - retreiving serial line settings", __FUNCTION__); 409 dbg("%s - retreiving serial line settings", __func__);
410 /* set initial values in feature buffer */ 410 /* set initial values in feature buffer */
411 memset(feature_buffer, 0, sizeof(feature_buffer)); 411 memset(feature_buffer, 0, sizeof(feature_buffer));
412 412
@@ -425,7 +425,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra
425 retval != -ENODEV); 425 retval != -ENODEV);
426 426
427 if (retval != sizeof(feature_buffer)) { 427 if (retval != sizeof(feature_buffer)) {
428 err("%s - failed to retrieve serial line settings - %d", __FUNCTION__, retval); 428 err("%s - failed to retrieve serial line settings - %d", __func__, retval);
429 cypress_set_dead(port); 429 cypress_set_dead(port);
430 return retval; 430 return retval;
431 } else { 431 } else {
@@ -473,7 +473,7 @@ static int generic_startup (struct usb_serial *serial)
473 struct cypress_private *priv; 473 struct cypress_private *priv;
474 struct usb_serial_port *port = serial->port[0]; 474 struct usb_serial_port *port = serial->port[0];
475 475
476 dbg("%s - port %d", __FUNCTION__, port->number); 476 dbg("%s - port %d", __func__, port->number);
477 477
478 priv = kzalloc(sizeof (struct cypress_private), GFP_KERNEL); 478 priv = kzalloc(sizeof (struct cypress_private), GFP_KERNEL);
479 if (!priv) 479 if (!priv)
@@ -509,12 +509,12 @@ static int generic_startup (struct usb_serial *serial)
509 priv->write_urb_interval = interval; 509 priv->write_urb_interval = interval;
510 priv->read_urb_interval = interval; 510 priv->read_urb_interval = interval;
511 dbg("%s - port %d read & write intervals forced to %d", 511 dbg("%s - port %d read & write intervals forced to %d",
512 __FUNCTION__,port->number,interval); 512 __func__,port->number,interval);
513 } else { 513 } else {
514 priv->write_urb_interval = port->interrupt_out_urb->interval; 514 priv->write_urb_interval = port->interrupt_out_urb->interval;
515 priv->read_urb_interval = port->interrupt_in_urb->interval; 515 priv->read_urb_interval = port->interrupt_in_urb->interval;
516 dbg("%s - port %d intervals: read=%d write=%d", 516 dbg("%s - port %d intervals: read=%d write=%d",
517 __FUNCTION__,port->number, 517 __func__,port->number,
518 priv->read_urb_interval,priv->write_urb_interval); 518 priv->read_urb_interval,priv->write_urb_interval);
519 } 519 }
520 usb_set_serial_port_data(port, priv); 520 usb_set_serial_port_data(port, priv);
@@ -528,10 +528,10 @@ static int cypress_earthmate_startup (struct usb_serial *serial)
528 struct cypress_private *priv; 528 struct cypress_private *priv;
529 struct usb_serial_port *port = serial->port[0]; 529 struct usb_serial_port *port = serial->port[0];
530 530
531 dbg("%s", __FUNCTION__); 531 dbg("%s", __func__);
532 532
533 if (generic_startup(serial)) { 533 if (generic_startup(serial)) {
534 dbg("%s - Failed setting up port %d", __FUNCTION__, 534 dbg("%s - Failed setting up port %d", __func__,
535 port->number); 535 port->number);
536 return 1; 536 return 1;
537 } 537 }
@@ -559,10 +559,10 @@ static int cypress_hidcom_startup (struct usb_serial *serial)
559{ 559{
560 struct cypress_private *priv; 560 struct cypress_private *priv;
561 561
562 dbg("%s", __FUNCTION__); 562 dbg("%s", __func__);
563 563
564 if (generic_startup(serial)) { 564 if (generic_startup(serial)) {
565 dbg("%s - Failed setting up port %d", __FUNCTION__, 565 dbg("%s - Failed setting up port %d", __func__,
566 serial->port[0]->number); 566 serial->port[0]->number);
567 return 1; 567 return 1;
568 } 568 }
@@ -578,10 +578,10 @@ static int cypress_ca42v2_startup (struct usb_serial *serial)
578{ 578{
579 struct cypress_private *priv; 579 struct cypress_private *priv;
580 580
581 dbg("%s", __FUNCTION__); 581 dbg("%s", __func__);
582 582
583 if (generic_startup(serial)) { 583 if (generic_startup(serial)) {
584 dbg("%s - Failed setting up port %d", __FUNCTION__, 584 dbg("%s - Failed setting up port %d", __func__,
585 serial->port[0]->number); 585 serial->port[0]->number);
586 return 1; 586 return 1;
587 } 587 }
@@ -597,7 +597,7 @@ static void cypress_shutdown (struct usb_serial *serial)
597{ 597{
598 struct cypress_private *priv; 598 struct cypress_private *priv;
599 599
600 dbg ("%s - port %d", __FUNCTION__, serial->port[0]->number); 600 dbg ("%s - port %d", __func__, serial->port[0]->number);
601 601
602 /* all open ports are closed at this point */ 602 /* all open ports are closed at this point */
603 603
@@ -618,7 +618,7 @@ static int cypress_open (struct usb_serial_port *port, struct file *filp)
618 unsigned long flags; 618 unsigned long flags;
619 int result = 0; 619 int result = 0;
620 620
621 dbg("%s - port %d", __FUNCTION__, port->number); 621 dbg("%s - port %d", __func__, port->number);
622 622
623 if (!priv->comm_is_ok) 623 if (!priv->comm_is_ok)
624 return -EIO; 624 return -EIO;
@@ -646,16 +646,16 @@ static int cypress_open (struct usb_serial_port *port, struct file *filp)
646 result = cypress_write(port, NULL, 0); 646 result = cypress_write(port, NULL, 0);
647 647
648 if (result) { 648 if (result) {
649 dev_err(&port->dev, "%s - failed setting the control lines - error %d\n", __FUNCTION__, result); 649 dev_err(&port->dev, "%s - failed setting the control lines - error %d\n", __func__, result);
650 return result; 650 return result;
651 } else 651 } else
652 dbg("%s - success setting the control lines", __FUNCTION__); 652 dbg("%s - success setting the control lines", __func__);
653 653
654 cypress_set_termios(port, &priv->tmp_termios); 654 cypress_set_termios(port, &priv->tmp_termios);
655 655
656 /* setup the port and start reading from the device */ 656 /* setup the port and start reading from the device */
657 if(!port->interrupt_in_urb){ 657 if(!port->interrupt_in_urb){
658 err("%s - interrupt_in_urb is empty!", __FUNCTION__); 658 err("%s - interrupt_in_urb is empty!", __func__);
659 return(-1); 659 return(-1);
660 } 660 }
661 661
@@ -666,7 +666,7 @@ static int cypress_open (struct usb_serial_port *port, struct file *filp)
666 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 666 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
667 667
668 if (result){ 668 if (result){
669 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result); 669 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __func__, result);
670 cypress_set_dead(port); 670 cypress_set_dead(port);
671 } 671 }
672 672
@@ -682,7 +682,7 @@ static void cypress_close(struct usb_serial_port *port, struct file * filp)
682 long timeout; 682 long timeout;
683 wait_queue_t wait; 683 wait_queue_t wait;
684 684
685 dbg("%s - port %d", __FUNCTION__, port->number); 685 dbg("%s - port %d", __func__, port->number);
686 686
687 /* wait for data to drain from buffer */ 687 /* wait for data to drain from buffer */
688 spin_lock_irq(&priv->lock); 688 spin_lock_irq(&priv->lock);
@@ -720,7 +720,7 @@ static void cypress_close(struct usb_serial_port *port, struct file * filp)
720 timeout = 2*HZ; 720 timeout = 2*HZ;
721 schedule_timeout_interruptible(timeout); 721 schedule_timeout_interruptible(timeout);
722 722
723 dbg("%s - stopping urbs", __FUNCTION__); 723 dbg("%s - stopping urbs", __func__);
724 usb_kill_urb (port->interrupt_in_urb); 724 usb_kill_urb (port->interrupt_in_urb);
725 usb_kill_urb (port->interrupt_out_urb); 725 usb_kill_urb (port->interrupt_out_urb);
726 726
@@ -749,7 +749,7 @@ static int cypress_write(struct usb_serial_port *port, const unsigned char *buf,
749 struct cypress_private *priv = usb_get_serial_port_data(port); 749 struct cypress_private *priv = usb_get_serial_port_data(port);
750 unsigned long flags; 750 unsigned long flags;
751 751
752 dbg("%s - port %d, %d bytes", __FUNCTION__, port->number, count); 752 dbg("%s - port %d, %d bytes", __func__, port->number, count);
753 753
754 /* line control commands, which need to be executed immediately, 754 /* line control commands, which need to be executed immediately,
755 are not put into the buffer for obvious reasons. 755 are not put into the buffer for obvious reasons.
@@ -782,12 +782,12 @@ static void cypress_send(struct usb_serial_port *port)
782 if (!priv->comm_is_ok) 782 if (!priv->comm_is_ok)
783 return; 783 return;
784 784
785 dbg("%s - port %d", __FUNCTION__, port->number); 785 dbg("%s - port %d", __func__, port->number);
786 dbg("%s - interrupt out size is %d", __FUNCTION__, port->interrupt_out_size); 786 dbg("%s - interrupt out size is %d", __func__, port->interrupt_out_size);
787 787
788 spin_lock_irqsave(&priv->lock, flags); 788 spin_lock_irqsave(&priv->lock, flags);
789 if (priv->write_urb_in_use) { 789 if (priv->write_urb_in_use) {
790 dbg("%s - can't write, urb in use", __FUNCTION__); 790 dbg("%s - can't write, urb in use", __func__);
791 spin_unlock_irqrestore(&priv->lock, flags); 791 spin_unlock_irqrestore(&priv->lock, flags);
792 return; 792 return;
793 } 793 }
@@ -816,7 +816,7 @@ static void cypress_send(struct usb_serial_port *port)
816 816
817 if (priv->cmd_ctrl) { 817 if (priv->cmd_ctrl) {
818 priv->cmd_count++; 818 priv->cmd_count++;
819 dbg("%s - line control command being issued", __FUNCTION__); 819 dbg("%s - line control command being issued", __func__);
820 spin_unlock_irqrestore(&priv->lock, flags); 820 spin_unlock_irqrestore(&priv->lock, flags);
821 goto send; 821 goto send;
822 } else 822 } else
@@ -838,7 +838,7 @@ static void cypress_send(struct usb_serial_port *port)
838 port->interrupt_out_buffer[0] |= count; 838 port->interrupt_out_buffer[0] |= count;
839 } 839 }
840 840
841 dbg("%s - count is %d", __FUNCTION__, count); 841 dbg("%s - count is %d", __func__, count);
842 842
843send: 843send:
844 spin_lock_irqsave(&priv->lock, flags); 844 spin_lock_irqsave(&priv->lock, flags);
@@ -851,7 +851,7 @@ send:
851 actual_size = count + 851 actual_size = count +
852 (priv->pkt_fmt == packet_format_1 ? 2 : 1); 852 (priv->pkt_fmt == packet_format_1 ? 2 : 1);
853 853
854 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, port->interrupt_out_size, 854 usb_serial_debug_data(debug, &port->dev, __func__, port->interrupt_out_size,
855 port->interrupt_out_urb->transfer_buffer); 855 port->interrupt_out_urb->transfer_buffer);
856 856
857 usb_fill_int_urb(port->interrupt_out_urb, port->serial->dev, 857 usb_fill_int_urb(port->interrupt_out_urb, port->serial->dev,
@@ -860,7 +860,7 @@ send:
860 cypress_write_int_callback, port, priv->write_urb_interval); 860 cypress_write_int_callback, port, priv->write_urb_interval);
861 result = usb_submit_urb (port->interrupt_out_urb, GFP_ATOMIC); 861 result = usb_submit_urb (port->interrupt_out_urb, GFP_ATOMIC);
862 if (result) { 862 if (result) {
863 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, 863 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __func__,
864 result); 864 result);
865 priv->write_urb_in_use = 0; 865 priv->write_urb_in_use = 0;
866 cypress_set_dead(port); 866 cypress_set_dead(port);
@@ -884,13 +884,13 @@ static int cypress_write_room(struct usb_serial_port *port)
884 int room = 0; 884 int room = 0;
885 unsigned long flags; 885 unsigned long flags;
886 886
887 dbg("%s - port %d", __FUNCTION__, port->number); 887 dbg("%s - port %d", __func__, port->number);
888 888
889 spin_lock_irqsave(&priv->lock, flags); 889 spin_lock_irqsave(&priv->lock, flags);
890 room = cypress_buf_space_avail(priv->buf); 890 room = cypress_buf_space_avail(priv->buf);
891 spin_unlock_irqrestore(&priv->lock, flags); 891 spin_unlock_irqrestore(&priv->lock, flags);
892 892
893 dbg("%s - returns %d", __FUNCTION__, room); 893 dbg("%s - returns %d", __func__, room);
894 return room; 894 return room;
895} 895}
896 896
@@ -902,7 +902,7 @@ static int cypress_tiocmget (struct usb_serial_port *port, struct file *file)
902 unsigned int result = 0; 902 unsigned int result = 0;
903 unsigned long flags; 903 unsigned long flags;
904 904
905 dbg("%s - port %d", __FUNCTION__, port->number); 905 dbg("%s - port %d", __func__, port->number);
906 906
907 spin_lock_irqsave(&priv->lock, flags); 907 spin_lock_irqsave(&priv->lock, flags);
908 control = priv->line_control; 908 control = priv->line_control;
@@ -916,7 +916,7 @@ static int cypress_tiocmget (struct usb_serial_port *port, struct file *file)
916 | ((status & UART_RI) ? TIOCM_RI : 0) 916 | ((status & UART_RI) ? TIOCM_RI : 0)
917 | ((status & UART_CD) ? TIOCM_CD : 0); 917 | ((status & UART_CD) ? TIOCM_CD : 0);
918 918
919 dbg("%s - result = %x", __FUNCTION__, result); 919 dbg("%s - result = %x", __func__, result);
920 920
921 return result; 921 return result;
922} 922}
@@ -928,7 +928,7 @@ static int cypress_tiocmset (struct usb_serial_port *port, struct file *file,
928 struct cypress_private *priv = usb_get_serial_port_data(port); 928 struct cypress_private *priv = usb_get_serial_port_data(port);
929 unsigned long flags; 929 unsigned long flags;
930 930
931 dbg("%s - port %d", __FUNCTION__, port->number); 931 dbg("%s - port %d", __func__, port->number);
932 932
933 spin_lock_irqsave(&priv->lock, flags); 933 spin_lock_irqsave(&priv->lock, flags);
934 if (set & TIOCM_RTS) 934 if (set & TIOCM_RTS)
@@ -950,7 +950,7 @@ static int cypress_ioctl (struct usb_serial_port *port, struct file * file, unsi
950{ 950{
951 struct cypress_private *priv = usb_get_serial_port_data(port); 951 struct cypress_private *priv = usb_get_serial_port_data(port);
952 952
953 dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd); 953 dbg("%s - port %d, cmd 0x%.4x", __func__, port->number, cmd);
954 954
955 switch (cmd) { 955 switch (cmd) {
956 /* This code comes from drivers/char/serial.c and ftdi_sio.c */ 956 /* This code comes from drivers/char/serial.c and ftdi_sio.c */
@@ -988,7 +988,7 @@ static int cypress_ioctl (struct usb_serial_port *port, struct file * file, unsi
988 break; 988 break;
989 } 989 }
990 990
991 dbg("%s - arg not supported - it was 0x%04x - check include/asm/ioctls.h", __FUNCTION__, cmd); 991 dbg("%s - arg not supported - it was 0x%04x - check include/asm/ioctls.h", __func__, cmd);
992 992
993 return -ENOIOCTLCMD; 993 return -ENOIOCTLCMD;
994} /* cypress_ioctl */ 994} /* cypress_ioctl */
@@ -1005,7 +1005,7 @@ static void cypress_set_termios (struct usb_serial_port *port,
1005 __u8 oldlines; 1005 __u8 oldlines;
1006 int linechange = 0; 1006 int linechange = 0;
1007 1007
1008 dbg("%s - port %d", __FUNCTION__, port->number); 1008 dbg("%s - port %d", __func__, port->number);
1009 1009
1010 tty = port->tty; 1010 tty = port->tty;
1011 1011
@@ -1076,7 +1076,7 @@ static void cypress_set_termios (struct usb_serial_port *port,
1076 break; 1076 break;
1077 default: 1077 default:
1078 err("%s - CSIZE was set, but not CS5-CS8", 1078 err("%s - CSIZE was set, but not CS5-CS8",
1079 __FUNCTION__); 1079 __func__);
1080 data_bits = 3; 1080 data_bits = 3;
1081 } 1081 }
1082 } else 1082 } else
@@ -1086,14 +1086,14 @@ static void cypress_set_termios (struct usb_serial_port *port,
1086 oldlines = priv->line_control; 1086 oldlines = priv->line_control;
1087 if ((cflag & CBAUD) == B0) { 1087 if ((cflag & CBAUD) == B0) {
1088 /* drop dtr and rts */ 1088 /* drop dtr and rts */
1089 dbg("%s - dropping the lines, baud rate 0bps", __FUNCTION__); 1089 dbg("%s - dropping the lines, baud rate 0bps", __func__);
1090 priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS); 1090 priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS);
1091 } else 1091 } else
1092 priv->line_control = (CONTROL_DTR | CONTROL_RTS); 1092 priv->line_control = (CONTROL_DTR | CONTROL_RTS);
1093 spin_unlock_irqrestore(&priv->lock, flags); 1093 spin_unlock_irqrestore(&priv->lock, flags);
1094 1094
1095 dbg("%s - sending %d stop_bits, %d parity_enable, %d parity_type, " 1095 dbg("%s - sending %d stop_bits, %d parity_enable, %d parity_type, "
1096 "%d data_bits (+5)", __FUNCTION__, stop_bits, 1096 "%d data_bits (+5)", __func__, stop_bits,
1097 parity_enable, parity_type, data_bits); 1097 parity_enable, parity_type, data_bits);
1098 1098
1099 cypress_serial_control(port, tty_get_baud_rate(tty), data_bits, stop_bits, 1099 cypress_serial_control(port, tty_get_baud_rate(tty), data_bits, stop_bits,
@@ -1154,13 +1154,13 @@ static int cypress_chars_in_buffer(struct usb_serial_port *port)
1154 int chars = 0; 1154 int chars = 0;
1155 unsigned long flags; 1155 unsigned long flags;
1156 1156
1157 dbg("%s - port %d", __FUNCTION__, port->number); 1157 dbg("%s - port %d", __func__, port->number);
1158 1158
1159 spin_lock_irqsave(&priv->lock, flags); 1159 spin_lock_irqsave(&priv->lock, flags);
1160 chars = cypress_buf_data_avail(priv->buf); 1160 chars = cypress_buf_data_avail(priv->buf);
1161 spin_unlock_irqrestore(&priv->lock, flags); 1161 spin_unlock_irqrestore(&priv->lock, flags);
1162 1162
1163 dbg("%s - returns %d", __FUNCTION__, chars); 1163 dbg("%s - returns %d", __func__, chars);
1164 return chars; 1164 return chars;
1165} 1165}
1166 1166
@@ -1170,7 +1170,7 @@ static void cypress_throttle (struct usb_serial_port *port)
1170 struct cypress_private *priv = usb_get_serial_port_data(port); 1170 struct cypress_private *priv = usb_get_serial_port_data(port);
1171 unsigned long flags; 1171 unsigned long flags;
1172 1172
1173 dbg("%s - port %d", __FUNCTION__, port->number); 1173 dbg("%s - port %d", __func__, port->number);
1174 1174
1175 spin_lock_irqsave(&priv->lock, flags); 1175 spin_lock_irqsave(&priv->lock, flags);
1176 priv->rx_flags = THROTTLED; 1176 priv->rx_flags = THROTTLED;
@@ -1184,7 +1184,7 @@ static void cypress_unthrottle (struct usb_serial_port *port)
1184 int actually_throttled, result; 1184 int actually_throttled, result;
1185 unsigned long flags; 1185 unsigned long flags;
1186 1186
1187 dbg("%s - port %d", __FUNCTION__, port->number); 1187 dbg("%s - port %d", __func__, port->number);
1188 1188
1189 spin_lock_irqsave(&priv->lock, flags); 1189 spin_lock_irqsave(&priv->lock, flags);
1190 actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED; 1190 actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED;
@@ -1200,7 +1200,7 @@ static void cypress_unthrottle (struct usb_serial_port *port)
1200 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); 1200 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
1201 if (result) { 1201 if (result) {
1202 dev_err(&port->dev, "%s - failed submitting read urb, " 1202 dev_err(&port->dev, "%s - failed submitting read urb, "
1203 "error %d\n", __FUNCTION__, result); 1203 "error %d\n", __func__, result);
1204 cypress_set_dead(port); 1204 cypress_set_dead(port);
1205 } 1205 }
1206 } 1206 }
@@ -1221,7 +1221,7 @@ static void cypress_read_int_callback(struct urb *urb)
1221 int i = 0; 1221 int i = 0;
1222 int status = urb->status; 1222 int status = urb->status;
1223 1223
1224 dbg("%s - port %d", __FUNCTION__, port->number); 1224 dbg("%s - port %d", __func__, port->number);
1225 1225
1226 switch (status) { 1226 switch (status) {
1227 case 0: /* success */ 1227 case 0: /* success */
@@ -1237,14 +1237,14 @@ static void cypress_read_int_callback(struct urb *urb)
1237 default: 1237 default:
1238 /* something ugly is going on... */ 1238 /* something ugly is going on... */
1239 dev_err(&urb->dev->dev,"%s - unexpected nonzero read status received: %d\n", 1239 dev_err(&urb->dev->dev,"%s - unexpected nonzero read status received: %d\n",
1240 __FUNCTION__, status); 1240 __func__, status);
1241 cypress_set_dead(port); 1241 cypress_set_dead(port);
1242 return; 1242 return;
1243 } 1243 }
1244 1244
1245 spin_lock_irqsave(&priv->lock, flags); 1245 spin_lock_irqsave(&priv->lock, flags);
1246 if (priv->rx_flags & THROTTLED) { 1246 if (priv->rx_flags & THROTTLED) {
1247 dbg("%s - now throttling", __FUNCTION__); 1247 dbg("%s - now throttling", __func__);
1248 priv->rx_flags |= ACTUALLY_THROTTLED; 1248 priv->rx_flags |= ACTUALLY_THROTTLED;
1249 spin_unlock_irqrestore(&priv->lock, flags); 1249 spin_unlock_irqrestore(&priv->lock, flags);
1250 return; 1250 return;
@@ -1253,7 +1253,7 @@ static void cypress_read_int_callback(struct urb *urb)
1253 1253
1254 tty = port->tty; 1254 tty = port->tty;
1255 if (!tty) { 1255 if (!tty) {
1256 dbg("%s - bad tty pointer - exiting", __FUNCTION__); 1256 dbg("%s - bad tty pointer - exiting", __func__);
1257 return; 1257 return;
1258 } 1258 }
1259 1259
@@ -1285,7 +1285,7 @@ static void cypress_read_int_callback(struct urb *urb)
1285 goto continue_read; 1285 goto continue_read;
1286 } 1286 }
1287 1287
1288 usb_serial_debug_data (debug, &port->dev, __FUNCTION__, 1288 usb_serial_debug_data (debug, &port->dev, __func__,
1289 urb->actual_length, data); 1289 urb->actual_length, data);
1290 1290
1291 spin_lock_irqsave(&priv->lock, flags); 1291 spin_lock_irqsave(&priv->lock, flags);
@@ -1302,7 +1302,7 @@ static void cypress_read_int_callback(struct urb *urb)
1302 * though */ 1302 * though */
1303 if (tty && !(tty->termios->c_cflag & CLOCAL) && 1303 if (tty && !(tty->termios->c_cflag & CLOCAL) &&
1304 !(priv->current_status & UART_CD)) { 1304 !(priv->current_status & UART_CD)) {
1305 dbg("%s - calling hangup", __FUNCTION__); 1305 dbg("%s - calling hangup", __func__);
1306 tty_hangup(tty); 1306 tty_hangup(tty);
1307 goto continue_read; 1307 goto continue_read;
1308 } 1308 }
@@ -1315,7 +1315,7 @@ static void cypress_read_int_callback(struct urb *urb)
1315 if (priv->current_status & CYP_ERROR) { 1315 if (priv->current_status & CYP_ERROR) {
1316 spin_unlock_irqrestore(&priv->lock, flags); 1316 spin_unlock_irqrestore(&priv->lock, flags);
1317 tty_flag = TTY_PARITY; 1317 tty_flag = TTY_PARITY;
1318 dbg("%s - Parity Error detected", __FUNCTION__); 1318 dbg("%s - Parity Error detected", __func__);
1319 } else 1319 } else
1320 spin_unlock_irqrestore(&priv->lock, flags); 1320 spin_unlock_irqrestore(&priv->lock, flags);
1321 1321
@@ -1349,7 +1349,7 @@ continue_read:
1349 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); 1349 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
1350 if (result) { 1350 if (result) {
1351 dev_err(&urb->dev->dev, "%s - failed resubmitting " 1351 dev_err(&urb->dev->dev, "%s - failed resubmitting "
1352 "read urb, error %d\n", __FUNCTION__, 1352 "read urb, error %d\n", __func__,
1353 result); 1353 result);
1354 cypress_set_dead(port); 1354 cypress_set_dead(port);
1355 } 1355 }
@@ -1366,7 +1366,7 @@ static void cypress_write_int_callback(struct urb *urb)
1366 int result; 1366 int result;
1367 int status = urb->status; 1367 int status = urb->status;
1368 1368
1369 dbg("%s - port %d", __FUNCTION__, port->number); 1369 dbg("%s - port %d", __func__, port->number);
1370 1370
1371 switch (status) { 1371 switch (status) {
1372 case 0: 1372 case 0:
@@ -1377,7 +1377,7 @@ static void cypress_write_int_callback(struct urb *urb)
1377 case -ESHUTDOWN: 1377 case -ESHUTDOWN:
1378 /* this urb is terminated, clean up */ 1378 /* this urb is terminated, clean up */
1379 dbg("%s - urb shutting down with status: %d", 1379 dbg("%s - urb shutting down with status: %d",
1380 __FUNCTION__, status); 1380 __func__, status);
1381 priv->write_urb_in_use = 0; 1381 priv->write_urb_in_use = 0;
1382 return; 1382 return;
1383 case -EPIPE: /* no break needed; clear halt and resubmit */ 1383 case -EPIPE: /* no break needed; clear halt and resubmit */
@@ -1386,19 +1386,19 @@ static void cypress_write_int_callback(struct urb *urb)
1386 usb_clear_halt(port->serial->dev, 0x02); 1386 usb_clear_halt(port->serial->dev, 0x02);
1387 /* error in the urb, so we have to resubmit it */ 1387 /* error in the urb, so we have to resubmit it */
1388 dbg("%s - nonzero write bulk status received: %d", 1388 dbg("%s - nonzero write bulk status received: %d",
1389 __FUNCTION__, status); 1389 __func__, status);
1390 port->interrupt_out_urb->transfer_buffer_length = 1; 1390 port->interrupt_out_urb->transfer_buffer_length = 1;
1391 port->interrupt_out_urb->dev = port->serial->dev; 1391 port->interrupt_out_urb->dev = port->serial->dev;
1392 result = usb_submit_urb(port->interrupt_out_urb, GFP_ATOMIC); 1392 result = usb_submit_urb(port->interrupt_out_urb, GFP_ATOMIC);
1393 if (!result) 1393 if (!result)
1394 return; 1394 return;
1395 dev_err(&urb->dev->dev, "%s - failed resubmitting write urb, error %d\n", 1395 dev_err(&urb->dev->dev, "%s - failed resubmitting write urb, error %d\n",
1396 __FUNCTION__, result); 1396 __func__, result);
1397 cypress_set_dead(port); 1397 cypress_set_dead(port);
1398 break; 1398 break;
1399 default: 1399 default:
1400 dev_err(&urb->dev->dev,"%s - unexpected nonzero write status received: %d\n", 1400 dev_err(&urb->dev->dev,"%s - unexpected nonzero write status received: %d\n",
1401 __FUNCTION__, status); 1401 __func__, status);
1402 cypress_set_dead(port); 1402 cypress_set_dead(port);
1403 break; 1403 break;
1404 } 1404 }
@@ -1603,7 +1603,7 @@ static int __init cypress_init(void)
1603{ 1603{
1604 int retval; 1604 int retval;
1605 1605
1606 dbg("%s", __FUNCTION__); 1606 dbg("%s", __func__);
1607 1607
1608 retval = usb_serial_register(&cypress_earthmate_device); 1608 retval = usb_serial_register(&cypress_earthmate_device);
1609 if (retval) 1609 if (retval)
@@ -1634,7 +1634,7 @@ failed_em_register:
1634 1634
1635static void __exit cypress_exit (void) 1635static void __exit cypress_exit (void)
1636{ 1636{
1637 dbg("%s", __FUNCTION__); 1637 dbg("%s", __func__);
1638 1638
1639 usb_deregister (&cypress_driver); 1639 usb_deregister (&cypress_driver);
1640 usb_serial_deregister (&cypress_earthmate_device); 1640 usb_serial_deregister (&cypress_earthmate_device);
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index 4e3d5993a8e3..c7cbc02f1a70 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -659,7 +659,7 @@ static int digi_write_oob_command(struct usb_serial_port *port,
659 } 659 }
660 spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags); 660 spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags);
661 if (ret) 661 if (ret)
662 err("%s: usb_submit_urb failed, ret=%d", __FUNCTION__, ret); 662 err("%s: usb_submit_urb failed, ret=%d", __func__, ret);
663 return ret; 663 return ret;
664 664
665} 665}
@@ -740,7 +740,7 @@ static int digi_write_inb_command(struct usb_serial_port *port,
740 740
741 if (ret) 741 if (ret)
742 err("%s: usb_submit_urb failed, ret=%d, port=%d", 742 err("%s: usb_submit_urb failed, ret=%d, port=%d",
743 __FUNCTION__, ret, priv->dp_port_num); 743 __func__, ret, priv->dp_port_num);
744 return ret; 744 return ret;
745} 745}
746 746
@@ -804,7 +804,7 @@ static int digi_set_modem_signals(struct usb_serial_port *port,
804 spin_unlock(&port_priv->dp_port_lock); 804 spin_unlock(&port_priv->dp_port_lock);
805 spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags); 805 spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags);
806 if (ret) 806 if (ret)
807 err("%s: usb_submit_urb failed, ret=%d", __FUNCTION__, ret); 807 err("%s: usb_submit_urb failed, ret=%d", __func__, ret);
808 return ret; 808 return ret;
809} 809}
810 810
@@ -897,7 +897,7 @@ static void digi_rx_unthrottle(struct usb_serial_port *port)
897 897
898 if (ret) 898 if (ret)
899 err("%s: usb_submit_urb failed, ret=%d, port=%d", 899 err("%s: usb_submit_urb failed, ret=%d, port=%d",
900 __FUNCTION__, ret, priv->dp_port_num); 900 __func__, ret, priv->dp_port_num);
901} 901}
902 902
903 903
@@ -1107,7 +1107,7 @@ static int digi_tiocmget(struct usb_serial_port *port, struct file *file)
1107 unsigned int val; 1107 unsigned int val;
1108 unsigned long flags; 1108 unsigned long flags;
1109 1109
1110 dbg("%s: TOP: port=%d", __FUNCTION__, priv->dp_port_num); 1110 dbg("%s: TOP: port=%d", __func__, priv->dp_port_num);
1111 1111
1112 spin_lock_irqsave(&priv->dp_port_lock, flags); 1112 spin_lock_irqsave(&priv->dp_port_lock, flags);
1113 val = priv->dp_modem_signals; 1113 val = priv->dp_modem_signals;
@@ -1123,7 +1123,7 @@ static int digi_tiocmset(struct usb_serial_port *port, struct file *file,
1123 unsigned int val; 1123 unsigned int val;
1124 unsigned long flags; 1124 unsigned long flags;
1125 1125
1126 dbg("%s: TOP: port=%d", __FUNCTION__, priv->dp_port_num); 1126 dbg("%s: TOP: port=%d", __func__, priv->dp_port_num);
1127 1127
1128 spin_lock_irqsave(&priv->dp_port_lock, flags); 1128 spin_lock_irqsave(&priv->dp_port_lock, flags);
1129 val = (priv->dp_modem_signals & ~clear) | set; 1129 val = (priv->dp_modem_signals & ~clear) | set;
@@ -1218,7 +1218,7 @@ static int digi_write(struct usb_serial_port *port, const unsigned char *buf, in
1218 spin_unlock_irqrestore(&priv->dp_port_lock, flags); 1218 spin_unlock_irqrestore(&priv->dp_port_lock, flags);
1219 if (ret < 0) 1219 if (ret < 0)
1220 err("%s: usb_submit_urb failed, ret=%d, port=%d", 1220 err("%s: usb_submit_urb failed, ret=%d, port=%d",
1221 __FUNCTION__, ret, priv->dp_port_num); 1221 __func__, ret, priv->dp_port_num);
1222 dbg("digi_write: returning %d", ret); 1222 dbg("digi_write: returning %d", ret);
1223 return ret; 1223 return ret;
1224 1224
@@ -1239,13 +1239,13 @@ static void digi_write_bulk_callback(struct urb *urb)
1239 /* port and serial sanity check */ 1239 /* port and serial sanity check */
1240 if (port == NULL || (priv=usb_get_serial_port_data(port)) == NULL) { 1240 if (port == NULL || (priv=usb_get_serial_port_data(port)) == NULL) {
1241 err("%s: port or port->private is NULL, status=%d", 1241 err("%s: port or port->private is NULL, status=%d",
1242 __FUNCTION__, status); 1242 __func__, status);
1243 return; 1243 return;
1244 } 1244 }
1245 serial = port->serial; 1245 serial = port->serial;
1246 if (serial == NULL || (serial_priv=usb_get_serial_data(serial)) == NULL) { 1246 if (serial == NULL || (serial_priv=usb_get_serial_data(serial)) == NULL) {
1247 err("%s: serial or serial->private is NULL, status=%d", 1247 err("%s: serial or serial->private is NULL, status=%d",
1248 __FUNCTION__, status); 1248 __func__, status);
1249 return; 1249 return;
1250 } 1250 }
1251 1251
@@ -1286,7 +1286,7 @@ static void digi_write_bulk_callback(struct urb *urb)
1286 spin_unlock(&priv->dp_port_lock); 1286 spin_unlock(&priv->dp_port_lock);
1287 if (ret) 1287 if (ret)
1288 err("%s: usb_submit_urb failed, ret=%d, port=%d", 1288 err("%s: usb_submit_urb failed, ret=%d, port=%d",
1289 __FUNCTION__, ret, priv->dp_port_num); 1289 __func__, ret, priv->dp_port_num);
1290} 1290}
1291 1291
1292static int digi_write_room(struct usb_serial_port *port) 1292static int digi_write_room(struct usb_serial_port *port)
@@ -1515,7 +1515,7 @@ static int digi_startup_device(struct usb_serial *serial)
1515 port->write_urb->dev = port->serial->dev; 1515 port->write_urb->dev = port->serial->dev;
1516 if ((ret = usb_submit_urb(port->read_urb, GFP_KERNEL)) != 0) { 1516 if ((ret = usb_submit_urb(port->read_urb, GFP_KERNEL)) != 0) {
1517 err("%s: usb_submit_urb failed, ret=%d, port=%d", 1517 err("%s: usb_submit_urb failed, ret=%d, port=%d",
1518 __FUNCTION__, ret, i); 1518 __func__, ret, i);
1519 break; 1519 break;
1520 } 1520 }
1521 } 1521 }
@@ -1616,20 +1616,20 @@ static void digi_read_bulk_callback(struct urb *urb)
1616 /* port sanity check, do not resubmit if port is not valid */ 1616 /* port sanity check, do not resubmit if port is not valid */
1617 if (port == NULL || (priv = usb_get_serial_port_data(port)) == NULL) { 1617 if (port == NULL || (priv = usb_get_serial_port_data(port)) == NULL) {
1618 err("%s: port or port->private is NULL, status=%d", 1618 err("%s: port or port->private is NULL, status=%d",
1619 __FUNCTION__, status); 1619 __func__, status);
1620 return; 1620 return;
1621 } 1621 }
1622 if (port->serial == NULL || 1622 if (port->serial == NULL ||
1623 (serial_priv=usb_get_serial_data(port->serial)) == NULL) { 1623 (serial_priv=usb_get_serial_data(port->serial)) == NULL) {
1624 err("%s: serial is bad or serial->private is NULL, status=%d", 1624 err("%s: serial is bad or serial->private is NULL, status=%d",
1625 __FUNCTION__, status); 1625 __func__, status);
1626 return; 1626 return;
1627 } 1627 }
1628 1628
1629 /* do not resubmit urb if it has any status error */ 1629 /* do not resubmit urb if it has any status error */
1630 if (status) { 1630 if (status) {
1631 err("%s: nonzero read bulk status: status=%d, port=%d", 1631 err("%s: nonzero read bulk status: status=%d, port=%d",
1632 __FUNCTION__, status, priv->dp_port_num); 1632 __func__, status, priv->dp_port_num);
1633 return; 1633 return;
1634 } 1634 }
1635 1635
@@ -1646,7 +1646,7 @@ static void digi_read_bulk_callback(struct urb *urb)
1646 urb->dev = port->serial->dev; 1646 urb->dev = port->serial->dev;
1647 if ((ret = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 1647 if ((ret = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
1648 err("%s: failed resubmitting urb, ret=%d, port=%d", 1648 err("%s: failed resubmitting urb, ret=%d, port=%d",
1649 __FUNCTION__, ret, priv->dp_port_num); 1649 __func__, ret, priv->dp_port_num);
1650 } 1650 }
1651 1651
1652} 1652}
@@ -1684,7 +1684,7 @@ static int digi_read_inb_callback(struct urb *urb)
1684 if (urb->actual_length != len + 2) { 1684 if (urb->actual_length != len + 2) {
1685 err("%s: INCOMPLETE OR MULTIPLE PACKET, urb->status=%d, " 1685 err("%s: INCOMPLETE OR MULTIPLE PACKET, urb->status=%d, "
1686 "port=%d, opcode=%d, len=%d, actual_length=%d, " 1686 "port=%d, opcode=%d, len=%d, actual_length=%d, "
1687 "status=%d", __FUNCTION__, status, priv->dp_port_num, 1687 "status=%d", __func__, status, priv->dp_port_num,
1688 opcode, len, urb->actual_length, port_status); 1688 opcode, len, urb->actual_length, port_status);
1689 return -1; 1689 return -1;
1690 } 1690 }
@@ -1733,9 +1733,9 @@ static int digi_read_inb_callback(struct urb *urb)
1733 spin_unlock(&priv->dp_port_lock); 1733 spin_unlock(&priv->dp_port_lock);
1734 1734
1735 if (opcode == DIGI_CMD_RECEIVE_DISABLE) 1735 if (opcode == DIGI_CMD_RECEIVE_DISABLE)
1736 dbg("%s: got RECEIVE_DISABLE", __FUNCTION__); 1736 dbg("%s: got RECEIVE_DISABLE", __func__);
1737 else if (opcode != DIGI_CMD_RECEIVE_DATA) 1737 else if (opcode != DIGI_CMD_RECEIVE_DATA)
1738 dbg("%s: unknown opcode: %d", __FUNCTION__, opcode); 1738 dbg("%s: unknown opcode: %d", __func__, opcode);
1739 1739
1740 return(throttled ? 1 : 0); 1740 return(throttled ? 1 : 0);
1741 1741
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
index 2cf821771175..5f731d4912f7 100644
--- a/drivers/usb/serial/empeg.c
+++ b/drivers/usb/serial/empeg.c
@@ -150,7 +150,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp)
150 struct usb_serial *serial = port->serial; 150 struct usb_serial *serial = port->serial;
151 int result = 0; 151 int result = 0;
152 152
153 dbg("%s - port %d", __FUNCTION__, port->number); 153 dbg("%s - port %d", __func__, port->number);
154 154
155 /* Force default termio settings */ 155 /* Force default termio settings */
156 empeg_set_termios (port, NULL) ; 156 empeg_set_termios (port, NULL) ;
@@ -172,7 +172,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp)
172 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 172 result = usb_submit_urb(port->read_urb, GFP_KERNEL);
173 173
174 if (result) 174 if (result)
175 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result); 175 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __func__, result);
176 176
177 return result; 177 return result;
178} 178}
@@ -180,7 +180,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp)
180 180
181static void empeg_close (struct usb_serial_port *port, struct file * filp) 181static void empeg_close (struct usb_serial_port *port, struct file * filp)
182{ 182{
183 dbg("%s - port %d", __FUNCTION__, port->number); 183 dbg("%s - port %d", __func__, port->number);
184 184
185 /* shutdown our bulk read */ 185 /* shutdown our bulk read */
186 usb_kill_urb(port->read_urb); 186 usb_kill_urb(port->read_urb);
@@ -200,7 +200,7 @@ static int empeg_write (struct usb_serial_port *port, const unsigned char *buf,
200 int bytes_sent = 0; 200 int bytes_sent = 0;
201 int transfer_size; 201 int transfer_size;
202 202
203 dbg("%s - port %d", __FUNCTION__, port->number); 203 dbg("%s - port %d", __func__, port->number);
204 204
205 while (count > 0) { 205 while (count > 0) {
206 206
@@ -219,14 +219,14 @@ static int empeg_write (struct usb_serial_port *port, const unsigned char *buf,
219 spin_unlock_irqrestore (&write_urb_pool_lock, flags); 219 spin_unlock_irqrestore (&write_urb_pool_lock, flags);
220 220
221 if (urb == NULL) { 221 if (urb == NULL) {
222 dbg("%s - no more free urbs", __FUNCTION__); 222 dbg("%s - no more free urbs", __func__);
223 goto exit; 223 goto exit;
224 } 224 }
225 225
226 if (urb->transfer_buffer == NULL) { 226 if (urb->transfer_buffer == NULL) {
227 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC); 227 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
228 if (urb->transfer_buffer == NULL) { 228 if (urb->transfer_buffer == NULL) {
229 dev_err(&port->dev, "%s no more kernel memory...\n", __FUNCTION__); 229 dev_err(&port->dev, "%s no more kernel memory...\n", __func__);
230 goto exit; 230 goto exit;
231 } 231 }
232 } 232 }
@@ -235,7 +235,7 @@ static int empeg_write (struct usb_serial_port *port, const unsigned char *buf,
235 235
236 memcpy (urb->transfer_buffer, current_position, transfer_size); 236 memcpy (urb->transfer_buffer, current_position, transfer_size);
237 237
238 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, transfer_size, urb->transfer_buffer); 238 usb_serial_debug_data(debug, &port->dev, __func__, transfer_size, urb->transfer_buffer);
239 239
240 /* build up our urb */ 240 /* build up our urb */
241 usb_fill_bulk_urb ( 241 usb_fill_bulk_urb (
@@ -251,7 +251,7 @@ static int empeg_write (struct usb_serial_port *port, const unsigned char *buf,
251 /* send it down the pipe */ 251 /* send it down the pipe */
252 status = usb_submit_urb(urb, GFP_ATOMIC); 252 status = usb_submit_urb(urb, GFP_ATOMIC);
253 if (status) { 253 if (status) {
254 dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n", __FUNCTION__, status); 254 dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n", __func__, status);
255 bytes_sent = status; 255 bytes_sent = status;
256 break; 256 break;
257 } 257 }
@@ -275,7 +275,7 @@ static int empeg_write_room (struct usb_serial_port *port)
275 int i; 275 int i;
276 int room = 0; 276 int room = 0;
277 277
278 dbg("%s - port %d", __FUNCTION__, port->number); 278 dbg("%s - port %d", __func__, port->number);
279 279
280 spin_lock_irqsave (&write_urb_pool_lock, flags); 280 spin_lock_irqsave (&write_urb_pool_lock, flags);
281 281
@@ -288,7 +288,7 @@ static int empeg_write_room (struct usb_serial_port *port)
288 288
289 spin_unlock_irqrestore (&write_urb_pool_lock, flags); 289 spin_unlock_irqrestore (&write_urb_pool_lock, flags);
290 290
291 dbg("%s - returns %d", __FUNCTION__, room); 291 dbg("%s - returns %d", __func__, room);
292 292
293 return (room); 293 return (room);
294 294
@@ -301,7 +301,7 @@ static int empeg_chars_in_buffer (struct usb_serial_port *port)
301 int i; 301 int i;
302 int chars = 0; 302 int chars = 0;
303 303
304 dbg("%s - port %d", __FUNCTION__, port->number); 304 dbg("%s - port %d", __func__, port->number);
305 305
306 spin_lock_irqsave (&write_urb_pool_lock, flags); 306 spin_lock_irqsave (&write_urb_pool_lock, flags);
307 307
@@ -314,7 +314,7 @@ static int empeg_chars_in_buffer (struct usb_serial_port *port)
314 314
315 spin_unlock_irqrestore (&write_urb_pool_lock, flags); 315 spin_unlock_irqrestore (&write_urb_pool_lock, flags);
316 316
317 dbg("%s - returns %d", __FUNCTION__, chars); 317 dbg("%s - returns %d", __func__, chars);
318 318
319 return (chars); 319 return (chars);
320 320
@@ -326,11 +326,11 @@ static void empeg_write_bulk_callback (struct urb *urb)
326 struct usb_serial_port *port = urb->context; 326 struct usb_serial_port *port = urb->context;
327 int status = urb->status; 327 int status = urb->status;
328 328
329 dbg("%s - port %d", __FUNCTION__, port->number); 329 dbg("%s - port %d", __func__, port->number);
330 330
331 if (status) { 331 if (status) {
332 dbg("%s - nonzero write bulk status received: %d", 332 dbg("%s - nonzero write bulk status received: %d",
333 __FUNCTION__, status); 333 __func__, status);
334 return; 334 return;
335 } 335 }
336 336
@@ -346,15 +346,15 @@ static void empeg_read_bulk_callback (struct urb *urb)
346 int result; 346 int result;
347 int status = urb->status; 347 int status = urb->status;
348 348
349 dbg("%s - port %d", __FUNCTION__, port->number); 349 dbg("%s - port %d", __func__, port->number);
350 350
351 if (status) { 351 if (status) {
352 dbg("%s - nonzero read bulk status received: %d", 352 dbg("%s - nonzero read bulk status received: %d",
353 __FUNCTION__, status); 353 __func__, status);
354 return; 354 return;
355 } 355 }
356 356
357 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 357 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
358 358
359 tty = port->tty; 359 tty = port->tty;
360 360
@@ -379,7 +379,7 @@ static void empeg_read_bulk_callback (struct urb *urb)
379 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 379 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
380 380
381 if (result) 381 if (result)
382 dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); 382 dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __func__, result);
383 383
384 return; 384 return;
385 385
@@ -388,7 +388,7 @@ static void empeg_read_bulk_callback (struct urb *urb)
388 388
389static void empeg_throttle (struct usb_serial_port *port) 389static void empeg_throttle (struct usb_serial_port *port)
390{ 390{
391 dbg("%s - port %d", __FUNCTION__, port->number); 391 dbg("%s - port %d", __func__, port->number);
392 usb_kill_urb(port->read_urb); 392 usb_kill_urb(port->read_urb);
393} 393}
394 394
@@ -397,14 +397,14 @@ static void empeg_unthrottle (struct usb_serial_port *port)
397{ 397{
398 int result; 398 int result;
399 399
400 dbg("%s - port %d", __FUNCTION__, port->number); 400 dbg("%s - port %d", __func__, port->number);
401 401
402 port->read_urb->dev = port->serial->dev; 402 port->read_urb->dev = port->serial->dev;
403 403
404 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 404 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
405 405
406 if (result) 406 if (result)
407 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result); 407 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __func__, result);
408 408
409 return; 409 return;
410} 410}
@@ -414,14 +414,14 @@ static int empeg_startup (struct usb_serial *serial)
414{ 414{
415 int r; 415 int r;
416 416
417 dbg("%s", __FUNCTION__); 417 dbg("%s", __func__);
418 418
419 if (serial->dev->actconfig->desc.bConfigurationValue != 1) { 419 if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
420 err("active config #%d != 1 ??", 420 err("active config #%d != 1 ??",
421 serial->dev->actconfig->desc.bConfigurationValue); 421 serial->dev->actconfig->desc.bConfigurationValue);
422 return -ENODEV; 422 return -ENODEV;
423 } 423 }
424 dbg("%s - reset config", __FUNCTION__); 424 dbg("%s - reset config", __func__);
425 r = usb_reset_configuration (serial->dev); 425 r = usb_reset_configuration (serial->dev);
426 426
427 /* continue on with initialization */ 427 /* continue on with initialization */
@@ -432,13 +432,13 @@ static int empeg_startup (struct usb_serial *serial)
432 432
433static void empeg_shutdown (struct usb_serial *serial) 433static void empeg_shutdown (struct usb_serial *serial)
434{ 434{
435 dbg ("%s", __FUNCTION__); 435 dbg ("%s", __func__);
436} 436}
437 437
438 438
439static int empeg_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg) 439static int empeg_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
440{ 440{
441 dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd); 441 dbg("%s - port %d, cmd 0x%.4x", __func__, port->number, cmd);
442 442
443 return -ENOIOCTLCMD; 443 return -ENOIOCTLCMD;
444} 444}
@@ -447,7 +447,7 @@ static int empeg_ioctl (struct usb_serial_port *port, struct file * file, unsign
447static void empeg_set_termios (struct usb_serial_port *port, struct ktermios *old_termios) 447static void empeg_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
448{ 448{
449 struct ktermios *termios = port->tty->termios; 449 struct ktermios *termios = port->tty->termios;
450 dbg("%s - port %d", __FUNCTION__, port->number); 450 dbg("%s - port %d", __func__, port->number);
451 451
452 /* 452 /*
453 * The empeg-car player wants these particular tty settings. 453 * The empeg-car player wants these particular tty settings.
@@ -514,7 +514,7 @@ static int __init empeg_init (void)
514 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL); 514 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
515 if (!urb->transfer_buffer) { 515 if (!urb->transfer_buffer) {
516 err("%s - out of memory for urb buffers.", 516 err("%s - out of memory for urb buffers.",
517 __FUNCTION__); 517 __func__);
518 continue; 518 continue;
519 } 519 }
520 } 520 }
diff --git a/drivers/usb/serial/ezusb.c b/drivers/usb/serial/ezusb.c
index 3f698baa0abb..cc4fbd9d60be 100644
--- a/drivers/usb/serial/ezusb.c
+++ b/drivers/usb/serial/ezusb.c
@@ -27,13 +27,13 @@ int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *da
27 27
28 /* dbg("ezusb_writememory %x, %d", address, length); */ 28 /* dbg("ezusb_writememory %x, %d", address, length); */
29 if (!serial->dev) { 29 if (!serial->dev) {
30 err("%s - no physical device present, failing.", __FUNCTION__); 30 err("%s - no physical device present, failing.", __func__);
31 return -ENODEV; 31 return -ENODEV;
32 } 32 }
33 33
34 transfer_buffer = kmemdup(data, length, GFP_KERNEL); 34 transfer_buffer = kmemdup(data, length, GFP_KERNEL);
35 if (!transfer_buffer) { 35 if (!transfer_buffer) {
36 dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, length); 36 dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __func__, length);
37 return -ENOMEM; 37 return -ENOMEM;
38 } 38 }
39 result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), bRequest, 0x40, address, 0, transfer_buffer, length, 3000); 39 result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), bRequest, 0x40, address, 0, transfer_buffer, length, 3000);
@@ -45,10 +45,10 @@ int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit)
45{ 45{
46 int response; 46 int response;
47 47
48 /* dbg("%s - %d", __FUNCTION__, reset_bit); */ 48 /* dbg("%s - %d", __func__, reset_bit); */
49 response = ezusb_writememory (serial, CPUCS_REG, &reset_bit, 1, 0xa0); 49 response = ezusb_writememory (serial, CPUCS_REG, &reset_bit, 1, 0xa0);
50 if (response < 0) 50 if (response < 0)
51 dev_err(&serial->dev->dev, "%s- %d failed\n", __FUNCTION__, reset_bit); 51 dev_err(&serial->dev->dev, "%s- %d failed\n", __func__, reset_bit);
52 return response; 52 return response;
53} 53}
54 54
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 54b502f2924c..8b531b377dcb 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -525,7 +525,7 @@ static int update_mctrl(struct usb_serial_port *port, unsigned int set, unsigned
525 int rv; 525 int rv;
526 526
527 if (((set | clear) & (TIOCM_DTR | TIOCM_RTS)) == 0) { 527 if (((set | clear) & (TIOCM_DTR | TIOCM_RTS)) == 0) {
528 dbg("%s - DTR|RTS not being set|cleared", __FUNCTION__); 528 dbg("%s - DTR|RTS not being set|cleared", __func__);
529 return 0; /* no change */ 529 return 0; /* no change */
530 } 530 }
531 531
@@ -553,13 +553,13 @@ static int update_mctrl(struct usb_serial_port *port, unsigned int set, unsigned
553 kfree(buf); 553 kfree(buf);
554 if (rv < 0) { 554 if (rv < 0) {
555 err("%s Error from MODEM_CTRL urb: DTR %s, RTS %s", 555 err("%s Error from MODEM_CTRL urb: DTR %s, RTS %s",
556 __FUNCTION__, 556 __func__,
557 (set & TIOCM_DTR) ? "HIGH" : 557 (set & TIOCM_DTR) ? "HIGH" :
558 (clear & TIOCM_DTR) ? "LOW" : "unchanged", 558 (clear & TIOCM_DTR) ? "LOW" : "unchanged",
559 (set & TIOCM_RTS) ? "HIGH" : 559 (set & TIOCM_RTS) ? "HIGH" :
560 (clear & TIOCM_RTS) ? "LOW" : "unchanged"); 560 (clear & TIOCM_RTS) ? "LOW" : "unchanged");
561 } else { 561 } else {
562 dbg("%s - DTR %s, RTS %s", __FUNCTION__, 562 dbg("%s - DTR %s, RTS %s", __func__,
563 (set & TIOCM_DTR) ? "HIGH" : 563 (set & TIOCM_DTR) ? "HIGH" :
564 (clear & TIOCM_DTR) ? "LOW" : "unchanged", 564 (clear & TIOCM_DTR) ? "LOW" : "unchanged",
565 (set & TIOCM_RTS) ? "HIGH" : 565 (set & TIOCM_RTS) ? "HIGH" :
@@ -639,7 +639,7 @@ static __u32 get_ftdi_divisor(struct usb_serial_port * port)
639 /* 1. Get the baud rate from the tty settings, this observes alt_speed hack */ 639 /* 1. Get the baud rate from the tty settings, this observes alt_speed hack */
640 640
641 baud = tty_get_baud_rate(port->tty); 641 baud = tty_get_baud_rate(port->tty);
642 dbg("%s - tty_get_baud_rate reports speed %d", __FUNCTION__, baud); 642 dbg("%s - tty_get_baud_rate reports speed %d", __func__, baud);
643 643
644 /* 2. Observe async-compatible custom_divisor hack, update baudrate if needed */ 644 /* 2. Observe async-compatible custom_divisor hack, update baudrate if needed */
645 645
@@ -647,7 +647,7 @@ static __u32 get_ftdi_divisor(struct usb_serial_port * port)
647 ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) && 647 ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) &&
648 (priv->custom_divisor)) { 648 (priv->custom_divisor)) {
649 baud = priv->baud_base / priv->custom_divisor; 649 baud = priv->baud_base / priv->custom_divisor;
650 dbg("%s - custom divisor %d sets baud rate to %d", __FUNCTION__, priv->custom_divisor, baud); 650 dbg("%s - custom divisor %d sets baud rate to %d", __func__, priv->custom_divisor, baud);
651 } 651 }
652 652
653 /* 3. Convert baudrate to device-specific divisor */ 653 /* 3. Convert baudrate to device-specific divisor */
@@ -668,7 +668,7 @@ static __u32 get_ftdi_divisor(struct usb_serial_port * port)
668 case 115200: div_value = ftdi_sio_b115200; break; 668 case 115200: div_value = ftdi_sio_b115200; break;
669 } /* baud */ 669 } /* baud */
670 if (div_value == 0) { 670 if (div_value == 0) {
671 dbg("%s - Baudrate (%d) requested is not supported", __FUNCTION__, baud); 671 dbg("%s - Baudrate (%d) requested is not supported", __func__, baud);
672 div_value = ftdi_sio_b9600; 672 div_value = ftdi_sio_b9600;
673 baud = 9600; 673 baud = 9600;
674 div_okay = 0; 674 div_okay = 0;
@@ -678,7 +678,7 @@ static __u32 get_ftdi_divisor(struct usb_serial_port * port)
678 if (baud <= 3000000) { 678 if (baud <= 3000000) {
679 div_value = ftdi_232am_baud_to_divisor(baud); 679 div_value = ftdi_232am_baud_to_divisor(baud);
680 } else { 680 } else {
681 dbg("%s - Baud rate too high!", __FUNCTION__); 681 dbg("%s - Baud rate too high!", __func__);
682 baud = 9600; 682 baud = 9600;
683 div_value = ftdi_232am_baud_to_divisor(9600); 683 div_value = ftdi_232am_baud_to_divisor(9600);
684 div_okay = 0; 684 div_okay = 0;
@@ -690,7 +690,7 @@ static __u32 get_ftdi_divisor(struct usb_serial_port * port)
690 if (baud <= 3000000) { 690 if (baud <= 3000000) {
691 div_value = ftdi_232bm_baud_to_divisor(baud); 691 div_value = ftdi_232bm_baud_to_divisor(baud);
692 } else { 692 } else {
693 dbg("%s - Baud rate too high!", __FUNCTION__); 693 dbg("%s - Baud rate too high!", __func__);
694 div_value = ftdi_232bm_baud_to_divisor(9600); 694 div_value = ftdi_232bm_baud_to_divisor(9600);
695 div_okay = 0; 695 div_okay = 0;
696 baud = 9600; 696 baud = 9600;
@@ -700,7 +700,7 @@ static __u32 get_ftdi_divisor(struct usb_serial_port * port)
700 700
701 if (div_okay) { 701 if (div_okay) {
702 dbg("%s - Baud rate set to %d (divisor 0x%lX) on chip %s", 702 dbg("%s - Baud rate set to %d (divisor 0x%lX) on chip %s",
703 __FUNCTION__, baud, (unsigned long)div_value, 703 __func__, baud, (unsigned long)div_value,
704 ftdi_chip_name[priv->chip_type]); 704 ftdi_chip_name[priv->chip_type]);
705 } 705 }
706 706
@@ -801,7 +801,7 @@ static void ftdi_determine_type(struct usb_serial_port *port)
801 801
802 version = le16_to_cpu(udev->descriptor.bcdDevice); 802 version = le16_to_cpu(udev->descriptor.bcdDevice);
803 interfaces = udev->actconfig->desc.bNumInterfaces; 803 interfaces = udev->actconfig->desc.bNumInterfaces;
804 dbg("%s: bcdDevice = 0x%x, bNumInterfaces = %u", __FUNCTION__, 804 dbg("%s: bcdDevice = 0x%x, bNumInterfaces = %u", __func__,
805 version, interfaces); 805 version, interfaces);
806 if (interfaces > 1) { 806 if (interfaces > 1) {
807 int inter; 807 int inter;
@@ -819,7 +819,7 @@ static void ftdi_determine_type(struct usb_serial_port *port)
819 * to 0x200 when iSerialNumber is 0. */ 819 * to 0x200 when iSerialNumber is 0. */
820 if (version < 0x500) { 820 if (version < 0x500) {
821 dbg("%s: something fishy - bcdDevice too low for multi-interface device", 821 dbg("%s: something fishy - bcdDevice too low for multi-interface device",
822 __FUNCTION__); 822 __func__);
823 } 823 }
824 } else if (version < 0x200) { 824 } else if (version < 0x200) {
825 /* Old device. Assume its the original SIO. */ 825 /* Old device. Assume its the original SIO. */
@@ -857,7 +857,7 @@ static ssize_t show_latency_timer(struct device *dev, struct device_attribute *a
857 int rv = 0; 857 int rv = 0;
858 858
859 859
860 dbg("%s",__FUNCTION__); 860 dbg("%s",__func__);
861 861
862 rv = usb_control_msg(udev, 862 rv = usb_control_msg(udev,
863 usb_rcvctrlpipe(udev, 0), 863 usb_rcvctrlpipe(udev, 0),
@@ -884,7 +884,7 @@ static ssize_t store_latency_timer(struct device *dev, struct device_attribute *
884 int v = simple_strtoul(valbuf, NULL, 10); 884 int v = simple_strtoul(valbuf, NULL, 10);
885 int rv = 0; 885 int rv = 0;
886 886
887 dbg("%s: setting latency timer = %i", __FUNCTION__, v); 887 dbg("%s: setting latency timer = %i", __func__, v);
888 888
889 rv = usb_control_msg(udev, 889 rv = usb_control_msg(udev,
890 usb_sndctrlpipe(udev, 0), 890 usb_sndctrlpipe(udev, 0),
@@ -913,7 +913,7 @@ static ssize_t store_event_char(struct device *dev, struct device_attribute *att
913 int v = simple_strtoul(valbuf, NULL, 10); 913 int v = simple_strtoul(valbuf, NULL, 10);
914 int rv = 0; 914 int rv = 0;
915 915
916 dbg("%s: setting event char = %i", __FUNCTION__, v); 916 dbg("%s: setting event char = %i", __func__, v);
917 917
918 rv = usb_control_msg(udev, 918 rv = usb_control_msg(udev,
919 usb_sndctrlpipe(udev, 0), 919 usb_sndctrlpipe(udev, 0),
@@ -938,7 +938,7 @@ static int create_sysfs_attrs(struct usb_serial_port *port)
938 struct ftdi_private *priv = usb_get_serial_port_data(port); 938 struct ftdi_private *priv = usb_get_serial_port_data(port);
939 int retval = 0; 939 int retval = 0;
940 940
941 dbg("%s",__FUNCTION__); 941 dbg("%s",__func__);
942 942
943 /* XXX I've no idea if the original SIO supports the event_char 943 /* XXX I've no idea if the original SIO supports the event_char
944 * sysfs parameter, so I'm playing it safe. */ 944 * sysfs parameter, so I'm playing it safe. */
@@ -960,7 +960,7 @@ static void remove_sysfs_attrs(struct usb_serial_port *port)
960{ 960{
961 struct ftdi_private *priv = usb_get_serial_port_data(port); 961 struct ftdi_private *priv = usb_get_serial_port_data(port);
962 962
963 dbg("%s",__FUNCTION__); 963 dbg("%s",__func__);
964 964
965 /* XXX see create_sysfs_attrs */ 965 /* XXX see create_sysfs_attrs */
966 if (priv->chip_type != SIO) { 966 if (priv->chip_type != SIO) {
@@ -1002,11 +1002,11 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port)
1002 struct ftdi_sio_quirk *quirk = usb_get_serial_data(port->serial); 1002 struct ftdi_sio_quirk *quirk = usb_get_serial_data(port->serial);
1003 1003
1004 1004
1005 dbg("%s",__FUNCTION__); 1005 dbg("%s",__func__);
1006 1006
1007 priv = kzalloc(sizeof(struct ftdi_private), GFP_KERNEL); 1007 priv = kzalloc(sizeof(struct ftdi_private), GFP_KERNEL);
1008 if (!priv){ 1008 if (!priv){
1009 err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct ftdi_private)); 1009 err("%s- kmalloc(%Zd) failed.", __func__, sizeof(struct ftdi_private));
1010 return -ENOMEM; 1010 return -ENOMEM;
1011 } 1011 }
1012 1012
@@ -1055,7 +1055,7 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port)
1055/* Called from usbserial:serial_probe */ 1055/* Called from usbserial:serial_probe */
1056static void ftdi_USB_UIRT_setup (struct ftdi_private *priv) 1056static void ftdi_USB_UIRT_setup (struct ftdi_private *priv)
1057{ 1057{
1058 dbg("%s",__FUNCTION__); 1058 dbg("%s",__func__);
1059 1059
1060 priv->flags |= ASYNC_SPD_CUST; 1060 priv->flags |= ASYNC_SPD_CUST;
1061 priv->custom_divisor = 77; 1061 priv->custom_divisor = 77;
@@ -1066,7 +1066,7 @@ static void ftdi_USB_UIRT_setup (struct ftdi_private *priv)
1066 * baudrate (38400 gets mapped to 100000) and RTS-CTS enabled. */ 1066 * baudrate (38400 gets mapped to 100000) and RTS-CTS enabled. */
1067static void ftdi_HE_TIRA1_setup (struct ftdi_private *priv) 1067static void ftdi_HE_TIRA1_setup (struct ftdi_private *priv)
1068{ 1068{
1069 dbg("%s",__FUNCTION__); 1069 dbg("%s",__func__);
1070 1070
1071 priv->flags |= ASYNC_SPD_CUST; 1071 priv->flags |= ASYNC_SPD_CUST;
1072 priv->custom_divisor = 240; 1072 priv->custom_divisor = 240;
@@ -1084,7 +1084,7 @@ static int ftdi_jtag_probe(struct usb_serial *serial)
1084 struct usb_device *udev = serial->dev; 1084 struct usb_device *udev = serial->dev;
1085 struct usb_interface *interface = serial->interface; 1085 struct usb_interface *interface = serial->interface;
1086 1086
1087 dbg("%s",__FUNCTION__); 1087 dbg("%s",__func__);
1088 1088
1089 if (interface == udev->actconfig->interface[0]) { 1089 if (interface == udev->actconfig->interface[0]) {
1090 info("Ignoring serial port reserved for JTAG"); 1090 info("Ignoring serial port reserved for JTAG");
@@ -1120,14 +1120,14 @@ static int ftdi_mtxorb_hack_setup(struct usb_serial *serial)
1120 */ 1120 */
1121static void ftdi_shutdown (struct usb_serial *serial) 1121static void ftdi_shutdown (struct usb_serial *serial)
1122{ 1122{
1123 dbg("%s", __FUNCTION__); 1123 dbg("%s", __func__);
1124} 1124}
1125 1125
1126static int ftdi_sio_port_remove(struct usb_serial_port *port) 1126static int ftdi_sio_port_remove(struct usb_serial_port *port)
1127{ 1127{
1128 struct ftdi_private *priv = usb_get_serial_port_data(port); 1128 struct ftdi_private *priv = usb_get_serial_port_data(port);
1129 1129
1130 dbg("%s", __FUNCTION__); 1130 dbg("%s", __func__);
1131 1131
1132 remove_sysfs_attrs(port); 1132 remove_sysfs_attrs(port);
1133 1133
@@ -1152,7 +1152,7 @@ static int ftdi_open (struct usb_serial_port *port, struct file *filp)
1152 int result = 0; 1152 int result = 0;
1153 char buf[1]; /* Needed for the usb_control_msg I think */ 1153 char buf[1]; /* Needed for the usb_control_msg I think */
1154 1154
1155 dbg("%s", __FUNCTION__); 1155 dbg("%s", __func__);
1156 1156
1157 spin_lock_irqsave(&priv->tx_lock, flags); 1157 spin_lock_irqsave(&priv->tx_lock, flags);
1158 priv->tx_bytes = 0; 1158 priv->tx_bytes = 0;
@@ -1197,7 +1197,7 @@ static int ftdi_open (struct usb_serial_port *port, struct file *filp)
1197 ftdi_read_bulk_callback, port); 1197 ftdi_read_bulk_callback, port);
1198 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 1198 result = usb_submit_urb(port->read_urb, GFP_KERNEL);
1199 if (result) 1199 if (result)
1200 err("%s - failed submitting read urb, error %d", __FUNCTION__, result); 1200 err("%s - failed submitting read urb, error %d", __func__, result);
1201 1201
1202 1202
1203 return result; 1203 return result;
@@ -1219,7 +1219,7 @@ static void ftdi_close (struct usb_serial_port *port, struct file *filp)
1219 struct ftdi_private *priv = usb_get_serial_port_data(port); 1219 struct ftdi_private *priv = usb_get_serial_port_data(port);
1220 char buf[1]; 1220 char buf[1];
1221 1221
1222 dbg("%s", __FUNCTION__); 1222 dbg("%s", __func__);
1223 1223
1224 mutex_lock(&port->serial->disc_mutex); 1224 mutex_lock(&port->serial->disc_mutex);
1225 if (c_cflag & HUPCL && !port->serial->disconnected){ 1225 if (c_cflag & HUPCL && !port->serial->disconnected){
@@ -1266,7 +1266,7 @@ static int ftdi_write (struct usb_serial_port *port,
1266 int transfer_size; 1266 int transfer_size;
1267 unsigned long flags; 1267 unsigned long flags;
1268 1268
1269 dbg("%s port %d, %d bytes", __FUNCTION__, port->number, count); 1269 dbg("%s port %d, %d bytes", __func__, port->number, count);
1270 1270
1271 if (count == 0) { 1271 if (count == 0) {
1272 dbg("write request of 0 bytes"); 1272 dbg("write request of 0 bytes");
@@ -1275,7 +1275,7 @@ static int ftdi_write (struct usb_serial_port *port,
1275 spin_lock_irqsave(&priv->tx_lock, flags); 1275 spin_lock_irqsave(&priv->tx_lock, flags);
1276 if (priv->tx_outstanding_urbs > URB_UPPER_LIMIT) { 1276 if (priv->tx_outstanding_urbs > URB_UPPER_LIMIT) {
1277 spin_unlock_irqrestore(&priv->tx_lock, flags); 1277 spin_unlock_irqrestore(&priv->tx_lock, flags);
1278 dbg("%s - write limit hit\n", __FUNCTION__); 1278 dbg("%s - write limit hit\n", __func__);
1279 return 0; 1279 return 0;
1280 } 1280 }
1281 priv->tx_outstanding_urbs++; 1281 priv->tx_outstanding_urbs++;
@@ -1295,14 +1295,14 @@ static int ftdi_write (struct usb_serial_port *port,
1295 1295
1296 buffer = kmalloc (transfer_size, GFP_ATOMIC); 1296 buffer = kmalloc (transfer_size, GFP_ATOMIC);
1297 if (!buffer) { 1297 if (!buffer) {
1298 err("%s ran out of kernel memory for urb ...", __FUNCTION__); 1298 err("%s ran out of kernel memory for urb ...", __func__);
1299 count = -ENOMEM; 1299 count = -ENOMEM;
1300 goto error_no_buffer; 1300 goto error_no_buffer;
1301 } 1301 }
1302 1302
1303 urb = usb_alloc_urb(0, GFP_ATOMIC); 1303 urb = usb_alloc_urb(0, GFP_ATOMIC);
1304 if (!urb) { 1304 if (!urb) {
1305 err("%s - no more free urbs", __FUNCTION__); 1305 err("%s - no more free urbs", __func__);
1306 count = -ENOMEM; 1306 count = -ENOMEM;
1307 goto error_no_urb; 1307 goto error_no_urb;
1308 } 1308 }
@@ -1334,7 +1334,7 @@ static int ftdi_write (struct usb_serial_port *port,
1334 memcpy (buffer, buf, count); 1334 memcpy (buffer, buf, count);
1335 } 1335 }
1336 1336
1337 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, transfer_size, buffer); 1337 usb_serial_debug_data(debug, &port->dev, __func__, transfer_size, buffer);
1338 1338
1339 /* fill the buffer and send it */ 1339 /* fill the buffer and send it */
1340 usb_fill_bulk_urb(urb, port->serial->dev, 1340 usb_fill_bulk_urb(urb, port->serial->dev,
@@ -1344,7 +1344,7 @@ static int ftdi_write (struct usb_serial_port *port,
1344 1344
1345 status = usb_submit_urb(urb, GFP_ATOMIC); 1345 status = usb_submit_urb(urb, GFP_ATOMIC);
1346 if (status) { 1346 if (status) {
1347 err("%s - failed submitting write urb, error %d", __FUNCTION__, status); 1347 err("%s - failed submitting write urb, error %d", __func__, status);
1348 count = status; 1348 count = status;
1349 goto error; 1349 goto error;
1350 } else { 1350 } else {
@@ -1358,7 +1358,7 @@ static int ftdi_write (struct usb_serial_port *port,
1358 * really free it when it is finished with it */ 1358 * really free it when it is finished with it */
1359 usb_free_urb(urb); 1359 usb_free_urb(urb);
1360 1360
1361 dbg("%s write returning: %d", __FUNCTION__, count); 1361 dbg("%s write returning: %d", __func__, count);
1362 return count; 1362 return count;
1363error: 1363error:
1364 usb_free_urb(urb); 1364 usb_free_urb(urb);
@@ -1386,7 +1386,7 @@ static void ftdi_write_bulk_callback (struct urb *urb)
1386 /* free up the transfer buffer, as usb_free_urb() does not do this */ 1386 /* free up the transfer buffer, as usb_free_urb() does not do this */
1387 kfree (urb->transfer_buffer); 1387 kfree (urb->transfer_buffer);
1388 1388
1389 dbg("%s - port %d", __FUNCTION__, port->number); 1389 dbg("%s - port %d", __func__, port->number);
1390 1390
1391 if (status) { 1391 if (status) {
1392 dbg("nonzero write bulk status received: %d", status); 1392 dbg("nonzero write bulk status received: %d", status);
@@ -1395,7 +1395,7 @@ static void ftdi_write_bulk_callback (struct urb *urb)
1395 1395
1396 priv = usb_get_serial_port_data(port); 1396 priv = usb_get_serial_port_data(port);
1397 if (!priv) { 1397 if (!priv) {
1398 dbg("%s - bad port private data pointer - exiting", __FUNCTION__); 1398 dbg("%s - bad port private data pointer - exiting", __func__);
1399 return; 1399 return;
1400 } 1400 }
1401 /* account for transferred data */ 1401 /* account for transferred data */
@@ -1420,7 +1420,7 @@ static int ftdi_write_room( struct usb_serial_port *port )
1420 int room; 1420 int room;
1421 unsigned long flags; 1421 unsigned long flags;
1422 1422
1423 dbg("%s - port %d", __FUNCTION__, port->number); 1423 dbg("%s - port %d", __func__, port->number);
1424 1424
1425 spin_lock_irqsave(&priv->tx_lock, flags); 1425 spin_lock_irqsave(&priv->tx_lock, flags);
1426 if (priv->tx_outstanding_urbs < URB_UPPER_LIMIT) { 1426 if (priv->tx_outstanding_urbs < URB_UPPER_LIMIT) {
@@ -1444,13 +1444,13 @@ static int ftdi_chars_in_buffer (struct usb_serial_port *port)
1444 int buffered; 1444 int buffered;
1445 unsigned long flags; 1445 unsigned long flags;
1446 1446
1447 dbg("%s - port %d", __FUNCTION__, port->number); 1447 dbg("%s - port %d", __func__, port->number);
1448 1448
1449 spin_lock_irqsave(&priv->tx_lock, flags); 1449 spin_lock_irqsave(&priv->tx_lock, flags);
1450 buffered = (int)priv->tx_outstanding_bytes; 1450 buffered = (int)priv->tx_outstanding_bytes;
1451 spin_unlock_irqrestore(&priv->tx_lock, flags); 1451 spin_unlock_irqrestore(&priv->tx_lock, flags);
1452 if (buffered < 0) { 1452 if (buffered < 0) {
1453 err("%s outstanding tx bytes is negative!", __FUNCTION__); 1453 err("%s outstanding tx bytes is negative!", __func__);
1454 buffered = 0; 1454 buffered = 0;
1455 } 1455 }
1456 return buffered; 1456 return buffered;
@@ -1468,30 +1468,30 @@ static void ftdi_read_bulk_callback (struct urb *urb)
1468 int status = urb->status; 1468 int status = urb->status;
1469 1469
1470 if (urb->number_of_packets > 0) { 1470 if (urb->number_of_packets > 0) {
1471 err("%s transfer_buffer_length %d actual_length %d number of packets %d",__FUNCTION__, 1471 err("%s transfer_buffer_length %d actual_length %d number of packets %d",__func__,
1472 urb->transfer_buffer_length, urb->actual_length, urb->number_of_packets ); 1472 urb->transfer_buffer_length, urb->actual_length, urb->number_of_packets );
1473 err("%s transfer_flags %x ", __FUNCTION__,urb->transfer_flags ); 1473 err("%s transfer_flags %x ", __func__,urb->transfer_flags );
1474 } 1474 }
1475 1475
1476 dbg("%s - port %d", __FUNCTION__, port->number); 1476 dbg("%s - port %d", __func__, port->number);
1477 1477
1478 if (port->open_count <= 0) 1478 if (port->open_count <= 0)
1479 return; 1479 return;
1480 1480
1481 tty = port->tty; 1481 tty = port->tty;
1482 if (!tty) { 1482 if (!tty) {
1483 dbg("%s - bad tty pointer - exiting",__FUNCTION__); 1483 dbg("%s - bad tty pointer - exiting",__func__);
1484 return; 1484 return;
1485 } 1485 }
1486 1486
1487 priv = usb_get_serial_port_data(port); 1487 priv = usb_get_serial_port_data(port);
1488 if (!priv) { 1488 if (!priv) {
1489 dbg("%s - bad port private data pointer - exiting", __FUNCTION__); 1489 dbg("%s - bad port private data pointer - exiting", __func__);
1490 return; 1490 return;
1491 } 1491 }
1492 1492
1493 if (urb != port->read_urb) { 1493 if (urb != port->read_urb) {
1494 err("%s - Not my urb!", __FUNCTION__); 1494 err("%s - Not my urb!", __func__);
1495 } 1495 }
1496 1496
1497 if (status) { 1497 if (status) {
@@ -1529,39 +1529,39 @@ static void ftdi_process_read (struct work_struct *work)
1529 int packet_offset; 1529 int packet_offset;
1530 unsigned long flags; 1530 unsigned long flags;
1531 1531
1532 dbg("%s - port %d", __FUNCTION__, port->number); 1532 dbg("%s - port %d", __func__, port->number);
1533 1533
1534 if (port->open_count <= 0) 1534 if (port->open_count <= 0)
1535 return; 1535 return;
1536 1536
1537 tty = port->tty; 1537 tty = port->tty;
1538 if (!tty) { 1538 if (!tty) {
1539 dbg("%s - bad tty pointer - exiting",__FUNCTION__); 1539 dbg("%s - bad tty pointer - exiting",__func__);
1540 return; 1540 return;
1541 } 1541 }
1542 1542
1543 priv = usb_get_serial_port_data(port); 1543 priv = usb_get_serial_port_data(port);
1544 if (!priv) { 1544 if (!priv) {
1545 dbg("%s - bad port private data pointer - exiting", __FUNCTION__); 1545 dbg("%s - bad port private data pointer - exiting", __func__);
1546 return; 1546 return;
1547 } 1547 }
1548 1548
1549 urb = port->read_urb; 1549 urb = port->read_urb;
1550 if (!urb) { 1550 if (!urb) {
1551 dbg("%s - bad read_urb pointer - exiting", __FUNCTION__); 1551 dbg("%s - bad read_urb pointer - exiting", __func__);
1552 return; 1552 return;
1553 } 1553 }
1554 1554
1555 data = urb->transfer_buffer; 1555 data = urb->transfer_buffer;
1556 1556
1557 if (priv->rx_processed) { 1557 if (priv->rx_processed) {
1558 dbg("%s - already processed: %d bytes, %d remain", __FUNCTION__, 1558 dbg("%s - already processed: %d bytes, %d remain", __func__,
1559 priv->rx_processed, 1559 priv->rx_processed,
1560 urb->actual_length - priv->rx_processed); 1560 urb->actual_length - priv->rx_processed);
1561 } else { 1561 } else {
1562 /* The first two bytes of every read packet are status */ 1562 /* The first two bytes of every read packet are status */
1563 if (urb->actual_length > 2) { 1563 if (urb->actual_length > 2) {
1564 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 1564 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
1565 } else { 1565 } else {
1566 dbg("Status only: %03oo %03oo",data[0],data[1]); 1566 dbg("Status only: %03oo %03oo",data[0],data[1]);
1567 } 1567 }
@@ -1591,17 +1591,17 @@ static void ftdi_process_read (struct work_struct *work)
1591 1591
1592 length = min(PKTSZ, urb->actual_length-packet_offset)-2; 1592 length = min(PKTSZ, urb->actual_length-packet_offset)-2;
1593 if (length < 0) { 1593 if (length < 0) {
1594 err("%s - bad packet length: %d", __FUNCTION__, length+2); 1594 err("%s - bad packet length: %d", __func__, length+2);
1595 length = 0; 1595 length = 0;
1596 } 1596 }
1597 1597
1598 if (priv->rx_flags & THROTTLED) { 1598 if (priv->rx_flags & THROTTLED) {
1599 dbg("%s - throttled", __FUNCTION__); 1599 dbg("%s - throttled", __func__);
1600 break; 1600 break;
1601 } 1601 }
1602 if (tty_buffer_request_room(tty, length) < length) { 1602 if (tty_buffer_request_room(tty, length) < length) {
1603 /* break out & wait for throttling/unthrottling to happen */ 1603 /* break out & wait for throttling/unthrottling to happen */
1604 dbg("%s - receive room low", __FUNCTION__); 1604 dbg("%s - receive room low", __func__);
1605 break; 1605 break;
1606 } 1606 }
1607 1607
@@ -1669,7 +1669,7 @@ static void ftdi_process_read (struct work_struct *work)
1669 /* not completely processed - record progress */ 1669 /* not completely processed - record progress */
1670 priv->rx_processed = packet_offset; 1670 priv->rx_processed = packet_offset;
1671 dbg("%s - incomplete, %d bytes processed, %d remain", 1671 dbg("%s - incomplete, %d bytes processed, %d remain",
1672 __FUNCTION__, packet_offset, 1672 __func__, packet_offset,
1673 urb->actual_length - packet_offset); 1673 urb->actual_length - packet_offset);
1674 /* check if we were throttled while processing */ 1674 /* check if we were throttled while processing */
1675 spin_lock_irqsave(&priv->rx_lock, flags); 1675 spin_lock_irqsave(&priv->rx_lock, flags);
@@ -1677,7 +1677,7 @@ static void ftdi_process_read (struct work_struct *work)
1677 priv->rx_flags |= ACTUALLY_THROTTLED; 1677 priv->rx_flags |= ACTUALLY_THROTTLED;
1678 spin_unlock_irqrestore(&priv->rx_lock, flags); 1678 spin_unlock_irqrestore(&priv->rx_lock, flags);
1679 dbg("%s - deferring remainder until unthrottled", 1679 dbg("%s - deferring remainder until unthrottled",
1680 __FUNCTION__); 1680 __func__);
1681 return; 1681 return;
1682 } 1682 }
1683 spin_unlock_irqrestore(&priv->rx_lock, flags); 1683 spin_unlock_irqrestore(&priv->rx_lock, flags);
@@ -1686,7 +1686,7 @@ static void ftdi_process_read (struct work_struct *work)
1686 /* delay processing of remainder */ 1686 /* delay processing of remainder */
1687 schedule_delayed_work(&priv->rx_work, 1); 1687 schedule_delayed_work(&priv->rx_work, 1);
1688 } else { 1688 } else {
1689 dbg("%s - port is closed", __FUNCTION__); 1689 dbg("%s - port is closed", __func__);
1690 } 1690 }
1691 return; 1691 return;
1692 } 1692 }
@@ -1704,7 +1704,7 @@ static void ftdi_process_read (struct work_struct *work)
1704 1704
1705 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 1705 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
1706 if (result) 1706 if (result)
1707 err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); 1707 err("%s - failed resubmitting read urb, error %d", __func__, result);
1708 } 1708 }
1709 1709
1710 return; 1710 return;
@@ -1733,10 +1733,10 @@ static void ftdi_break_ctl( struct usb_serial_port *port, int break_state )
1733 FTDI_SIO_SET_DATA_REQUEST_TYPE, 1733 FTDI_SIO_SET_DATA_REQUEST_TYPE,
1734 urb_value , priv->interface, 1734 urb_value , priv->interface,
1735 buf, 0, WDR_TIMEOUT) < 0) { 1735 buf, 0, WDR_TIMEOUT) < 0) {
1736 err("%s FAILED to enable/disable break state (state was %d)", __FUNCTION__,break_state); 1736 err("%s FAILED to enable/disable break state (state was %d)", __func__,break_state);
1737 } 1737 }
1738 1738
1739 dbg("%s break state is %d - urb is %d", __FUNCTION__,break_state, urb_value); 1739 dbg("%s break state is %d - urb is %d", __func__,break_state, urb_value);
1740 1740
1741} 1741}
1742 1742
@@ -1760,18 +1760,18 @@ static void ftdi_set_termios (struct usb_serial_port *port, struct ktermios *old
1760 unsigned char vstop; 1760 unsigned char vstop;
1761 unsigned char vstart; 1761 unsigned char vstart;
1762 1762
1763 dbg("%s", __FUNCTION__); 1763 dbg("%s", __func__);
1764 1764
1765 /* Force baud rate if this device requires it, unless it is set to B0. */ 1765 /* Force baud rate if this device requires it, unless it is set to B0. */
1766 if (priv->force_baud && ((termios->c_cflag & CBAUD) != B0)) { 1766 if (priv->force_baud && ((termios->c_cflag & CBAUD) != B0)) {
1767 dbg("%s: forcing baud rate for this device", __FUNCTION__); 1767 dbg("%s: forcing baud rate for this device", __func__);
1768 tty_encode_baud_rate(port->tty, priv->force_baud, 1768 tty_encode_baud_rate(port->tty, priv->force_baud,
1769 priv->force_baud); 1769 priv->force_baud);
1770 } 1770 }
1771 1771
1772 /* Force RTS-CTS if this device requires it. */ 1772 /* Force RTS-CTS if this device requires it. */
1773 if (priv->force_rtscts) { 1773 if (priv->force_rtscts) {
1774 dbg("%s: forcing rtscts for this device", __FUNCTION__); 1774 dbg("%s: forcing rtscts for this device", __func__);
1775 termios->c_cflag |= CRTSCTS; 1775 termios->c_cflag |= CRTSCTS;
1776 } 1776 }
1777 1777
@@ -1815,7 +1815,7 @@ static void ftdi_set_termios (struct usb_serial_port *port, struct ktermios *old
1815 FTDI_SIO_SET_DATA_REQUEST_TYPE, 1815 FTDI_SIO_SET_DATA_REQUEST_TYPE,
1816 urb_value , priv->interface, 1816 urb_value , priv->interface,
1817 buf, 0, WDR_SHORT_TIMEOUT) < 0) { 1817 buf, 0, WDR_SHORT_TIMEOUT) < 0) {
1818 err("%s FAILED to set databits/stopbits/parity", __FUNCTION__); 1818 err("%s FAILED to set databits/stopbits/parity", __func__);
1819 } 1819 }
1820 1820
1821 /* Now do the baudrate */ 1821 /* Now do the baudrate */
@@ -1826,14 +1826,14 @@ static void ftdi_set_termios (struct usb_serial_port *port, struct ktermios *old
1826 FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE, 1826 FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
1827 0, priv->interface, 1827 0, priv->interface,
1828 buf, 0, WDR_TIMEOUT) < 0) { 1828 buf, 0, WDR_TIMEOUT) < 0) {
1829 err("%s error from disable flowcontrol urb", __FUNCTION__); 1829 err("%s error from disable flowcontrol urb", __func__);
1830 } 1830 }
1831 /* Drop RTS and DTR */ 1831 /* Drop RTS and DTR */
1832 clear_mctrl(port, TIOCM_DTR | TIOCM_RTS); 1832 clear_mctrl(port, TIOCM_DTR | TIOCM_RTS);
1833 } else { 1833 } else {
1834 /* set the baudrate determined before */ 1834 /* set the baudrate determined before */
1835 if (change_speed(port)) { 1835 if (change_speed(port)) {
1836 err("%s urb failed to set baudrate", __FUNCTION__); 1836 err("%s urb failed to set baudrate", __func__);
1837 } 1837 }
1838 /* Ensure RTS and DTR are raised when baudrate changed from 0 */ 1838 /* Ensure RTS and DTR are raised when baudrate changed from 0 */
1839 if (!old_termios || (old_termios->c_cflag & CBAUD) == B0) { 1839 if (!old_termios || (old_termios->c_cflag & CBAUD) == B0) {
@@ -1844,7 +1844,7 @@ static void ftdi_set_termios (struct usb_serial_port *port, struct ktermios *old
1844 /* Set flow control */ 1844 /* Set flow control */
1845 /* Note device also supports DTR/CD (ugh) and Xon/Xoff in hardware */ 1845 /* Note device also supports DTR/CD (ugh) and Xon/Xoff in hardware */
1846 if (cflag & CRTSCTS) { 1846 if (cflag & CRTSCTS) {
1847 dbg("%s Setting to CRTSCTS flow control", __FUNCTION__); 1847 dbg("%s Setting to CRTSCTS flow control", __func__);
1848 if (usb_control_msg(dev, 1848 if (usb_control_msg(dev,
1849 usb_sndctrlpipe(dev, 0), 1849 usb_sndctrlpipe(dev, 0),
1850 FTDI_SIO_SET_FLOW_CTRL_REQUEST, 1850 FTDI_SIO_SET_FLOW_CTRL_REQUEST,
@@ -1862,7 +1862,7 @@ static void ftdi_set_termios (struct usb_serial_port *port, struct ktermios *old
1862 * if IXOFF is not set, the pre-xon/xoff code is executed. 1862 * if IXOFF is not set, the pre-xon/xoff code is executed.
1863 */ 1863 */
1864 if (iflag & IXOFF) { 1864 if (iflag & IXOFF) {
1865 dbg("%s request to enable xonxoff iflag=%04x",__FUNCTION__,iflag); 1865 dbg("%s request to enable xonxoff iflag=%04x",__func__,iflag);
1866 // Try to enable the XON/XOFF on the ftdi_sio 1866 // Try to enable the XON/XOFF on the ftdi_sio
1867 // Set the vstart and vstop -- could have been done up above where 1867 // Set the vstart and vstop -- could have been done up above where
1868 // a lot of other dereferencing is done but that would be very 1868 // a lot of other dereferencing is done but that would be very
@@ -1883,7 +1883,7 @@ static void ftdi_set_termios (struct usb_serial_port *port, struct ktermios *old
1883 } else { 1883 } else {
1884 /* else clause to only run if cfag ! CRTSCTS and iflag ! XOFF */ 1884 /* else clause to only run if cfag ! CRTSCTS and iflag ! XOFF */
1885 /* CHECKME Assuming XON/XOFF handled by tty stack - not by device */ 1885 /* CHECKME Assuming XON/XOFF handled by tty stack - not by device */
1886 dbg("%s Turning off hardware flow control", __FUNCTION__); 1886 dbg("%s Turning off hardware flow control", __func__);
1887 if (usb_control_msg(dev, 1887 if (usb_control_msg(dev,
1888 usb_sndctrlpipe(dev, 0), 1888 usb_sndctrlpipe(dev, 0),
1889 FTDI_SIO_SET_FLOW_CTRL_REQUEST, 1889 FTDI_SIO_SET_FLOW_CTRL_REQUEST,
@@ -1905,7 +1905,7 @@ static int ftdi_tiocmget (struct usb_serial_port *port, struct file *file)
1905 unsigned char buf[2]; 1905 unsigned char buf[2];
1906 int ret; 1906 int ret;
1907 1907
1908 dbg("%s TIOCMGET", __FUNCTION__); 1908 dbg("%s TIOCMGET", __func__);
1909 switch (priv->chip_type) { 1909 switch (priv->chip_type) {
1910 case SIO: 1910 case SIO:
1911 /* Request the status from the device */ 1911 /* Request the status from the device */
@@ -1915,7 +1915,7 @@ static int ftdi_tiocmget (struct usb_serial_port *port, struct file *file)
1915 FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE, 1915 FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
1916 0, 0, 1916 0, 0,
1917 buf, 1, WDR_TIMEOUT)) < 0 ) { 1917 buf, 1, WDR_TIMEOUT)) < 0 ) {
1918 err("%s Could not get modem status of device - err: %d", __FUNCTION__, 1918 err("%s Could not get modem status of device - err: %d", __func__,
1919 ret); 1919 ret);
1920 return(ret); 1920 return(ret);
1921 } 1921 }
@@ -1932,7 +1932,7 @@ static int ftdi_tiocmget (struct usb_serial_port *port, struct file *file)
1932 FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE, 1932 FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
1933 0, priv->interface, 1933 0, priv->interface,
1934 buf, 2, WDR_TIMEOUT)) < 0 ) { 1934 buf, 2, WDR_TIMEOUT)) < 0 ) {
1935 err("%s Could not get modem status of device - err: %d", __FUNCTION__, 1935 err("%s Could not get modem status of device - err: %d", __func__,
1936 ret); 1936 ret);
1937 return(ret); 1937 return(ret);
1938 } 1938 }
@@ -1951,7 +1951,7 @@ static int ftdi_tiocmget (struct usb_serial_port *port, struct file *file)
1951 1951
1952static int ftdi_tiocmset(struct usb_serial_port *port, struct file * file, unsigned int set, unsigned int clear) 1952static int ftdi_tiocmset(struct usb_serial_port *port, struct file * file, unsigned int set, unsigned int clear)
1953{ 1953{
1954 dbg("%s TIOCMSET", __FUNCTION__); 1954 dbg("%s TIOCMSET", __func__);
1955 return update_mctrl(port, set, clear); 1955 return update_mctrl(port, set, clear);
1956} 1956}
1957 1957
@@ -1960,7 +1960,7 @@ static int ftdi_ioctl (struct usb_serial_port *port, struct file * file, unsigne
1960{ 1960{
1961 struct ftdi_private *priv = usb_get_serial_port_data(port); 1961 struct ftdi_private *priv = usb_get_serial_port_data(port);
1962 1962
1963 dbg("%s cmd 0x%04x", __FUNCTION__, cmd); 1963 dbg("%s cmd 0x%04x", __func__, cmd);
1964 1964
1965 /* Based on code from acm.c and others */ 1965 /* Based on code from acm.c and others */
1966 switch (cmd) { 1966 switch (cmd) {
@@ -2019,7 +2019,7 @@ static int ftdi_ioctl (struct usb_serial_port *port, struct file * file, unsigne
2019 /* This is not necessarily an error - turns out the higher layers will do 2019 /* This is not necessarily an error - turns out the higher layers will do
2020 * some ioctls itself (see comment above) 2020 * some ioctls itself (see comment above)
2021 */ 2021 */
2022 dbg("%s arg not supported - it was 0x%04x - check /usr/include/asm/ioctls.h", __FUNCTION__, cmd); 2022 dbg("%s arg not supported - it was 0x%04x - check /usr/include/asm/ioctls.h", __func__, cmd);
2023 2023
2024 return(-ENOIOCTLCMD); 2024 return(-ENOIOCTLCMD);
2025} /* ftdi_ioctl */ 2025} /* ftdi_ioctl */
@@ -2030,7 +2030,7 @@ static void ftdi_throttle (struct usb_serial_port *port)
2030 struct ftdi_private *priv = usb_get_serial_port_data(port); 2030 struct ftdi_private *priv = usb_get_serial_port_data(port);
2031 unsigned long flags; 2031 unsigned long flags;
2032 2032
2033 dbg("%s - port %d", __FUNCTION__, port->number); 2033 dbg("%s - port %d", __func__, port->number);
2034 2034
2035 spin_lock_irqsave(&priv->rx_lock, flags); 2035 spin_lock_irqsave(&priv->rx_lock, flags);
2036 priv->rx_flags |= THROTTLED; 2036 priv->rx_flags |= THROTTLED;
@@ -2044,7 +2044,7 @@ static void ftdi_unthrottle (struct usb_serial_port *port)
2044 int actually_throttled; 2044 int actually_throttled;
2045 unsigned long flags; 2045 unsigned long flags;
2046 2046
2047 dbg("%s - port %d", __FUNCTION__, port->number); 2047 dbg("%s - port %d", __func__, port->number);
2048 2048
2049 spin_lock_irqsave(&priv->rx_lock, flags); 2049 spin_lock_irqsave(&priv->rx_lock, flags);
2050 actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED; 2050 actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED;
@@ -2059,7 +2059,7 @@ static int __init ftdi_init (void)
2059{ 2059{
2060 int retval; 2060 int retval;
2061 2061
2062 dbg("%s", __FUNCTION__); 2062 dbg("%s", __func__);
2063 if (vendor > 0 && product > 0) { 2063 if (vendor > 0 && product > 0) {
2064 /* Add user specified VID/PID to reserved element of table. */ 2064 /* Add user specified VID/PID to reserved element of table. */
2065 int i; 2065 int i;
@@ -2088,7 +2088,7 @@ failed_sio_register:
2088static void __exit ftdi_exit (void) 2088static void __exit ftdi_exit (void)
2089{ 2089{
2090 2090
2091 dbg("%s", __FUNCTION__); 2091 dbg("%s", __func__);
2092 2092
2093 usb_deregister (&ftdi_driver); 2093 usb_deregister (&ftdi_driver);
2094 usb_serial_deregister (&ftdi_sio_device); 2094 usb_serial_deregister (&ftdi_sio_device);
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
index 87b77f92ae07..513d771adc4e 100644
--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -280,7 +280,7 @@ static void send_to_tty(struct usb_serial_port *port,
280 if (tty && actual_length) { 280 if (tty && actual_length) {
281 281
282 usb_serial_debug_data(debug, &port->dev, 282 usb_serial_debug_data(debug, &port->dev,
283 __FUNCTION__, actual_length, data); 283 __func__, actual_length, data);
284 284
285 tty_buffer_request_room(tty, actual_length); 285 tty_buffer_request_room(tty, actual_length);
286 tty_insert_flip_string(tty, data, actual_length); 286 tty_insert_flip_string(tty, data, actual_length);
@@ -355,7 +355,7 @@ static void pkt_clear(struct garmin_data * garmin_data_p)
355 unsigned long flags; 355 unsigned long flags;
356 struct garmin_packet *result = NULL; 356 struct garmin_packet *result = NULL;
357 357
358 dbg("%s", __FUNCTION__); 358 dbg("%s", __func__);
359 359
360 spin_lock_irqsave(&garmin_data_p->lock, flags); 360 spin_lock_irqsave(&garmin_data_p->lock, flags);
361 while (!list_empty(&garmin_data_p->pktlist)) { 361 while (!list_empty(&garmin_data_p->pktlist)) {
@@ -379,7 +379,7 @@ static int gsp_send_ack(struct garmin_data * garmin_data_p, __u8 pkt_id)
379 __u8 *ptr = pkt; 379 __u8 *ptr = pkt;
380 unsigned l = 0; 380 unsigned l = 0;
381 381
382 dbg("%s - pkt-id: 0x%X.", __FUNCTION__, 0xFF & pkt_id); 382 dbg("%s - pkt-id: 0x%X.", __func__, 0xFF & pkt_id);
383 383
384 *ptr++ = DLE; 384 *ptr++ = DLE;
385 *ptr++ = ACK; 385 *ptr++ = ACK;
@@ -429,11 +429,11 @@ static int gsp_rec_packet(struct garmin_data * garmin_data_p, int count)
429 int size = recpkt[1]; 429 int size = recpkt[1];
430 430
431 usb_serial_debug_data(debug, &garmin_data_p->port->dev, 431 usb_serial_debug_data(debug, &garmin_data_p->port->dev,
432 __FUNCTION__, count-GSP_INITIAL_OFFSET, recpkt); 432 __func__, count-GSP_INITIAL_OFFSET, recpkt);
433 433
434 if (size != (count-GSP_INITIAL_OFFSET-3)) { 434 if (size != (count-GSP_INITIAL_OFFSET-3)) {
435 dbg("%s - invalid size, expected %d bytes, got %d", 435 dbg("%s - invalid size, expected %d bytes, got %d",
436 __FUNCTION__, size, (count-GSP_INITIAL_OFFSET-3)); 436 __func__, size, (count-GSP_INITIAL_OFFSET-3));
437 return -EINVPKT; 437 return -EINVPKT;
438 } 438 }
439 439
@@ -443,7 +443,7 @@ static int gsp_rec_packet(struct garmin_data * garmin_data_p, int count)
443 // sanity check, remove after test ... 443 // sanity check, remove after test ...
444 if ((__u8*)&(usbdata[3]) != recpkt) { 444 if ((__u8*)&(usbdata[3]) != recpkt) {
445 dbg("%s - ptr mismatch %p - %p", 445 dbg("%s - ptr mismatch %p - %p",
446 __FUNCTION__, &(usbdata[4]), recpkt); 446 __func__, &(usbdata[4]), recpkt);
447 return -EINVPKT; 447 return -EINVPKT;
448 } 448 }
449 449
@@ -454,7 +454,7 @@ static int gsp_rec_packet(struct garmin_data * garmin_data_p, int count)
454 454
455 if ((0xff & (cksum + *recpkt)) != 0) { 455 if ((0xff & (cksum + *recpkt)) != 0) {
456 dbg("%s - invalid checksum, expected %02x, got %02x", 456 dbg("%s - invalid checksum, expected %02x, got %02x",
457 __FUNCTION__, 0xff & -cksum, 0xff & *recpkt); 457 __func__, 0xff & -cksum, 0xff & *recpkt);
458 return -EINVPKT; 458 return -EINVPKT;
459 } 459 }
460 460
@@ -519,7 +519,7 @@ static int gsp_receive(struct garmin_data * garmin_data_p,
519 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 519 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
520 520
521 dbg("%s - dle=%d skip=%d size=%d count=%d", 521 dbg("%s - dle=%d skip=%d size=%d count=%d",
522 __FUNCTION__, dleSeen, skip, size, count); 522 __func__, dleSeen, skip, size, count);
523 523
524 if (size == 0) { 524 if (size == 0) {
525 size = GSP_INITIAL_OFFSET; 525 size = GSP_INITIAL_OFFSET;
@@ -578,7 +578,7 @@ static int gsp_receive(struct garmin_data * garmin_data_p,
578 } 578 }
579 579
580 if (size >= GPS_IN_BUFSIZ) { 580 if (size >= GPS_IN_BUFSIZ) {
581 dbg("%s - packet too large.", __FUNCTION__); 581 dbg("%s - packet too large.", __func__);
582 skip = 1; 582 skip = 1;
583 size = GSP_INITIAL_OFFSET; 583 size = GSP_INITIAL_OFFSET;
584 dleSeen = 0; 584 dleSeen = 0;
@@ -634,7 +634,7 @@ static int gsp_send(struct garmin_data * garmin_data_p,
634 int i=0; 634 int i=0;
635 int k; 635 int k;
636 636
637 dbg("%s - state %d - %d bytes.", __FUNCTION__, 637 dbg("%s - state %d - %d bytes.", __func__,
638 garmin_data_p->state, count); 638 garmin_data_p->state, count);
639 639
640 k = garmin_data_p->outsize; 640 k = garmin_data_p->outsize;
@@ -658,13 +658,13 @@ static int gsp_send(struct garmin_data * garmin_data_p,
658 return 0; 658 return 0;
659 } 659 }
660 660
661 dbg("%s - %d bytes in buffer, %d bytes in pkt.", __FUNCTION__, 661 dbg("%s - %d bytes in buffer, %d bytes in pkt.", __func__,
662 k, i); 662 k, i);
663 663
664 /* garmin_data_p->outbuffer now contains a complete packet */ 664 /* garmin_data_p->outbuffer now contains a complete packet */
665 665
666 usb_serial_debug_data(debug, &garmin_data_p->port->dev, 666 usb_serial_debug_data(debug, &garmin_data_p->port->dev,
667 __FUNCTION__, k, garmin_data_p->outbuffer); 667 __func__, k, garmin_data_p->outbuffer);
668 668
669 garmin_data_p->outsize = 0; 669 garmin_data_p->outsize = 0;
670 670
@@ -749,7 +749,7 @@ static void gsp_next_packet(struct garmin_data * garmin_data_p)
749 struct garmin_packet *pkt = NULL; 749 struct garmin_packet *pkt = NULL;
750 750
751 while ((pkt = pkt_pop(garmin_data_p)) != NULL) { 751 while ((pkt = pkt_pop(garmin_data_p)) != NULL) {
752 dbg("%s - next pkt: %d", __FUNCTION__, pkt->seq); 752 dbg("%s - next pkt: %d", __func__, pkt->seq);
753 if (gsp_send(garmin_data_p, pkt->data, pkt->size) > 0) { 753 if (gsp_send(garmin_data_p, pkt->data, pkt->size) > 0) {
754 kfree(pkt); 754 kfree(pkt);
755 return; 755 return;
@@ -794,7 +794,7 @@ static int nat_receive(struct garmin_data * garmin_data_p,
794 if (len >= GPS_IN_BUFSIZ) { 794 if (len >= GPS_IN_BUFSIZ) {
795 /* seem to be an invalid packet, ignore rest of input */ 795 /* seem to be an invalid packet, ignore rest of input */
796 dbg("%s - packet size too large: %d", 796 dbg("%s - packet size too large: %d",
797 __FUNCTION__, len); 797 __func__, len);
798 garmin_data_p->insize = 0; 798 garmin_data_p->insize = 0;
799 count = 0; 799 count = 0;
800 result = -EINVPKT; 800 result = -EINVPKT;
@@ -873,11 +873,11 @@ static int process_resetdev_request(struct usb_serial_port *port)
873 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 873 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
874 874
875 usb_kill_urb (port->interrupt_in_urb); 875 usb_kill_urb (port->interrupt_in_urb);
876 dbg("%s - usb_reset_device", __FUNCTION__ ); 876 dbg("%s - usb_reset_device", __func__ );
877 status = usb_reset_device(port->serial->dev); 877 status = usb_reset_device(port->serial->dev);
878 if (status) 878 if (status)
879 dbg("%s - usb_reset_device failed: %d", 879 dbg("%s - usb_reset_device failed: %d",
880 __FUNCTION__, status); 880 __func__, status);
881 return status; 881 return status;
882} 882}
883 883
@@ -926,18 +926,18 @@ static int garmin_init_session(struct usb_serial_port *port)
926 if (status == 0) { 926 if (status == 0) {
927 usb_kill_urb (port->interrupt_in_urb); 927 usb_kill_urb (port->interrupt_in_urb);
928 928
929 dbg("%s - adding interrupt input", __FUNCTION__); 929 dbg("%s - adding interrupt input", __func__);
930 port->interrupt_in_urb->dev = serial->dev; 930 port->interrupt_in_urb->dev = serial->dev;
931 status = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 931 status = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
932 if (status) 932 if (status)
933 dev_err(&serial->dev->dev, 933 dev_err(&serial->dev->dev,
934 "%s - failed submitting interrupt urb," 934 "%s - failed submitting interrupt urb,"
935 " error %d\n", 935 " error %d\n",
936 __FUNCTION__, status); 936 __func__, status);
937 } 937 }
938 938
939 if (status == 0) { 939 if (status == 0) {
940 dbg("%s - starting session ...", __FUNCTION__); 940 dbg("%s - starting session ...", __func__);
941 garmin_data_p->state = STATE_ACTIVE; 941 garmin_data_p->state = STATE_ACTIVE;
942 status = garmin_write_bulk(port, GARMIN_START_SESSION_REQ, 942 status = garmin_write_bulk(port, GARMIN_START_SESSION_REQ,
943 sizeof(GARMIN_START_SESSION_REQ), 943 sizeof(GARMIN_START_SESSION_REQ),
@@ -976,7 +976,7 @@ static int garmin_open (struct usb_serial_port *port, struct file *filp)
976 int status = 0; 976 int status = 0;
977 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 977 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
978 978
979 dbg("%s - port %d", __FUNCTION__, port->number); 979 dbg("%s - port %d", __func__, port->number);
980 980
981 /* 981 /*
982 * Force low_latency on so that our tty_push actually forces the data 982 * Force low_latency on so that our tty_push actually forces the data
@@ -1013,7 +1013,7 @@ static void garmin_close (struct usb_serial_port *port, struct file * filp)
1013 struct usb_serial *serial = port->serial; 1013 struct usb_serial *serial = port->serial;
1014 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1014 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1015 1015
1016 dbg("%s - port %d - mode=%d state=%d flags=0x%X", __FUNCTION__, 1016 dbg("%s - port %d - mode=%d state=%d flags=0x%X", __func__,
1017 port->number, garmin_data_p->mode, 1017 port->number, garmin_data_p->mode,
1018 garmin_data_p->state, garmin_data_p->flags); 1018 garmin_data_p->state, garmin_data_p->flags);
1019 1019
@@ -1052,7 +1052,7 @@ static void garmin_write_bulk_callback (struct urb *urb)
1052 if (port) { 1052 if (port) {
1053 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1053 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1054 1054
1055 dbg("%s - port %d", __FUNCTION__, port->number); 1055 dbg("%s - port %d", __func__, port->number);
1056 1056
1057 if (GARMIN_LAYERID_APPL == getLayerId(urb->transfer_buffer) 1057 if (GARMIN_LAYERID_APPL == getLayerId(urb->transfer_buffer)
1058 && (garmin_data_p->mode == MODE_GARMIN_SERIAL)) { 1058 && (garmin_data_p->mode == MODE_GARMIN_SERIAL)) {
@@ -1061,7 +1061,7 @@ static void garmin_write_bulk_callback (struct urb *urb)
1061 1061
1062 if (status) { 1062 if (status) {
1063 dbg("%s - nonzero write bulk status received: %d", 1063 dbg("%s - nonzero write bulk status received: %d",
1064 __FUNCTION__, urb->status); 1064 __func__, urb->status);
1065 spin_lock_irqsave(&garmin_data_p->lock, flags); 1065 spin_lock_irqsave(&garmin_data_p->lock, flags);
1066 garmin_data_p->flags |= CLEAR_HALT_REQUIRED; 1066 garmin_data_p->flags |= CLEAR_HALT_REQUIRED;
1067 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 1067 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
@@ -1088,7 +1088,7 @@ static int garmin_write_bulk (struct usb_serial_port *port,
1088 unsigned char *buffer; 1088 unsigned char *buffer;
1089 int status; 1089 int status;
1090 1090
1091 dbg("%s - port %d, state %d", __FUNCTION__, port->number, 1091 dbg("%s - port %d, state %d", __func__, port->number,
1092 garmin_data_p->state); 1092 garmin_data_p->state);
1093 1093
1094 spin_lock_irqsave(&garmin_data_p->lock, flags); 1094 spin_lock_irqsave(&garmin_data_p->lock, flags);
@@ -1110,7 +1110,7 @@ static int garmin_write_bulk (struct usb_serial_port *port,
1110 1110
1111 memcpy (buffer, buf, count); 1111 memcpy (buffer, buf, count);
1112 1112
1113 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buffer); 1113 usb_serial_debug_data(debug, &port->dev, __func__, count, buffer);
1114 1114
1115 usb_fill_bulk_urb (urb, serial->dev, 1115 usb_fill_bulk_urb (urb, serial->dev,
1116 usb_sndbulkpipe (serial->dev, 1116 usb_sndbulkpipe (serial->dev,
@@ -1134,7 +1134,7 @@ static int garmin_write_bulk (struct usb_serial_port *port,
1134 dev_err(&port->dev, 1134 dev_err(&port->dev,
1135 "%s - usb_submit_urb(write bulk) " 1135 "%s - usb_submit_urb(write bulk) "
1136 "failed with status = %d\n", 1136 "failed with status = %d\n",
1137 __FUNCTION__, status); 1137 __func__, status);
1138 count = status; 1138 count = status;
1139 } 1139 }
1140 1140
@@ -1154,7 +1154,7 @@ static int garmin_write (struct usb_serial_port *port,
1154 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1154 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1155 __le32 *privpkt = (__le32 *)garmin_data_p->privpkt; 1155 __le32 *privpkt = (__le32 *)garmin_data_p->privpkt;
1156 1156
1157 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buf); 1157 usb_serial_debug_data(debug, &port->dev, __func__, count, buf);
1158 1158
1159 /* check for our private packets */ 1159 /* check for our private packets */
1160 if (count >= GARMIN_PKTHDR_LENGTH) { 1160 if (count >= GARMIN_PKTHDR_LENGTH) {
@@ -1172,7 +1172,7 @@ static int garmin_write (struct usb_serial_port *port,
1172 && GARMIN_LAYERID_PRIVATE == getLayerId(garmin_data_p->privpkt)) { 1172 && GARMIN_LAYERID_PRIVATE == getLayerId(garmin_data_p->privpkt)) {
1173 1173
1174 dbg("%s - processing private request %d", 1174 dbg("%s - processing private request %d",
1175 __FUNCTION__, pktid); 1175 __func__, pktid);
1176 1176
1177 // drop all unfinished transfers 1177 // drop all unfinished transfers
1178 garmin_clear(garmin_data_p); 1178 garmin_clear(garmin_data_p);
@@ -1184,7 +1184,7 @@ static int garmin_write (struct usb_serial_port *port,
1184 return -EINVPKT; 1184 return -EINVPKT;
1185 debug = __le32_to_cpu(privpkt[3]); 1185 debug = __le32_to_cpu(privpkt[3]);
1186 dbg("%s - debug level set to 0x%X", 1186 dbg("%s - debug level set to 0x%X",
1187 __FUNCTION__, debug); 1187 __func__, debug);
1188 break; 1188 break;
1189 1189
1190 case PRIV_PKTID_SET_MODE: 1190 case PRIV_PKTID_SET_MODE:
@@ -1192,7 +1192,7 @@ static int garmin_write (struct usb_serial_port *port,
1192 return -EINVPKT; 1192 return -EINVPKT;
1193 garmin_data_p->mode = __le32_to_cpu(privpkt[3]); 1193 garmin_data_p->mode = __le32_to_cpu(privpkt[3]);
1194 dbg("%s - mode set to %d", 1194 dbg("%s - mode set to %d",
1195 __FUNCTION__, garmin_data_p->mode); 1195 __func__, garmin_data_p->mode);
1196 break; 1196 break;
1197 1197
1198 case PRIV_PKTID_INFO_REQ: 1198 case PRIV_PKTID_INFO_REQ:
@@ -1208,7 +1208,7 @@ static int garmin_write (struct usb_serial_port *port,
1208 return -EINVPKT; 1208 return -EINVPKT;
1209 initial_mode = __le32_to_cpu(privpkt[3]); 1209 initial_mode = __le32_to_cpu(privpkt[3]);
1210 dbg("%s - initial_mode set to %d", 1210 dbg("%s - initial_mode set to %d",
1211 __FUNCTION__, 1211 __func__,
1212 garmin_data_p->mode); 1212 garmin_data_p->mode);
1213 break; 1213 break;
1214 } 1214 }
@@ -1255,7 +1255,7 @@ static void garmin_read_process(struct garmin_data * garmin_data_p,
1255{ 1255{
1256 if (garmin_data_p->flags & FLAGS_DROP_DATA) { 1256 if (garmin_data_p->flags & FLAGS_DROP_DATA) {
1257 /* abort-transfer cmd is actice */ 1257 /* abort-transfer cmd is actice */
1258 dbg("%s - pkt dropped", __FUNCTION__); 1258 dbg("%s - pkt dropped", __func__);
1259 } else if (garmin_data_p->state != STATE_DISCONNECTED && 1259 } else if (garmin_data_p->state != STATE_DISCONNECTED &&
1260 garmin_data_p->state != STATE_RESET ) { 1260 garmin_data_p->state != STATE_RESET ) {
1261 1261
@@ -1293,21 +1293,21 @@ static void garmin_read_bulk_callback (struct urb *urb)
1293 int status = urb->status; 1293 int status = urb->status;
1294 int retval; 1294 int retval;
1295 1295
1296 dbg("%s - port %d", __FUNCTION__, port->number); 1296 dbg("%s - port %d", __func__, port->number);
1297 1297
1298 if (!serial) { 1298 if (!serial) {
1299 dbg("%s - bad serial pointer, exiting", __FUNCTION__); 1299 dbg("%s - bad serial pointer, exiting", __func__);
1300 return; 1300 return;
1301 } 1301 }
1302 1302
1303 if (status) { 1303 if (status) {
1304 dbg("%s - nonzero read bulk status received: %d", 1304 dbg("%s - nonzero read bulk status received: %d",
1305 __FUNCTION__, status); 1305 __func__, status);
1306 return; 1306 return;
1307 } 1307 }
1308 1308
1309 usb_serial_debug_data(debug, &port->dev, 1309 usb_serial_debug_data(debug, &port->dev,
1310 __FUNCTION__, urb->actual_length, data); 1310 __func__, urb->actual_length, data);
1311 1311
1312 garmin_read_process(garmin_data_p, data, urb->actual_length); 1312 garmin_read_process(garmin_data_p, data, urb->actual_length);
1313 1313
@@ -1320,7 +1320,7 @@ static void garmin_read_bulk_callback (struct urb *urb)
1320 if (retval) 1320 if (retval)
1321 dev_err(&port->dev, 1321 dev_err(&port->dev,
1322 "%s - failed resubmitting read urb, error %d\n", 1322 "%s - failed resubmitting read urb, error %d\n",
1323 __FUNCTION__, retval); 1323 __func__, retval);
1324 } else if (urb->actual_length > 0) { 1324 } else if (urb->actual_length > 0) {
1325 /* Continue trying to read until nothing more is received */ 1325 /* Continue trying to read until nothing more is received */
1326 if (0 == (garmin_data_p->flags & FLAGS_THROTTLED)) { 1326 if (0 == (garmin_data_p->flags & FLAGS_THROTTLED)) {
@@ -1328,10 +1328,10 @@ static void garmin_read_bulk_callback (struct urb *urb)
1328 if (retval) 1328 if (retval)
1329 dev_err(&port->dev, 1329 dev_err(&port->dev,
1330 "%s - failed resubmitting read urb, " 1330 "%s - failed resubmitting read urb, "
1331 "error %d\n", __FUNCTION__, retval); 1331 "error %d\n", __func__, retval);
1332 } 1332 }
1333 } else { 1333 } else {
1334 dbg("%s - end of bulk data", __FUNCTION__); 1334 dbg("%s - end of bulk data", __func__);
1335 spin_lock_irqsave(&garmin_data_p->lock, flags); 1335 spin_lock_irqsave(&garmin_data_p->lock, flags);
1336 garmin_data_p->flags &= ~FLAGS_BULK_IN_ACTIVE; 1336 garmin_data_p->flags &= ~FLAGS_BULK_IN_ACTIVE;
1337 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 1337 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
@@ -1359,22 +1359,22 @@ static void garmin_read_int_callback (struct urb *urb)
1359 case -ESHUTDOWN: 1359 case -ESHUTDOWN:
1360 /* this urb is terminated, clean up */ 1360 /* this urb is terminated, clean up */
1361 dbg("%s - urb shutting down with status: %d", 1361 dbg("%s - urb shutting down with status: %d",
1362 __FUNCTION__, status); 1362 __func__, status);
1363 return; 1363 return;
1364 default: 1364 default:
1365 dbg("%s - nonzero urb status received: %d", 1365 dbg("%s - nonzero urb status received: %d",
1366 __FUNCTION__, status); 1366 __func__, status);
1367 return; 1367 return;
1368 } 1368 }
1369 1369
1370 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, 1370 usb_serial_debug_data(debug, &port->dev, __func__,
1371 urb->actual_length, urb->transfer_buffer); 1371 urb->actual_length, urb->transfer_buffer);
1372 1372
1373 if (urb->actual_length == sizeof(GARMIN_BULK_IN_AVAIL_REPLY) && 1373 if (urb->actual_length == sizeof(GARMIN_BULK_IN_AVAIL_REPLY) &&
1374 0 == memcmp(data, GARMIN_BULK_IN_AVAIL_REPLY, 1374 0 == memcmp(data, GARMIN_BULK_IN_AVAIL_REPLY,
1375 sizeof(GARMIN_BULK_IN_AVAIL_REPLY))) { 1375 sizeof(GARMIN_BULK_IN_AVAIL_REPLY))) {
1376 1376
1377 dbg("%s - bulk data available.", __FUNCTION__); 1377 dbg("%s - bulk data available.", __func__);
1378 1378
1379 if (0 == (garmin_data_p->flags & FLAGS_BULK_IN_ACTIVE)) { 1379 if (0 == (garmin_data_p->flags & FLAGS_BULK_IN_ACTIVE)) {
1380 1380
@@ -1389,7 +1389,7 @@ static void garmin_read_int_callback (struct urb *urb)
1389 if (retval) { 1389 if (retval) {
1390 dev_err(&port->dev, 1390 dev_err(&port->dev,
1391 "%s - failed submitting read urb, error %d\n", 1391 "%s - failed submitting read urb, error %d\n",
1392 __FUNCTION__, retval); 1392 __func__, retval);
1393 } else { 1393 } else {
1394 spin_lock_irqsave(&garmin_data_p->lock, flags); 1394 spin_lock_irqsave(&garmin_data_p->lock, flags);
1395 garmin_data_p->flags |= FLAGS_BULK_IN_ACTIVE; 1395 garmin_data_p->flags |= FLAGS_BULK_IN_ACTIVE;
@@ -1417,14 +1417,14 @@ static void garmin_read_int_callback (struct urb *urb)
1417 = __le32_to_cpup((__le32*)(data+GARMIN_PKTHDR_LENGTH)); 1417 = __le32_to_cpup((__le32*)(data+GARMIN_PKTHDR_LENGTH));
1418 1418
1419 dbg("%s - start-of-session reply seen - serial %u.", 1419 dbg("%s - start-of-session reply seen - serial %u.",
1420 __FUNCTION__, garmin_data_p->serial_num); 1420 __func__, garmin_data_p->serial_num);
1421 } 1421 }
1422 1422
1423 if (garmin_data_p->ignorePkts) { 1423 if (garmin_data_p->ignorePkts) {
1424 /* this reply belongs to a request generated by the driver, 1424 /* this reply belongs to a request generated by the driver,
1425 ignore it. */ 1425 ignore it. */
1426 dbg("%s - pkt ignored (%d)", 1426 dbg("%s - pkt ignored (%d)",
1427 __FUNCTION__, garmin_data_p->ignorePkts); 1427 __func__, garmin_data_p->ignorePkts);
1428 spin_lock_irqsave(&garmin_data_p->lock, flags); 1428 spin_lock_irqsave(&garmin_data_p->lock, flags);
1429 garmin_data_p->ignorePkts--; 1429 garmin_data_p->ignorePkts--;
1430 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 1430 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
@@ -1437,7 +1437,7 @@ static void garmin_read_int_callback (struct urb *urb)
1437 if (retval) 1437 if (retval)
1438 dev_err(&urb->dev->dev, 1438 dev_err(&urb->dev->dev,
1439 "%s - Error %d submitting interrupt urb\n", 1439 "%s - Error %d submitting interrupt urb\n",
1440 __FUNCTION__, retval); 1440 __func__, retval);
1441} 1441}
1442 1442
1443 1443
@@ -1473,7 +1473,7 @@ static void garmin_throttle (struct usb_serial_port *port)
1473 unsigned long flags; 1473 unsigned long flags;
1474 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1474 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1475 1475
1476 dbg("%s - port %d", __FUNCTION__, port->number); 1476 dbg("%s - port %d", __func__, port->number);
1477 /* set flag, data received will be put into a queue 1477 /* set flag, data received will be put into a queue
1478 for later processing */ 1478 for later processing */
1479 spin_lock_irqsave(&garmin_data_p->lock, flags); 1479 spin_lock_irqsave(&garmin_data_p->lock, flags);
@@ -1488,7 +1488,7 @@ static void garmin_unthrottle (struct usb_serial_port *port)
1488 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1488 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1489 int status; 1489 int status;
1490 1490
1491 dbg("%s - port %d", __FUNCTION__, port->number); 1491 dbg("%s - port %d", __func__, port->number);
1492 spin_lock_irqsave(&garmin_data_p->lock, flags); 1492 spin_lock_irqsave(&garmin_data_p->lock, flags);
1493 garmin_data_p->flags &= ~FLAGS_THROTTLED; 1493 garmin_data_p->flags &= ~FLAGS_THROTTLED;
1494 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 1494 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
@@ -1503,7 +1503,7 @@ static void garmin_unthrottle (struct usb_serial_port *port)
1503 if (status) 1503 if (status)
1504 dev_err(&port->dev, 1504 dev_err(&port->dev,
1505 "%s - failed resubmitting read urb, error %d\n", 1505 "%s - failed resubmitting read urb, error %d\n",
1506 __FUNCTION__, status); 1506 __func__, status);
1507 } 1507 }
1508} 1508}
1509 1509
@@ -1532,11 +1532,11 @@ static int garmin_attach (struct usb_serial *serial)
1532 struct usb_serial_port *port = serial->port[0]; 1532 struct usb_serial_port *port = serial->port[0];
1533 struct garmin_data * garmin_data_p = NULL; 1533 struct garmin_data * garmin_data_p = NULL;
1534 1534
1535 dbg("%s", __FUNCTION__); 1535 dbg("%s", __func__);
1536 1536
1537 garmin_data_p = kzalloc(sizeof(struct garmin_data), GFP_KERNEL); 1537 garmin_data_p = kzalloc(sizeof(struct garmin_data), GFP_KERNEL);
1538 if (garmin_data_p == NULL) { 1538 if (garmin_data_p == NULL) {
1539 dev_err(&port->dev, "%s - Out of memory\n", __FUNCTION__); 1539 dev_err(&port->dev, "%s - Out of memory\n", __func__);
1540 return -ENOMEM; 1540 return -ENOMEM;
1541 } 1541 }
1542 init_timer(&garmin_data_p->timer); 1542 init_timer(&garmin_data_p->timer);
@@ -1561,7 +1561,7 @@ static void garmin_shutdown (struct usb_serial *serial)
1561 struct usb_serial_port *port = serial->port[0]; 1561 struct usb_serial_port *port = serial->port[0];
1562 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1562 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1563 1563
1564 dbg("%s", __FUNCTION__); 1564 dbg("%s", __func__);
1565 1565
1566 usb_kill_urb (port->interrupt_in_urb); 1566 usb_kill_urb (port->interrupt_in_urb);
1567 del_timer_sync(&garmin_data_p->timer); 1567 del_timer_sync(&garmin_data_p->timer);
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 5b0952054dec..2078667db4aa 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -118,7 +118,7 @@ int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp)
118 int result = 0; 118 int result = 0;
119 unsigned long flags; 119 unsigned long flags;
120 120
121 dbg("%s - port %d", __FUNCTION__, port->number); 121 dbg("%s - port %d", __func__, port->number);
122 122
123 /* force low_latency on so that our tty_push actually forces the data through, 123 /* force low_latency on so that our tty_push actually forces the data through,
124 otherwise it is scheduled, and with high data rates (like with OHCI) data 124 otherwise it is scheduled, and with high data rates (like with OHCI) data
@@ -145,7 +145,7 @@ int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp)
145 port); 145 port);
146 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 146 result = usb_submit_urb(port->read_urb, GFP_KERNEL);
147 if (result) 147 if (result)
148 dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); 148 dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __func__, result);
149 } 149 }
150 150
151 return result; 151 return result;
@@ -156,7 +156,7 @@ static void generic_cleanup (struct usb_serial_port *port)
156{ 156{
157 struct usb_serial *serial = port->serial; 157 struct usb_serial *serial = port->serial;
158 158
159 dbg("%s - port %d", __FUNCTION__, port->number); 159 dbg("%s - port %d", __func__, port->number);
160 160
161 if (serial->dev) { 161 if (serial->dev) {
162 /* shutdown any bulk reads that might be going on */ 162 /* shutdown any bulk reads that might be going on */
@@ -194,7 +194,7 @@ int usb_serial_generic_resume(struct usb_serial *serial)
194 194
195void usb_serial_generic_close (struct usb_serial_port *port, struct file * filp) 195void usb_serial_generic_close (struct usb_serial_port *port, struct file * filp)
196{ 196{
197 dbg("%s - port %d", __FUNCTION__, port->number); 197 dbg("%s - port %d", __func__, port->number);
198 generic_cleanup (port); 198 generic_cleanup (port);
199} 199}
200 200
@@ -204,10 +204,10 @@ int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char *
204 int result; 204 int result;
205 unsigned char *data; 205 unsigned char *data;
206 206
207 dbg("%s - port %d", __FUNCTION__, port->number); 207 dbg("%s - port %d", __func__, port->number);
208 208
209 if (count == 0) { 209 if (count == 0) {
210 dbg("%s - write request of 0 bytes", __FUNCTION__); 210 dbg("%s - write request of 0 bytes", __func__);
211 return (0); 211 return (0);
212 } 212 }
213 213
@@ -217,7 +217,7 @@ int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char *
217 spin_lock_irqsave(&port->lock, flags); 217 spin_lock_irqsave(&port->lock, flags);
218 if (port->write_urb_busy) { 218 if (port->write_urb_busy) {
219 spin_unlock_irqrestore(&port->lock, flags); 219 spin_unlock_irqrestore(&port->lock, flags);
220 dbg("%s - already writing", __FUNCTION__); 220 dbg("%s - already writing", __func__);
221 return 0; 221 return 0;
222 } 222 }
223 port->write_urb_busy = 1; 223 port->write_urb_busy = 1;
@@ -227,7 +227,7 @@ int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char *
227 227
228 memcpy (port->write_urb->transfer_buffer, buf, count); 228 memcpy (port->write_urb->transfer_buffer, buf, count);
229 data = port->write_urb->transfer_buffer; 229 data = port->write_urb->transfer_buffer;
230 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, data); 230 usb_serial_debug_data(debug, &port->dev, __func__, count, data);
231 231
232 /* set up our urb */ 232 /* set up our urb */
233 usb_fill_bulk_urb (port->write_urb, serial->dev, 233 usb_fill_bulk_urb (port->write_urb, serial->dev,
@@ -242,7 +242,7 @@ int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char *
242 port->write_urb_busy = 1; 242 port->write_urb_busy = 1;
243 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 243 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
244 if (result) { 244 if (result) {
245 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result); 245 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __func__, result);
246 /* don't have to grab the lock here, as we will retry if != 0 */ 246 /* don't have to grab the lock here, as we will retry if != 0 */
247 port->write_urb_busy = 0; 247 port->write_urb_busy = 0;
248 } else 248 } else
@@ -260,14 +260,14 @@ int usb_serial_generic_write_room (struct usb_serial_port *port)
260 struct usb_serial *serial = port->serial; 260 struct usb_serial *serial = port->serial;
261 int room = 0; 261 int room = 0;
262 262
263 dbg("%s - port %d", __FUNCTION__, port->number); 263 dbg("%s - port %d", __func__, port->number);
264 264
265 if (serial->num_bulk_out) { 265 if (serial->num_bulk_out) {
266 if (!(port->write_urb_busy)) 266 if (!(port->write_urb_busy))
267 room = port->bulk_out_size; 267 room = port->bulk_out_size;
268 } 268 }
269 269
270 dbg("%s - returns %d", __FUNCTION__, room); 270 dbg("%s - returns %d", __func__, room);
271 return (room); 271 return (room);
272} 272}
273 273
@@ -276,14 +276,14 @@ int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port)
276 struct usb_serial *serial = port->serial; 276 struct usb_serial *serial = port->serial;
277 int chars = 0; 277 int chars = 0;
278 278
279 dbg("%s - port %d", __FUNCTION__, port->number); 279 dbg("%s - port %d", __func__, port->number);
280 280
281 if (serial->num_bulk_out) { 281 if (serial->num_bulk_out) {
282 if (port->write_urb_busy) 282 if (port->write_urb_busy)
283 chars = port->write_urb->transfer_buffer_length; 283 chars = port->write_urb->transfer_buffer_length;
284 } 284 }
285 285
286 dbg("%s - returns %d", __FUNCTION__, chars); 286 dbg("%s - returns %d", __func__, chars);
287 return (chars); 287 return (chars);
288} 288}
289 289
@@ -305,7 +305,7 @@ static void resubmit_read_urb(struct usb_serial_port *port, gfp_t mem_flags)
305 usb_serial_generic_read_bulk_callback), port); 305 usb_serial_generic_read_bulk_callback), port);
306 result = usb_submit_urb(urb, mem_flags); 306 result = usb_submit_urb(urb, mem_flags);
307 if (result) 307 if (result)
308 dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); 308 dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __func__, result);
309} 309}
310 310
311/* Push data to tty layer and resubmit the bulk read URB */ 311/* Push data to tty layer and resubmit the bulk read URB */
@@ -334,15 +334,15 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb)
334 int status = urb->status; 334 int status = urb->status;
335 unsigned long flags; 335 unsigned long flags;
336 336
337 dbg("%s - port %d", __FUNCTION__, port->number); 337 dbg("%s - port %d", __func__, port->number);
338 338
339 if (unlikely(status != 0)) { 339 if (unlikely(status != 0)) {
340 dbg("%s - nonzero read bulk status received: %d", 340 dbg("%s - nonzero read bulk status received: %d",
341 __FUNCTION__, status); 341 __func__, status);
342 return; 342 return;
343 } 343 }
344 344
345 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 345 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
346 346
347 /* Throttle the device if requested by tty */ 347 /* Throttle the device if requested by tty */
348 spin_lock_irqsave(&port->lock, flags); 348 spin_lock_irqsave(&port->lock, flags);
@@ -360,12 +360,12 @@ void usb_serial_generic_write_bulk_callback (struct urb *urb)
360 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 360 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
361 int status = urb->status; 361 int status = urb->status;
362 362
363 dbg("%s - port %d", __FUNCTION__, port->number); 363 dbg("%s - port %d", __func__, port->number);
364 364
365 port->write_urb_busy = 0; 365 port->write_urb_busy = 0;
366 if (status) { 366 if (status) {
367 dbg("%s - nonzero write bulk status received: %d", 367 dbg("%s - nonzero write bulk status received: %d",
368 __FUNCTION__, status); 368 __func__, status);
369 return; 369 return;
370 } 370 }
371 371
@@ -377,7 +377,7 @@ void usb_serial_generic_throttle (struct usb_serial_port *port)
377{ 377{
378 unsigned long flags; 378 unsigned long flags;
379 379
380 dbg("%s - port %d", __FUNCTION__, port->number); 380 dbg("%s - port %d", __func__, port->number);
381 381
382 /* Set the throttle request flag. It will be picked up 382 /* Set the throttle request flag. It will be picked up
383 * by usb_serial_generic_read_bulk_callback(). */ 383 * by usb_serial_generic_read_bulk_callback(). */
@@ -391,7 +391,7 @@ void usb_serial_generic_unthrottle (struct usb_serial_port *port)
391 int was_throttled; 391 int was_throttled;
392 unsigned long flags; 392 unsigned long flags;
393 393
394 dbg("%s - port %d", __FUNCTION__, port->number); 394 dbg("%s - port %d", __func__, port->number);
395 395
396 /* Clear the throttle flags */ 396 /* Clear the throttle flags */
397 spin_lock_irqsave(&port->lock, flags); 397 spin_lock_irqsave(&port->lock, flags);
@@ -409,7 +409,7 @@ void usb_serial_generic_shutdown (struct usb_serial *serial)
409{ 409{
410 int i; 410 int i;
411 411
412 dbg("%s", __FUNCTION__); 412 dbg("%s", __func__);
413 413
414 /* stop reads and writes on all ports */ 414 /* stop reads and writes on all ports */
415 for (i=0; i < serial->num_ports; ++i) { 415 for (i=0; i < serial->num_ports; ++i) {
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
index 3428ccc28da7..2b676732e9fa 100644
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -371,7 +371,7 @@ static int get_string (struct usb_device *dev, int Id, char *string, int buflen)
371 struct usb_string_descriptor StringDesc; 371 struct usb_string_descriptor StringDesc;
372 struct usb_string_descriptor *pStringDesc; 372 struct usb_string_descriptor *pStringDesc;
373 373
374 dbg("%s - USB String ID = %d", __FUNCTION__, Id ); 374 dbg("%s - USB String ID = %d", __func__, Id );
375 375
376 if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) { 376 if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) {
377 return 0; 377 return 0;
@@ -391,7 +391,7 @@ static int get_string (struct usb_device *dev, int Id, char *string, int buflen)
391 unicode_to_ascii(string, buflen, pStringDesc->wData, pStringDesc->bLength/2); 391 unicode_to_ascii(string, buflen, pStringDesc->wData, pStringDesc->bLength/2);
392 392
393 kfree(pStringDesc); 393 kfree(pStringDesc);
394 dbg("%s - USB String %s", __FUNCTION__, string); 394 dbg("%s - USB String %s", __func__, string);
395 return strlen(string); 395 return strlen(string);
396} 396}
397 397
@@ -407,7 +407,7 @@ static int get_string_desc (struct usb_device *dev, int Id, struct usb_string_de
407 struct usb_string_descriptor StringDesc; 407 struct usb_string_descriptor StringDesc;
408 struct usb_string_descriptor *pStringDesc; 408 struct usb_string_descriptor *pStringDesc;
409 409
410 dbg("%s - USB String ID = %d", __FUNCTION__, Id ); 410 dbg("%s - USB String ID = %d", __func__, Id );
411 411
412 if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) { 412 if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) {
413 return 0; 413 return 0;
@@ -537,7 +537,7 @@ static int get_epic_descriptor(struct edgeport_serial *ep)
537 sizeof(struct edge_compatibility_descriptor), 537 sizeof(struct edge_compatibility_descriptor),
538 300); 538 300);
539 539
540 dbg("%s result = %d", __FUNCTION__, result); 540 dbg("%s result = %d", __func__, result);
541 541
542 if (result > 0) { 542 if (result > 0) {
543 ep->is_epic = 1; 543 ep->is_epic = 1;
@@ -601,7 +601,7 @@ static void edge_interrupt_callback (struct urb *urb)
601 int result; 601 int result;
602 int status = urb->status; 602 int status = urb->status;
603 603
604 dbg("%s", __FUNCTION__); 604 dbg("%s", __func__);
605 605
606 switch (status) { 606 switch (status) {
607 case 0: 607 case 0:
@@ -612,35 +612,35 @@ static void edge_interrupt_callback (struct urb *urb)
612 case -ESHUTDOWN: 612 case -ESHUTDOWN:
613 /* this urb is terminated, clean up */ 613 /* this urb is terminated, clean up */
614 dbg("%s - urb shutting down with status: %d", 614 dbg("%s - urb shutting down with status: %d",
615 __FUNCTION__, status); 615 __func__, status);
616 return; 616 return;
617 default: 617 default:
618 dbg("%s - nonzero urb status received: %d", 618 dbg("%s - nonzero urb status received: %d",
619 __FUNCTION__, status); 619 __func__, status);
620 goto exit; 620 goto exit;
621 } 621 }
622 622
623 // process this interrupt-read even if there are no ports open 623 // process this interrupt-read even if there are no ports open
624 if (length) { 624 if (length) {
625 usb_serial_debug_data(debug, &edge_serial->serial->dev->dev, __FUNCTION__, length, data); 625 usb_serial_debug_data(debug, &edge_serial->serial->dev->dev, __func__, length, data);
626 626
627 if (length > 1) { 627 if (length > 1) {
628 bytes_avail = data[0] | (data[1] << 8); 628 bytes_avail = data[0] | (data[1] << 8);
629 if (bytes_avail) { 629 if (bytes_avail) {
630 spin_lock(&edge_serial->es_lock); 630 spin_lock(&edge_serial->es_lock);
631 edge_serial->rxBytesAvail += bytes_avail; 631 edge_serial->rxBytesAvail += bytes_avail;
632 dbg("%s - bytes_avail=%d, rxBytesAvail=%d, read_in_progress=%d", __FUNCTION__, bytes_avail, edge_serial->rxBytesAvail, edge_serial->read_in_progress); 632 dbg("%s - bytes_avail=%d, rxBytesAvail=%d, read_in_progress=%d", __func__, bytes_avail, edge_serial->rxBytesAvail, edge_serial->read_in_progress);
633 633
634 if (edge_serial->rxBytesAvail > 0 && 634 if (edge_serial->rxBytesAvail > 0 &&
635 !edge_serial->read_in_progress) { 635 !edge_serial->read_in_progress) {
636 dbg("%s - posting a read", __FUNCTION__); 636 dbg("%s - posting a read", __func__);
637 edge_serial->read_in_progress = true; 637 edge_serial->read_in_progress = true;
638 638
639 /* we have pending bytes on the bulk in pipe, send a request */ 639 /* we have pending bytes on the bulk in pipe, send a request */
640 edge_serial->read_urb->dev = edge_serial->serial->dev; 640 edge_serial->read_urb->dev = edge_serial->serial->dev;
641 result = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC); 641 result = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC);
642 if (result) { 642 if (result) {
643 dev_err(&edge_serial->serial->dev->dev, "%s - usb_submit_urb(read bulk) failed with result = %d\n", __FUNCTION__, result); 643 dev_err(&edge_serial->serial->dev->dev, "%s - usb_submit_urb(read bulk) failed with result = %d\n", __func__, result);
644 edge_serial->read_in_progress = false; 644 edge_serial->read_in_progress = false;
645 } 645 }
646 } 646 }
@@ -659,7 +659,7 @@ static void edge_interrupt_callback (struct urb *urb)
659 spin_lock(&edge_port->ep_lock); 659 spin_lock(&edge_port->ep_lock);
660 edge_port->txCredits += txCredits; 660 edge_port->txCredits += txCredits;
661 spin_unlock(&edge_port->ep_lock); 661 spin_unlock(&edge_port->ep_lock);
662 dbg("%s - txcredits for port%d = %d", __FUNCTION__, portNumber, edge_port->txCredits); 662 dbg("%s - txcredits for port%d = %d", __func__, portNumber, edge_port->txCredits);
663 663
664 /* tell the tty driver that something has changed */ 664 /* tell the tty driver that something has changed */
665 if (edge_port->port->tty) 665 if (edge_port->port->tty)
@@ -677,7 +677,7 @@ static void edge_interrupt_callback (struct urb *urb)
677exit: 677exit:
678 result = usb_submit_urb (urb, GFP_ATOMIC); 678 result = usb_submit_urb (urb, GFP_ATOMIC);
679 if (result) { 679 if (result) {
680 dev_err(&urb->dev->dev, "%s - Error %d submitting control urb\n", __FUNCTION__, result); 680 dev_err(&urb->dev->dev, "%s - Error %d submitting control urb\n", __func__, result);
681 } 681 }
682} 682}
683 683
@@ -695,43 +695,43 @@ static void edge_bulk_in_callback (struct urb *urb)
695 __u16 raw_data_length; 695 __u16 raw_data_length;
696 int status = urb->status; 696 int status = urb->status;
697 697
698 dbg("%s", __FUNCTION__); 698 dbg("%s", __func__);
699 699
700 if (status) { 700 if (status) {
701 dbg("%s - nonzero read bulk status received: %d", 701 dbg("%s - nonzero read bulk status received: %d",
702 __FUNCTION__, status); 702 __func__, status);
703 edge_serial->read_in_progress = false; 703 edge_serial->read_in_progress = false;
704 return; 704 return;
705 } 705 }
706 706
707 if (urb->actual_length == 0) { 707 if (urb->actual_length == 0) {
708 dbg("%s - read bulk callback with no data", __FUNCTION__); 708 dbg("%s - read bulk callback with no data", __func__);
709 edge_serial->read_in_progress = false; 709 edge_serial->read_in_progress = false;
710 return; 710 return;
711 } 711 }
712 712
713 raw_data_length = urb->actual_length; 713 raw_data_length = urb->actual_length;
714 714
715 usb_serial_debug_data(debug, &edge_serial->serial->dev->dev, __FUNCTION__, raw_data_length, data); 715 usb_serial_debug_data(debug, &edge_serial->serial->dev->dev, __func__, raw_data_length, data);
716 716
717 spin_lock(&edge_serial->es_lock); 717 spin_lock(&edge_serial->es_lock);
718 718
719 /* decrement our rxBytes available by the number that we just got */ 719 /* decrement our rxBytes available by the number that we just got */
720 edge_serial->rxBytesAvail -= raw_data_length; 720 edge_serial->rxBytesAvail -= raw_data_length;
721 721
722 dbg("%s - Received = %d, rxBytesAvail %d", __FUNCTION__, raw_data_length, edge_serial->rxBytesAvail); 722 dbg("%s - Received = %d, rxBytesAvail %d", __func__, raw_data_length, edge_serial->rxBytesAvail);
723 723
724 process_rcvd_data (edge_serial, data, urb->actual_length); 724 process_rcvd_data (edge_serial, data, urb->actual_length);
725 725
726 /* check to see if there's any more data for us to read */ 726 /* check to see if there's any more data for us to read */
727 if (edge_serial->rxBytesAvail > 0) { 727 if (edge_serial->rxBytesAvail > 0) {
728 dbg("%s - posting a read", __FUNCTION__); 728 dbg("%s - posting a read", __func__);
729 edge_serial->read_urb->dev = edge_serial->serial->dev; 729 edge_serial->read_urb->dev = edge_serial->serial->dev;
730 retval = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC); 730 retval = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC);
731 if (retval) { 731 if (retval) {
732 dev_err(&urb->dev->dev, 732 dev_err(&urb->dev->dev,
733 "%s - usb_submit_urb(read bulk) failed, " 733 "%s - usb_submit_urb(read bulk) failed, "
734 "retval = %d\n", __FUNCTION__, retval); 734 "retval = %d\n", __func__, retval);
735 edge_serial->read_in_progress = false; 735 edge_serial->read_in_progress = false;
736 } 736 }
737 } else { 737 } else {
@@ -753,11 +753,11 @@ static void edge_bulk_out_data_callback (struct urb *urb)
753 struct tty_struct *tty; 753 struct tty_struct *tty;
754 int status = urb->status; 754 int status = urb->status;
755 755
756 dbg("%s", __FUNCTION__); 756 dbg("%s", __func__);
757 757
758 if (status) { 758 if (status) {
759 dbg("%s - nonzero write bulk status received: %d", 759 dbg("%s - nonzero write bulk status received: %d",
760 __FUNCTION__, status); 760 __func__, status);
761 } 761 }
762 762
763 tty = edge_port->port->tty; 763 tty = edge_port->port->tty;
@@ -786,10 +786,10 @@ static void edge_bulk_out_cmd_callback (struct urb *urb)
786 struct tty_struct *tty; 786 struct tty_struct *tty;
787 int status = urb->status; 787 int status = urb->status;
788 788
789 dbg("%s", __FUNCTION__); 789 dbg("%s", __func__);
790 790
791 atomic_dec(&CmdUrbs); 791 atomic_dec(&CmdUrbs);
792 dbg("%s - FREE URB %p (outstanding %d)", __FUNCTION__, urb, atomic_read(&CmdUrbs)); 792 dbg("%s - FREE URB %p (outstanding %d)", __func__, urb, atomic_read(&CmdUrbs));
793 793
794 794
795 /* clean up the transfer buffer */ 795 /* clean up the transfer buffer */
@@ -799,7 +799,7 @@ static void edge_bulk_out_cmd_callback (struct urb *urb)
799 usb_free_urb (urb); 799 usb_free_urb (urb);
800 800
801 if (status) { 801 if (status) {
802 dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, status); 802 dbg("%s - nonzero write bulk status received: %d", __func__, status);
803 return; 803 return;
804 } 804 }
805 805
@@ -833,7 +833,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
833 struct edgeport_serial *edge_serial; 833 struct edgeport_serial *edge_serial;
834 int response; 834 int response;
835 835
836 dbg("%s - port %d", __FUNCTION__, port->number); 836 dbg("%s - port %d", __func__, port->number);
837 837
838 if (edge_port == NULL) 838 if (edge_port == NULL)
839 return -ENODEV; 839 return -ENODEV;
@@ -883,7 +883,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
883 * this interrupt will continue as long as the edgeport is connected */ 883 * this interrupt will continue as long as the edgeport is connected */
884 response = usb_submit_urb (edge_serial->interrupt_read_urb, GFP_KERNEL); 884 response = usb_submit_urb (edge_serial->interrupt_read_urb, GFP_KERNEL);
885 if (response) { 885 if (response) {
886 dev_err(&port->dev, "%s - Error %d submitting control urb\n", __FUNCTION__, response); 886 dev_err(&port->dev, "%s - Error %d submitting control urb\n", __func__, response);
887 } 887 }
888 } 888 }
889 889
@@ -907,7 +907,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
907 response = send_iosp_ext_cmd (edge_port, IOSP_CMD_OPEN_PORT, 0); 907 response = send_iosp_ext_cmd (edge_port, IOSP_CMD_OPEN_PORT, 0);
908 908
909 if (response < 0) { 909 if (response < 0) {
910 dev_err(&port->dev, "%s - error sending open port command\n", __FUNCTION__); 910 dev_err(&port->dev, "%s - error sending open port command\n", __func__);
911 edge_port->openPending = false; 911 edge_port->openPending = false;
912 return -ENODEV; 912 return -ENODEV;
913 } 913 }
@@ -917,7 +917,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
917 917
918 if (!edge_port->open) { 918 if (!edge_port->open) {
919 /* open timed out */ 919 /* open timed out */
920 dbg("%s - open timedout", __FUNCTION__); 920 dbg("%s - open timedout", __func__);
921 edge_port->openPending = false; 921 edge_port->openPending = false;
922 return -ENODEV; 922 return -ENODEV;
923 } 923 }
@@ -930,7 +930,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
930 edge_port->txfifo.fifo = kmalloc (edge_port->maxTxCredits, GFP_KERNEL); 930 edge_port->txfifo.fifo = kmalloc (edge_port->maxTxCredits, GFP_KERNEL);
931 931
932 if (!edge_port->txfifo.fifo) { 932 if (!edge_port->txfifo.fifo) {
933 dbg("%s - no memory", __FUNCTION__); 933 dbg("%s - no memory", __func__);
934 edge_close (port, filp); 934 edge_close (port, filp);
935 return -ENOMEM; 935 return -ENOMEM;
936 } 936 }
@@ -940,14 +940,14 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
940 edge_port->write_in_progress = false; 940 edge_port->write_in_progress = false;
941 941
942 if (!edge_port->write_urb) { 942 if (!edge_port->write_urb) {
943 dbg("%s - no memory", __FUNCTION__); 943 dbg("%s - no memory", __func__);
944 edge_close (port, filp); 944 edge_close (port, filp);
945 return -ENOMEM; 945 return -ENOMEM;
946 } 946 }
947 947
948 dbg("%s(%d) - Initialize TX fifo to %d bytes", __FUNCTION__, port->number, edge_port->maxTxCredits); 948 dbg("%s(%d) - Initialize TX fifo to %d bytes", __func__, port->number, edge_port->maxTxCredits);
949 949
950 dbg("%s exited", __FUNCTION__); 950 dbg("%s exited", __func__);
951 951
952 return 0; 952 return 0;
953} 953}
@@ -976,11 +976,11 @@ static void block_until_chase_response(struct edgeport_port *edge_port)
976 976
977 // Did we get our Chase response 977 // Did we get our Chase response
978 if (!edge_port->chaseResponsePending) { 978 if (!edge_port->chaseResponsePending) {
979 dbg("%s - Got Chase Response", __FUNCTION__); 979 dbg("%s - Got Chase Response", __func__);
980 980
981 // did we get all of our credit back? 981 // did we get all of our credit back?
982 if (edge_port->txCredits == edge_port->maxTxCredits ) { 982 if (edge_port->txCredits == edge_port->maxTxCredits ) {
983 dbg("%s - Got all credits", __FUNCTION__); 983 dbg("%s - Got all credits", __func__);
984 return; 984 return;
985 } 985 }
986 } 986 }
@@ -995,12 +995,12 @@ static void block_until_chase_response(struct edgeport_port *edge_port)
995 loop--; 995 loop--;
996 if (loop == 0) { 996 if (loop == 0) {
997 edge_port->chaseResponsePending = false; 997 edge_port->chaseResponsePending = false;
998 dbg("%s - Chase TIMEOUT", __FUNCTION__); 998 dbg("%s - Chase TIMEOUT", __func__);
999 return; 999 return;
1000 } 1000 }
1001 } else { 1001 } else {
1002 // Reset timeout value back to 10 seconds 1002 // Reset timeout value back to 10 seconds
1003 dbg("%s - Last %d, Current %d", __FUNCTION__, lastCredits, edge_port->txCredits); 1003 dbg("%s - Last %d, Current %d", __func__, lastCredits, edge_port->txCredits);
1004 loop = 10; 1004 loop = 10;
1005 } 1005 }
1006 } 1006 }
@@ -1031,7 +1031,7 @@ static void block_until_tx_empty (struct edgeport_port *edge_port)
1031 1031
1032 // Is the Edgeport Buffer empty? 1032 // Is the Edgeport Buffer empty?
1033 if (lastCount == 0) { 1033 if (lastCount == 0) {
1034 dbg("%s - TX Buffer Empty", __FUNCTION__); 1034 dbg("%s - TX Buffer Empty", __func__);
1035 return; 1035 return;
1036 } 1036 }
1037 1037
@@ -1040,13 +1040,13 @@ static void block_until_tx_empty (struct edgeport_port *edge_port)
1040 schedule_timeout(timeout); 1040 schedule_timeout(timeout);
1041 finish_wait(&edge_port->wait_chase, &wait); 1041 finish_wait(&edge_port->wait_chase, &wait);
1042 1042
1043 dbg("%s wait", __FUNCTION__); 1043 dbg("%s wait", __func__);
1044 1044
1045 if (lastCount == fifo->count) { 1045 if (lastCount == fifo->count) {
1046 // No activity.. count down. 1046 // No activity.. count down.
1047 loop--; 1047 loop--;
1048 if (loop == 0) { 1048 if (loop == 0) {
1049 dbg("%s - TIMEOUT", __FUNCTION__); 1049 dbg("%s - TIMEOUT", __func__);
1050 return; 1050 return;
1051 } 1051 }
1052 } else { 1052 } else {
@@ -1067,7 +1067,7 @@ static void edge_close (struct usb_serial_port *port, struct file * filp)
1067 struct edgeport_port *edge_port; 1067 struct edgeport_port *edge_port;
1068 int status; 1068 int status;
1069 1069
1070 dbg("%s - port %d", __FUNCTION__, port->number); 1070 dbg("%s - port %d", __func__, port->number);
1071 1071
1072 edge_serial = usb_get_serial_data(port->serial); 1072 edge_serial = usb_get_serial_data(port->serial);
1073 edge_port = usb_get_serial_port_data(port); 1073 edge_port = usb_get_serial_port_data(port);
@@ -1085,7 +1085,7 @@ static void edge_close (struct usb_serial_port *port, struct file * filp)
1085 /* flush and chase */ 1085 /* flush and chase */
1086 edge_port->chaseResponsePending = true; 1086 edge_port->chaseResponsePending = true;
1087 1087
1088 dbg("%s - Sending IOSP_CMD_CHASE_PORT", __FUNCTION__); 1088 dbg("%s - Sending IOSP_CMD_CHASE_PORT", __func__);
1089 status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0); 1089 status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0);
1090 if (status == 0) { 1090 if (status == 0) {
1091 // block until chase finished 1091 // block until chase finished
@@ -1099,7 +1099,7 @@ static void edge_close (struct usb_serial_port *port, struct file * filp)
1099 ((edge_serial->is_epic) && 1099 ((edge_serial->is_epic) &&
1100 (edge_serial->epic_descriptor.Supports.IOSPClose))) { 1100 (edge_serial->epic_descriptor.Supports.IOSPClose))) {
1101 /* close the port */ 1101 /* close the port */
1102 dbg("%s - Sending IOSP_CMD_CLOSE_PORT", __FUNCTION__); 1102 dbg("%s - Sending IOSP_CMD_CLOSE_PORT", __func__);
1103 send_iosp_ext_cmd (edge_port, IOSP_CMD_CLOSE_PORT, 0); 1103 send_iosp_ext_cmd (edge_port, IOSP_CMD_CLOSE_PORT, 0);
1104 } 1104 }
1105 1105
@@ -1119,7 +1119,7 @@ static void edge_close (struct usb_serial_port *port, struct file * filp)
1119 kfree(edge_port->txfifo.fifo); 1119 kfree(edge_port->txfifo.fifo);
1120 edge_port->txfifo.fifo = NULL; 1120 edge_port->txfifo.fifo = NULL;
1121 1121
1122 dbg("%s exited", __FUNCTION__); 1122 dbg("%s exited", __func__);
1123} 1123}
1124 1124
1125/***************************************************************************** 1125/*****************************************************************************
@@ -1139,7 +1139,7 @@ static int edge_write (struct usb_serial_port *port, const unsigned char *data,
1139 int secondhalf; 1139 int secondhalf;
1140 unsigned long flags; 1140 unsigned long flags;
1141 1141
1142 dbg("%s - port %d", __FUNCTION__, port->number); 1142 dbg("%s - port %d", __func__, port->number);
1143 1143
1144 if (edge_port == NULL) 1144 if (edge_port == NULL)
1145 return -ENODEV; 1145 return -ENODEV;
@@ -1152,12 +1152,12 @@ static int edge_write (struct usb_serial_port *port, const unsigned char *data,
1152 // calculate number of bytes to put in fifo 1152 // calculate number of bytes to put in fifo
1153 copySize = min ((unsigned int)count, (edge_port->txCredits - fifo->count)); 1153 copySize = min ((unsigned int)count, (edge_port->txCredits - fifo->count));
1154 1154
1155 dbg("%s(%d) of %d byte(s) Fifo room %d -- will copy %d bytes", __FUNCTION__, 1155 dbg("%s(%d) of %d byte(s) Fifo room %d -- will copy %d bytes", __func__,
1156 port->number, count, edge_port->txCredits - fifo->count, copySize); 1156 port->number, count, edge_port->txCredits - fifo->count, copySize);
1157 1157
1158 /* catch writes of 0 bytes which the tty driver likes to give us, and when txCredits is empty */ 1158 /* catch writes of 0 bytes which the tty driver likes to give us, and when txCredits is empty */
1159 if (copySize == 0) { 1159 if (copySize == 0) {
1160 dbg("%s - copySize = Zero", __FUNCTION__); 1160 dbg("%s - copySize = Zero", __func__);
1161 goto finish_write; 1161 goto finish_write;
1162 } 1162 }
1163 1163
@@ -1169,11 +1169,11 @@ static int edge_write (struct usb_serial_port *port, const unsigned char *data,
1169 1169
1170 bytesleft = fifo->size - fifo->head; 1170 bytesleft = fifo->size - fifo->head;
1171 firsthalf = min (bytesleft, copySize); 1171 firsthalf = min (bytesleft, copySize);
1172 dbg("%s - copy %d bytes of %d into fifo ", __FUNCTION__, firsthalf, bytesleft); 1172 dbg("%s - copy %d bytes of %d into fifo ", __func__, firsthalf, bytesleft);
1173 1173
1174 /* now copy our data */ 1174 /* now copy our data */
1175 memcpy(&fifo->fifo[fifo->head], data, firsthalf); 1175 memcpy(&fifo->fifo[fifo->head], data, firsthalf);
1176 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, firsthalf, &fifo->fifo[fifo->head]); 1176 usb_serial_debug_data(debug, &port->dev, __func__, firsthalf, &fifo->fifo[fifo->head]);
1177 1177
1178 // update the index and size 1178 // update the index and size
1179 fifo->head += firsthalf; 1179 fifo->head += firsthalf;
@@ -1187,9 +1187,9 @@ static int edge_write (struct usb_serial_port *port, const unsigned char *data,
1187 secondhalf = copySize-firsthalf; 1187 secondhalf = copySize-firsthalf;
1188 1188
1189 if (secondhalf) { 1189 if (secondhalf) {
1190 dbg("%s - copy rest of data %d", __FUNCTION__, secondhalf); 1190 dbg("%s - copy rest of data %d", __func__, secondhalf);
1191 memcpy(&fifo->fifo[fifo->head], &data[firsthalf], secondhalf); 1191 memcpy(&fifo->fifo[fifo->head], &data[firsthalf], secondhalf);
1192 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, secondhalf, &fifo->fifo[fifo->head]); 1192 usb_serial_debug_data(debug, &port->dev, __func__, secondhalf, &fifo->fifo[fifo->head]);
1193 // update the index and size 1193 // update the index and size
1194 fifo->count += secondhalf; 1194 fifo->count += secondhalf;
1195 fifo->head += secondhalf; 1195 fifo->head += secondhalf;
@@ -1201,7 +1201,7 @@ finish_write:
1201 1201
1202 send_more_port_data((struct edgeport_serial *)usb_get_serial_data(port->serial), edge_port); 1202 send_more_port_data((struct edgeport_serial *)usb_get_serial_data(port->serial), edge_port);
1203 1203
1204 dbg("%s wrote %d byte(s) TxCredits %d, Fifo %d", __FUNCTION__, copySize, edge_port->txCredits, fifo->count); 1204 dbg("%s wrote %d byte(s) TxCredits %d, Fifo %d", __func__, copySize, edge_port->txCredits, fifo->count);
1205 1205
1206 return copySize; 1206 return copySize;
1207} 1207}
@@ -1232,14 +1232,14 @@ static void send_more_port_data(struct edgeport_serial *edge_serial, struct edge
1232 int secondhalf; 1232 int secondhalf;
1233 unsigned long flags; 1233 unsigned long flags;
1234 1234
1235 dbg("%s(%d)", __FUNCTION__, edge_port->port->number); 1235 dbg("%s(%d)", __func__, edge_port->port->number);
1236 1236
1237 spin_lock_irqsave(&edge_port->ep_lock, flags); 1237 spin_lock_irqsave(&edge_port->ep_lock, flags);
1238 1238
1239 if (edge_port->write_in_progress || 1239 if (edge_port->write_in_progress ||
1240 !edge_port->open || 1240 !edge_port->open ||
1241 (fifo->count == 0)) { 1241 (fifo->count == 0)) {
1242 dbg("%s(%d) EXIT - fifo %d, PendingWrite = %d", __FUNCTION__, edge_port->port->number, fifo->count, edge_port->write_in_progress); 1242 dbg("%s(%d) EXIT - fifo %d, PendingWrite = %d", __func__, edge_port->port->number, fifo->count, edge_port->write_in_progress);
1243 goto exit_send; 1243 goto exit_send;
1244 } 1244 }
1245 1245
@@ -1251,7 +1251,7 @@ static void send_more_port_data(struct edgeport_serial *edge_serial, struct edge
1251 // it's better to wait for more credits so we can do a larger 1251 // it's better to wait for more credits so we can do a larger
1252 // write. 1252 // write.
1253 if (edge_port->txCredits < EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(edge_port->maxTxCredits,EDGE_FW_BULK_MAX_PACKET_SIZE)) { 1253 if (edge_port->txCredits < EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(edge_port->maxTxCredits,EDGE_FW_BULK_MAX_PACKET_SIZE)) {
1254 dbg("%s(%d) Not enough credit - fifo %d TxCredit %d", __FUNCTION__, edge_port->port->number, fifo->count, edge_port->txCredits ); 1254 dbg("%s(%d) Not enough credit - fifo %d TxCredit %d", __func__, edge_port->port->number, fifo->count, edge_port->txCredits );
1255 goto exit_send; 1255 goto exit_send;
1256 } 1256 }
1257 1257
@@ -1269,7 +1269,7 @@ static void send_more_port_data(struct edgeport_serial *edge_serial, struct edge
1269 count = fifo->count; 1269 count = fifo->count;
1270 buffer = kmalloc (count+2, GFP_ATOMIC); 1270 buffer = kmalloc (count+2, GFP_ATOMIC);
1271 if (buffer == NULL) { 1271 if (buffer == NULL) {
1272 dev_err(&edge_port->port->dev, "%s - no more kernel memory...\n", __FUNCTION__); 1272 dev_err(&edge_port->port->dev, "%s - no more kernel memory...\n", __func__);
1273 edge_port->write_in_progress = false; 1273 edge_port->write_in_progress = false;
1274 goto exit_send; 1274 goto exit_send;
1275 } 1275 }
@@ -1294,7 +1294,7 @@ static void send_more_port_data(struct edgeport_serial *edge_serial, struct edge
1294 } 1294 }
1295 1295
1296 if (count) 1296 if (count)
1297 usb_serial_debug_data(debug, &edge_port->port->dev, __FUNCTION__, count, &buffer[2]); 1297 usb_serial_debug_data(debug, &edge_port->port->dev, __func__, count, &buffer[2]);
1298 1298
1299 /* fill up the urb with all of our data and submit it */ 1299 /* fill up the urb with all of our data and submit it */
1300 usb_fill_bulk_urb (urb, edge_serial->serial->dev, 1300 usb_fill_bulk_urb (urb, edge_serial->serial->dev,
@@ -1309,14 +1309,14 @@ static void send_more_port_data(struct edgeport_serial *edge_serial, struct edge
1309 status = usb_submit_urb(urb, GFP_ATOMIC); 1309 status = usb_submit_urb(urb, GFP_ATOMIC);
1310 if (status) { 1310 if (status) {
1311 /* something went wrong */ 1311 /* something went wrong */
1312 dev_err(&edge_port->port->dev, "%s - usb_submit_urb(write bulk) failed, status = %d, data lost\n", __FUNCTION__, status); 1312 dev_err(&edge_port->port->dev, "%s - usb_submit_urb(write bulk) failed, status = %d, data lost\n", __func__, status);
1313 edge_port->write_in_progress = false; 1313 edge_port->write_in_progress = false;
1314 1314
1315 /* revert the credits as something bad happened. */ 1315 /* revert the credits as something bad happened. */
1316 edge_port->txCredits += count; 1316 edge_port->txCredits += count;
1317 edge_port->icount.tx -= count; 1317 edge_port->icount.tx -= count;
1318 } 1318 }
1319 dbg("%s wrote %d byte(s) TxCredit %d, Fifo %d", __FUNCTION__, count, edge_port->txCredits, fifo->count); 1319 dbg("%s wrote %d byte(s) TxCredit %d, Fifo %d", __func__, count, edge_port->txCredits, fifo->count);
1320 1320
1321exit_send: 1321exit_send:
1322 spin_unlock_irqrestore(&edge_port->ep_lock, flags); 1322 spin_unlock_irqrestore(&edge_port->ep_lock, flags);
@@ -1337,17 +1337,17 @@ static int edge_write_room (struct usb_serial_port *port)
1337 int room; 1337 int room;
1338 unsigned long flags; 1338 unsigned long flags;
1339 1339
1340 dbg("%s", __FUNCTION__); 1340 dbg("%s", __func__);
1341 1341
1342 if (edge_port == NULL) 1342 if (edge_port == NULL)
1343 return -ENODEV; 1343 return -ENODEV;
1344 if (edge_port->closePending) 1344 if (edge_port->closePending)
1345 return -ENODEV; 1345 return -ENODEV;
1346 1346
1347 dbg("%s - port %d", __FUNCTION__, port->number); 1347 dbg("%s - port %d", __func__, port->number);
1348 1348
1349 if (!edge_port->open) { 1349 if (!edge_port->open) {
1350 dbg("%s - port not opened", __FUNCTION__); 1350 dbg("%s - port not opened", __func__);
1351 return -EINVAL; 1351 return -EINVAL;
1352 } 1352 }
1353 1353
@@ -1356,7 +1356,7 @@ static int edge_write_room (struct usb_serial_port *port)
1356 room = edge_port->txCredits - edge_port->txfifo.count; 1356 room = edge_port->txCredits - edge_port->txfifo.count;
1357 spin_unlock_irqrestore(&edge_port->ep_lock, flags); 1357 spin_unlock_irqrestore(&edge_port->ep_lock, flags);
1358 1358
1359 dbg("%s - returns %d", __FUNCTION__, room); 1359 dbg("%s - returns %d", __func__, room);
1360 return room; 1360 return room;
1361} 1361}
1362 1362
@@ -1376,7 +1376,7 @@ static int edge_chars_in_buffer (struct usb_serial_port *port)
1376 int num_chars; 1376 int num_chars;
1377 unsigned long flags; 1377 unsigned long flags;
1378 1378
1379 dbg("%s", __FUNCTION__); 1379 dbg("%s", __func__);
1380 1380
1381 if (edge_port == NULL) 1381 if (edge_port == NULL)
1382 return -ENODEV; 1382 return -ENODEV;
@@ -1384,7 +1384,7 @@ static int edge_chars_in_buffer (struct usb_serial_port *port)
1384 return -ENODEV; 1384 return -ENODEV;
1385 1385
1386 if (!edge_port->open) { 1386 if (!edge_port->open) {
1387 dbg("%s - port not opened", __FUNCTION__); 1387 dbg("%s - port not opened", __func__);
1388 return -EINVAL; 1388 return -EINVAL;
1389 } 1389 }
1390 1390
@@ -1392,7 +1392,7 @@ static int edge_chars_in_buffer (struct usb_serial_port *port)
1392 num_chars = edge_port->maxTxCredits - edge_port->txCredits + edge_port->txfifo.count; 1392 num_chars = edge_port->maxTxCredits - edge_port->txCredits + edge_port->txfifo.count;
1393 spin_unlock_irqrestore(&edge_port->ep_lock, flags); 1393 spin_unlock_irqrestore(&edge_port->ep_lock, flags);
1394 if (num_chars) { 1394 if (num_chars) {
1395 dbg("%s(port %d) - returns %d", __FUNCTION__, port->number, num_chars); 1395 dbg("%s(port %d) - returns %d", __func__, port->number, num_chars);
1396 } 1396 }
1397 1397
1398 return num_chars; 1398 return num_chars;
@@ -1410,19 +1410,19 @@ static void edge_throttle (struct usb_serial_port *port)
1410 struct tty_struct *tty; 1410 struct tty_struct *tty;
1411 int status; 1411 int status;
1412 1412
1413 dbg("%s - port %d", __FUNCTION__, port->number); 1413 dbg("%s - port %d", __func__, port->number);
1414 1414
1415 if (edge_port == NULL) 1415 if (edge_port == NULL)
1416 return; 1416 return;
1417 1417
1418 if (!edge_port->open) { 1418 if (!edge_port->open) {
1419 dbg("%s - port not opened", __FUNCTION__); 1419 dbg("%s - port not opened", __func__);
1420 return; 1420 return;
1421 } 1421 }
1422 1422
1423 tty = port->tty; 1423 tty = port->tty;
1424 if (!tty) { 1424 if (!tty) {
1425 dbg ("%s - no tty available", __FUNCTION__); 1425 dbg ("%s - no tty available", __func__);
1426 return; 1426 return;
1427 } 1427 }
1428 1428
@@ -1459,19 +1459,19 @@ static void edge_unthrottle (struct usb_serial_port *port)
1459 struct tty_struct *tty; 1459 struct tty_struct *tty;
1460 int status; 1460 int status;
1461 1461
1462 dbg("%s - port %d", __FUNCTION__, port->number); 1462 dbg("%s - port %d", __func__, port->number);
1463 1463
1464 if (edge_port == NULL) 1464 if (edge_port == NULL)
1465 return; 1465 return;
1466 1466
1467 if (!edge_port->open) { 1467 if (!edge_port->open) {
1468 dbg("%s - port not opened", __FUNCTION__); 1468 dbg("%s - port not opened", __func__);
1469 return; 1469 return;
1470 } 1470 }
1471 1471
1472 tty = port->tty; 1472 tty = port->tty;
1473 if (!tty) { 1473 if (!tty) {
1474 dbg ("%s - no tty available", __FUNCTION__); 1474 dbg ("%s - no tty available", __func__);
1475 return; 1475 return;
1476 } 1476 }
1477 1477
@@ -1509,18 +1509,18 @@ static void edge_set_termios (struct usb_serial_port *port, struct ktermios *old
1509 unsigned int cflag; 1509 unsigned int cflag;
1510 1510
1511 cflag = tty->termios->c_cflag; 1511 cflag = tty->termios->c_cflag;
1512 dbg("%s - clfag %08x iflag %08x", __FUNCTION__, 1512 dbg("%s - clfag %08x iflag %08x", __func__,
1513 tty->termios->c_cflag, tty->termios->c_iflag); 1513 tty->termios->c_cflag, tty->termios->c_iflag);
1514 dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__, 1514 dbg("%s - old clfag %08x old iflag %08x", __func__,
1515 old_termios->c_cflag, old_termios->c_iflag); 1515 old_termios->c_cflag, old_termios->c_iflag);
1516 1516
1517 dbg("%s - port %d", __FUNCTION__, port->number); 1517 dbg("%s - port %d", __func__, port->number);
1518 1518
1519 if (edge_port == NULL) 1519 if (edge_port == NULL)
1520 return; 1520 return;
1521 1521
1522 if (!edge_port->open) { 1522 if (!edge_port->open) {
1523 dbg("%s - port not opened", __FUNCTION__); 1523 dbg("%s - port not opened", __func__);
1524 return; 1524 return;
1525 } 1525 }
1526 1526
@@ -1549,7 +1549,7 @@ static int get_lsr_info(struct edgeport_port *edge_port, unsigned int __user *va
1549 spin_lock_irqsave(&edge_port->ep_lock, flags); 1549 spin_lock_irqsave(&edge_port->ep_lock, flags);
1550 if (edge_port->maxTxCredits == edge_port->txCredits && 1550 if (edge_port->maxTxCredits == edge_port->txCredits &&
1551 edge_port->txfifo.count == 0) { 1551 edge_port->txfifo.count == 0) {
1552 dbg("%s -- Empty", __FUNCTION__); 1552 dbg("%s -- Empty", __func__);
1553 result = TIOCSER_TEMT; 1553 result = TIOCSER_TEMT;
1554 } 1554 }
1555 spin_unlock_irqrestore(&edge_port->ep_lock, flags); 1555 spin_unlock_irqrestore(&edge_port->ep_lock, flags);
@@ -1569,7 +1569,7 @@ static int get_number_bytes_avail(struct edgeport_port *edge_port, unsigned int
1569 1569
1570 result = tty->read_cnt; 1570 result = tty->read_cnt;
1571 1571
1572 dbg("%s(%d) = %d", __FUNCTION__, edge_port->port->number, result); 1572 dbg("%s(%d) = %d", __func__, edge_port->port->number, result);
1573 if (copy_to_user(value, &result, sizeof(int))) 1573 if (copy_to_user(value, &result, sizeof(int)))
1574 return -EFAULT; 1574 return -EFAULT;
1575 //return 0; 1575 //return 0;
@@ -1581,7 +1581,7 @@ static int edge_tiocmset (struct usb_serial_port *port, struct file *file, unsig
1581 struct edgeport_port *edge_port = usb_get_serial_port_data(port); 1581 struct edgeport_port *edge_port = usb_get_serial_port_data(port);
1582 unsigned int mcr; 1582 unsigned int mcr;
1583 1583
1584 dbg("%s - port %d", __FUNCTION__, port->number); 1584 dbg("%s - port %d", __func__, port->number);
1585 1585
1586 mcr = edge_port->shadowMCR; 1586 mcr = edge_port->shadowMCR;
1587 if (set & TIOCM_RTS) 1587 if (set & TIOCM_RTS)
@@ -1612,7 +1612,7 @@ static int edge_tiocmget(struct usb_serial_port *port, struct file *file)
1612 unsigned int msr; 1612 unsigned int msr;
1613 unsigned int mcr; 1613 unsigned int mcr;
1614 1614
1615 dbg("%s - port %d", __FUNCTION__, port->number); 1615 dbg("%s - port %d", __func__, port->number);
1616 1616
1617 msr = edge_port->shadowMSR; 1617 msr = edge_port->shadowMSR;
1618 mcr = edge_port->shadowMCR; 1618 mcr = edge_port->shadowMCR;
@@ -1624,7 +1624,7 @@ static int edge_tiocmget(struct usb_serial_port *port, struct file *file)
1624 | ((msr & EDGEPORT_MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */ 1624 | ((msr & EDGEPORT_MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */
1625 1625
1626 1626
1627 dbg("%s -- %x", __FUNCTION__, result); 1627 dbg("%s -- %x", __func__, result);
1628 1628
1629 return result; 1629 return result;
1630} 1630}
@@ -1670,30 +1670,30 @@ static int edge_ioctl (struct usb_serial_port *port, struct file *file, unsigned
1670 struct async_icount cprev; 1670 struct async_icount cprev;
1671 struct serial_icounter_struct icount; 1671 struct serial_icounter_struct icount;
1672 1672
1673 dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd); 1673 dbg("%s - port %d, cmd = 0x%x", __func__, port->number, cmd);
1674 1674
1675 switch (cmd) { 1675 switch (cmd) {
1676 // return number of bytes available 1676 // return number of bytes available
1677 case TIOCINQ: 1677 case TIOCINQ:
1678 dbg("%s (%d) TIOCINQ", __FUNCTION__, port->number); 1678 dbg("%s (%d) TIOCINQ", __func__, port->number);
1679 return get_number_bytes_avail(edge_port, (unsigned int __user *) arg); 1679 return get_number_bytes_avail(edge_port, (unsigned int __user *) arg);
1680 break; 1680 break;
1681 1681
1682 case TIOCSERGETLSR: 1682 case TIOCSERGETLSR:
1683 dbg("%s (%d) TIOCSERGETLSR", __FUNCTION__, port->number); 1683 dbg("%s (%d) TIOCSERGETLSR", __func__, port->number);
1684 return get_lsr_info(edge_port, (unsigned int __user *) arg); 1684 return get_lsr_info(edge_port, (unsigned int __user *) arg);
1685 return 0; 1685 return 0;
1686 1686
1687 case TIOCGSERIAL: 1687 case TIOCGSERIAL:
1688 dbg("%s (%d) TIOCGSERIAL", __FUNCTION__, port->number); 1688 dbg("%s (%d) TIOCGSERIAL", __func__, port->number);
1689 return get_serial_info(edge_port, (struct serial_struct __user *) arg); 1689 return get_serial_info(edge_port, (struct serial_struct __user *) arg);
1690 1690
1691 case TIOCSSERIAL: 1691 case TIOCSSERIAL:
1692 dbg("%s (%d) TIOCSSERIAL", __FUNCTION__, port->number); 1692 dbg("%s (%d) TIOCSSERIAL", __func__, port->number);
1693 break; 1693 break;
1694 1694
1695 case TIOCMIWAIT: 1695 case TIOCMIWAIT:
1696 dbg("%s (%d) TIOCMIWAIT", __FUNCTION__, port->number); 1696 dbg("%s (%d) TIOCMIWAIT", __func__, port->number);
1697 cprev = edge_port->icount; 1697 cprev = edge_port->icount;
1698 while (1) { 1698 while (1) {
1699 prepare_to_wait(&edge_port->delta_msr_wait, &wait, TASK_INTERRUPTIBLE); 1699 prepare_to_wait(&edge_port->delta_msr_wait, &wait, TASK_INTERRUPTIBLE);
@@ -1732,7 +1732,7 @@ static int edge_ioctl (struct usb_serial_port *port, struct file *file, unsigned
1732 icount.brk = cnow.brk; 1732 icount.brk = cnow.brk;
1733 icount.buf_overrun = cnow.buf_overrun; 1733 icount.buf_overrun = cnow.buf_overrun;
1734 1734
1735 dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__, port->number, icount.rx, icount.tx ); 1735 dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __func__, port->number, icount.rx, icount.tx );
1736 if (copy_to_user((void __user *)arg, &icount, sizeof(icount))) 1736 if (copy_to_user((void __user *)arg, &icount, sizeof(icount)))
1737 return -EFAULT; 1737 return -EFAULT;
1738 return 0; 1738 return 0;
@@ -1758,7 +1758,7 @@ static void edge_break (struct usb_serial_port *port, int break_state)
1758 /* flush and chase */ 1758 /* flush and chase */
1759 edge_port->chaseResponsePending = true; 1759 edge_port->chaseResponsePending = true;
1760 1760
1761 dbg("%s - Sending IOSP_CMD_CHASE_PORT", __FUNCTION__); 1761 dbg("%s - Sending IOSP_CMD_CHASE_PORT", __func__);
1762 status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0); 1762 status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0);
1763 if (status == 0) { 1763 if (status == 0) {
1764 // block until chase finished 1764 // block until chase finished
@@ -1772,14 +1772,14 @@ static void edge_break (struct usb_serial_port *port, int break_state)
1772 ((edge_serial->is_epic) && 1772 ((edge_serial->is_epic) &&
1773 (edge_serial->epic_descriptor.Supports.IOSPSetClrBreak))) { 1773 (edge_serial->epic_descriptor.Supports.IOSPSetClrBreak))) {
1774 if (break_state == -1) { 1774 if (break_state == -1) {
1775 dbg("%s - Sending IOSP_CMD_SET_BREAK", __FUNCTION__); 1775 dbg("%s - Sending IOSP_CMD_SET_BREAK", __func__);
1776 status = send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_BREAK, 0); 1776 status = send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_BREAK, 0);
1777 } else { 1777 } else {
1778 dbg("%s - Sending IOSP_CMD_CLEAR_BREAK", __FUNCTION__); 1778 dbg("%s - Sending IOSP_CMD_CLEAR_BREAK", __func__);
1779 status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CLEAR_BREAK, 0); 1779 status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CLEAR_BREAK, 0);
1780 } 1780 }
1781 if (status) { 1781 if (status) {
1782 dbg("%s - error sending break set/clear command.", __FUNCTION__); 1782 dbg("%s - error sending break set/clear command.", __func__);
1783 } 1783 }
1784 } 1784 }
1785 1785
@@ -1799,14 +1799,14 @@ static void process_rcvd_data (struct edgeport_serial *edge_serial, unsigned cha
1799 __u16 lastBufferLength; 1799 __u16 lastBufferLength;
1800 __u16 rxLen; 1800 __u16 rxLen;
1801 1801
1802 dbg("%s", __FUNCTION__); 1802 dbg("%s", __func__);
1803 1803
1804 lastBufferLength = bufferLength + 1; 1804 lastBufferLength = bufferLength + 1;
1805 1805
1806 while (bufferLength > 0) { 1806 while (bufferLength > 0) {
1807 /* failsafe incase we get a message that we don't understand */ 1807 /* failsafe incase we get a message that we don't understand */
1808 if (lastBufferLength == bufferLength) { 1808 if (lastBufferLength == bufferLength) {
1809 dbg("%s - stuck in loop, exiting it.", __FUNCTION__); 1809 dbg("%s - stuck in loop, exiting it.", __func__);
1810 break; 1810 break;
1811 } 1811 }
1812 lastBufferLength = bufferLength; 1812 lastBufferLength = bufferLength;
@@ -1828,7 +1828,7 @@ static void process_rcvd_data (struct edgeport_serial *edge_serial, unsigned cha
1828 ++buffer; 1828 ++buffer;
1829 --bufferLength; 1829 --bufferLength;
1830 1830
1831 dbg("%s - Hdr1=%02X Hdr2=%02X", __FUNCTION__, edge_serial->rxHeader1, edge_serial->rxHeader2); 1831 dbg("%s - Hdr1=%02X Hdr2=%02X", __func__, edge_serial->rxHeader1, edge_serial->rxHeader2);
1832 1832
1833 // Process depending on whether this header is 1833 // Process depending on whether this header is
1834 // data or status 1834 // data or status
@@ -1858,7 +1858,7 @@ static void process_rcvd_data (struct edgeport_serial *edge_serial, unsigned cha
1858 edge_serial->rxPort = IOSP_GET_HDR_PORT(edge_serial->rxHeader1); 1858 edge_serial->rxPort = IOSP_GET_HDR_PORT(edge_serial->rxHeader1);
1859 edge_serial->rxBytesRemaining = IOSP_GET_HDR_DATA_LEN(edge_serial->rxHeader1, edge_serial->rxHeader2); 1859 edge_serial->rxBytesRemaining = IOSP_GET_HDR_DATA_LEN(edge_serial->rxHeader1, edge_serial->rxHeader2);
1860 1860
1861 dbg("%s - Data for Port %u Len %u", __FUNCTION__, edge_serial->rxPort, edge_serial->rxBytesRemaining); 1861 dbg("%s - Data for Port %u Len %u", __func__, edge_serial->rxPort, edge_serial->rxBytesRemaining);
1862 1862
1863 //ASSERT( DevExt->RxPort < DevExt->NumPorts ); 1863 //ASSERT( DevExt->RxPort < DevExt->NumPorts );
1864 //ASSERT( DevExt->RxBytesRemaining < IOSP_MAX_DATA_LENGTH ); 1864 //ASSERT( DevExt->RxBytesRemaining < IOSP_MAX_DATA_LENGTH );
@@ -1891,7 +1891,7 @@ static void process_rcvd_data (struct edgeport_serial *edge_serial, unsigned cha
1891 if (edge_port->open) { 1891 if (edge_port->open) {
1892 tty = edge_port->port->tty; 1892 tty = edge_port->port->tty;
1893 if (tty) { 1893 if (tty) {
1894 dbg("%s - Sending %d bytes to TTY for port %d", __FUNCTION__, rxLen, edge_serial->rxPort); 1894 dbg("%s - Sending %d bytes to TTY for port %d", __func__, rxLen, edge_serial->rxPort);
1895 edge_tty_recv(&edge_serial->serial->dev->dev, tty, buffer, rxLen); 1895 edge_tty_recv(&edge_serial->serial->dev->dev, tty, buffer, rxLen);
1896 } 1896 }
1897 edge_port->icount.rx += rxLen; 1897 edge_port->icount.rx += rxLen;
@@ -1930,17 +1930,17 @@ static void process_rcvd_status (struct edgeport_serial *edge_serial, __u8 byte2
1930 port = edge_serial->serial->port[edge_serial->rxPort]; 1930 port = edge_serial->serial->port[edge_serial->rxPort];
1931 edge_port = usb_get_serial_port_data(port); 1931 edge_port = usb_get_serial_port_data(port);
1932 if (edge_port == NULL) { 1932 if (edge_port == NULL) {
1933 dev_err(&edge_serial->serial->dev->dev, "%s - edge_port == NULL for port %d\n", __FUNCTION__, edge_serial->rxPort); 1933 dev_err(&edge_serial->serial->dev->dev, "%s - edge_port == NULL for port %d\n", __func__, edge_serial->rxPort);
1934 return; 1934 return;
1935 } 1935 }
1936 1936
1937 dbg("%s - port %d", __FUNCTION__, edge_serial->rxPort); 1937 dbg("%s - port %d", __func__, edge_serial->rxPort);
1938 1938
1939 if (code == IOSP_EXT_STATUS) { 1939 if (code == IOSP_EXT_STATUS) {
1940 switch (byte2) { 1940 switch (byte2) {
1941 case IOSP_EXT_STATUS_CHASE_RSP: 1941 case IOSP_EXT_STATUS_CHASE_RSP:
1942 // we want to do EXT status regardless of port open/closed 1942 // we want to do EXT status regardless of port open/closed
1943 dbg("%s - Port %u EXT CHASE_RSP Data = %02x", __FUNCTION__, edge_serial->rxPort, byte3 ); 1943 dbg("%s - Port %u EXT CHASE_RSP Data = %02x", __func__, edge_serial->rxPort, byte3 );
1944 // Currently, the only EXT_STATUS is Chase, so process here instead of one more call 1944 // Currently, the only EXT_STATUS is Chase, so process here instead of one more call
1945 // to one more subroutine. If/when more EXT_STATUS, there'll be more work to do. 1945 // to one more subroutine. If/when more EXT_STATUS, there'll be more work to do.
1946 // Also, we currently clear flag and close the port regardless of content of above's Byte3. 1946 // Also, we currently clear flag and close the port regardless of content of above's Byte3.
@@ -1951,7 +1951,7 @@ static void process_rcvd_status (struct edgeport_serial *edge_serial, __u8 byte2
1951 return; 1951 return;
1952 1952
1953 case IOSP_EXT_STATUS_RX_CHECK_RSP: 1953 case IOSP_EXT_STATUS_RX_CHECK_RSP:
1954 dbg("%s ========== Port %u CHECK_RSP Sequence = %02x =============\n", __FUNCTION__, edge_serial->rxPort, byte3 ); 1954 dbg("%s ========== Port %u CHECK_RSP Sequence = %02x =============\n", __func__, edge_serial->rxPort, byte3 );
1955 //Port->RxCheckRsp = true; 1955 //Port->RxCheckRsp = true;
1956 return; 1956 return;
1957 } 1957 }
@@ -1960,7 +1960,7 @@ static void process_rcvd_status (struct edgeport_serial *edge_serial, __u8 byte2
1960 if (code == IOSP_STATUS_OPEN_RSP) { 1960 if (code == IOSP_STATUS_OPEN_RSP) {
1961 edge_port->txCredits = GET_TX_BUFFER_SIZE(byte3); 1961 edge_port->txCredits = GET_TX_BUFFER_SIZE(byte3);
1962 edge_port->maxTxCredits = edge_port->txCredits; 1962 edge_port->maxTxCredits = edge_port->txCredits;
1963 dbg("%s - Port %u Open Response Inital MSR = %02x TxBufferSize = %d", __FUNCTION__, edge_serial->rxPort, byte2, edge_port->txCredits); 1963 dbg("%s - Port %u Open Response Inital MSR = %02x TxBufferSize = %d", __func__, edge_serial->rxPort, byte2, edge_port->txCredits);
1964 handle_new_msr (edge_port, byte2); 1964 handle_new_msr (edge_port, byte2);
1965 1965
1966 /* send the current line settings to the port so we are in sync with any further termios calls */ 1966 /* send the current line settings to the port so we are in sync with any further termios calls */
@@ -1984,23 +1984,23 @@ static void process_rcvd_status (struct edgeport_serial *edge_serial, __u8 byte2
1984 switch (code) { 1984 switch (code) {
1985 // Not currently sent by Edgeport 1985 // Not currently sent by Edgeport
1986 case IOSP_STATUS_LSR: 1986 case IOSP_STATUS_LSR:
1987 dbg("%s - Port %u LSR Status = %02x", __FUNCTION__, edge_serial->rxPort, byte2); 1987 dbg("%s - Port %u LSR Status = %02x", __func__, edge_serial->rxPort, byte2);
1988 handle_new_lsr(edge_port, false, byte2, 0); 1988 handle_new_lsr(edge_port, false, byte2, 0);
1989 break; 1989 break;
1990 1990
1991 case IOSP_STATUS_LSR_DATA: 1991 case IOSP_STATUS_LSR_DATA:
1992 dbg("%s - Port %u LSR Status = %02x, Data = %02x", __FUNCTION__, edge_serial->rxPort, byte2, byte3); 1992 dbg("%s - Port %u LSR Status = %02x, Data = %02x", __func__, edge_serial->rxPort, byte2, byte3);
1993 // byte2 is LSR Register 1993 // byte2 is LSR Register
1994 // byte3 is broken data byte 1994 // byte3 is broken data byte
1995 handle_new_lsr(edge_port, true, byte2, byte3); 1995 handle_new_lsr(edge_port, true, byte2, byte3);
1996 break; 1996 break;
1997 // 1997 //
1998 // case IOSP_EXT_4_STATUS: 1998 // case IOSP_EXT_4_STATUS:
1999 // dbg("%s - Port %u LSR Status = %02x Data = %02x", __FUNCTION__, edge_serial->rxPort, byte2, byte3); 1999 // dbg("%s - Port %u LSR Status = %02x Data = %02x", __func__, edge_serial->rxPort, byte2, byte3);
2000 // break; 2000 // break;
2001 // 2001 //
2002 case IOSP_STATUS_MSR: 2002 case IOSP_STATUS_MSR:
2003 dbg("%s - Port %u MSR Status = %02x", __FUNCTION__, edge_serial->rxPort, byte2); 2003 dbg("%s - Port %u MSR Status = %02x", __func__, edge_serial->rxPort, byte2);
2004 2004
2005 // Process this new modem status and generate appropriate 2005 // Process this new modem status and generate appropriate
2006 // events, etc, based on the new status. This routine 2006 // events, etc, based on the new status. This routine
@@ -2009,7 +2009,7 @@ static void process_rcvd_status (struct edgeport_serial *edge_serial, __u8 byte2
2009 break; 2009 break;
2010 2010
2011 default: 2011 default:
2012 dbg("%s - Unrecognized IOSP status code %u\n", __FUNCTION__, code); 2012 dbg("%s - Unrecognized IOSP status code %u\n", __func__, code);
2013 break; 2013 break;
2014 } 2014 }
2015 2015
@@ -2029,7 +2029,7 @@ static void edge_tty_recv(struct device *dev, struct tty_struct *tty, unsigned c
2029 cnt = tty_buffer_request_room(tty, length); 2029 cnt = tty_buffer_request_room(tty, length);
2030 if (cnt < length) { 2030 if (cnt < length) {
2031 dev_err(dev, "%s - dropping data, %d bytes lost\n", 2031 dev_err(dev, "%s - dropping data, %d bytes lost\n",
2032 __FUNCTION__, length - cnt); 2032 __func__, length - cnt);
2033 if(cnt == 0) 2033 if(cnt == 0)
2034 break; 2034 break;
2035 } 2035 }
@@ -2050,7 +2050,7 @@ static void handle_new_msr(struct edgeport_port *edge_port, __u8 newMsr)
2050{ 2050{
2051 struct async_icount *icount; 2051 struct async_icount *icount;
2052 2052
2053 dbg("%s %02x", __FUNCTION__, newMsr); 2053 dbg("%s %02x", __func__, newMsr);
2054 2054
2055 if (newMsr & (EDGEPORT_MSR_DELTA_CTS | EDGEPORT_MSR_DELTA_DSR | EDGEPORT_MSR_DELTA_RI | EDGEPORT_MSR_DELTA_CD)) { 2055 if (newMsr & (EDGEPORT_MSR_DELTA_CTS | EDGEPORT_MSR_DELTA_DSR | EDGEPORT_MSR_DELTA_RI | EDGEPORT_MSR_DELTA_CD)) {
2056 icount = &edge_port->icount; 2056 icount = &edge_port->icount;
@@ -2087,7 +2087,7 @@ static void handle_new_lsr(struct edgeport_port *edge_port, __u8 lsrData, __u8 l
2087 __u8 newLsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK)); 2087 __u8 newLsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK));
2088 struct async_icount *icount; 2088 struct async_icount *icount;
2089 2089
2090 dbg("%s - %02x", __FUNCTION__, newLsr); 2090 dbg("%s - %02x", __func__, newLsr);
2091 2091
2092 edge_port->shadowLSR = lsr; 2092 edge_port->shadowLSR = lsr;
2093 2093
@@ -2136,11 +2136,11 @@ static int sram_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u
2136 __u16 current_length; 2136 __u16 current_length;
2137 unsigned char *transfer_buffer; 2137 unsigned char *transfer_buffer;
2138 2138
2139 dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, length); 2139 dbg("%s - %x, %x, %d", __func__, extAddr, addr, length);
2140 2140
2141 transfer_buffer = kmalloc (64, GFP_KERNEL); 2141 transfer_buffer = kmalloc (64, GFP_KERNEL);
2142 if (!transfer_buffer) { 2142 if (!transfer_buffer) {
2143 dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64); 2143 dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __func__, 64);
2144 return -ENOMEM; 2144 return -ENOMEM;
2145 } 2145 }
2146 2146
@@ -2152,7 +2152,7 @@ static int sram_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u
2152 } else { 2152 } else {
2153 current_length = length; 2153 current_length = length;
2154 } 2154 }
2155// dbg("%s - writing %x, %x, %d", __FUNCTION__, extAddr, addr, current_length); 2155// dbg("%s - writing %x, %x, %d", __func__, extAddr, addr, current_length);
2156 memcpy (transfer_buffer, data, current_length); 2156 memcpy (transfer_buffer, data, current_length);
2157 result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_RAM, 2157 result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_RAM,
2158 0x40, addr, extAddr, transfer_buffer, current_length, 300); 2158 0x40, addr, extAddr, transfer_buffer, current_length, 300);
@@ -2181,11 +2181,11 @@ static int rom_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u1
2181 __u16 current_length; 2181 __u16 current_length;
2182 unsigned char *transfer_buffer; 2182 unsigned char *transfer_buffer;
2183 2183
2184// dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, length); 2184// dbg("%s - %x, %x, %d", __func__, extAddr, addr, length);
2185 2185
2186 transfer_buffer = kmalloc (64, GFP_KERNEL); 2186 transfer_buffer = kmalloc (64, GFP_KERNEL);
2187 if (!transfer_buffer) { 2187 if (!transfer_buffer) {
2188 dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64); 2188 dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __func__, 64);
2189 return -ENOMEM; 2189 return -ENOMEM;
2190 } 2190 }
2191 2191
@@ -2197,7 +2197,7 @@ static int rom_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u1
2197 } else { 2197 } else {
2198 current_length = length; 2198 current_length = length;
2199 } 2199 }
2200// dbg("%s - writing %x, %x, %d", __FUNCTION__, extAddr, addr, current_length); 2200// dbg("%s - writing %x, %x, %d", __func__, extAddr, addr, current_length);
2201 memcpy (transfer_buffer, data, current_length); 2201 memcpy (transfer_buffer, data, current_length);
2202 result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_ROM, 2202 result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_ROM,
2203 0x40, addr, extAddr, transfer_buffer, current_length, 300); 2203 0x40, addr, extAddr, transfer_buffer, current_length, 300);
@@ -2226,11 +2226,11 @@ static int rom_read (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16
2226 __u16 current_length; 2226 __u16 current_length;
2227 unsigned char *transfer_buffer; 2227 unsigned char *transfer_buffer;
2228 2228
2229 dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, length); 2229 dbg("%s - %x, %x, %d", __func__, extAddr, addr, length);
2230 2230
2231 transfer_buffer = kmalloc (64, GFP_KERNEL); 2231 transfer_buffer = kmalloc (64, GFP_KERNEL);
2232 if (!transfer_buffer) { 2232 if (!transfer_buffer) {
2233 dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64); 2233 dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __func__, 64);
2234 return -ENOMEM; 2234 return -ENOMEM;
2235 } 2235 }
2236 2236
@@ -2242,7 +2242,7 @@ static int rom_read (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16
2242 } else { 2242 } else {
2243 current_length = length; 2243 current_length = length;
2244 } 2244 }
2245// dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, current_length); 2245// dbg("%s - %x, %x, %d", __func__, extAddr, addr, current_length);
2246 result = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), USB_REQUEST_ION_READ_ROM, 2246 result = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), USB_REQUEST_ION_READ_ROM,
2247 0xC0, addr, extAddr, transfer_buffer, current_length, 300); 2247 0xC0, addr, extAddr, transfer_buffer, current_length, 300);
2248 if (result < 0) 2248 if (result < 0)
@@ -2269,11 +2269,11 @@ static int send_iosp_ext_cmd (struct edgeport_port *edge_port, __u8 command, __u
2269 int length = 0; 2269 int length = 0;
2270 int status = 0; 2270 int status = 0;
2271 2271
2272 dbg("%s - %d, %d", __FUNCTION__, command, param); 2272 dbg("%s - %d, %d", __func__, command, param);
2273 2273
2274 buffer = kmalloc (10, GFP_ATOMIC); 2274 buffer = kmalloc (10, GFP_ATOMIC);
2275 if (!buffer) { 2275 if (!buffer) {
2276 dev_err(&edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 10); 2276 dev_err(&edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __func__, 10);
2277 return -ENOMEM; 2277 return -ENOMEM;
2278 } 2278 }
2279 2279
@@ -2304,7 +2304,7 @@ static int write_cmd_usb (struct edgeport_port *edge_port, unsigned char *buffer
2304 struct urb *urb; 2304 struct urb *urb;
2305 int timeout; 2305 int timeout;
2306 2306
2307 usb_serial_debug_data(debug, &edge_port->port->dev, __FUNCTION__, length, buffer); 2307 usb_serial_debug_data(debug, &edge_port->port->dev, __func__, length, buffer);
2308 2308
2309 /* Allocate our next urb */ 2309 /* Allocate our next urb */
2310 urb = usb_alloc_urb (0, GFP_ATOMIC); 2310 urb = usb_alloc_urb (0, GFP_ATOMIC);
@@ -2312,7 +2312,7 @@ static int write_cmd_usb (struct edgeport_port *edge_port, unsigned char *buffer
2312 return -ENOMEM; 2312 return -ENOMEM;
2313 2313
2314 atomic_inc(&CmdUrbs); 2314 atomic_inc(&CmdUrbs);
2315 dbg("%s - ALLOCATE URB %p (outstanding %d)", __FUNCTION__, urb, atomic_read(&CmdUrbs)); 2315 dbg("%s - ALLOCATE URB %p (outstanding %d)", __func__, urb, atomic_read(&CmdUrbs));
2316 2316
2317 usb_fill_bulk_urb (urb, edge_serial->serial->dev, 2317 usb_fill_bulk_urb (urb, edge_serial->serial->dev,
2318 usb_sndbulkpipe(edge_serial->serial->dev, edge_serial->bulk_out_endpoint), 2318 usb_sndbulkpipe(edge_serial->serial->dev, edge_serial->bulk_out_endpoint),
@@ -2323,7 +2323,7 @@ static int write_cmd_usb (struct edgeport_port *edge_port, unsigned char *buffer
2323 2323
2324 if (status) { 2324 if (status) {
2325 /* something went wrong */ 2325 /* something went wrong */
2326 dev_err(&edge_port->port->dev, "%s - usb_submit_urb(write command) failed, status = %d\n", __FUNCTION__, status); 2326 dev_err(&edge_port->port->dev, "%s - usb_submit_urb(write command) failed, status = %d\n", __func__, status);
2327 usb_kill_urb(urb); 2327 usb_kill_urb(urb);
2328 usb_free_urb(urb); 2328 usb_free_urb(urb);
2329 atomic_dec(&CmdUrbs); 2329 atomic_dec(&CmdUrbs);
@@ -2337,7 +2337,7 @@ static int write_cmd_usb (struct edgeport_port *edge_port, unsigned char *buffer
2337 2337
2338 if (edge_port->commandPending) { 2338 if (edge_port->commandPending) {
2339 /* command timed out */ 2339 /* command timed out */
2340 dbg("%s - command timed out", __FUNCTION__); 2340 dbg("%s - command timed out", __func__);
2341 status = -EINVAL; 2341 status = -EINVAL;
2342 } 2342 }
2343#endif 2343#endif
@@ -2367,18 +2367,18 @@ static int send_cmd_write_baud_rate (struct edgeport_port *edge_port, int baudRa
2367 return 0; 2367 return 0;
2368 } 2368 }
2369 2369
2370 dbg("%s - port = %d, baud = %d", __FUNCTION__, edge_port->port->number, baudRate); 2370 dbg("%s - port = %d, baud = %d", __func__, edge_port->port->number, baudRate);
2371 2371
2372 status = calc_baud_rate_divisor (baudRate, &divisor); 2372 status = calc_baud_rate_divisor (baudRate, &divisor);
2373 if (status) { 2373 if (status) {
2374 dev_err(&edge_port->port->dev, "%s - bad baud rate\n", __FUNCTION__); 2374 dev_err(&edge_port->port->dev, "%s - bad baud rate\n", __func__);
2375 return status; 2375 return status;
2376 } 2376 }
2377 2377
2378 // Alloc memory for the string of commands. 2378 // Alloc memory for the string of commands.
2379 cmdBuffer = kmalloc (0x100, GFP_ATOMIC); 2379 cmdBuffer = kmalloc (0x100, GFP_ATOMIC);
2380 if (!cmdBuffer) { 2380 if (!cmdBuffer) {
2381 dev_err(&edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x100); 2381 dev_err(&edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __func__, 0x100);
2382 return -ENOMEM; 2382 return -ENOMEM;
2383 } 2383 }
2384 currCmd = cmdBuffer; 2384 currCmd = cmdBuffer;
@@ -2414,7 +2414,7 @@ static int calc_baud_rate_divisor (int baudrate, int *divisor)
2414 __u16 custom; 2414 __u16 custom;
2415 2415
2416 2416
2417 dbg("%s - %d", __FUNCTION__, baudrate); 2417 dbg("%s - %d", __func__, baudrate);
2418 2418
2419 for (i = 0; i < ARRAY_SIZE(divisor_table); i++) { 2419 for (i = 0; i < ARRAY_SIZE(divisor_table); i++) {
2420 if ( divisor_table[i].BaudRate == baudrate ) { 2420 if ( divisor_table[i].BaudRate == baudrate ) {
@@ -2432,7 +2432,7 @@ static int calc_baud_rate_divisor (int baudrate, int *divisor)
2432 2432
2433 *divisor = custom; 2433 *divisor = custom;
2434 2434
2435 dbg("%s - Baud %d = %d\n", __FUNCTION__, baudrate, custom); 2435 dbg("%s - Baud %d = %d\n", __func__, baudrate, custom);
2436 return 0; 2436 return 0;
2437 } 2437 }
2438 2438
@@ -2452,7 +2452,7 @@ static int send_cmd_write_uart_register (struct edgeport_port *edge_port, __u8 r
2452 unsigned long cmdLen = 0; 2452 unsigned long cmdLen = 0;
2453 int status; 2453 int status;
2454 2454
2455 dbg("%s - write to %s register 0x%02x", (regNum == MCR) ? "MCR" : "LCR", __FUNCTION__, regValue); 2455 dbg("%s - write to %s register 0x%02x", (regNum == MCR) ? "MCR" : "LCR", __func__, regValue);
2456 2456
2457 if (edge_serial->is_epic && 2457 if (edge_serial->is_epic &&
2458 !edge_serial->epic_descriptor.Supports.IOSPWriteMCR && 2458 !edge_serial->epic_descriptor.Supports.IOSPWriteMCR &&
@@ -2513,29 +2513,29 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi
2513 __u8 txFlow; 2513 __u8 txFlow;
2514 int status; 2514 int status;
2515 2515
2516 dbg("%s - port %d", __FUNCTION__, edge_port->port->number); 2516 dbg("%s - port %d", __func__, edge_port->port->number);
2517 2517
2518 if (!edge_port->open && 2518 if (!edge_port->open &&
2519 !edge_port->openPending) { 2519 !edge_port->openPending) {
2520 dbg("%s - port not opened", __FUNCTION__); 2520 dbg("%s - port not opened", __func__);
2521 return; 2521 return;
2522 } 2522 }
2523 2523
2524 tty = edge_port->port->tty; 2524 tty = edge_port->port->tty;
2525 if ((!tty) || 2525 if ((!tty) ||
2526 (!tty->termios)) { 2526 (!tty->termios)) {
2527 dbg("%s - no tty structures", __FUNCTION__); 2527 dbg("%s - no tty structures", __func__);
2528 return; 2528 return;
2529 } 2529 }
2530 2530
2531 cflag = tty->termios->c_cflag; 2531 cflag = tty->termios->c_cflag;
2532 2532
2533 switch (cflag & CSIZE) { 2533 switch (cflag & CSIZE) {
2534 case CS5: lData = LCR_BITS_5; mask = 0x1f; dbg("%s - data bits = 5", __FUNCTION__); break; 2534 case CS5: lData = LCR_BITS_5; mask = 0x1f; dbg("%s - data bits = 5", __func__); break;
2535 case CS6: lData = LCR_BITS_6; mask = 0x3f; dbg("%s - data bits = 6", __FUNCTION__); break; 2535 case CS6: lData = LCR_BITS_6; mask = 0x3f; dbg("%s - data bits = 6", __func__); break;
2536 case CS7: lData = LCR_BITS_7; mask = 0x7f; dbg("%s - data bits = 7", __FUNCTION__); break; 2536 case CS7: lData = LCR_BITS_7; mask = 0x7f; dbg("%s - data bits = 7", __func__); break;
2537 default: 2537 default:
2538 case CS8: lData = LCR_BITS_8; dbg("%s - data bits = 8", __FUNCTION__); break; 2538 case CS8: lData = LCR_BITS_8; dbg("%s - data bits = 8", __func__); break;
2539 } 2539 }
2540 2540
2541 lParity = LCR_PAR_NONE; 2541 lParity = LCR_PAR_NONE;
@@ -2543,28 +2543,28 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi
2543 if (cflag & CMSPAR) { 2543 if (cflag & CMSPAR) {
2544 if (cflag & PARODD) { 2544 if (cflag & PARODD) {
2545 lParity = LCR_PAR_MARK; 2545 lParity = LCR_PAR_MARK;
2546 dbg("%s - parity = mark", __FUNCTION__); 2546 dbg("%s - parity = mark", __func__);
2547 } else { 2547 } else {
2548 lParity = LCR_PAR_SPACE; 2548 lParity = LCR_PAR_SPACE;
2549 dbg("%s - parity = space", __FUNCTION__); 2549 dbg("%s - parity = space", __func__);
2550 } 2550 }
2551 } else if (cflag & PARODD) { 2551 } else if (cflag & PARODD) {
2552 lParity = LCR_PAR_ODD; 2552 lParity = LCR_PAR_ODD;
2553 dbg("%s - parity = odd", __FUNCTION__); 2553 dbg("%s - parity = odd", __func__);
2554 } else { 2554 } else {
2555 lParity = LCR_PAR_EVEN; 2555 lParity = LCR_PAR_EVEN;
2556 dbg("%s - parity = even", __FUNCTION__); 2556 dbg("%s - parity = even", __func__);
2557 } 2557 }
2558 } else { 2558 } else {
2559 dbg("%s - parity = none", __FUNCTION__); 2559 dbg("%s - parity = none", __func__);
2560 } 2560 }
2561 2561
2562 if (cflag & CSTOPB) { 2562 if (cflag & CSTOPB) {
2563 lStop = LCR_STOP_2; 2563 lStop = LCR_STOP_2;
2564 dbg("%s - stop bits = 2", __FUNCTION__); 2564 dbg("%s - stop bits = 2", __func__);
2565 } else { 2565 } else {
2566 lStop = LCR_STOP_1; 2566 lStop = LCR_STOP_1;
2567 dbg("%s - stop bits = 1", __FUNCTION__); 2567 dbg("%s - stop bits = 1", __func__);
2568 } 2568 }
2569 2569
2570 /* figure out the flow control settings */ 2570 /* figure out the flow control settings */
@@ -2572,9 +2572,9 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi
2572 if (cflag & CRTSCTS) { 2572 if (cflag & CRTSCTS) {
2573 rxFlow |= IOSP_RX_FLOW_RTS; 2573 rxFlow |= IOSP_RX_FLOW_RTS;
2574 txFlow |= IOSP_TX_FLOW_CTS; 2574 txFlow |= IOSP_TX_FLOW_CTS;
2575 dbg("%s - RTS/CTS is enabled", __FUNCTION__); 2575 dbg("%s - RTS/CTS is enabled", __func__);
2576 } else { 2576 } else {
2577 dbg("%s - RTS/CTS is disabled", __FUNCTION__); 2577 dbg("%s - RTS/CTS is disabled", __func__);
2578 } 2578 }
2579 2579
2580 /* if we are implementing XON/XOFF, set the start and stop character in the device */ 2580 /* if we are implementing XON/XOFF, set the start and stop character in the device */
@@ -2592,17 +2592,17 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi
2592 /* if we are implementing INBOUND XON/XOFF */ 2592 /* if we are implementing INBOUND XON/XOFF */
2593 if (I_IXOFF(tty)) { 2593 if (I_IXOFF(tty)) {
2594 rxFlow |= IOSP_RX_FLOW_XON_XOFF; 2594 rxFlow |= IOSP_RX_FLOW_XON_XOFF;
2595 dbg("%s - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", __FUNCTION__, start_char, stop_char); 2595 dbg("%s - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", __func__, start_char, stop_char);
2596 } else { 2596 } else {
2597 dbg("%s - INBOUND XON/XOFF is disabled", __FUNCTION__); 2597 dbg("%s - INBOUND XON/XOFF is disabled", __func__);
2598 } 2598 }
2599 2599
2600 /* if we are implementing OUTBOUND XON/XOFF */ 2600 /* if we are implementing OUTBOUND XON/XOFF */
2601 if (I_IXON(tty)) { 2601 if (I_IXON(tty)) {
2602 txFlow |= IOSP_TX_FLOW_XON_XOFF; 2602 txFlow |= IOSP_TX_FLOW_XON_XOFF;
2603 dbg("%s - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", __FUNCTION__, start_char, stop_char); 2603 dbg("%s - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", __func__, start_char, stop_char);
2604 } else { 2604 } else {
2605 dbg("%s - OUTBOUND XON/XOFF is disabled", __FUNCTION__); 2605 dbg("%s - OUTBOUND XON/XOFF is disabled", __func__);
2606 } 2606 }
2607 } 2607 }
2608 2608
@@ -2645,7 +2645,7 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi
2645 baud = 9600; 2645 baud = 9600;
2646 } 2646 }
2647 2647
2648 dbg("%s - baud rate = %d", __FUNCTION__, baud); 2648 dbg("%s - baud rate = %d", __func__, baud);
2649 status = send_cmd_write_baud_rate (edge_port, baud); 2649 status = send_cmd_write_baud_rate (edge_port, baud);
2650 if (status == -1) { 2650 if (status == -1) {
2651 /* Speed change was not possible - put back the old speed */ 2651 /* Speed change was not possible - put back the old speed */
@@ -2843,7 +2843,7 @@ static int edge_startup (struct usb_serial *serial)
2843 /* create our private serial structure */ 2843 /* create our private serial structure */
2844 edge_serial = kzalloc(sizeof(struct edgeport_serial), GFP_KERNEL); 2844 edge_serial = kzalloc(sizeof(struct edgeport_serial), GFP_KERNEL);
2845 if (edge_serial == NULL) { 2845 if (edge_serial == NULL) {
2846 dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__); 2846 dev_err(&serial->dev->dev, "%s - Out of memory\n", __func__);
2847 return -ENOMEM; 2847 return -ENOMEM;
2848 } 2848 }
2849 spin_lock_init(&edge_serial->es_lock); 2849 spin_lock_init(&edge_serial->es_lock);
@@ -2885,19 +2885,19 @@ static int edge_startup (struct usb_serial *serial)
2885 serial->num_ports); 2885 serial->num_ports);
2886 } 2886 }
2887 2887
2888 dbg("%s - time 1 %ld", __FUNCTION__, jiffies); 2888 dbg("%s - time 1 %ld", __func__, jiffies);
2889 2889
2890 /* If not an EPiC device */ 2890 /* If not an EPiC device */
2891 if (!edge_serial->is_epic) { 2891 if (!edge_serial->is_epic) {
2892 /* now load the application firmware into this device */ 2892 /* now load the application firmware into this device */
2893 load_application_firmware (edge_serial); 2893 load_application_firmware (edge_serial);
2894 2894
2895 dbg("%s - time 2 %ld", __FUNCTION__, jiffies); 2895 dbg("%s - time 2 %ld", __func__, jiffies);
2896 2896
2897 /* Check current Edgeport EEPROM and update if necessary */ 2897 /* Check current Edgeport EEPROM and update if necessary */
2898 update_edgeport_E2PROM (edge_serial); 2898 update_edgeport_E2PROM (edge_serial);
2899 2899
2900 dbg("%s - time 3 %ld", __FUNCTION__, jiffies); 2900 dbg("%s - time 3 %ld", __func__, jiffies);
2901 2901
2902 /* set the configuration to use #1 */ 2902 /* set the configuration to use #1 */
2903// dbg("set_configuration 1"); 2903// dbg("set_configuration 1");
@@ -2911,7 +2911,7 @@ static int edge_startup (struct usb_serial *serial)
2911 for (i = 0; i < serial->num_ports; ++i) { 2911 for (i = 0; i < serial->num_ports; ++i) {
2912 edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL); 2912 edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL);
2913 if (edge_port == NULL) { 2913 if (edge_port == NULL) {
2914 dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__); 2914 dev_err(&serial->dev->dev, "%s - Out of memory\n", __func__);
2915 for (j = 0; j < i; ++j) { 2915 for (j = 0; j < i; ++j) {
2916 kfree (usb_get_serial_port_data(serial->port[j])); 2916 kfree (usb_get_serial_port_data(serial->port[j]));
2917 usb_set_serial_port_data(serial->port[j], NULL); 2917 usb_set_serial_port_data(serial->port[j], NULL);
@@ -3017,7 +3017,7 @@ static int edge_startup (struct usb_serial *serial)
3017 * continue as long as the edgeport is connected */ 3017 * continue as long as the edgeport is connected */
3018 response = usb_submit_urb(edge_serial->interrupt_read_urb, GFP_KERNEL); 3018 response = usb_submit_urb(edge_serial->interrupt_read_urb, GFP_KERNEL);
3019 if (response) 3019 if (response)
3020 err("%s - Error %d submitting control urb", __FUNCTION__, response); 3020 err("%s - Error %d submitting control urb", __func__, response);
3021 } 3021 }
3022 return response; 3022 return response;
3023} 3023}
@@ -3032,7 +3032,7 @@ static void edge_shutdown (struct usb_serial *serial)
3032 struct edgeport_serial *edge_serial = usb_get_serial_data(serial); 3032 struct edgeport_serial *edge_serial = usb_get_serial_data(serial);
3033 int i; 3033 int i;
3034 3034
3035 dbg("%s", __FUNCTION__); 3035 dbg("%s", __func__);
3036 3036
3037 /* stop reads and writes on all ports */ 3037 /* stop reads and writes on all ports */
3038 for (i=0; i < serial->num_ports; ++i) { 3038 for (i=0; i < serial->num_ports; ++i) {
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
index 856e4d9afd6f..0d412ede839a 100644
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -290,7 +290,7 @@ static int TIReadVendorRequestSync (struct usb_device *dev,
290 return status; 290 return status;
291 if (status != size) { 291 if (status != size) {
292 dbg ("%s - wanted to write %d, but only wrote %d", 292 dbg ("%s - wanted to write %d, but only wrote %d",
293 __FUNCTION__, size, status); 293 __func__, size, status);
294 return -ECOMM; 294 return -ECOMM;
295 } 295 }
296 return 0; 296 return 0;
@@ -320,7 +320,7 @@ static int TISendVendorRequestSync (struct usb_device *dev,
320 return status; 320 return status;
321 if (status != size) { 321 if (status != size) {
322 dbg ("%s - wanted to write %d, but only wrote %d", 322 dbg ("%s - wanted to write %d, but only wrote %d",
323 __FUNCTION__, size, status); 323 __func__, size, status);
324 return -ECOMM; 324 return -ECOMM;
325 } 325 }
326 return 0; 326 return 0;
@@ -344,7 +344,7 @@ static int TIPurgeDataSync (struct usb_serial_port *port, __u16 mask)
344{ 344{
345 int port_number = port->number - port->serial->minor; 345 int port_number = port->number - port->serial->minor;
346 346
347 dbg ("%s - port %d, mask %x", __FUNCTION__, port_number, mask); 347 dbg ("%s - port %d, mask %x", __func__, port_number, mask);
348 348
349 return TIWriteCommandSync (port->serial->dev, 349 return TIWriteCommandSync (port->serial->dev,
350 UMPC_PURGE_PORT, 350 UMPC_PURGE_PORT,
@@ -369,7 +369,7 @@ static int TIReadDownloadMemory(struct usb_device *dev, int start_address,
369 __u8 read_length; 369 __u8 read_length;
370 __be16 be_start_address; 370 __be16 be_start_address;
371 371
372 dbg ("%s - @ %x for %d", __FUNCTION__, start_address, length); 372 dbg ("%s - @ %x for %d", __func__, start_address, length);
373 373
374 /* Read in blocks of 64 bytes 374 /* Read in blocks of 64 bytes
375 * (TI firmware can't handle more than 64 byte reads) 375 * (TI firmware can't handle more than 64 byte reads)
@@ -381,7 +381,7 @@ static int TIReadDownloadMemory(struct usb_device *dev, int start_address,
381 read_length = (__u8)length; 381 read_length = (__u8)length;
382 382
383 if (read_length > 1) { 383 if (read_length > 1) {
384 dbg ("%s - @ %x for %d", __FUNCTION__, 384 dbg ("%s - @ %x for %d", __func__,
385 start_address, read_length); 385 start_address, read_length);
386 } 386 }
387 be_start_address = cpu_to_be16 (start_address); 387 be_start_address = cpu_to_be16 (start_address);
@@ -393,12 +393,12 @@ static int TIReadDownloadMemory(struct usb_device *dev, int start_address,
393 read_length); // TransferBufferLength 393 read_length); // TransferBufferLength
394 394
395 if (status) { 395 if (status) {
396 dbg ("%s - ERROR %x", __FUNCTION__, status); 396 dbg ("%s - ERROR %x", __func__, status);
397 return status; 397 return status;
398 } 398 }
399 399
400 if (read_length > 1) { 400 if (read_length > 1) {
401 usb_serial_debug_data(debug, &dev->dev, __FUNCTION__, 401 usb_serial_debug_data(debug, &dev->dev, __func__,
402 read_length, buffer); 402 read_length, buffer);
403 } 403 }
404 404
@@ -434,13 +434,13 @@ static int TIReadBootMemory (struct edgeport_serial *serial, int start_address,
434 &buffer[i], // TransferBuffer 434 &buffer[i], // TransferBuffer
435 0x01); // TransferBufferLength 435 0x01); // TransferBufferLength
436 if (status) { 436 if (status) {
437 dbg ("%s - ERROR %x", __FUNCTION__, status); 437 dbg ("%s - ERROR %x", __func__, status);
438 return status; 438 return status;
439 } 439 }
440 } 440 }
441 441
442 dbg ("%s - start_address = %x, length = %d", __FUNCTION__, start_address, length); 442 dbg ("%s - start_address = %x, length = %d", __func__, start_address, length);
443 usb_serial_debug_data(debug, &serial->serial->dev->dev, __FUNCTION__, length, buffer); 443 usb_serial_debug_data(debug, &serial->serial->dev->dev, __func__, length, buffer);
444 444
445 serial->TiReadI2C = 1; 445 serial->TiReadI2C = 1;
446 446
@@ -472,8 +472,8 @@ static int TIWriteBootMemory (struct edgeport_serial *serial, int start_address,
472 return status; 472 return status;
473 } 473 }
474 474
475 dbg ("%s - start_sddr = %x, length = %d", __FUNCTION__, start_address, length); 475 dbg ("%s - start_sddr = %x, length = %d", __func__, start_address, length);
476 usb_serial_debug_data(debug, &serial->serial->dev->dev, __FUNCTION__, length, buffer); 476 usb_serial_debug_data(debug, &serial->serial->dev->dev, __func__, length, buffer);
477 477
478 return status; 478 return status;
479} 479}
@@ -494,8 +494,8 @@ static int TIWriteDownloadI2C (struct edgeport_serial *serial, int start_address
494 if (write_length > length) 494 if (write_length > length)
495 write_length = length; 495 write_length = length;
496 496
497 dbg ("%s - BytesInFirstPage Addr = %x, length = %d", __FUNCTION__, start_address, write_length); 497 dbg ("%s - BytesInFirstPage Addr = %x, length = %d", __func__, start_address, write_length);
498 usb_serial_debug_data(debug, &serial->serial->dev->dev, __FUNCTION__, write_length, buffer); 498 usb_serial_debug_data(debug, &serial->serial->dev->dev, __func__, write_length, buffer);
499 499
500 /* Write first page */ 500 /* Write first page */
501 be_start_address = cpu_to_be16 (start_address); 501 be_start_address = cpu_to_be16 (start_address);
@@ -506,7 +506,7 @@ static int TIWriteDownloadI2C (struct edgeport_serial *serial, int start_address
506 buffer, // TransferBuffer 506 buffer, // TransferBuffer
507 write_length); 507 write_length);
508 if (status) { 508 if (status) {
509 dbg ("%s - ERROR %d", __FUNCTION__, status); 509 dbg ("%s - ERROR %d", __func__, status);
510 return status; 510 return status;
511 } 511 }
512 512
@@ -521,8 +521,8 @@ static int TIWriteDownloadI2C (struct edgeport_serial *serial, int start_address
521 else 521 else
522 write_length = length; 522 write_length = length;
523 523
524 dbg ("%s - Page Write Addr = %x, length = %d", __FUNCTION__, start_address, write_length); 524 dbg ("%s - Page Write Addr = %x, length = %d", __func__, start_address, write_length);
525 usb_serial_debug_data(debug, &serial->serial->dev->dev, __FUNCTION__, write_length, buffer); 525 usb_serial_debug_data(debug, &serial->serial->dev->dev, __func__, write_length, buffer);
526 526
527 /* Write next page */ 527 /* Write next page */
528 be_start_address = cpu_to_be16 (start_address); 528 be_start_address = cpu_to_be16 (start_address);
@@ -533,7 +533,7 @@ static int TIWriteDownloadI2C (struct edgeport_serial *serial, int start_address
533 buffer, // TransferBuffer 533 buffer, // TransferBuffer
534 write_length); // TransferBufferLength 534 write_length); // TransferBufferLength
535 if (status) { 535 if (status) {
536 dev_err (&serial->serial->dev->dev, "%s - ERROR %d\n", __FUNCTION__, status); 536 dev_err (&serial->serial->dev->dev, "%s - ERROR %d\n", __func__, status);
537 return status; 537 return status;
538 } 538 }
539 539
@@ -559,7 +559,7 @@ static int TIIsTxActive (struct edgeport_port *port)
559 559
560 oedb = kmalloc (sizeof (* oedb), GFP_KERNEL); 560 oedb = kmalloc (sizeof (* oedb), GFP_KERNEL);
561 if (!oedb) { 561 if (!oedb) {
562 dev_err (&port->port->dev, "%s - out of memory\n", __FUNCTION__); 562 dev_err (&port->port->dev, "%s - out of memory\n", __func__);
563 return -ENOMEM; 563 return -ENOMEM;
564 } 564 }
565 565
@@ -579,7 +579,7 @@ static int TIIsTxActive (struct edgeport_port *port)
579 if (status) 579 if (status)
580 goto exit_is_tx_active; 580 goto exit_is_tx_active;
581 581
582 dbg ("%s - XByteCount 0x%X", __FUNCTION__, oedb->XByteCount); 582 dbg ("%s - XByteCount 0x%X", __func__, oedb->XByteCount);
583 583
584 /* and the LSR */ 584 /* and the LSR */
585 status = TIReadRam (port->port->serial->dev, 585 status = TIReadRam (port->port->serial->dev,
@@ -589,7 +589,7 @@ static int TIIsTxActive (struct edgeport_port *port)
589 589
590 if (status) 590 if (status)
591 goto exit_is_tx_active; 591 goto exit_is_tx_active;
592 dbg ("%s - LSR = 0x%X", __FUNCTION__, *lsr); 592 dbg ("%s - LSR = 0x%X", __func__, *lsr);
593 593
594 /* If either buffer has data or we are transmitting then return TRUE */ 594 /* If either buffer has data or we are transmitting then return TRUE */
595 if ((oedb->XByteCount & 0x80 ) != 0 ) 595 if ((oedb->XByteCount & 0x80 ) != 0 )
@@ -600,7 +600,7 @@ static int TIIsTxActive (struct edgeport_port *port)
600 600
601 /* We return Not Active if we get any kind of error */ 601 /* We return Not Active if we get any kind of error */
602exit_is_tx_active: 602exit_is_tx_active:
603 dbg ("%s - return %d", __FUNCTION__, bytes_left ); 603 dbg ("%s - return %d", __func__, bytes_left );
604 604
605 kfree(lsr); 605 kfree(lsr);
606 kfree(oedb); 606 kfree(oedb);
@@ -664,11 +664,11 @@ static int TIChooseConfiguration (struct usb_device *dev)
664 // we want. However, we just support one config at this point, 664 // we want. However, we just support one config at this point,
665 // configuration # 1, which is Config Descriptor 0. 665 // configuration # 1, which is Config Descriptor 0.
666 666
667 dbg ("%s - Number of Interfaces = %d", __FUNCTION__, dev->config->desc.bNumInterfaces); 667 dbg ("%s - Number of Interfaces = %d", __func__, dev->config->desc.bNumInterfaces);
668 dbg ("%s - MAX Power = %d", __FUNCTION__, dev->config->desc.bMaxPower*2); 668 dbg ("%s - MAX Power = %d", __func__, dev->config->desc.bMaxPower*2);
669 669
670 if (dev->config->desc.bNumInterfaces != 1) { 670 if (dev->config->desc.bNumInterfaces != 1) {
671 dev_err (&dev->dev, "%s - bNumInterfaces is not 1, ERROR!\n", __FUNCTION__); 671 dev_err (&dev->dev, "%s - bNumInterfaces is not 1, ERROR!\n", __func__);
672 return -ENODEV; 672 return -ENODEV;
673 } 673 }
674 674
@@ -751,7 +751,7 @@ static int ValidChecksum(struct ti_i2c_desc *rom_desc, __u8 *buffer)
751 cs = (__u8)(cs + buffer[i]); 751 cs = (__u8)(cs + buffer[i]);
752 } 752 }
753 if (cs != rom_desc->CheckSum) { 753 if (cs != rom_desc->CheckSum) {
754 dbg ("%s - Mismatch %x - %x", __FUNCTION__, rom_desc->CheckSum, cs); 754 dbg ("%s - Mismatch %x - %x", __func__, rom_desc->CheckSum, cs);
755 return -EINVAL; 755 return -EINVAL;
756 } 756 }
757 return 0; 757 return 0;
@@ -769,12 +769,12 @@ static int TiValidateI2cImage (struct edgeport_serial *serial)
769 769
770 rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL); 770 rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
771 if (!rom_desc) { 771 if (!rom_desc) {
772 dev_err (dev, "%s - out of memory\n", __FUNCTION__); 772 dev_err (dev, "%s - out of memory\n", __func__);
773 return -ENOMEM; 773 return -ENOMEM;
774 } 774 }
775 buffer = kmalloc (TI_MAX_I2C_SIZE, GFP_KERNEL); 775 buffer = kmalloc (TI_MAX_I2C_SIZE, GFP_KERNEL);
776 if (!buffer) { 776 if (!buffer) {
777 dev_err (dev, "%s - out of memory when allocating buffer\n", __FUNCTION__); 777 dev_err (dev, "%s - out of memory when allocating buffer\n", __func__);
778 kfree (rom_desc); 778 kfree (rom_desc);
779 return -ENOMEM; 779 return -ENOMEM;
780 } 780 }
@@ -785,7 +785,7 @@ static int TiValidateI2cImage (struct edgeport_serial *serial)
785 goto ExitTiValidateI2cImage; 785 goto ExitTiValidateI2cImage;
786 786
787 if (*buffer != UMP5152 && *buffer != UMP3410) { 787 if (*buffer != UMP5152 && *buffer != UMP3410) {
788 dev_err (dev, "%s - invalid buffer signature\n", __FUNCTION__); 788 dev_err (dev, "%s - invalid buffer signature\n", __func__);
789 status = -ENODEV; 789 status = -ENODEV;
790 goto ExitTiValidateI2cImage; 790 goto ExitTiValidateI2cImage;
791 } 791 }
@@ -801,11 +801,11 @@ static int TiValidateI2cImage (struct edgeport_serial *serial)
801 801
802 if ((start_address + sizeof(struct ti_i2c_desc) + rom_desc->Size) > TI_MAX_I2C_SIZE) { 802 if ((start_address + sizeof(struct ti_i2c_desc) + rom_desc->Size) > TI_MAX_I2C_SIZE) {
803 status = -ENODEV; 803 status = -ENODEV;
804 dbg ("%s - structure too big, erroring out.", __FUNCTION__); 804 dbg ("%s - structure too big, erroring out.", __func__);
805 break; 805 break;
806 } 806 }
807 807
808 dbg ("%s Type = 0x%x", __FUNCTION__, rom_desc->Type); 808 dbg ("%s Type = 0x%x", __func__, rom_desc->Type);
809 809
810 // Skip type 2 record 810 // Skip type 2 record
811 ttype = rom_desc->Type & 0x0f; 811 ttype = rom_desc->Type & 0x0f;
@@ -845,13 +845,13 @@ static int TIReadManufDescriptor (struct edgeport_serial *serial, __u8 *buffer)
845 845
846 rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL); 846 rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
847 if (!rom_desc) { 847 if (!rom_desc) {
848 dev_err (&serial->serial->dev->dev, "%s - out of memory\n", __FUNCTION__); 848 dev_err (&serial->serial->dev->dev, "%s - out of memory\n", __func__);
849 return -ENOMEM; 849 return -ENOMEM;
850 } 850 }
851 start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_ION, rom_desc); 851 start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_ION, rom_desc);
852 852
853 if (!start_address) { 853 if (!start_address) {
854 dbg ("%s - Edge Descriptor not found in I2C", __FUNCTION__); 854 dbg ("%s - Edge Descriptor not found in I2C", __func__);
855 status = -ENODEV; 855 status = -ENODEV;
856 goto exit; 856 goto exit;
857 } 857 }
@@ -867,12 +867,12 @@ static int TIReadManufDescriptor (struct edgeport_serial *serial, __u8 *buffer)
867 status = ValidChecksum(rom_desc, buffer); 867 status = ValidChecksum(rom_desc, buffer);
868 868
869 desc = (struct edge_ti_manuf_descriptor *)buffer; 869 desc = (struct edge_ti_manuf_descriptor *)buffer;
870 dbg ( "%s - IonConfig 0x%x", __FUNCTION__, desc->IonConfig ); 870 dbg ( "%s - IonConfig 0x%x", __func__, desc->IonConfig );
871 dbg ( "%s - Version %d", __FUNCTION__, desc->Version ); 871 dbg ( "%s - Version %d", __func__, desc->Version );
872 dbg ( "%s - Cpu/Board 0x%x", __FUNCTION__, desc->CpuRev_BoardRev ); 872 dbg ( "%s - Cpu/Board 0x%x", __func__, desc->CpuRev_BoardRev );
873 dbg ( "%s - NumPorts %d", __FUNCTION__, desc->NumPorts ); 873 dbg ( "%s - NumPorts %d", __func__, desc->NumPorts );
874 dbg ( "%s - NumVirtualPorts %d", __FUNCTION__, desc->NumVirtualPorts ); 874 dbg ( "%s - NumVirtualPorts %d", __func__, desc->NumVirtualPorts );
875 dbg ( "%s - TotalPorts %d", __FUNCTION__, desc->TotalPorts ); 875 dbg ( "%s - TotalPorts %d", __func__, desc->TotalPorts );
876 876
877exit: 877exit:
878 kfree (rom_desc); 878 kfree (rom_desc);
@@ -902,7 +902,7 @@ static int BuildI2CFirmwareHeader (__u8 *header, struct device *dev)
902 902
903 buffer = kmalloc (buffer_size, GFP_KERNEL); 903 buffer = kmalloc (buffer_size, GFP_KERNEL);
904 if (!buffer) { 904 if (!buffer) {
905 dev_err (dev, "%s - out of memory\n", __FUNCTION__); 905 dev_err (dev, "%s - out of memory\n", __func__);
906 return -ENOMEM; 906 return -ENOMEM;
907 } 907 }
908 908
@@ -955,11 +955,11 @@ static int TIGetI2cTypeInBootMode (struct edgeport_serial *serial)
955 &data, // TransferBuffer 955 &data, // TransferBuffer
956 0x01); // TransferBufferLength 956 0x01); // TransferBufferLength
957 if (status) 957 if (status)
958 dbg ("%s - read 2 status error = %d", __FUNCTION__, status); 958 dbg ("%s - read 2 status error = %d", __func__, status);
959 else 959 else
960 dbg ("%s - read 2 data = 0x%x", __FUNCTION__, data); 960 dbg ("%s - read 2 data = 0x%x", __func__, data);
961 if ((!status) && (data == UMP5152 || data == UMP3410)) { 961 if ((!status) && (data == UMP5152 || data == UMP3410)) {
962 dbg ("%s - ROM_TYPE_II", __FUNCTION__); 962 dbg ("%s - ROM_TYPE_II", __func__);
963 serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II; 963 serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
964 return 0; 964 return 0;
965 } 965 }
@@ -972,16 +972,16 @@ static int TIGetI2cTypeInBootMode (struct edgeport_serial *serial)
972 &data, // TransferBuffer 972 &data, // TransferBuffer
973 0x01); // TransferBufferLength 973 0x01); // TransferBufferLength
974 if (status) 974 if (status)
975 dbg ("%s - read 3 status error = %d", __FUNCTION__, status); 975 dbg ("%s - read 3 status error = %d", __func__, status);
976 else 976 else
977 dbg ("%s - read 2 data = 0x%x", __FUNCTION__, data); 977 dbg ("%s - read 2 data = 0x%x", __func__, data);
978 if ((!status) && (data == UMP5152 || data == UMP3410)) { 978 if ((!status) && (data == UMP5152 || data == UMP3410)) {
979 dbg ("%s - ROM_TYPE_III", __FUNCTION__); 979 dbg ("%s - ROM_TYPE_III", __func__);
980 serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_III; 980 serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_III;
981 return 0; 981 return 0;
982 } 982 }
983 983
984 dbg ("%s - Unknown", __FUNCTION__); 984 dbg ("%s - Unknown", __func__);
985 serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II; 985 serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
986 return -ENODEV; 986 return -ENODEV;
987} 987}
@@ -1063,7 +1063,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1063 1063
1064 interface = &serial->serial->interface->cur_altsetting->desc; 1064 interface = &serial->serial->interface->cur_altsetting->desc;
1065 if (!interface) { 1065 if (!interface) {
1066 dev_err (dev, "%s - no interface set, error!\n", __FUNCTION__); 1066 dev_err (dev, "%s - no interface set, error!\n", __func__);
1067 return -ENODEV; 1067 return -ENODEV;
1068 } 1068 }
1069 1069
@@ -1099,7 +1099,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1099 */ 1099 */
1100 ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL); 1100 ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL);
1101 if (!ti_manuf_desc) { 1101 if (!ti_manuf_desc) {
1102 dev_err (dev, "%s - out of memory.\n", __FUNCTION__); 1102 dev_err (dev, "%s - out of memory.\n", __func__);
1103 return -ENOMEM; 1103 return -ENOMEM;
1104 } 1104 }
1105 status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc); 1105 status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc);
@@ -1110,7 +1110,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1110 1110
1111 // Check version number of ION descriptor 1111 // Check version number of ION descriptor
1112 if (!ignore_cpu_rev && TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev) < 2) { 1112 if (!ignore_cpu_rev && TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev) < 2) {
1113 dbg ( "%s - Wrong CPU Rev %d (Must be 2)", __FUNCTION__, 1113 dbg ( "%s - Wrong CPU Rev %d (Must be 2)", __func__,
1114 TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev)); 1114 TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev));
1115 kfree (ti_manuf_desc); 1115 kfree (ti_manuf_desc);
1116 return -EINVAL; 1116 return -EINVAL;
@@ -1118,7 +1118,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1118 1118
1119 rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL); 1119 rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
1120 if (!rom_desc) { 1120 if (!rom_desc) {
1121 dev_err (dev, "%s - out of memory.\n", __FUNCTION__); 1121 dev_err (dev, "%s - out of memory.\n", __func__);
1122 kfree (ti_manuf_desc); 1122 kfree (ti_manuf_desc);
1123 return -ENOMEM; 1123 return -ENOMEM;
1124 } 1124 }
@@ -1128,11 +1128,11 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1128 struct ti_i2c_firmware_rec *firmware_version; 1128 struct ti_i2c_firmware_rec *firmware_version;
1129 __u8 record; 1129 __u8 record;
1130 1130
1131 dbg ("%s - Found Type FIRMWARE (Type 2) record", __FUNCTION__); 1131 dbg ("%s - Found Type FIRMWARE (Type 2) record", __func__);
1132 1132
1133 firmware_version = kmalloc (sizeof (*firmware_version), GFP_KERNEL); 1133 firmware_version = kmalloc (sizeof (*firmware_version), GFP_KERNEL);
1134 if (!firmware_version) { 1134 if (!firmware_version) {
1135 dev_err (dev, "%s - out of memory.\n", __FUNCTION__); 1135 dev_err (dev, "%s - out of memory.\n", __func__);
1136 kfree (rom_desc); 1136 kfree (rom_desc);
1137 kfree (ti_manuf_desc); 1137 kfree (ti_manuf_desc);
1138 return -ENOMEM; 1138 return -ENOMEM;
@@ -1158,7 +1158,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1158 (OperationalCodeImageVersion.MinorVersion); 1158 (OperationalCodeImageVersion.MinorVersion);
1159 1159
1160 dbg ("%s - >>>Firmware Versions Device %d.%d Driver %d.%d", 1160 dbg ("%s - >>>Firmware Versions Device %d.%d Driver %d.%d",
1161 __FUNCTION__, 1161 __func__,
1162 firmware_version->Ver_Major, 1162 firmware_version->Ver_Major,
1163 firmware_version->Ver_Minor, 1163 firmware_version->Ver_Minor,
1164 OperationalCodeImageVersion.MajorVersion, 1164 OperationalCodeImageVersion.MajorVersion,
@@ -1167,7 +1167,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1167 // Check if we have an old version in the I2C and update if necessary 1167 // Check if we have an old version in the I2C and update if necessary
1168 if (download_cur_ver != download_new_ver) { 1168 if (download_cur_ver != download_new_ver) {
1169 dbg ("%s - Update I2C Download from %d.%d to %d.%d", 1169 dbg ("%s - Update I2C Download from %d.%d to %d.%d",
1170 __FUNCTION__, 1170 __func__,
1171 firmware_version->Ver_Major, 1171 firmware_version->Ver_Major,
1172 firmware_version->Ver_Minor, 1172 firmware_version->Ver_Minor,
1173 OperationalCodeImageVersion.MajorVersion, 1173 OperationalCodeImageVersion.MajorVersion,
@@ -1209,14 +1209,14 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1209 } 1209 }
1210 1210
1211 if (record != I2C_DESC_TYPE_FIRMWARE_BLANK) { 1211 if (record != I2C_DESC_TYPE_FIRMWARE_BLANK) {
1212 dev_err (dev, "%s - error resetting device\n", __FUNCTION__); 1212 dev_err (dev, "%s - error resetting device\n", __func__);
1213 kfree (firmware_version); 1213 kfree (firmware_version);
1214 kfree (rom_desc); 1214 kfree (rom_desc);
1215 kfree (ti_manuf_desc); 1215 kfree (ti_manuf_desc);
1216 return -ENODEV; 1216 return -ENODEV;
1217 } 1217 }
1218 1218
1219 dbg ("%s - HARDWARE RESET", __FUNCTION__); 1219 dbg ("%s - HARDWARE RESET", __func__);
1220 1220
1221 // Reset UMP -- Back to BOOT MODE 1221 // Reset UMP -- Back to BOOT MODE
1222 status = TISendVendorRequestSync (serial->serial->dev, 1222 status = TISendVendorRequestSync (serial->serial->dev,
@@ -1226,7 +1226,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1226 NULL, // TransferBuffer 1226 NULL, // TransferBuffer
1227 0); // TransferBufferLength 1227 0); // TransferBufferLength
1228 1228
1229 dbg ( "%s - HARDWARE RESET return %d", __FUNCTION__, status); 1229 dbg ( "%s - HARDWARE RESET return %d", __func__, status);
1230 1230
1231 /* return an error on purpose. */ 1231 /* return an error on purpose. */
1232 kfree (firmware_version); 1232 kfree (firmware_version);
@@ -1244,7 +1244,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1244 1244
1245 header = kmalloc (HEADER_SIZE, GFP_KERNEL); 1245 header = kmalloc (HEADER_SIZE, GFP_KERNEL);
1246 if (!header) { 1246 if (!header) {
1247 dev_err (dev, "%s - out of memory.\n", __FUNCTION__); 1247 dev_err (dev, "%s - out of memory.\n", __func__);
1248 kfree (rom_desc); 1248 kfree (rom_desc);
1249 kfree (ti_manuf_desc); 1249 kfree (ti_manuf_desc);
1250 return -ENOMEM; 1250 return -ENOMEM;
@@ -1252,14 +1252,14 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1252 1252
1253 vheader = kmalloc (HEADER_SIZE, GFP_KERNEL); 1253 vheader = kmalloc (HEADER_SIZE, GFP_KERNEL);
1254 if (!vheader) { 1254 if (!vheader) {
1255 dev_err (dev, "%s - out of memory.\n", __FUNCTION__); 1255 dev_err (dev, "%s - out of memory.\n", __func__);
1256 kfree (header); 1256 kfree (header);
1257 kfree (rom_desc); 1257 kfree (rom_desc);
1258 kfree (ti_manuf_desc); 1258 kfree (ti_manuf_desc);
1259 return -ENOMEM; 1259 return -ENOMEM;
1260 } 1260 }
1261 1261
1262 dbg ("%s - Found Type BLANK FIRMWARE (Type F2) record", __FUNCTION__); 1262 dbg ("%s - Found Type BLANK FIRMWARE (Type F2) record", __func__);
1263 1263
1264 // In order to update the I2C firmware we must change the type 2 record to type 0xF2. 1264 // In order to update the I2C firmware we must change the type 2 record to type 0xF2.
1265 // This will force the UMP to come up in Boot Mode. Then while in boot mode, the driver 1265 // This will force the UMP to come up in Boot Mode. Then while in boot mode, the driver
@@ -1297,7 +1297,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1297 vheader); 1297 vheader);
1298 1298
1299 if (status) { 1299 if (status) {
1300 dbg ("%s - can't read header back", __FUNCTION__); 1300 dbg ("%s - can't read header back", __func__);
1301 kfree (vheader); 1301 kfree (vheader);
1302 kfree (header); 1302 kfree (header);
1303 kfree (rom_desc); 1303 kfree (rom_desc);
@@ -1305,7 +1305,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1305 return status; 1305 return status;
1306 } 1306 }
1307 if (memcmp(vheader, header, HEADER_SIZE)) { 1307 if (memcmp(vheader, header, HEADER_SIZE)) {
1308 dbg ("%s - write download record failed", __FUNCTION__); 1308 dbg ("%s - write download record failed", __func__);
1309 kfree (vheader); 1309 kfree (vheader);
1310 kfree (header); 1310 kfree (header);
1311 kfree (rom_desc); 1311 kfree (rom_desc);
@@ -1316,7 +1316,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1316 kfree (vheader); 1316 kfree (vheader);
1317 kfree (header); 1317 kfree (header);
1318 1318
1319 dbg ("%s - Start firmware update", __FUNCTION__); 1319 dbg ("%s - Start firmware update", __func__);
1320 1320
1321 // Tell firmware to copy download image into I2C 1321 // Tell firmware to copy download image into I2C
1322 status = TISendVendorRequestSync (serial->serial->dev, 1322 status = TISendVendorRequestSync (serial->serial->dev,
@@ -1326,9 +1326,9 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1326 NULL, // TransferBuffer 1326 NULL, // TransferBuffer
1327 0); // TransferBufferLength 1327 0); // TransferBufferLength
1328 1328
1329 dbg ("%s - Update complete 0x%x", __FUNCTION__, status); 1329 dbg ("%s - Update complete 0x%x", __func__, status);
1330 if (status) { 1330 if (status) {
1331 dev_err (dev, "%s - UMPC_COPY_DNLD_TO_I2C failed\n", __FUNCTION__); 1331 dev_err (dev, "%s - UMPC_COPY_DNLD_TO_I2C failed\n", __func__);
1332 kfree (rom_desc); 1332 kfree (rom_desc);
1333 kfree (ti_manuf_desc); 1333 kfree (ti_manuf_desc);
1334 return status; 1334 return status;
@@ -1352,7 +1352,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1352 return status; 1352 return status;
1353 1353
1354 if (le16_to_cpu(serial->serial->dev->descriptor.idVendor) != USB_VENDOR_ID_ION) { 1354 if (le16_to_cpu(serial->serial->dev->descriptor.idVendor) != USB_VENDOR_ID_ION) {
1355 dbg ("%s - VID = 0x%x", __FUNCTION__, 1355 dbg ("%s - VID = 0x%x", __func__,
1356 le16_to_cpu(serial->serial->dev->descriptor.idVendor)); 1356 le16_to_cpu(serial->serial->dev->descriptor.idVendor));
1357 serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II; 1357 serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
1358 goto StayInBootMode; 1358 goto StayInBootMode;
@@ -1366,7 +1366,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1366 1366
1367 // Registry variable set? 1367 // Registry variable set?
1368 if (TIStayInBootMode) { 1368 if (TIStayInBootMode) {
1369 dbg ("%s - TIStayInBootMode", __FUNCTION__); 1369 dbg ("%s - TIStayInBootMode", __func__);
1370 goto StayInBootMode; 1370 goto StayInBootMode;
1371 } 1371 }
1372 1372
@@ -1383,7 +1383,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1383 */ 1383 */
1384 ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL); 1384 ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL);
1385 if (!ti_manuf_desc) { 1385 if (!ti_manuf_desc) {
1386 dev_err (dev, "%s - out of memory.\n", __FUNCTION__); 1386 dev_err (dev, "%s - out of memory.\n", __func__);
1387 return -ENOMEM; 1387 return -ENOMEM;
1388 } 1388 }
1389 status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc); 1389 status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc);
@@ -1394,7 +1394,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1394 1394
1395 // Check for version 2 1395 // Check for version 2
1396 if (!ignore_cpu_rev && TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev) < 2) { 1396 if (!ignore_cpu_rev && TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev) < 2) {
1397 dbg ("%s - Wrong CPU Rev %d (Must be 2)", __FUNCTION__, 1397 dbg ("%s - Wrong CPU Rev %d (Must be 2)", __func__,
1398 TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev)); 1398 TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev));
1399 kfree (ti_manuf_desc); 1399 kfree (ti_manuf_desc);
1400 goto StayInBootMode; 1400 goto StayInBootMode;
@@ -1418,7 +1418,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1418 buffer_size = (((1024 * 16) - 512) + sizeof(struct ti_i2c_image_header)); 1418 buffer_size = (((1024 * 16) - 512) + sizeof(struct ti_i2c_image_header));
1419 buffer = kmalloc (buffer_size, GFP_KERNEL); 1419 buffer = kmalloc (buffer_size, GFP_KERNEL);
1420 if (!buffer) { 1420 if (!buffer) {
1421 dev_err (dev, "%s - out of memory\n", __FUNCTION__); 1421 dev_err (dev, "%s - out of memory\n", __func__);
1422 return -ENOMEM; 1422 return -ENOMEM;
1423 } 1423 }
1424 1424
@@ -1438,20 +1438,20 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
1438 header->CheckSum = cs; 1438 header->CheckSum = cs;
1439 1439
1440 // Download the operational code 1440 // Download the operational code
1441 dbg ("%s - Downloading operational code image (TI UMP)", __FUNCTION__); 1441 dbg ("%s - Downloading operational code image (TI UMP)", __func__);
1442 status = TIDownloadCodeImage (serial, buffer, buffer_size); 1442 status = TIDownloadCodeImage (serial, buffer, buffer_size);
1443 1443
1444 kfree (buffer); 1444 kfree (buffer);
1445 1445
1446 if (status) { 1446 if (status) {
1447 dbg ("%s - Error downloading operational code image", __FUNCTION__); 1447 dbg ("%s - Error downloading operational code image", __func__);
1448 return status; 1448 return status;
1449 } 1449 }
1450 1450
1451 // Device will reboot 1451 // Device will reboot
1452 serial->product_info.TiMode = TI_MODE_TRANSITIONING; 1452 serial->product_info.TiMode = TI_MODE_TRANSITIONING;
1453 1453
1454 dbg ("%s - Download successful -- Device rebooting...", __FUNCTION__); 1454 dbg ("%s - Download successful -- Device rebooting...", __func__);
1455 1455
1456 /* return an error on purpose */ 1456 /* return an error on purpose */
1457 return -ENODEV; 1457 return -ENODEV;
@@ -1470,7 +1470,7 @@ static int TISetDtr (struct edgeport_port *port)
1470{ 1470{
1471 int port_number = port->port->number - port->port->serial->minor; 1471 int port_number = port->port->number - port->port->serial->minor;
1472 1472
1473 dbg ("%s", __FUNCTION__); 1473 dbg ("%s", __func__);
1474 port->shadow_mcr |= MCR_DTR; 1474 port->shadow_mcr |= MCR_DTR;
1475 1475
1476 return TIWriteCommandSync (port->port->serial->dev, 1476 return TIWriteCommandSync (port->port->serial->dev,
@@ -1485,7 +1485,7 @@ static int TIClearDtr (struct edgeport_port *port)
1485{ 1485{
1486 int port_number = port->port->number - port->port->serial->minor; 1486 int port_number = port->port->number - port->port->serial->minor;
1487 1487
1488 dbg ("%s", __FUNCTION__); 1488 dbg ("%s", __func__);
1489 port->shadow_mcr &= ~MCR_DTR; 1489 port->shadow_mcr &= ~MCR_DTR;
1490 1490
1491 return TIWriteCommandSync (port->port->serial->dev, 1491 return TIWriteCommandSync (port->port->serial->dev,
@@ -1500,7 +1500,7 @@ static int TISetRts (struct edgeport_port *port)
1500{ 1500{
1501 int port_number = port->port->number - port->port->serial->minor; 1501 int port_number = port->port->number - port->port->serial->minor;
1502 1502
1503 dbg ("%s", __FUNCTION__); 1503 dbg ("%s", __func__);
1504 port->shadow_mcr |= MCR_RTS; 1504 port->shadow_mcr |= MCR_RTS;
1505 1505
1506 return TIWriteCommandSync (port->port->serial->dev, 1506 return TIWriteCommandSync (port->port->serial->dev,
@@ -1515,7 +1515,7 @@ static int TIClearRts (struct edgeport_port *port)
1515{ 1515{
1516 int port_number = port->port->number - port->port->serial->minor; 1516 int port_number = port->port->number - port->port->serial->minor;
1517 1517
1518 dbg ("%s", __FUNCTION__); 1518 dbg ("%s", __func__);
1519 port->shadow_mcr &= ~MCR_RTS; 1519 port->shadow_mcr &= ~MCR_RTS;
1520 1520
1521 return TIWriteCommandSync (port->port->serial->dev, 1521 return TIWriteCommandSync (port->port->serial->dev,
@@ -1530,7 +1530,7 @@ static int TISetLoopBack (struct edgeport_port *port)
1530{ 1530{
1531 int port_number = port->port->number - port->port->serial->minor; 1531 int port_number = port->port->number - port->port->serial->minor;
1532 1532
1533 dbg ("%s", __FUNCTION__); 1533 dbg ("%s", __func__);
1534 1534
1535 return TIWriteCommandSync (port->port->serial->dev, 1535 return TIWriteCommandSync (port->port->serial->dev,
1536 UMPC_SET_CLR_LOOPBACK, 1536 UMPC_SET_CLR_LOOPBACK,
@@ -1544,7 +1544,7 @@ static int TIClearLoopBack (struct edgeport_port *port)
1544{ 1544{
1545 int port_number = port->port->number - port->port->serial->minor; 1545 int port_number = port->port->number - port->port->serial->minor;
1546 1546
1547 dbg ("%s", __FUNCTION__); 1547 dbg ("%s", __func__);
1548 1548
1549 return TIWriteCommandSync (port->port->serial->dev, 1549 return TIWriteCommandSync (port->port->serial->dev,
1550 UMPC_SET_CLR_LOOPBACK, 1550 UMPC_SET_CLR_LOOPBACK,
@@ -1558,7 +1558,7 @@ static int TISetBreak (struct edgeport_port *port)
1558{ 1558{
1559 int port_number = port->port->number - port->port->serial->minor; 1559 int port_number = port->port->number - port->port->serial->minor;
1560 1560
1561 dbg ("%s", __FUNCTION__); 1561 dbg ("%s", __func__);
1562 1562
1563 return TIWriteCommandSync (port->port->serial->dev, 1563 return TIWriteCommandSync (port->port->serial->dev,
1564 UMPC_SET_CLR_BREAK, 1564 UMPC_SET_CLR_BREAK,
@@ -1572,7 +1572,7 @@ static int TIClearBreak (struct edgeport_port *port)
1572{ 1572{
1573 int port_number = port->port->number - port->port->serial->minor; 1573 int port_number = port->port->number - port->port->serial->minor;
1574 1574
1575 dbg ("%s", __FUNCTION__); 1575 dbg ("%s", __func__);
1576 1576
1577 return TIWriteCommandSync (port->port->serial->dev, 1577 return TIWriteCommandSync (port->port->serial->dev,
1578 UMPC_SET_CLR_BREAK, 1578 UMPC_SET_CLR_BREAK,
@@ -1586,7 +1586,7 @@ static int TIRestoreMCR (struct edgeport_port *port, __u8 mcr)
1586{ 1586{
1587 int status = 0; 1587 int status = 0;
1588 1588
1589 dbg ("%s - %x", __FUNCTION__, mcr); 1589 dbg ("%s - %x", __func__, mcr);
1590 1590
1591 if (mcr & MCR_DTR) 1591 if (mcr & MCR_DTR)
1592 status = TISetDtr (port); 1592 status = TISetDtr (port);
@@ -1640,7 +1640,7 @@ static void handle_new_msr (struct edgeport_port *edge_port, __u8 msr)
1640 struct async_icount *icount; 1640 struct async_icount *icount;
1641 struct tty_struct *tty; 1641 struct tty_struct *tty;
1642 1642
1643 dbg ("%s - %02x", __FUNCTION__, msr); 1643 dbg ("%s - %02x", __func__, msr);
1644 1644
1645 if (msr & (EDGEPORT_MSR_DELTA_CTS | EDGEPORT_MSR_DELTA_DSR | EDGEPORT_MSR_DELTA_RI | EDGEPORT_MSR_DELTA_CD)) { 1645 if (msr & (EDGEPORT_MSR_DELTA_CTS | EDGEPORT_MSR_DELTA_DSR | EDGEPORT_MSR_DELTA_RI | EDGEPORT_MSR_DELTA_CD)) {
1646 icount = &edge_port->icount; 1646 icount = &edge_port->icount;
@@ -1679,7 +1679,7 @@ static void handle_new_lsr (struct edgeport_port *edge_port, int lsr_data, __u8
1679 struct async_icount *icount; 1679 struct async_icount *icount;
1680 __u8 new_lsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK)); 1680 __u8 new_lsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK));
1681 1681
1682 dbg ("%s - %02x", __FUNCTION__, new_lsr); 1682 dbg ("%s - %02x", __func__, new_lsr);
1683 1683
1684 edge_port->shadow_lsr = lsr; 1684 edge_port->shadow_lsr = lsr;
1685 1685
@@ -1722,7 +1722,7 @@ static void edge_interrupt_callback (struct urb *urb)
1722 __u8 msr; 1722 __u8 msr;
1723 int status = urb->status; 1723 int status = urb->status;
1724 1724
1725 dbg("%s", __FUNCTION__); 1725 dbg("%s", __func__);
1726 1726
1727 switch (status) { 1727 switch (status) {
1728 case 0: 1728 case 0:
@@ -1733,34 +1733,34 @@ static void edge_interrupt_callback (struct urb *urb)
1733 case -ESHUTDOWN: 1733 case -ESHUTDOWN:
1734 /* this urb is terminated, clean up */ 1734 /* this urb is terminated, clean up */
1735 dbg("%s - urb shutting down with status: %d", 1735 dbg("%s - urb shutting down with status: %d",
1736 __FUNCTION__, status); 1736 __func__, status);
1737 return; 1737 return;
1738 default: 1738 default:
1739 dev_err(&urb->dev->dev, "%s - nonzero urb status received: " 1739 dev_err(&urb->dev->dev, "%s - nonzero urb status received: "
1740 "%d\n", __FUNCTION__, status); 1740 "%d\n", __func__, status);
1741 goto exit; 1741 goto exit;
1742 } 1742 }
1743 1743
1744 if (!length) { 1744 if (!length) {
1745 dbg ("%s - no data in urb", __FUNCTION__); 1745 dbg ("%s - no data in urb", __func__);
1746 goto exit; 1746 goto exit;
1747 } 1747 }
1748 1748
1749 usb_serial_debug_data(debug, &edge_serial->serial->dev->dev, __FUNCTION__, length, data); 1749 usb_serial_debug_data(debug, &edge_serial->serial->dev->dev, __func__, length, data);
1750 1750
1751 if (length != 2) { 1751 if (length != 2) {
1752 dbg ("%s - expecting packet of size 2, got %d", __FUNCTION__, length); 1752 dbg ("%s - expecting packet of size 2, got %d", __func__, length);
1753 goto exit; 1753 goto exit;
1754 } 1754 }
1755 1755
1756 port_number = TIUMP_GET_PORT_FROM_CODE (data[0]); 1756 port_number = TIUMP_GET_PORT_FROM_CODE (data[0]);
1757 function = TIUMP_GET_FUNC_FROM_CODE (data[0]); 1757 function = TIUMP_GET_FUNC_FROM_CODE (data[0]);
1758 dbg ("%s - port_number %d, function %d, info 0x%x", 1758 dbg ("%s - port_number %d, function %d, info 0x%x",
1759 __FUNCTION__, port_number, function, data[1]); 1759 __func__, port_number, function, data[1]);
1760 port = edge_serial->serial->port[port_number]; 1760 port = edge_serial->serial->port[port_number];
1761 edge_port = usb_get_serial_port_data(port); 1761 edge_port = usb_get_serial_port_data(port);
1762 if (!edge_port) { 1762 if (!edge_port) {
1763 dbg ("%s - edge_port not found", __FUNCTION__); 1763 dbg ("%s - edge_port not found", __func__);
1764 return; 1764 return;
1765 } 1765 }
1766 switch (function) { 1766 switch (function) {
@@ -1769,12 +1769,12 @@ static void edge_interrupt_callback (struct urb *urb)
1769 if (lsr & UMP_UART_LSR_DATA_MASK) { 1769 if (lsr & UMP_UART_LSR_DATA_MASK) {
1770 /* Save the LSR event for bulk read completion routine */ 1770 /* Save the LSR event for bulk read completion routine */
1771 dbg ("%s - LSR Event Port %u LSR Status = %02x", 1771 dbg ("%s - LSR Event Port %u LSR Status = %02x",
1772 __FUNCTION__, port_number, lsr); 1772 __func__, port_number, lsr);
1773 edge_port->lsr_event = 1; 1773 edge_port->lsr_event = 1;
1774 edge_port->lsr_mask = lsr; 1774 edge_port->lsr_mask = lsr;
1775 } else { 1775 } else {
1776 dbg ("%s - ===== Port %d LSR Status = %02x ======", 1776 dbg ("%s - ===== Port %d LSR Status = %02x ======",
1777 __FUNCTION__, port_number, lsr); 1777 __func__, port_number, lsr);
1778 handle_new_lsr (edge_port, 0, lsr, 0); 1778 handle_new_lsr (edge_port, 0, lsr, 0);
1779 } 1779 }
1780 break; 1780 break;
@@ -1783,13 +1783,13 @@ static void edge_interrupt_callback (struct urb *urb)
1783 /* Copy MSR from UMP */ 1783 /* Copy MSR from UMP */
1784 msr = data[1]; 1784 msr = data[1];
1785 dbg ("%s - ===== Port %u MSR Status = %02x ======\n", 1785 dbg ("%s - ===== Port %u MSR Status = %02x ======\n",
1786 __FUNCTION__, port_number, msr); 1786 __func__, port_number, msr);
1787 handle_new_msr (edge_port, msr); 1787 handle_new_msr (edge_port, msr);
1788 break; 1788 break;
1789 1789
1790 default: 1790 default:
1791 dev_err (&urb->dev->dev, "%s - Unknown Interrupt code from UMP %x\n", 1791 dev_err (&urb->dev->dev, "%s - Unknown Interrupt code from UMP %x\n",
1792 __FUNCTION__, data[1]); 1792 __func__, data[1]);
1793 break; 1793 break;
1794 1794
1795 } 1795 }
@@ -1798,7 +1798,7 @@ exit:
1798 retval = usb_submit_urb (urb, GFP_ATOMIC); 1798 retval = usb_submit_urb (urb, GFP_ATOMIC);
1799 if (retval) 1799 if (retval)
1800 dev_err (&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n", 1800 dev_err (&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
1801 __FUNCTION__, retval); 1801 __func__, retval);
1802} 1802}
1803 1803
1804static void edge_bulk_in_callback (struct urb *urb) 1804static void edge_bulk_in_callback (struct urb *urb)
@@ -1810,7 +1810,7 @@ static void edge_bulk_in_callback (struct urb *urb)
1810 int port_number; 1810 int port_number;
1811 int status = urb->status; 1811 int status = urb->status;
1812 1812
1813 dbg("%s", __FUNCTION__); 1813 dbg("%s", __func__);
1814 1814
1815 switch (status) { 1815 switch (status) {
1816 case 0: 1816 case 0:
@@ -1821,18 +1821,18 @@ static void edge_bulk_in_callback (struct urb *urb)
1821 case -ESHUTDOWN: 1821 case -ESHUTDOWN:
1822 /* this urb is terminated, clean up */ 1822 /* this urb is terminated, clean up */
1823 dbg("%s - urb shutting down with status: %d", 1823 dbg("%s - urb shutting down with status: %d",
1824 __FUNCTION__, status); 1824 __func__, status);
1825 return; 1825 return;
1826 default: 1826 default:
1827 dev_err (&urb->dev->dev,"%s - nonzero read bulk status received: %d\n", 1827 dev_err (&urb->dev->dev,"%s - nonzero read bulk status received: %d\n",
1828 __FUNCTION__, status); 1828 __func__, status);
1829 } 1829 }
1830 1830
1831 if (status == -EPIPE) 1831 if (status == -EPIPE)
1832 goto exit; 1832 goto exit;
1833 1833
1834 if (status) { 1834 if (status) {
1835 dev_err(&urb->dev->dev,"%s - stopping read!\n", __FUNCTION__); 1835 dev_err(&urb->dev->dev,"%s - stopping read!\n", __func__);
1836 return; 1836 return;
1837 } 1837 }
1838 1838
@@ -1841,7 +1841,7 @@ static void edge_bulk_in_callback (struct urb *urb)
1841 if (edge_port->lsr_event) { 1841 if (edge_port->lsr_event) {
1842 edge_port->lsr_event = 0; 1842 edge_port->lsr_event = 0;
1843 dbg ("%s ===== Port %u LSR Status = %02x, Data = %02x ======", 1843 dbg ("%s ===== Port %u LSR Status = %02x, Data = %02x ======",
1844 __FUNCTION__, port_number, edge_port->lsr_mask, *data); 1844 __func__, port_number, edge_port->lsr_mask, *data);
1845 handle_new_lsr (edge_port, 1, edge_port->lsr_mask, *data); 1845 handle_new_lsr (edge_port, 1, edge_port->lsr_mask, *data);
1846 /* Adjust buffer length/pointer */ 1846 /* Adjust buffer length/pointer */
1847 --urb->actual_length; 1847 --urb->actual_length;
@@ -1850,10 +1850,10 @@ static void edge_bulk_in_callback (struct urb *urb)
1850 1850
1851 tty = edge_port->port->tty; 1851 tty = edge_port->port->tty;
1852 if (tty && urb->actual_length) { 1852 if (tty && urb->actual_length) {
1853 usb_serial_debug_data(debug, &edge_port->port->dev, __FUNCTION__, urb->actual_length, data); 1853 usb_serial_debug_data(debug, &edge_port->port->dev, __func__, urb->actual_length, data);
1854 1854
1855 if (edge_port->close_pending) { 1855 if (edge_port->close_pending) {
1856 dbg ("%s - close is pending, dropping data on the floor.", __FUNCTION__); 1856 dbg ("%s - close is pending, dropping data on the floor.", __func__);
1857 } else { 1857 } else {
1858 edge_tty_recv(&edge_port->port->dev, tty, data, urb->actual_length); 1858 edge_tty_recv(&edge_port->port->dev, tty, data, urb->actual_length);
1859 } 1859 }
@@ -1872,7 +1872,7 @@ exit:
1872 spin_unlock(&edge_port->ep_lock); 1872 spin_unlock(&edge_port->ep_lock);
1873 if (retval) 1873 if (retval)
1874 dev_err (&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n", 1874 dev_err (&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
1875 __FUNCTION__, retval); 1875 __func__, retval);
1876} 1876}
1877 1877
1878static void edge_tty_recv(struct device *dev, struct tty_struct *tty, unsigned char *data, int length) 1878static void edge_tty_recv(struct device *dev, struct tty_struct *tty, unsigned char *data, int length)
@@ -1883,7 +1883,7 @@ static void edge_tty_recv(struct device *dev, struct tty_struct *tty, unsigned c
1883 cnt = tty_buffer_request_room(tty, length); 1883 cnt = tty_buffer_request_room(tty, length);
1884 if (cnt < length) { 1884 if (cnt < length) {
1885 dev_err(dev, "%s - dropping data, %d bytes lost\n", 1885 dev_err(dev, "%s - dropping data, %d bytes lost\n",
1886 __FUNCTION__, length - cnt); 1886 __func__, length - cnt);
1887 if(cnt == 0) 1887 if(cnt == 0)
1888 break; 1888 break;
1889 } 1889 }
@@ -1901,7 +1901,7 @@ static void edge_bulk_out_callback (struct urb *urb)
1901 struct edgeport_port *edge_port = usb_get_serial_port_data(port); 1901 struct edgeport_port *edge_port = usb_get_serial_port_data(port);
1902 int status = urb->status; 1902 int status = urb->status;
1903 1903
1904 dbg ("%s - port %d", __FUNCTION__, port->number); 1904 dbg ("%s - port %d", __func__, port->number);
1905 1905
1906 edge_port->ep_write_urb_in_use = 0; 1906 edge_port->ep_write_urb_in_use = 0;
1907 1907
@@ -1914,11 +1914,11 @@ static void edge_bulk_out_callback (struct urb *urb)
1914 case -ESHUTDOWN: 1914 case -ESHUTDOWN:
1915 /* this urb is terminated, clean up */ 1915 /* this urb is terminated, clean up */
1916 dbg("%s - urb shutting down with status: %d", 1916 dbg("%s - urb shutting down with status: %d",
1917 __FUNCTION__, status); 1917 __func__, status);
1918 return; 1918 return;
1919 default: 1919 default:
1920 dev_err(&urb->dev->dev, "%s - nonzero write bulk status " 1920 dev_err(&urb->dev->dev, "%s - nonzero write bulk status "
1921 "received: %d\n", __FUNCTION__, status); 1921 "received: %d\n", __func__, status);
1922 } 1922 }
1923 1923
1924 /* send any buffered data */ 1924 /* send any buffered data */
@@ -1936,7 +1936,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
1936 u16 open_settings; 1936 u16 open_settings;
1937 u8 transaction_timeout; 1937 u8 transaction_timeout;
1938 1938
1939 dbg("%s - port %d", __FUNCTION__, port->number); 1939 dbg("%s - port %d", __func__, port->number);
1940 1940
1941 if (edge_port == NULL) 1941 if (edge_port == NULL)
1942 return -ENODEV; 1942 return -ENODEV;
@@ -1959,7 +1959,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
1959 } 1959 }
1960 1960
1961 dbg ("%s - port_number = %d, uart_base = %04x, dma_address = %04x", 1961 dbg ("%s - port_number = %d, uart_base = %04x, dma_address = %04x",
1962 __FUNCTION__, port_number, edge_port->uart_base, edge_port->dma_address); 1962 __func__, port_number, edge_port->uart_base, edge_port->dma_address);
1963 1963
1964 dev = port->serial->dev; 1964 dev = port->serial->dev;
1965 1965
@@ -1970,7 +1970,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
1970 status = TIClearLoopBack (edge_port); 1970 status = TIClearLoopBack (edge_port);
1971 if (status) { 1971 if (status) {
1972 dev_err(&port->dev,"%s - cannot send clear loopback command, %d\n", 1972 dev_err(&port->dev,"%s - cannot send clear loopback command, %d\n",
1973 __FUNCTION__, status); 1973 __func__, status);
1974 return status; 1974 return status;
1975 } 1975 }
1976 1976
@@ -1989,7 +1989,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
1989 UMP_PIPE_TRANS_TIMEOUT_ENA | 1989 UMP_PIPE_TRANS_TIMEOUT_ENA |
1990 (transaction_timeout << 2)); 1990 (transaction_timeout << 2));
1991 1991
1992 dbg ("%s - Sending UMPC_OPEN_PORT", __FUNCTION__); 1992 dbg ("%s - Sending UMPC_OPEN_PORT", __func__);
1993 1993
1994 /* Tell TI to open and start the port */ 1994 /* Tell TI to open and start the port */
1995 status = TIWriteCommandSync (dev, 1995 status = TIWriteCommandSync (dev,
@@ -1999,7 +1999,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
1999 NULL, 1999 NULL,
2000 0); 2000 0);
2001 if (status) { 2001 if (status) {
2002 dev_err(&port->dev,"%s - cannot send open command, %d\n", __FUNCTION__, status); 2002 dev_err(&port->dev,"%s - cannot send open command, %d\n", __func__, status);
2003 return status; 2003 return status;
2004 } 2004 }
2005 2005
@@ -2011,14 +2011,14 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
2011 NULL, 2011 NULL,
2012 0); 2012 0);
2013 if (status) { 2013 if (status) {
2014 dev_err(&port->dev,"%s - cannot send start DMA command, %d\n", __FUNCTION__, status); 2014 dev_err(&port->dev,"%s - cannot send start DMA command, %d\n", __func__, status);
2015 return status; 2015 return status;
2016 } 2016 }
2017 2017
2018 /* Clear TX and RX buffers in UMP */ 2018 /* Clear TX and RX buffers in UMP */
2019 status = TIPurgeDataSync (port, UMP_PORT_DIR_OUT | UMP_PORT_DIR_IN); 2019 status = TIPurgeDataSync (port, UMP_PORT_DIR_OUT | UMP_PORT_DIR_IN);
2020 if (status) { 2020 if (status) {
2021 dev_err(&port->dev,"%s - cannot send clear buffers command, %d\n", __FUNCTION__, status); 2021 dev_err(&port->dev,"%s - cannot send clear buffers command, %d\n", __func__, status);
2022 return status; 2022 return status;
2023 } 2023 }
2024 2024
@@ -2030,7 +2030,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
2030 &edge_port->shadow_msr, // TransferBuffer 2030 &edge_port->shadow_msr, // TransferBuffer
2031 1); // TransferBufferLength 2031 1); // TransferBufferLength
2032 if (status) { 2032 if (status) {
2033 dev_err(&port->dev,"%s - cannot send read MSR command, %d\n", __FUNCTION__, status); 2033 dev_err(&port->dev,"%s - cannot send read MSR command, %d\n", __func__, status);
2034 return status; 2034 return status;
2035 } 2035 }
2036 2036
@@ -2047,7 +2047,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
2047 /* we are the first port to be opened, let's post the interrupt urb */ 2047 /* we are the first port to be opened, let's post the interrupt urb */
2048 urb = edge_serial->serial->port[0]->interrupt_in_urb; 2048 urb = edge_serial->serial->port[0]->interrupt_in_urb;
2049 if (!urb) { 2049 if (!urb) {
2050 dev_err (&port->dev, "%s - no interrupt urb present, exiting\n", __FUNCTION__); 2050 dev_err (&port->dev, "%s - no interrupt urb present, exiting\n", __func__);
2051 status = -EINVAL; 2051 status = -EINVAL;
2052 goto release_es_lock; 2052 goto release_es_lock;
2053 } 2053 }
@@ -2056,7 +2056,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
2056 urb->dev = dev; 2056 urb->dev = dev;
2057 status = usb_submit_urb (urb, GFP_KERNEL); 2057 status = usb_submit_urb (urb, GFP_KERNEL);
2058 if (status) { 2058 if (status) {
2059 dev_err (&port->dev, "%s - usb_submit_urb failed with value %d\n", __FUNCTION__, status); 2059 dev_err (&port->dev, "%s - usb_submit_urb failed with value %d\n", __func__, status);
2060 goto release_es_lock; 2060 goto release_es_lock;
2061 } 2061 }
2062 } 2062 }
@@ -2071,7 +2071,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
2071 /* start up our bulk read urb */ 2071 /* start up our bulk read urb */
2072 urb = port->read_urb; 2072 urb = port->read_urb;
2073 if (!urb) { 2073 if (!urb) {
2074 dev_err (&port->dev, "%s - no read urb present, exiting\n", __FUNCTION__); 2074 dev_err (&port->dev, "%s - no read urb present, exiting\n", __func__);
2075 status = -EINVAL; 2075 status = -EINVAL;
2076 goto unlink_int_urb; 2076 goto unlink_int_urb;
2077 } 2077 }
@@ -2081,13 +2081,13 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
2081 urb->dev = dev; 2081 urb->dev = dev;
2082 status = usb_submit_urb (urb, GFP_KERNEL); 2082 status = usb_submit_urb (urb, GFP_KERNEL);
2083 if (status) { 2083 if (status) {
2084 dev_err (&port->dev, "%s - read bulk usb_submit_urb failed with value %d\n", __FUNCTION__, status); 2084 dev_err (&port->dev, "%s - read bulk usb_submit_urb failed with value %d\n", __func__, status);
2085 goto unlink_int_urb; 2085 goto unlink_int_urb;
2086 } 2086 }
2087 2087
2088 ++edge_serial->num_ports_open; 2088 ++edge_serial->num_ports_open;
2089 2089
2090 dbg("%s - exited", __FUNCTION__); 2090 dbg("%s - exited", __func__);
2091 2091
2092 goto release_es_lock; 2092 goto release_es_lock;
2093 2093
@@ -2106,7 +2106,7 @@ static void edge_close (struct usb_serial_port *port, struct file *filp)
2106 int port_number; 2106 int port_number;
2107 int status; 2107 int status;
2108 2108
2109 dbg("%s - port %d", __FUNCTION__, port->number); 2109 dbg("%s - port %d", __func__, port->number);
2110 2110
2111 edge_serial = usb_get_serial_data(port->serial); 2111 edge_serial = usb_get_serial_data(port->serial);
2112 edge_port = usb_get_serial_port_data(port); 2112 edge_port = usb_get_serial_port_data(port);
@@ -2126,7 +2126,7 @@ static void edge_close (struct usb_serial_port *port, struct file *filp)
2126 2126
2127 /* assuming we can still talk to the device, 2127 /* assuming we can still talk to the device,
2128 * send a close port command to it */ 2128 * send a close port command to it */
2129 dbg("%s - send umpc_close_port", __FUNCTION__); 2129 dbg("%s - send umpc_close_port", __func__);
2130 port_number = port->number - port->serial->minor; 2130 port_number = port->number - port->serial->minor;
2131 status = TIWriteCommandSync (port->serial->dev, 2131 status = TIWriteCommandSync (port->serial->dev,
2132 UMPC_CLOSE_PORT, 2132 UMPC_CLOSE_PORT,
@@ -2144,7 +2144,7 @@ static void edge_close (struct usb_serial_port *port, struct file *filp)
2144 mutex_unlock(&edge_serial->es_lock); 2144 mutex_unlock(&edge_serial->es_lock);
2145 edge_port->close_pending = 0; 2145 edge_port->close_pending = 0;
2146 2146
2147 dbg("%s - exited", __FUNCTION__); 2147 dbg("%s - exited", __func__);
2148} 2148}
2149 2149
2150static int edge_write (struct usb_serial_port *port, const unsigned char *data, int count) 2150static int edge_write (struct usb_serial_port *port, const unsigned char *data, int count)
@@ -2152,10 +2152,10 @@ static int edge_write (struct usb_serial_port *port, const unsigned char *data,
2152 struct edgeport_port *edge_port = usb_get_serial_port_data(port); 2152 struct edgeport_port *edge_port = usb_get_serial_port_data(port);
2153 unsigned long flags; 2153 unsigned long flags;
2154 2154
2155 dbg("%s - port %d", __FUNCTION__, port->number); 2155 dbg("%s - port %d", __func__, port->number);
2156 2156
2157 if (count == 0) { 2157 if (count == 0) {
2158 dbg("%s - write request of 0 bytes", __FUNCTION__); 2158 dbg("%s - write request of 0 bytes", __func__);
2159 return 0; 2159 return 0;
2160 } 2160 }
2161 2161
@@ -2181,7 +2181,7 @@ static void edge_send(struct usb_serial_port *port)
2181 unsigned long flags; 2181 unsigned long flags;
2182 2182
2183 2183
2184 dbg("%s - port %d", __FUNCTION__, port->number); 2184 dbg("%s - port %d", __func__, port->number);
2185 2185
2186 spin_lock_irqsave(&edge_port->ep_lock, flags); 2186 spin_lock_irqsave(&edge_port->ep_lock, flags);
2187 2187
@@ -2203,7 +2203,7 @@ static void edge_send(struct usb_serial_port *port)
2203 2203
2204 spin_unlock_irqrestore(&edge_port->ep_lock, flags); 2204 spin_unlock_irqrestore(&edge_port->ep_lock, flags);
2205 2205
2206 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, port->write_urb->transfer_buffer); 2206 usb_serial_debug_data(debug, &port->dev, __func__, count, port->write_urb->transfer_buffer);
2207 2207
2208 /* set up our urb */ 2208 /* set up our urb */
2209 usb_fill_bulk_urb (port->write_urb, port->serial->dev, 2209 usb_fill_bulk_urb (port->write_urb, port->serial->dev,
@@ -2216,7 +2216,7 @@ static void edge_send(struct usb_serial_port *port)
2216 /* send the data out the bulk port */ 2216 /* send the data out the bulk port */
2217 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 2217 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
2218 if (result) { 2218 if (result) {
2219 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result); 2219 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __func__, result);
2220 edge_port->ep_write_urb_in_use = 0; 2220 edge_port->ep_write_urb_in_use = 0;
2221 // TODO: reschedule edge_send 2221 // TODO: reschedule edge_send
2222 } else { 2222 } else {
@@ -2237,7 +2237,7 @@ static int edge_write_room (struct usb_serial_port *port)
2237 int room = 0; 2237 int room = 0;
2238 unsigned long flags; 2238 unsigned long flags;
2239 2239
2240 dbg("%s - port %d", __FUNCTION__, port->number); 2240 dbg("%s - port %d", __func__, port->number);
2241 2241
2242 if (edge_port == NULL) 2242 if (edge_port == NULL)
2243 return -ENODEV; 2243 return -ENODEV;
@@ -2248,7 +2248,7 @@ static int edge_write_room (struct usb_serial_port *port)
2248 room = edge_buf_space_avail(edge_port->ep_out_buf); 2248 room = edge_buf_space_avail(edge_port->ep_out_buf);
2249 spin_unlock_irqrestore(&edge_port->ep_lock, flags); 2249 spin_unlock_irqrestore(&edge_port->ep_lock, flags);
2250 2250
2251 dbg("%s - returns %d", __FUNCTION__, room); 2251 dbg("%s - returns %d", __func__, room);
2252 return room; 2252 return room;
2253} 2253}
2254 2254
@@ -2258,7 +2258,7 @@ static int edge_chars_in_buffer (struct usb_serial_port *port)
2258 int chars = 0; 2258 int chars = 0;
2259 unsigned long flags; 2259 unsigned long flags;
2260 2260
2261 dbg("%s - port %d", __FUNCTION__, port->number); 2261 dbg("%s - port %d", __func__, port->number);
2262 2262
2263 if (edge_port == NULL) 2263 if (edge_port == NULL)
2264 return -ENODEV; 2264 return -ENODEV;
@@ -2269,7 +2269,7 @@ static int edge_chars_in_buffer (struct usb_serial_port *port)
2269 chars = edge_buf_data_avail(edge_port->ep_out_buf); 2269 chars = edge_buf_data_avail(edge_port->ep_out_buf);
2270 spin_unlock_irqrestore(&edge_port->ep_lock, flags); 2270 spin_unlock_irqrestore(&edge_port->ep_lock, flags);
2271 2271
2272 dbg ("%s - returns %d", __FUNCTION__, chars); 2272 dbg ("%s - returns %d", __func__, chars);
2273 return chars; 2273 return chars;
2274} 2274}
2275 2275
@@ -2279,14 +2279,14 @@ static void edge_throttle (struct usb_serial_port *port)
2279 struct tty_struct *tty; 2279 struct tty_struct *tty;
2280 int status; 2280 int status;
2281 2281
2282 dbg("%s - port %d", __FUNCTION__, port->number); 2282 dbg("%s - port %d", __func__, port->number);
2283 2283
2284 if (edge_port == NULL) 2284 if (edge_port == NULL)
2285 return; 2285 return;
2286 2286
2287 tty = port->tty; 2287 tty = port->tty;
2288 if (!tty) { 2288 if (!tty) {
2289 dbg ("%s - no tty available", __FUNCTION__); 2289 dbg ("%s - no tty available", __func__);
2290 return; 2290 return;
2291 } 2291 }
2292 2292
@@ -2295,7 +2295,7 @@ static void edge_throttle (struct usb_serial_port *port)
2295 unsigned char stop_char = STOP_CHAR(tty); 2295 unsigned char stop_char = STOP_CHAR(tty);
2296 status = edge_write (port, &stop_char, 1); 2296 status = edge_write (port, &stop_char, 1);
2297 if (status <= 0) { 2297 if (status <= 0) {
2298 dev_err(&port->dev, "%s - failed to write stop character, %d\n", __FUNCTION__, status); 2298 dev_err(&port->dev, "%s - failed to write stop character, %d\n", __func__, status);
2299 } 2299 }
2300 } 2300 }
2301 2301
@@ -2312,14 +2312,14 @@ static void edge_unthrottle (struct usb_serial_port *port)
2312 struct tty_struct *tty; 2312 struct tty_struct *tty;
2313 int status; 2313 int status;
2314 2314
2315 dbg("%s - port %d", __FUNCTION__, port->number); 2315 dbg("%s - port %d", __func__, port->number);
2316 2316
2317 if (edge_port == NULL) 2317 if (edge_port == NULL)
2318 return; 2318 return;
2319 2319
2320 tty = port->tty; 2320 tty = port->tty;
2321 if (!tty) { 2321 if (!tty) {
2322 dbg ("%s - no tty available", __FUNCTION__); 2322 dbg ("%s - no tty available", __func__);
2323 return; 2323 return;
2324 } 2324 }
2325 2325
@@ -2328,7 +2328,7 @@ static void edge_unthrottle (struct usb_serial_port *port)
2328 unsigned char start_char = START_CHAR(tty); 2328 unsigned char start_char = START_CHAR(tty);
2329 status = edge_write (port, &start_char, 1); 2329 status = edge_write (port, &start_char, 1);
2330 if (status <= 0) { 2330 if (status <= 0) {
2331 dev_err(&port->dev, "%s - failed to write start character, %d\n", __FUNCTION__, status); 2331 dev_err(&port->dev, "%s - failed to write start character, %d\n", __func__, status);
2332 } 2332 }
2333 } 2333 }
2334 2334
@@ -2337,7 +2337,7 @@ static void edge_unthrottle (struct usb_serial_port *port)
2337 if (C_CRTSCTS(tty)) { 2337 if (C_CRTSCTS(tty)) {
2338 status = restart_read(edge_port); 2338 status = restart_read(edge_port);
2339 if (status) 2339 if (status)
2340 dev_err(&port->dev, "%s - read bulk usb_submit_urb failed with value %d\n", __FUNCTION__, status); 2340 dev_err(&port->dev, "%s - read bulk usb_submit_urb failed with value %d\n", __func__, status);
2341 } 2341 }
2342 2342
2343} 2343}
@@ -2387,13 +2387,13 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi
2387 int status; 2387 int status;
2388 int port_number = edge_port->port->number - edge_port->port->serial->minor; 2388 int port_number = edge_port->port->number - edge_port->port->serial->minor;
2389 2389
2390 dbg("%s - port %d", __FUNCTION__, edge_port->port->number); 2390 dbg("%s - port %d", __func__, edge_port->port->number);
2391 2391
2392 tty = edge_port->port->tty; 2392 tty = edge_port->port->tty;
2393 2393
2394 config = kmalloc (sizeof (*config), GFP_KERNEL); 2394 config = kmalloc (sizeof (*config), GFP_KERNEL);
2395 if (!config) { 2395 if (!config) {
2396 dev_err (&edge_port->port->dev, "%s - out of memory\n", __FUNCTION__); 2396 dev_err (&edge_port->port->dev, "%s - out of memory\n", __func__);
2397 return; 2397 return;
2398 } 2398 }
2399 2399
@@ -2409,20 +2409,20 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi
2409 switch (cflag & CSIZE) { 2409 switch (cflag & CSIZE) {
2410 case CS5: 2410 case CS5:
2411 config->bDataBits = UMP_UART_CHAR5BITS; 2411 config->bDataBits = UMP_UART_CHAR5BITS;
2412 dbg ("%s - data bits = 5", __FUNCTION__); 2412 dbg ("%s - data bits = 5", __func__);
2413 break; 2413 break;
2414 case CS6: 2414 case CS6:
2415 config->bDataBits = UMP_UART_CHAR6BITS; 2415 config->bDataBits = UMP_UART_CHAR6BITS;
2416 dbg ("%s - data bits = 6", __FUNCTION__); 2416 dbg ("%s - data bits = 6", __func__);
2417 break; 2417 break;
2418 case CS7: 2418 case CS7:
2419 config->bDataBits = UMP_UART_CHAR7BITS; 2419 config->bDataBits = UMP_UART_CHAR7BITS;
2420 dbg ("%s - data bits = 7", __FUNCTION__); 2420 dbg ("%s - data bits = 7", __func__);
2421 break; 2421 break;
2422 default: 2422 default:
2423 case CS8: 2423 case CS8:
2424 config->bDataBits = UMP_UART_CHAR8BITS; 2424 config->bDataBits = UMP_UART_CHAR8BITS;
2425 dbg ("%s - data bits = 8", __FUNCTION__); 2425 dbg ("%s - data bits = 8", __func__);
2426 break; 2426 break;
2427 } 2427 }
2428 2428
@@ -2430,32 +2430,32 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi
2430 if (cflag & PARODD) { 2430 if (cflag & PARODD) {
2431 config->wFlags |= UMP_MASK_UART_FLAGS_PARITY; 2431 config->wFlags |= UMP_MASK_UART_FLAGS_PARITY;
2432 config->bParity = UMP_UART_ODDPARITY; 2432 config->bParity = UMP_UART_ODDPARITY;
2433 dbg("%s - parity = odd", __FUNCTION__); 2433 dbg("%s - parity = odd", __func__);
2434 } else { 2434 } else {
2435 config->wFlags |= UMP_MASK_UART_FLAGS_PARITY; 2435 config->wFlags |= UMP_MASK_UART_FLAGS_PARITY;
2436 config->bParity = UMP_UART_EVENPARITY; 2436 config->bParity = UMP_UART_EVENPARITY;
2437 dbg("%s - parity = even", __FUNCTION__); 2437 dbg("%s - parity = even", __func__);
2438 } 2438 }
2439 } else { 2439 } else {
2440 config->bParity = UMP_UART_NOPARITY; 2440 config->bParity = UMP_UART_NOPARITY;
2441 dbg("%s - parity = none", __FUNCTION__); 2441 dbg("%s - parity = none", __func__);
2442 } 2442 }
2443 2443
2444 if (cflag & CSTOPB) { 2444 if (cflag & CSTOPB) {
2445 config->bStopBits = UMP_UART_STOPBIT2; 2445 config->bStopBits = UMP_UART_STOPBIT2;
2446 dbg("%s - stop bits = 2", __FUNCTION__); 2446 dbg("%s - stop bits = 2", __func__);
2447 } else { 2447 } else {
2448 config->bStopBits = UMP_UART_STOPBIT1; 2448 config->bStopBits = UMP_UART_STOPBIT1;
2449 dbg("%s - stop bits = 1", __FUNCTION__); 2449 dbg("%s - stop bits = 1", __func__);
2450 } 2450 }
2451 2451
2452 /* figure out the flow control settings */ 2452 /* figure out the flow control settings */
2453 if (cflag & CRTSCTS) { 2453 if (cflag & CRTSCTS) {
2454 config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X_CTS_FLOW; 2454 config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X_CTS_FLOW;
2455 config->wFlags |= UMP_MASK_UART_FLAGS_RTS_FLOW; 2455 config->wFlags |= UMP_MASK_UART_FLAGS_RTS_FLOW;
2456 dbg("%s - RTS/CTS is enabled", __FUNCTION__); 2456 dbg("%s - RTS/CTS is enabled", __func__);
2457 } else { 2457 } else {
2458 dbg("%s - RTS/CTS is disabled", __FUNCTION__); 2458 dbg("%s - RTS/CTS is disabled", __func__);
2459 tty->hw_stopped = 0; 2459 tty->hw_stopped = 0;
2460 restart_read(edge_port); 2460 restart_read(edge_port);
2461 } 2461 }
@@ -2469,18 +2469,18 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi
2469 if (I_IXOFF(tty)) { 2469 if (I_IXOFF(tty)) {
2470 config->wFlags |= UMP_MASK_UART_FLAGS_IN_X; 2470 config->wFlags |= UMP_MASK_UART_FLAGS_IN_X;
2471 dbg ("%s - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", 2471 dbg ("%s - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x",
2472 __FUNCTION__, config->cXon, config->cXoff); 2472 __func__, config->cXon, config->cXoff);
2473 } else { 2473 } else {
2474 dbg ("%s - INBOUND XON/XOFF is disabled", __FUNCTION__); 2474 dbg ("%s - INBOUND XON/XOFF is disabled", __func__);
2475 } 2475 }
2476 2476
2477 /* if we are implementing OUTBOUND XON/XOFF */ 2477 /* if we are implementing OUTBOUND XON/XOFF */
2478 if (I_IXON(tty)) { 2478 if (I_IXON(tty)) {
2479 config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X; 2479 config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X;
2480 dbg ("%s - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", 2480 dbg ("%s - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x",
2481 __FUNCTION__, config->cXon, config->cXoff); 2481 __func__, config->cXon, config->cXoff);
2482 } else { 2482 } else {
2483 dbg ("%s - OUTBOUND XON/XOFF is disabled", __FUNCTION__); 2483 dbg ("%s - OUTBOUND XON/XOFF is disabled", __func__);
2484 } 2484 }
2485 } 2485 }
2486 2486
@@ -2499,7 +2499,7 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi
2499 2499
2500 /* FIXME: Recompute actual baud from divisor here */ 2500 /* FIXME: Recompute actual baud from divisor here */
2501 2501
2502 dbg ("%s - baud rate = %d, wBaudRate = %d", __FUNCTION__, baud, config->wBaudRate); 2502 dbg ("%s - baud rate = %d, wBaudRate = %d", __func__, baud, config->wBaudRate);
2503 2503
2504 dbg ("wBaudRate: %d", (int)(461550L / config->wBaudRate)); 2504 dbg ("wBaudRate: %d", (int)(461550L / config->wBaudRate));
2505 dbg ("wFlags: 0x%x", config->wFlags); 2505 dbg ("wFlags: 0x%x", config->wFlags);
@@ -2522,7 +2522,7 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi
2522 sizeof(*config)); 2522 sizeof(*config));
2523 if (status) { 2523 if (status) {
2524 dbg ("%s - error %d when trying to write config to device", 2524 dbg ("%s - error %d when trying to write config to device",
2525 __FUNCTION__, status); 2525 __func__, status);
2526 } 2526 }
2527 2527
2528 kfree (config); 2528 kfree (config);
@@ -2538,12 +2538,12 @@ static void edge_set_termios (struct usb_serial_port *port, struct ktermios *old
2538 2538
2539 cflag = tty->termios->c_cflag; 2539 cflag = tty->termios->c_cflag;
2540 2540
2541 dbg("%s - clfag %08x iflag %08x", __FUNCTION__, 2541 dbg("%s - clfag %08x iflag %08x", __func__,
2542 tty->termios->c_cflag, tty->termios->c_iflag); 2542 tty->termios->c_cflag, tty->termios->c_iflag);
2543 dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__, 2543 dbg("%s - old clfag %08x old iflag %08x", __func__,
2544 old_termios->c_cflag, old_termios->c_iflag); 2544 old_termios->c_cflag, old_termios->c_iflag);
2545 2545
2546 dbg("%s - port %d", __FUNCTION__, port->number); 2546 dbg("%s - port %d", __func__, port->number);
2547 2547
2548 if (edge_port == NULL) 2548 if (edge_port == NULL)
2549 return; 2549 return;
@@ -2560,7 +2560,7 @@ static int edge_tiocmset (struct usb_serial_port *port, struct file *file, unsig
2560 unsigned int mcr; 2560 unsigned int mcr;
2561 unsigned long flags; 2561 unsigned long flags;
2562 2562
2563 dbg("%s - port %d", __FUNCTION__, port->number); 2563 dbg("%s - port %d", __func__, port->number);
2564 2564
2565 spin_lock_irqsave(&edge_port->ep_lock, flags); 2565 spin_lock_irqsave(&edge_port->ep_lock, flags);
2566 mcr = edge_port->shadow_mcr; 2566 mcr = edge_port->shadow_mcr;
@@ -2594,7 +2594,7 @@ static int edge_tiocmget(struct usb_serial_port *port, struct file *file)
2594 unsigned int mcr; 2594 unsigned int mcr;
2595 unsigned long flags; 2595 unsigned long flags;
2596 2596
2597 dbg("%s - port %d", __FUNCTION__, port->number); 2597 dbg("%s - port %d", __func__, port->number);
2598 2598
2599 spin_lock_irqsave(&edge_port->ep_lock, flags); 2599 spin_lock_irqsave(&edge_port->ep_lock, flags);
2600 2600
@@ -2608,7 +2608,7 @@ static int edge_tiocmget(struct usb_serial_port *port, struct file *file)
2608 | ((msr & EDGEPORT_MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */ 2608 | ((msr & EDGEPORT_MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */
2609 2609
2610 2610
2611 dbg("%s -- %x", __FUNCTION__, result); 2611 dbg("%s -- %x", __func__, result);
2612 spin_unlock_irqrestore(&edge_port->ep_lock, flags); 2612 spin_unlock_irqrestore(&edge_port->ep_lock, flags);
2613 2613
2614 return result; 2614 return result;
@@ -2648,30 +2648,30 @@ static int edge_ioctl (struct usb_serial_port *port, struct file *file, unsigned
2648 struct async_icount cnow; 2648 struct async_icount cnow;
2649 struct async_icount cprev; 2649 struct async_icount cprev;
2650 2650
2651 dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd); 2651 dbg("%s - port %d, cmd = 0x%x", __func__, port->number, cmd);
2652 2652
2653 switch (cmd) { 2653 switch (cmd) {
2654 case TIOCINQ: 2654 case TIOCINQ:
2655 dbg("%s - (%d) TIOCINQ", __FUNCTION__, port->number); 2655 dbg("%s - (%d) TIOCINQ", __func__, port->number);
2656// return get_number_bytes_avail(edge_port, (unsigned int *) arg); 2656// return get_number_bytes_avail(edge_port, (unsigned int *) arg);
2657 break; 2657 break;
2658 2658
2659 case TIOCSERGETLSR: 2659 case TIOCSERGETLSR:
2660 dbg("%s - (%d) TIOCSERGETLSR", __FUNCTION__, port->number); 2660 dbg("%s - (%d) TIOCSERGETLSR", __func__, port->number);
2661// return get_lsr_info(edge_port, (unsigned int *) arg); 2661// return get_lsr_info(edge_port, (unsigned int *) arg);
2662 break; 2662 break;
2663 2663
2664 case TIOCGSERIAL: 2664 case TIOCGSERIAL:
2665 dbg("%s - (%d) TIOCGSERIAL", __FUNCTION__, port->number); 2665 dbg("%s - (%d) TIOCGSERIAL", __func__, port->number);
2666 return get_serial_info(edge_port, (struct serial_struct __user *) arg); 2666 return get_serial_info(edge_port, (struct serial_struct __user *) arg);
2667 break; 2667 break;
2668 2668
2669 case TIOCSSERIAL: 2669 case TIOCSSERIAL:
2670 dbg("%s - (%d) TIOCSSERIAL", __FUNCTION__, port->number); 2670 dbg("%s - (%d) TIOCSSERIAL", __func__, port->number);
2671 break; 2671 break;
2672 2672
2673 case TIOCMIWAIT: 2673 case TIOCMIWAIT:
2674 dbg("%s - (%d) TIOCMIWAIT", __FUNCTION__, port->number); 2674 dbg("%s - (%d) TIOCMIWAIT", __func__, port->number);
2675 cprev = edge_port->icount; 2675 cprev = edge_port->icount;
2676 while (1) { 2676 while (1) {
2677 interruptible_sleep_on(&edge_port->delta_msr_wait); 2677 interruptible_sleep_on(&edge_port->delta_msr_wait);
@@ -2694,7 +2694,7 @@ static int edge_ioctl (struct usb_serial_port *port, struct file *file, unsigned
2694 break; 2694 break;
2695 2695
2696 case TIOCGICOUNT: 2696 case TIOCGICOUNT:
2697 dbg ("%s - (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__, 2697 dbg ("%s - (%d) TIOCGICOUNT RX=%d, TX=%d", __func__,
2698 port->number, edge_port->icount.rx, edge_port->icount.tx); 2698 port->number, edge_port->icount.rx, edge_port->icount.tx);
2699 if (copy_to_user((void __user *)arg, &edge_port->icount, sizeof(edge_port->icount))) 2699 if (copy_to_user((void __user *)arg, &edge_port->icount, sizeof(edge_port->icount)))
2700 return -EFAULT; 2700 return -EFAULT;
@@ -2709,7 +2709,7 @@ static void edge_break (struct usb_serial_port *port, int break_state)
2709 struct edgeport_port *edge_port = usb_get_serial_port_data(port); 2709 struct edgeport_port *edge_port = usb_get_serial_port_data(port);
2710 int status; 2710 int status;
2711 2711
2712 dbg ("%s - state = %d", __FUNCTION__, break_state); 2712 dbg ("%s - state = %d", __func__, break_state);
2713 2713
2714 /* chase the port close */ 2714 /* chase the port close */
2715 TIChasePort (edge_port, 0, 0); 2715 TIChasePort (edge_port, 0, 0);
@@ -2721,7 +2721,7 @@ static void edge_break (struct usb_serial_port *port, int break_state)
2721 } 2721 }
2722 if (status) { 2722 if (status) {
2723 dbg ("%s - error %d sending break set/clear command.", 2723 dbg ("%s - error %d sending break set/clear command.",
2724 __FUNCTION__, status); 2724 __func__, status);
2725 } 2725 }
2726} 2726}
2727 2727
@@ -2738,7 +2738,7 @@ static int edge_startup (struct usb_serial *serial)
2738 /* create our private serial structure */ 2738 /* create our private serial structure */
2739 edge_serial = kzalloc(sizeof(struct edgeport_serial), GFP_KERNEL); 2739 edge_serial = kzalloc(sizeof(struct edgeport_serial), GFP_KERNEL);
2740 if (edge_serial == NULL) { 2740 if (edge_serial == NULL) {
2741 dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__); 2741 dev_err(&serial->dev->dev, "%s - Out of memory\n", __func__);
2742 return -ENOMEM; 2742 return -ENOMEM;
2743 } 2743 }
2744 mutex_init(&edge_serial->es_lock); 2744 mutex_init(&edge_serial->es_lock);
@@ -2755,13 +2755,13 @@ static int edge_startup (struct usb_serial *serial)
2755 for (i = 0; i < serial->num_ports; ++i) { 2755 for (i = 0; i < serial->num_ports; ++i) {
2756 edge_port = kzalloc(sizeof(struct edgeport_port), GFP_KERNEL); 2756 edge_port = kzalloc(sizeof(struct edgeport_port), GFP_KERNEL);
2757 if (edge_port == NULL) { 2757 if (edge_port == NULL) {
2758 dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__); 2758 dev_err(&serial->dev->dev, "%s - Out of memory\n", __func__);
2759 goto cleanup; 2759 goto cleanup;
2760 } 2760 }
2761 spin_lock_init(&edge_port->ep_lock); 2761 spin_lock_init(&edge_port->ep_lock);
2762 edge_port->ep_out_buf = edge_buf_alloc(EDGE_OUT_BUF_SIZE); 2762 edge_port->ep_out_buf = edge_buf_alloc(EDGE_OUT_BUF_SIZE);
2763 if (edge_port->ep_out_buf == NULL) { 2763 if (edge_port->ep_out_buf == NULL) {
2764 dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__); 2764 dev_err(&serial->dev->dev, "%s - Out of memory\n", __func__);
2765 kfree(edge_port); 2765 kfree(edge_port);
2766 goto cleanup; 2766 goto cleanup;
2767 } 2767 }
@@ -2790,7 +2790,7 @@ static void edge_shutdown (struct usb_serial *serial)
2790 int i; 2790 int i;
2791 struct edgeport_port *edge_port; 2791 struct edgeport_port *edge_port;
2792 2792
2793 dbg ("%s", __FUNCTION__); 2793 dbg ("%s", __func__);
2794 2794
2795 for (i = 0; i < serial->num_ports; ++i) { 2795 for (i = 0; i < serial->num_ports; ++i) {
2796 edge_port = usb_get_serial_port_data(serial->port[i]); 2796 edge_port = usb_get_serial_port_data(serial->port[i]);
@@ -2822,12 +2822,12 @@ static ssize_t store_uart_mode(struct device *dev,
2822 struct edgeport_port *edge_port = usb_get_serial_port_data(port); 2822 struct edgeport_port *edge_port = usb_get_serial_port_data(port);
2823 unsigned int v = simple_strtoul(valbuf, NULL, 0); 2823 unsigned int v = simple_strtoul(valbuf, NULL, 0);
2824 2824
2825 dbg("%s: setting uart_mode = %d", __FUNCTION__, v); 2825 dbg("%s: setting uart_mode = %d", __func__, v);
2826 2826
2827 if (v < 256) 2827 if (v < 256)
2828 edge_port->bUartMode = v; 2828 edge_port->bUartMode = v;
2829 else 2829 else
2830 dev_err(dev, "%s - uart_mode %d is invalid\n", __FUNCTION__, v); 2830 dev_err(dev, "%s - uart_mode %d is invalid\n", __func__, v);
2831 2831
2832 return count; 2832 return count;
2833} 2833}
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
index 1711dda0ea6d..c90436ea8060 100644
--- a/drivers/usb/serial/ipaq.c
+++ b/drivers/usb/serial/ipaq.c
@@ -594,13 +594,13 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
594 int i, result = 0; 594 int i, result = 0;
595 int retries = connect_retries; 595 int retries = connect_retries;
596 596
597 dbg("%s - port %d", __FUNCTION__, port->number); 597 dbg("%s - port %d", __func__, port->number);
598 598
599 bytes_in = 0; 599 bytes_in = 0;
600 bytes_out = 0; 600 bytes_out = 0;
601 priv = kmalloc(sizeof(struct ipaq_private), GFP_KERNEL); 601 priv = kmalloc(sizeof(struct ipaq_private), GFP_KERNEL);
602 if (priv == NULL) { 602 if (priv == NULL) {
603 err("%s - Out of memory", __FUNCTION__); 603 err("%s - Out of memory", __func__);
604 return -ENOMEM; 604 return -ENOMEM;
605 } 605 }
606 usb_set_serial_port_data(port, priv); 606 usb_set_serial_port_data(port, priv);
@@ -679,7 +679,7 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
679 } 679 }
680 680
681 if (!retries && result) { 681 if (!retries && result) {
682 err("%s - failed doing control urb, error %d", __FUNCTION__, 682 err("%s - failed doing control urb, error %d", __func__,
683 result); 683 result);
684 goto error; 684 goto error;
685 } 685 }
@@ -692,7 +692,7 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
692 692
693 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 693 result = usb_submit_urb(port->read_urb, GFP_KERNEL);
694 if (result) { 694 if (result) {
695 err("%s - failed submitting read urb, error %d", __FUNCTION__, result); 695 err("%s - failed submitting read urb, error %d", __func__, result);
696 goto error; 696 goto error;
697 } 697 }
698 698
@@ -700,7 +700,7 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
700 700
701enomem: 701enomem:
702 result = -ENOMEM; 702 result = -ENOMEM;
703 err("%s - Out of memory", __FUNCTION__); 703 err("%s - Out of memory", __func__);
704error: 704error:
705 ipaq_destroy_lists(port); 705 ipaq_destroy_lists(port);
706 kfree(priv); 706 kfree(priv);
@@ -712,7 +712,7 @@ static void ipaq_close(struct usb_serial_port *port, struct file *filp)
712{ 712{
713 struct ipaq_private *priv = usb_get_serial_port_data(port); 713 struct ipaq_private *priv = usb_get_serial_port_data(port);
714 714
715 dbg("%s - port %d", __FUNCTION__, port->number); 715 dbg("%s - port %d", __func__, port->number);
716 716
717 /* 717 /*
718 * shut down bulk read and write 718 * shut down bulk read and write
@@ -735,15 +735,15 @@ static void ipaq_read_bulk_callback(struct urb *urb)
735 int result; 735 int result;
736 int status = urb->status; 736 int status = urb->status;
737 737
738 dbg("%s - port %d", __FUNCTION__, port->number); 738 dbg("%s - port %d", __func__, port->number);
739 739
740 if (status) { 740 if (status) {
741 dbg("%s - nonzero read bulk status received: %d", 741 dbg("%s - nonzero read bulk status received: %d",
742 __FUNCTION__, status); 742 __func__, status);
743 return; 743 return;
744 } 744 }
745 745
746 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 746 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
747 747
748 tty = port->tty; 748 tty = port->tty;
749 if (tty && urb->actual_length) { 749 if (tty && urb->actual_length) {
@@ -760,7 +760,7 @@ static void ipaq_read_bulk_callback(struct urb *urb)
760 ipaq_read_bulk_callback, port); 760 ipaq_read_bulk_callback, port);
761 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 761 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
762 if (result) 762 if (result)
763 err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); 763 err("%s - failed resubmitting read urb, error %d", __func__, result);
764 return; 764 return;
765} 765}
766 766
@@ -771,7 +771,7 @@ static int ipaq_write(struct usb_serial_port *port, const unsigned char *buf,
771 int bytes_sent = 0; 771 int bytes_sent = 0;
772 int transfer_size; 772 int transfer_size;
773 773
774 dbg("%s - port %d", __FUNCTION__, port->number); 774 dbg("%s - port %d", __func__, port->number);
775 775
776 while (count > 0) { 776 while (count > 0) {
777 transfer_size = min(count, PACKET_SIZE); 777 transfer_size = min(count, PACKET_SIZE);
@@ -796,7 +796,7 @@ static int ipaq_write_bulk(struct usb_serial_port *port, const unsigned char *bu
796 unsigned long flags; 796 unsigned long flags;
797 797
798 if (priv->free_len <= 0) { 798 if (priv->free_len <= 0) {
799 dbg("%s - we're stuffed", __FUNCTION__); 799 dbg("%s - we're stuffed", __func__);
800 return -EAGAIN; 800 return -EAGAIN;
801 } 801 }
802 802
@@ -808,12 +808,12 @@ static int ipaq_write_bulk(struct usb_serial_port *port, const unsigned char *bu
808 } 808 }
809 spin_unlock_irqrestore(&write_list_lock, flags); 809 spin_unlock_irqrestore(&write_list_lock, flags);
810 if (pkt == NULL) { 810 if (pkt == NULL) {
811 dbg("%s - we're stuffed", __FUNCTION__); 811 dbg("%s - we're stuffed", __func__);
812 return -EAGAIN; 812 return -EAGAIN;
813 } 813 }
814 814
815 memcpy(pkt->data, buf, count); 815 memcpy(pkt->data, buf, count);
816 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, pkt->data); 816 usb_serial_debug_data(debug, &port->dev, __func__, count, pkt->data);
817 817
818 pkt->len = count; 818 pkt->len = count;
819 pkt->written = 0; 819 pkt->written = 0;
@@ -826,7 +826,7 @@ static int ipaq_write_bulk(struct usb_serial_port *port, const unsigned char *bu
826 spin_unlock_irqrestore(&write_list_lock, flags); 826 spin_unlock_irqrestore(&write_list_lock, flags);
827 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 827 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
828 if (result) { 828 if (result) {
829 err("%s - failed submitting write urb, error %d", __FUNCTION__, result); 829 err("%s - failed submitting write urb, error %d", __func__, result);
830 } 830 }
831 } else { 831 } else {
832 spin_unlock_irqrestore(&write_list_lock, flags); 832 spin_unlock_irqrestore(&write_list_lock, flags);
@@ -875,11 +875,11 @@ static void ipaq_write_bulk_callback(struct urb *urb)
875 int result; 875 int result;
876 int status = urb->status; 876 int status = urb->status;
877 877
878 dbg("%s - port %d", __FUNCTION__, port->number); 878 dbg("%s - port %d", __func__, port->number);
879 879
880 if (status) { 880 if (status) {
881 dbg("%s - nonzero write bulk status received: %d", 881 dbg("%s - nonzero write bulk status received: %d",
882 __FUNCTION__, status); 882 __func__, status);
883 return; 883 return;
884 } 884 }
885 885
@@ -889,7 +889,7 @@ static void ipaq_write_bulk_callback(struct urb *urb)
889 spin_unlock_irqrestore(&write_list_lock, flags); 889 spin_unlock_irqrestore(&write_list_lock, flags);
890 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 890 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
891 if (result) { 891 if (result) {
892 err("%s - failed submitting write urb, error %d", __FUNCTION__, result); 892 err("%s - failed submitting write urb, error %d", __func__, result);
893 } 893 }
894 } else { 894 } else {
895 priv->active = 0; 895 priv->active = 0;
@@ -903,7 +903,7 @@ static int ipaq_write_room(struct usb_serial_port *port)
903{ 903{
904 struct ipaq_private *priv = usb_get_serial_port_data(port); 904 struct ipaq_private *priv = usb_get_serial_port_data(port);
905 905
906 dbg("%s - freelen %d", __FUNCTION__, priv->free_len); 906 dbg("%s - freelen %d", __func__, priv->free_len);
907 return priv->free_len; 907 return priv->free_len;
908} 908}
909 909
@@ -911,7 +911,7 @@ static int ipaq_chars_in_buffer(struct usb_serial_port *port)
911{ 911{
912 struct ipaq_private *priv = usb_get_serial_port_data(port); 912 struct ipaq_private *priv = usb_get_serial_port_data(port);
913 913
914 dbg("%s - queuelen %d", __FUNCTION__, priv->queue_len); 914 dbg("%s - queuelen %d", __func__, priv->queue_len);
915 return priv->queue_len; 915 return priv->queue_len;
916} 916}
917 917
@@ -933,7 +933,7 @@ static void ipaq_destroy_lists(struct usb_serial_port *port)
933 933
934static int ipaq_startup(struct usb_serial *serial) 934static int ipaq_startup(struct usb_serial *serial)
935{ 935{
936 dbg("%s", __FUNCTION__); 936 dbg("%s", __func__);
937 if (serial->dev->actconfig->desc.bConfigurationValue != 1) { 937 if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
938 err("active config #%d != 1 ??", 938 err("active config #%d != 1 ??",
939 serial->dev->actconfig->desc.bConfigurationValue); 939 serial->dev->actconfig->desc.bConfigurationValue);
@@ -944,7 +944,7 @@ static int ipaq_startup(struct usb_serial *serial)
944 944
945static void ipaq_shutdown(struct usb_serial *serial) 945static void ipaq_shutdown(struct usb_serial *serial)
946{ 946{
947 dbg("%s", __FUNCTION__); 947 dbg("%s", __func__);
948} 948}
949 949
950static int __init ipaq_init(void) 950static int __init ipaq_init(void)
diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c
index ec0ccd14e18e..bc85ca5c1c37 100644
--- a/drivers/usb/serial/ipw.c
+++ b/drivers/usb/serial/ipw.c
@@ -169,15 +169,15 @@ static void ipw_read_bulk_callback(struct urb *urb)
169 int result; 169 int result;
170 int status = urb->status; 170 int status = urb->status;
171 171
172 dbg("%s - port %d", __FUNCTION__, port->number); 172 dbg("%s - port %d", __func__, port->number);
173 173
174 if (status) { 174 if (status) {
175 dbg("%s - nonzero read bulk status received: %d", 175 dbg("%s - nonzero read bulk status received: %d",
176 __FUNCTION__, status); 176 __func__, status);
177 return; 177 return;
178 } 178 }
179 179
180 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 180 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
181 181
182 tty = port->tty; 182 tty = port->tty;
183 if (tty && urb->actual_length) { 183 if (tty && urb->actual_length) {
@@ -195,7 +195,7 @@ static void ipw_read_bulk_callback(struct urb *urb)
195 ipw_read_bulk_callback, port); 195 ipw_read_bulk_callback, port);
196 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 196 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
197 if (result) 197 if (result)
198 dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); 198 dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __func__, result);
199 return; 199 return;
200} 200}
201 201
@@ -206,7 +206,7 @@ static int ipw_open(struct usb_serial_port *port, struct file *filp)
206 u8 *buf_flow_init; 206 u8 *buf_flow_init;
207 int result; 207 int result;
208 208
209 dbg("%s", __FUNCTION__); 209 dbg("%s", __func__);
210 210
211 buf_flow_init = kmemdup(buf_flow_static, 16, GFP_KERNEL); 211 buf_flow_init = kmemdup(buf_flow_static, 16, GFP_KERNEL);
212 if (!buf_flow_init) 212 if (!buf_flow_init)
@@ -217,7 +217,7 @@ static int ipw_open(struct usb_serial_port *port, struct file *filp)
217 217
218 /* --1: Tell the modem to initialize (we think) From sniffs this is always the 218 /* --1: Tell the modem to initialize (we think) From sniffs this is always the
219 * first thing that gets sent to the modem during opening of the device */ 219 * first thing that gets sent to the modem during opening of the device */
220 dbg("%s: Sending SIO_INIT (we guess)",__FUNCTION__); 220 dbg("%s: Sending SIO_INIT (we guess)",__func__);
221 result = usb_control_msg(dev, usb_sndctrlpipe(dev,0), 221 result = usb_control_msg(dev, usb_sndctrlpipe(dev,0),
222 IPW_SIO_INIT, 222 IPW_SIO_INIT,
223 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT, 223 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
@@ -234,7 +234,7 @@ static int ipw_open(struct usb_serial_port *port, struct file *filp)
234 usb_clear_halt(dev, usb_sndbulkpipe(dev, port->bulk_out_endpointAddress)); 234 usb_clear_halt(dev, usb_sndbulkpipe(dev, port->bulk_out_endpointAddress));
235 235
236 /*--2: Start reading from the device */ 236 /*--2: Start reading from the device */
237 dbg("%s: setting up bulk read callback",__FUNCTION__); 237 dbg("%s: setting up bulk read callback",__func__);
238 usb_fill_bulk_urb(port->read_urb, dev, 238 usb_fill_bulk_urb(port->read_urb, dev,
239 usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress), 239 usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress),
240 port->bulk_in_buffer, 240 port->bulk_in_buffer,
@@ -242,10 +242,10 @@ static int ipw_open(struct usb_serial_port *port, struct file *filp)
242 ipw_read_bulk_callback, port); 242 ipw_read_bulk_callback, port);
243 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 243 result = usb_submit_urb(port->read_urb, GFP_KERNEL);
244 if (result < 0) 244 if (result < 0)
245 dbg("%s - usb_submit_urb(read bulk) failed with status %d", __FUNCTION__, result); 245 dbg("%s - usb_submit_urb(read bulk) failed with status %d", __func__, result);
246 246
247 /*--3: Tell the modem to open the floodgates on the rx bulk channel */ 247 /*--3: Tell the modem to open the floodgates on the rx bulk channel */
248 dbg("%s:asking modem for RxRead (RXBULK_ON)",__FUNCTION__); 248 dbg("%s:asking modem for RxRead (RXBULK_ON)",__func__);
249 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 249 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
250 IPW_SIO_RXCTL, 250 IPW_SIO_RXCTL,
251 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT, 251 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
@@ -258,7 +258,7 @@ static int ipw_open(struct usb_serial_port *port, struct file *filp)
258 dev_err(&port->dev, "Enabling bulk RxRead failed (error = %d)\n", result); 258 dev_err(&port->dev, "Enabling bulk RxRead failed (error = %d)\n", result);
259 259
260 /*--4: setup the initial flowcontrol */ 260 /*--4: setup the initial flowcontrol */
261 dbg("%s:setting init flowcontrol (%s)",__FUNCTION__,buf_flow_init); 261 dbg("%s:setting init flowcontrol (%s)",__func__,buf_flow_init);
262 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 262 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
263 IPW_SIO_HANDFLOW, 263 IPW_SIO_HANDFLOW,
264 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT, 264 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
@@ -272,7 +272,7 @@ static int ipw_open(struct usb_serial_port *port, struct file *filp)
272 272
273 273
274 /*--5: raise the dtr */ 274 /*--5: raise the dtr */
275 dbg("%s:raising dtr",__FUNCTION__); 275 dbg("%s:raising dtr",__func__);
276 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 276 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
277 IPW_SIO_SET_PIN, 277 IPW_SIO_SET_PIN,
278 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT, 278 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
@@ -285,7 +285,7 @@ static int ipw_open(struct usb_serial_port *port, struct file *filp)
285 dev_err(&port->dev, "setting dtr failed (error = %d)\n", result); 285 dev_err(&port->dev, "setting dtr failed (error = %d)\n", result);
286 286
287 /*--6: raise the rts */ 287 /*--6: raise the rts */
288 dbg("%s:raising rts",__FUNCTION__); 288 dbg("%s:raising rts",__func__);
289 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 289 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
290 IPW_SIO_SET_PIN, 290 IPW_SIO_SET_PIN,
291 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT, 291 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
@@ -307,12 +307,12 @@ static void ipw_close(struct usb_serial_port *port, struct file * filp)
307 int result; 307 int result;
308 308
309 if (tty_hung_up_p(filp)) { 309 if (tty_hung_up_p(filp)) {
310 dbg("%s: tty_hung_up_p ...", __FUNCTION__); 310 dbg("%s: tty_hung_up_p ...", __func__);
311 return; 311 return;
312 } 312 }
313 313
314 /*--1: drop the dtr */ 314 /*--1: drop the dtr */
315 dbg("%s:dropping dtr",__FUNCTION__); 315 dbg("%s:dropping dtr",__func__);
316 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 316 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
317 IPW_SIO_SET_PIN, 317 IPW_SIO_SET_PIN,
318 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT, 318 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
@@ -325,7 +325,7 @@ static void ipw_close(struct usb_serial_port *port, struct file * filp)
325 dev_err(&port->dev, "dropping dtr failed (error = %d)\n", result); 325 dev_err(&port->dev, "dropping dtr failed (error = %d)\n", result);
326 326
327 /*--2: drop the rts */ 327 /*--2: drop the rts */
328 dbg("%s:dropping rts",__FUNCTION__); 328 dbg("%s:dropping rts",__func__);
329 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 329 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
330 IPW_SIO_SET_PIN, USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT, 330 IPW_SIO_SET_PIN, USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
331 IPW_PIN_CLRRTS, 331 IPW_PIN_CLRRTS,
@@ -338,7 +338,7 @@ static void ipw_close(struct usb_serial_port *port, struct file * filp)
338 338
339 339
340 /*--3: purge */ 340 /*--3: purge */
341 dbg("%s:sending purge",__FUNCTION__); 341 dbg("%s:sending purge",__func__);
342 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 342 result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
343 IPW_SIO_PURGE, USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT, 343 IPW_SIO_PURGE, USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
344 0x03, 344 0x03,
@@ -373,13 +373,13 @@ static void ipw_write_bulk_callback(struct urb *urb)
373 struct usb_serial_port *port = urb->context; 373 struct usb_serial_port *port = urb->context;
374 int status = urb->status; 374 int status = urb->status;
375 375
376 dbg("%s", __FUNCTION__); 376 dbg("%s", __func__);
377 377
378 port->write_urb_busy = 0; 378 port->write_urb_busy = 0;
379 379
380 if (status) 380 if (status)
381 dbg("%s - nonzero write bulk status received: %d", 381 dbg("%s - nonzero write bulk status received: %d",
382 __FUNCTION__, status); 382 __func__, status);
383 383
384 usb_serial_port_softint(port); 384 usb_serial_port_softint(port);
385} 385}
@@ -389,18 +389,18 @@ static int ipw_write(struct usb_serial_port *port, const unsigned char *buf, int
389 struct usb_device *dev = port->serial->dev; 389 struct usb_device *dev = port->serial->dev;
390 int ret; 390 int ret;
391 391
392 dbg("%s: TOP: count=%d, in_interrupt=%ld", __FUNCTION__, 392 dbg("%s: TOP: count=%d, in_interrupt=%ld", __func__,
393 count, in_interrupt() ); 393 count, in_interrupt() );
394 394
395 if (count == 0) { 395 if (count == 0) {
396 dbg("%s - write request of 0 bytes", __FUNCTION__); 396 dbg("%s - write request of 0 bytes", __func__);
397 return 0; 397 return 0;
398 } 398 }
399 399
400 spin_lock_bh(&port->lock); 400 spin_lock_bh(&port->lock);
401 if (port->write_urb_busy) { 401 if (port->write_urb_busy) {
402 spin_unlock_bh(&port->lock); 402 spin_unlock_bh(&port->lock);
403 dbg("%s - already writing", __FUNCTION__); 403 dbg("%s - already writing", __func__);
404 return 0; 404 return 0;
405 } 405 }
406 port->write_urb_busy = 1; 406 port->write_urb_busy = 1;
@@ -409,7 +409,7 @@ static int ipw_write(struct usb_serial_port *port, const unsigned char *buf, int
409 count = min(count, port->bulk_out_size); 409 count = min(count, port->bulk_out_size);
410 memcpy(port->bulk_out_buffer, buf, count); 410 memcpy(port->bulk_out_buffer, buf, count);
411 411
412 dbg("%s count now:%d", __FUNCTION__, count); 412 dbg("%s count now:%d", __func__, count);
413 413
414 usb_fill_bulk_urb(port->write_urb, dev, 414 usb_fill_bulk_urb(port->write_urb, dev,
415 usb_sndbulkpipe(dev, port->bulk_out_endpointAddress), 415 usb_sndbulkpipe(dev, port->bulk_out_endpointAddress),
@@ -421,11 +421,11 @@ static int ipw_write(struct usb_serial_port *port, const unsigned char *buf, int
421 ret = usb_submit_urb(port->write_urb, GFP_ATOMIC); 421 ret = usb_submit_urb(port->write_urb, GFP_ATOMIC);
422 if (ret != 0) { 422 if (ret != 0) {
423 port->write_urb_busy = 0; 423 port->write_urb_busy = 0;
424 dbg("%s - usb_submit_urb(write bulk) failed with error = %d", __FUNCTION__, ret); 424 dbg("%s - usb_submit_urb(write bulk) failed with error = %d", __func__, ret);
425 return ret; 425 return ret;
426 } 426 }
427 427
428 dbg("%s returning %d", __FUNCTION__, count); 428 dbg("%s returning %d", __func__, count);
429 return count; 429 return count;
430} 430}
431 431
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
index 82e12f8d600a..496009cff3a8 100644
--- a/drivers/usb/serial/ir-usb.c
+++ b/drivers/usb/serial/ir-usb.c
@@ -195,16 +195,16 @@ static struct irda_class_desc *irda_usb_find_class_desc(struct usb_device *dev,
195 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 195 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
196 0, ifnum, desc, sizeof(*desc), 1000); 196 0, ifnum, desc, sizeof(*desc), 1000);
197 197
198 dbg("%s - ret=%d", __FUNCTION__, ret); 198 dbg("%s - ret=%d", __func__, ret);
199 if (ret < sizeof(*desc)) { 199 if (ret < sizeof(*desc)) {
200 dbg("%s - class descriptor read %s (%d)", 200 dbg("%s - class descriptor read %s (%d)",
201 __FUNCTION__, 201 __func__,
202 (ret<0) ? "failed" : "too short", 202 (ret<0) ? "failed" : "too short",
203 ret); 203 ret);
204 goto error; 204 goto error;
205 } 205 }
206 if (desc->bDescriptorType != USB_DT_IRDA) { 206 if (desc->bDescriptorType != USB_DT_IRDA) {
207 dbg("%s - bad class descriptor type", __FUNCTION__); 207 dbg("%s - bad class descriptor type", __func__);
208 goto error; 208 goto error;
209 } 209 }
210 210
@@ -248,7 +248,7 @@ static int ir_startup (struct usb_serial *serial)
248 } 248 }
249 249
250 dbg ("%s - Baud rates supported:%s%s%s%s%s%s%s%s%s", 250 dbg ("%s - Baud rates supported:%s%s%s%s%s%s%s%s%s",
251 __FUNCTION__, 251 __func__,
252 (irda_desc->wBaudRate & 0x0001) ? " 2400" : "", 252 (irda_desc->wBaudRate & 0x0001) ? " 2400" : "",
253 (irda_desc->wBaudRate & 0x0002) ? " 9600" : "", 253 (irda_desc->wBaudRate & 0x0002) ? " 9600" : "",
254 (irda_desc->wBaudRate & 0x0004) ? " 19200" : "", 254 (irda_desc->wBaudRate & 0x0004) ? " 19200" : "",
@@ -281,13 +281,13 @@ static int ir_open (struct usb_serial_port *port, struct file *filp)
281 char *buffer; 281 char *buffer;
282 int result = 0; 282 int result = 0;
283 283
284 dbg("%s - port %d", __FUNCTION__, port->number); 284 dbg("%s - port %d", __func__, port->number);
285 285
286 if (buffer_size) { 286 if (buffer_size) {
287 /* override the default buffer sizes */ 287 /* override the default buffer sizes */
288 buffer = kmalloc (buffer_size, GFP_KERNEL); 288 buffer = kmalloc (buffer_size, GFP_KERNEL);
289 if (!buffer) { 289 if (!buffer) {
290 dev_err (&port->dev, "%s - out of memory.\n", __FUNCTION__); 290 dev_err (&port->dev, "%s - out of memory.\n", __func__);
291 return -ENOMEM; 291 return -ENOMEM;
292 } 292 }
293 kfree (port->read_urb->transfer_buffer); 293 kfree (port->read_urb->transfer_buffer);
@@ -296,7 +296,7 @@ static int ir_open (struct usb_serial_port *port, struct file *filp)
296 296
297 buffer = kmalloc (buffer_size, GFP_KERNEL); 297 buffer = kmalloc (buffer_size, GFP_KERNEL);
298 if (!buffer) { 298 if (!buffer) {
299 dev_err (&port->dev, "%s - out of memory.\n", __FUNCTION__); 299 dev_err (&port->dev, "%s - out of memory.\n", __func__);
300 return -ENOMEM; 300 return -ENOMEM;
301 } 301 }
302 kfree (port->write_urb->transfer_buffer); 302 kfree (port->write_urb->transfer_buffer);
@@ -316,14 +316,14 @@ static int ir_open (struct usb_serial_port *port, struct file *filp)
316 port); 316 port);
317 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 317 result = usb_submit_urb(port->read_urb, GFP_KERNEL);
318 if (result) 318 if (result)
319 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result); 319 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __func__, result);
320 320
321 return result; 321 return result;
322} 322}
323 323
324static void ir_close (struct usb_serial_port *port, struct file * filp) 324static void ir_close (struct usb_serial_port *port, struct file * filp)
325{ 325{
326 dbg("%s - port %d", __FUNCTION__, port->number); 326 dbg("%s - port %d", __func__, port->number);
327 327
328 /* shutdown our bulk read */ 328 /* shutdown our bulk read */
329 usb_kill_urb(port->read_urb); 329 usb_kill_urb(port->read_urb);
@@ -335,10 +335,10 @@ static int ir_write (struct usb_serial_port *port, const unsigned char *buf, int
335 int result; 335 int result;
336 int transfer_size; 336 int transfer_size;
337 337
338 dbg("%s - port = %d, count = %d", __FUNCTION__, port->number, count); 338 dbg("%s - port = %d, count = %d", __func__, port->number, count);
339 339
340 if (!port->tty) { 340 if (!port->tty) {
341 dev_err (&port->dev, "%s - no tty???\n", __FUNCTION__); 341 dev_err (&port->dev, "%s - no tty???\n", __func__);
342 return 0; 342 return 0;
343 } 343 }
344 344
@@ -348,7 +348,7 @@ static int ir_write (struct usb_serial_port *port, const unsigned char *buf, int
348 spin_lock_bh(&port->lock); 348 spin_lock_bh(&port->lock);
349 if (port->write_urb_busy) { 349 if (port->write_urb_busy) {
350 spin_unlock_bh(&port->lock); 350 spin_unlock_bh(&port->lock);
351 dbg("%s - already writing", __FUNCTION__); 351 dbg("%s - already writing", __func__);
352 return 0; 352 return 0;
353 } 353 }
354 port->write_urb_busy = 1; 354 port->write_urb_busy = 1;
@@ -384,7 +384,7 @@ static int ir_write (struct usb_serial_port *port, const unsigned char *buf, int
384 result = usb_submit_urb (port->write_urb, GFP_ATOMIC); 384 result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
385 if (result) { 385 if (result) {
386 port->write_urb_busy = 0; 386 port->write_urb_busy = 0;
387 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result); 387 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __func__, result);
388 } else 388 } else
389 result = transfer_size; 389 result = transfer_size;
390 390
@@ -396,19 +396,19 @@ static void ir_write_bulk_callback (struct urb *urb)
396 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 396 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
397 int status = urb->status; 397 int status = urb->status;
398 398
399 dbg("%s - port %d", __FUNCTION__, port->number); 399 dbg("%s - port %d", __func__, port->number);
400 400
401 port->write_urb_busy = 0; 401 port->write_urb_busy = 0;
402 if (status) { 402 if (status) {
403 dbg("%s - nonzero write bulk status received: %d", 403 dbg("%s - nonzero write bulk status received: %d",
404 __FUNCTION__, status); 404 __func__, status);
405 return; 405 return;
406 } 406 }
407 407
408 usb_serial_debug_data ( 408 usb_serial_debug_data (
409 debug, 409 debug,
410 &port->dev, 410 &port->dev,
411 __FUNCTION__, 411 __func__,
412 urb->actual_length, 412 urb->actual_length,
413 urb->transfer_buffer); 413 urb->transfer_buffer);
414 414
@@ -423,10 +423,10 @@ static void ir_read_bulk_callback (struct urb *urb)
423 int result; 423 int result;
424 int status = urb->status; 424 int status = urb->status;
425 425
426 dbg("%s - port %d", __FUNCTION__, port->number); 426 dbg("%s - port %d", __func__, port->number);
427 427
428 if (!port->open_count) { 428 if (!port->open_count) {
429 dbg("%s - port closed.", __FUNCTION__); 429 dbg("%s - port closed.", __func__);
430 return; 430 return;
431 } 431 }
432 432
@@ -444,7 +444,7 @@ static void ir_read_bulk_callback (struct urb *urb)
444 usb_serial_debug_data ( 444 usb_serial_debug_data (
445 debug, 445 debug,
446 &port->dev, 446 &port->dev,
447 __FUNCTION__, 447 __func__,
448 urb->actual_length, 448 urb->actual_length,
449 data); 449 data);
450 450
@@ -477,13 +477,13 @@ static void ir_read_bulk_callback (struct urb *urb)
477 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 477 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
478 if (result) 478 if (result)
479 dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", 479 dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n",
480 __FUNCTION__, result); 480 __func__, result);
481 481
482 break ; 482 break ;
483 483
484 default: 484 default:
485 dbg("%s - nonzero read bulk status received: %d", 485 dbg("%s - nonzero read bulk status received: %d",
486 __FUNCTION__, 486 __func__,
487 status); 487 status);
488 break ; 488 break ;
489 489
@@ -499,7 +499,7 @@ static void ir_set_termios (struct usb_serial_port *port, struct ktermios *old_t
499 speed_t baud; 499 speed_t baud;
500 int ir_baud; 500 int ir_baud;
501 501
502 dbg("%s - port %d", __FUNCTION__, port->number); 502 dbg("%s - port %d", __func__, port->number);
503 503
504 baud = tty_get_baud_rate(port->tty); 504 baud = tty_get_baud_rate(port->tty);
505 505
@@ -551,7 +551,7 @@ static void ir_set_termios (struct usb_serial_port *port, struct ktermios *old_t
551 551
552 result = usb_submit_urb (port->write_urb, GFP_KERNEL); 552 result = usb_submit_urb (port->write_urb, GFP_KERNEL);
553 if (result) 553 if (result)
554 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result); 554 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __func__, result);
555 555
556 /* Only speed changes are supported */ 556 /* Only speed changes are supported */
557 tty_termios_copy_hw(port->tty->termios, old_termios); 557 tty_termios_copy_hw(port->tty->termios, old_termios);
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
index 7fee53441c24..b486a54c6f46 100644
--- a/drivers/usb/serial/iuu_phoenix.c
+++ b/drivers/usb/serial/iuu_phoenix.c
@@ -98,10 +98,10 @@ static int iuu_alloc_buf(struct iuu_private *priv)
98 priv->writebuf = kzalloc(256, GFP_KERNEL); 98 priv->writebuf = kzalloc(256, GFP_KERNEL);
99 if (!priv->buf || !priv->dbgbuf || !priv->writebuf) { 99 if (!priv->buf || !priv->dbgbuf || !priv->writebuf) {
100 iuu_free_buf(priv); 100 iuu_free_buf(priv);
101 dbg("%s problem allocation buffer", __FUNCTION__); 101 dbg("%s problem allocation buffer", __func__);
102 return -ENOMEM; 102 return -ENOMEM;
103 } 103 }
104 dbg("%s - Privates buffers allocation success", __FUNCTION__); 104 dbg("%s - Privates buffers allocation success", __func__);
105 return 0; 105 return 0;
106} 106}
107 107
@@ -109,7 +109,7 @@ static int iuu_startup(struct usb_serial *serial)
109{ 109{
110 struct iuu_private *priv; 110 struct iuu_private *priv;
111 priv = kzalloc(sizeof(struct iuu_private), GFP_KERNEL); 111 priv = kzalloc(sizeof(struct iuu_private), GFP_KERNEL);
112 dbg("%s- priv allocation success", __FUNCTION__); 112 dbg("%s- priv allocation success", __func__);
113 if (!priv) 113 if (!priv)
114 return -ENOMEM; 114 return -ENOMEM;
115 if (iuu_alloc_buf(priv)) { 115 if (iuu_alloc_buf(priv)) {
@@ -130,17 +130,17 @@ static void iuu_shutdown(struct usb_serial *serial)
130 if (!port) 130 if (!port)
131 return; 131 return;
132 132
133 dbg("%s", __FUNCTION__); 133 dbg("%s", __func__);
134 134
135 if (priv) { 135 if (priv) {
136 iuu_free_buf(priv); 136 iuu_free_buf(priv);
137 dbg("%s - I will free all", __FUNCTION__); 137 dbg("%s - I will free all", __func__);
138 usb_set_serial_port_data(port, NULL); 138 usb_set_serial_port_data(port, NULL);
139 139
140 dbg("%s - priv is not anymore in port structure", __FUNCTION__); 140 dbg("%s - priv is not anymore in port structure", __func__);
141 kfree(priv); 141 kfree(priv);
142 142
143 dbg("%s priv is now kfree", __FUNCTION__); 143 dbg("%s priv is now kfree", __func__);
144 } 144 }
145} 145}
146 146
@@ -151,7 +151,7 @@ static int iuu_tiocmset(struct usb_serial_port *port, struct file *file,
151 unsigned long flags; 151 unsigned long flags;
152 152
153 /* FIXME: locking on tiomstatus */ 153 /* FIXME: locking on tiomstatus */
154 dbg("%s (%d) msg : SET = 0x%04x, CLEAR = 0x%04x ", __FUNCTION__, 154 dbg("%s (%d) msg : SET = 0x%04x, CLEAR = 0x%04x ", __func__,
155 port->number, set, clear); 155 port->number, set, clear);
156 156
157 spin_lock_irqsave(&priv->lock, flags); 157 spin_lock_irqsave(&priv->lock, flags);
@@ -159,7 +159,7 @@ static int iuu_tiocmset(struct usb_serial_port *port, struct file *file,
159 priv->tiostatus = TIOCM_RTS; 159 priv->tiostatus = TIOCM_RTS;
160 160
161 if (!(set & TIOCM_RTS) && priv->tiostatus == TIOCM_RTS) { 161 if (!(set & TIOCM_RTS) && priv->tiostatus == TIOCM_RTS) {
162 dbg("%s TIOCMSET RESET called !!!", __FUNCTION__); 162 dbg("%s TIOCMSET RESET called !!!", __func__);
163 priv->reset = 1; 163 priv->reset = 1;
164 } 164 }
165 spin_unlock_irqrestore(&priv->lock, flags); 165 spin_unlock_irqrestore(&priv->lock, flags);
@@ -188,10 +188,10 @@ static void iuu_rxcmd(struct urb *urb)
188{ 188{
189 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 189 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
190 int result; 190 int result;
191 dbg("%s - enter", __FUNCTION__); 191 dbg("%s - enter", __func__);
192 192
193 if (urb->status) { 193 if (urb->status) {
194 dbg("%s - urb->status = %d", __FUNCTION__, urb->status); 194 dbg("%s - urb->status = %d", __func__, urb->status);
195 /* error stop all */ 195 /* error stop all */
196 return; 196 return;
197 } 197 }
@@ -211,7 +211,7 @@ static int iuu_reset(struct usb_serial_port *port, u8 wt)
211 struct iuu_private *priv = usb_get_serial_port_data(port); 211 struct iuu_private *priv = usb_get_serial_port_data(port);
212 int result; 212 int result;
213 char *buf_ptr = port->write_urb->transfer_buffer; 213 char *buf_ptr = port->write_urb->transfer_buffer;
214 dbg("%s - enter", __FUNCTION__); 214 dbg("%s - enter", __func__);
215 215
216 /* Prepare the reset sequence */ 216 /* Prepare the reset sequence */
217 217
@@ -243,16 +243,16 @@ static void iuu_update_status_callback(struct urb *urb)
243 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 243 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
244 struct iuu_private *priv = usb_get_serial_port_data(port); 244 struct iuu_private *priv = usb_get_serial_port_data(port);
245 u8 *st; 245 u8 *st;
246 dbg("%s - enter", __FUNCTION__); 246 dbg("%s - enter", __func__);
247 247
248 if (urb->status) { 248 if (urb->status) {
249 dbg("%s - urb->status = %d", __FUNCTION__, urb->status); 249 dbg("%s - urb->status = %d", __func__, urb->status);
250 /* error stop all */ 250 /* error stop all */
251 return; 251 return;
252 } 252 }
253 253
254 st = urb->transfer_buffer; 254 st = urb->transfer_buffer;
255 dbg("%s - enter", __FUNCTION__); 255 dbg("%s - enter", __func__);
256 if (urb->actual_length == 1) { 256 if (urb->actual_length == 1) {
257 switch (st[0]) { 257 switch (st[0]) {
258 case 0x1: 258 case 0x1:
@@ -272,9 +272,9 @@ static void iuu_status_callback(struct urb *urb)
272{ 272{
273 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 273 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
274 int result; 274 int result;
275 dbg("%s - enter", __FUNCTION__); 275 dbg("%s - enter", __func__);
276 276
277 dbg("%s - urb->status = %d", __FUNCTION__, urb->status); 277 dbg("%s - urb->status = %d", __func__, urb->status);
278 usb_fill_bulk_urb(port->read_urb, port->serial->dev, 278 usb_fill_bulk_urb(port->read_urb, port->serial->dev,
279 usb_rcvbulkpipe(port->serial->dev, 279 usb_rcvbulkpipe(port->serial->dev,
280 port->bulk_in_endpointAddress), 280 port->bulk_in_endpointAddress),
@@ -287,7 +287,7 @@ static int iuu_status(struct usb_serial_port *port)
287{ 287{
288 int result; 288 int result;
289 289
290 dbg("%s - enter", __FUNCTION__); 290 dbg("%s - enter", __func__);
291 291
292 memset(port->write_urb->transfer_buffer, IUU_GET_STATE_REGISTER, 1); 292 memset(port->write_urb->transfer_buffer, IUU_GET_STATE_REGISTER, 1);
293 usb_fill_bulk_urb(port->write_urb, port->serial->dev, 293 usb_fill_bulk_urb(port->write_urb, port->serial->dev,
@@ -306,7 +306,7 @@ static int bulk_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
306 struct usb_serial *serial = port->serial; 306 struct usb_serial *serial = port->serial;
307 int actual = 0; 307 int actual = 0;
308 308
309 dbg("%s - enter", __FUNCTION__); 309 dbg("%s - enter", __func__);
310 310
311 /* send the data out the bulk port */ 311 /* send the data out the bulk port */
312 312
@@ -317,9 +317,9 @@ static int bulk_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
317 count, &actual, HZ * 1); 317 count, &actual, HZ * 1);
318 318
319 if (status != IUU_OPERATION_OK) { 319 if (status != IUU_OPERATION_OK) {
320 dbg("%s - error = %2x", __FUNCTION__, status); 320 dbg("%s - error = %2x", __func__, status);
321 } else { 321 } else {
322 dbg("%s - write OK !", __FUNCTION__); 322 dbg("%s - write OK !", __func__);
323 } 323 }
324 return status; 324 return status;
325} 325}
@@ -330,7 +330,7 @@ static int read_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
330 struct usb_serial *serial = port->serial; 330 struct usb_serial *serial = port->serial;
331 int actual = 0; 331 int actual = 0;
332 332
333 dbg("%s - enter", __FUNCTION__); 333 dbg("%s - enter", __func__);
334 334
335 /* send the data out the bulk port */ 335 /* send the data out the bulk port */
336 336
@@ -341,9 +341,9 @@ static int read_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
341 count, &actual, HZ * 1); 341 count, &actual, HZ * 1);
342 342
343 if (status != IUU_OPERATION_OK) { 343 if (status != IUU_OPERATION_OK) {
344 dbg("%s - error = %2x", __FUNCTION__, status); 344 dbg("%s - error = %2x", __func__, status);
345 } else { 345 } else {
346 dbg("%s - read OK !", __FUNCTION__); 346 dbg("%s - read OK !", __func__);
347 } 347 }
348 348
349 return status; 349 return status;
@@ -358,7 +358,7 @@ static int iuu_led(struct usb_serial_port *port, unsigned int R,
358 if (!buf) 358 if (!buf)
359 return -ENOMEM; 359 return -ENOMEM;
360 360
361 dbg("%s - enter", __FUNCTION__); 361 dbg("%s - enter", __func__);
362 362
363 buf[0] = IUU_SET_LED; 363 buf[0] = IUU_SET_LED;
364 buf[1] = R & 0xFF; 364 buf[1] = R & 0xFF;
@@ -371,9 +371,9 @@ static int iuu_led(struct usb_serial_port *port, unsigned int R,
371 status = bulk_immediate(port, buf, 8); 371 status = bulk_immediate(port, buf, 8);
372 kfree(buf); 372 kfree(buf);
373 if (status != IUU_OPERATION_OK) 373 if (status != IUU_OPERATION_OK)
374 dbg("%s - led error status = %2x", __FUNCTION__, status); 374 dbg("%s - led error status = %2x", __func__, status);
375 else 375 else
376 dbg("%s - led OK !", __FUNCTION__); 376 dbg("%s - led OK !", __func__);
377 return IUU_OPERATION_OK; 377 return IUU_OPERATION_OK;
378} 378}
379 379
@@ -451,7 +451,7 @@ static int iuu_clk(struct usb_serial_port *port, int dwFrq)
451 unsigned int P2 = 0; 451 unsigned int P2 = 0;
452 int frq = (int)dwFrq; 452 int frq = (int)dwFrq;
453 453
454 dbg("%s - enter", __FUNCTION__); 454 dbg("%s - enter", __func__);
455 455
456 if (frq == 0) { 456 if (frq == 0) {
457 priv->buf[Count++] = IUU_UART_WRITE_I2C; 457 priv->buf[Count++] = IUU_UART_WRITE_I2C;
@@ -461,7 +461,7 @@ static int iuu_clk(struct usb_serial_port *port, int dwFrq)
461 461
462 status = bulk_immediate(port, (u8 *) priv->buf, Count); 462 status = bulk_immediate(port, (u8 *) priv->buf, Count);
463 if (status != 0) { 463 if (status != 0) {
464 dbg("%s - write error ", __FUNCTION__); 464 dbg("%s - write error ", __func__);
465 return status; 465 return status;
466 } 466 }
467 } else if (frq == 3579000) { 467 } else if (frq == 3579000) {
@@ -570,7 +570,7 @@ static int iuu_clk(struct usb_serial_port *port, int dwFrq)
570 570
571 status = bulk_immediate(port, (u8 *) priv->buf, Count); 571 status = bulk_immediate(port, (u8 *) priv->buf, Count);
572 if (status != IUU_OPERATION_OK) 572 if (status != IUU_OPERATION_OK)
573 dbg("%s - write error ", __FUNCTION__); 573 dbg("%s - write error ", __func__);
574 return status; 574 return status;
575} 575}
576 576
@@ -581,7 +581,7 @@ static int iuu_uart_flush(struct usb_serial_port *port)
581 u8 rxcmd = IUU_UART_RX; 581 u8 rxcmd = IUU_UART_RX;
582 struct iuu_private *priv = usb_get_serial_port_data(port); 582 struct iuu_private *priv = usb_get_serial_port_data(port);
583 583
584 dbg("%s - enter", __FUNCTION__); 584 dbg("%s - enter", __func__);
585 585
586 if (iuu_led(port, 0xF000, 0, 0, 0xFF) < 0) 586 if (iuu_led(port, 0xF000, 0, 0, 0xFF) < 0)
587 return -EIO; 587 return -EIO;
@@ -589,27 +589,27 @@ static int iuu_uart_flush(struct usb_serial_port *port)
589 for (i = 0; i < 2; i++) { 589 for (i = 0; i < 2; i++) {
590 status = bulk_immediate(port, &rxcmd, 1); 590 status = bulk_immediate(port, &rxcmd, 1);
591 if (status != IUU_OPERATION_OK) { 591 if (status != IUU_OPERATION_OK) {
592 dbg("%s - uart_flush_write error", __FUNCTION__); 592 dbg("%s - uart_flush_write error", __func__);
593 return status; 593 return status;
594 } 594 }
595 595
596 status = read_immediate(port, &priv->len, 1); 596 status = read_immediate(port, &priv->len, 1);
597 if (status != IUU_OPERATION_OK) { 597 if (status != IUU_OPERATION_OK) {
598 dbg("%s - uart_flush_read error", __FUNCTION__); 598 dbg("%s - uart_flush_read error", __func__);
599 return status; 599 return status;
600 } 600 }
601 601
602 if (priv->len > 0) { 602 if (priv->len > 0) {
603 dbg("%s - uart_flush datalen is : %i ", __FUNCTION__, 603 dbg("%s - uart_flush datalen is : %i ", __func__,
604 priv->len); 604 priv->len);
605 status = read_immediate(port, priv->buf, priv->len); 605 status = read_immediate(port, priv->buf, priv->len);
606 if (status != IUU_OPERATION_OK) { 606 if (status != IUU_OPERATION_OK) {
607 dbg("%s - uart_flush_read error", __FUNCTION__); 607 dbg("%s - uart_flush_read error", __func__);
608 return status; 608 return status;
609 } 609 }
610 } 610 }
611 } 611 }
612 dbg("%s - uart_flush_read OK!", __FUNCTION__); 612 dbg("%s - uart_flush_read OK!", __func__);
613 iuu_led(port, 0, 0xF000, 0, 0xFF); 613 iuu_led(port, 0, 0xF000, 0, 0xFF);
614 return status; 614 return status;
615} 615}
@@ -619,20 +619,20 @@ static void read_buf_callback(struct urb *urb)
619 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 619 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
620 unsigned char *data = urb->transfer_buffer; 620 unsigned char *data = urb->transfer_buffer;
621 struct tty_struct *tty; 621 struct tty_struct *tty;
622 dbg("%s - urb->status = %d", __FUNCTION__, urb->status); 622 dbg("%s - urb->status = %d", __func__, urb->status);
623 623
624 if (urb->status) { 624 if (urb->status) {
625 dbg("%s - urb->status = %d", __FUNCTION__, urb->status); 625 dbg("%s - urb->status = %d", __func__, urb->status);
626 if (urb->status == -EPROTO) { 626 if (urb->status == -EPROTO) {
627 /* reschedule needed */ 627 /* reschedule needed */
628 } 628 }
629 return; 629 return;
630 } 630 }
631 631
632 dbg("%s - %i chars to write", __FUNCTION__, urb->actual_length); 632 dbg("%s - %i chars to write", __func__, urb->actual_length);
633 tty = port->tty; 633 tty = port->tty;
634 if (data == NULL) 634 if (data == NULL)
635 dbg("%s - data is NULL !!!", __FUNCTION__); 635 dbg("%s - data is NULL !!!", __func__);
636 if (tty && urb->actual_length && data) { 636 if (tty && urb->actual_length && data) {
637 tty_insert_flip_string(tty, data, urb->actual_length); 637 tty_insert_flip_string(tty, data, urb->actual_length);
638 tty_flip_buffer_push(tty); 638 tty_flip_buffer_push(tty);
@@ -647,7 +647,7 @@ static int iuu_bulk_write(struct usb_serial_port *port)
647 int result; 647 int result;
648 int i; 648 int i;
649 char *buf_ptr = port->write_urb->transfer_buffer; 649 char *buf_ptr = port->write_urb->transfer_buffer;
650 dbg("%s - enter", __FUNCTION__); 650 dbg("%s - enter", __func__);
651 651
652 *buf_ptr++ = IUU_UART_ESC; 652 *buf_ptr++ = IUU_UART_ESC;
653 *buf_ptr++ = IUU_UART_TX; 653 *buf_ptr++ = IUU_UART_TX;
@@ -660,7 +660,7 @@ static int iuu_bulk_write(struct usb_serial_port *port)
660 sprintf(priv->dbgbuf + i*2 , 660 sprintf(priv->dbgbuf + i*2 ,
661 "%02X", priv->writebuf[i]); 661 "%02X", priv->writebuf[i]);
662 priv->dbgbuf[priv->writelen+i*2] = 0; 662 priv->dbgbuf[priv->writelen+i*2] = 0;
663 dbg("%s - writing %i chars : %s", __FUNCTION__, 663 dbg("%s - writing %i chars : %s", __func__,
664 priv->writelen, priv->dbgbuf); 664 priv->writelen, priv->dbgbuf);
665 } 665 }
666 usb_fill_bulk_urb(port->write_urb, port->serial->dev, 666 usb_fill_bulk_urb(port->write_urb, port->serial->dev,
@@ -679,7 +679,7 @@ static int iuu_bulk_write(struct usb_serial_port *port)
679static int iuu_read_buf(struct usb_serial_port *port, int len) 679static int iuu_read_buf(struct usb_serial_port *port, int len)
680{ 680{
681 int result; 681 int result;
682 dbg("%s - enter", __FUNCTION__); 682 dbg("%s - enter", __func__);
683 683
684 usb_fill_bulk_urb(port->read_urb, port->serial->dev, 684 usb_fill_bulk_urb(port->read_urb, port->serial->dev,
685 usb_rcvbulkpipe(port->serial->dev, 685 usb_rcvbulkpipe(port->serial->dev,
@@ -701,21 +701,21 @@ static void iuu_uart_read_callback(struct urb *urb)
701 unsigned char *data = urb->transfer_buffer; 701 unsigned char *data = urb->transfer_buffer;
702 priv->poll++; 702 priv->poll++;
703 703
704 dbg("%s - enter", __FUNCTION__); 704 dbg("%s - enter", __func__);
705 705
706 if (urb->status) { 706 if (urb->status) {
707 dbg("%s - urb->status = %d", __FUNCTION__, urb->status); 707 dbg("%s - urb->status = %d", __func__, urb->status);
708 /* error stop all */ 708 /* error stop all */
709 return; 709 return;
710 } 710 }
711 if (data == NULL) 711 if (data == NULL)
712 dbg("%s - data is NULL !!!", __FUNCTION__); 712 dbg("%s - data is NULL !!!", __func__);
713 713
714 if (urb->actual_length == 1 && data != NULL) 714 if (urb->actual_length == 1 && data != NULL)
715 len = (int) data[0]; 715 len = (int) data[0];
716 716
717 if (urb->actual_length > 1) { 717 if (urb->actual_length > 1) {
718 dbg("%s - urb->actual_length = %i", __FUNCTION__, 718 dbg("%s - urb->actual_length = %i", __func__,
719 urb->actual_length); 719 urb->actual_length);
720 error = 1; 720 error = 1;
721 return; 721 return;
@@ -724,7 +724,7 @@ static void iuu_uart_read_callback(struct urb *urb)
724 724
725 if (len > 0 && error == 0) { 725 if (len > 0 && error == 0) {
726 dbg("%s - call read buf - len to read is %i ", 726 dbg("%s - call read buf - len to read is %i ",
727 __FUNCTION__, len); 727 __func__, len);
728 status = iuu_read_buf(port, len); 728 status = iuu_read_buf(port, len);
729 return; 729 return;
730 } 730 }
@@ -750,7 +750,7 @@ static void iuu_uart_read_callback(struct urb *urb)
750 } 750 }
751 spin_unlock_irqrestore(&priv->lock, flags); 751 spin_unlock_irqrestore(&priv->lock, flags);
752 /* if nothing to write call again rxcmd */ 752 /* if nothing to write call again rxcmd */
753 dbg("%s - rxcmd recall", __FUNCTION__); 753 dbg("%s - rxcmd recall", __func__);
754 iuu_led_activity_off(urb); 754 iuu_led_activity_off(urb);
755 return; 755 return;
756} 756}
@@ -760,7 +760,7 @@ static int iuu_uart_write(struct usb_serial_port *port, const u8 *buf,
760{ 760{
761 struct iuu_private *priv = usb_get_serial_port_data(port); 761 struct iuu_private *priv = usb_get_serial_port_data(port);
762 unsigned int flags; 762 unsigned int flags;
763 dbg("%s - enter", __FUNCTION__); 763 dbg("%s - enter", __func__);
764 764
765 if (count > 256) 765 if (count > 256)
766 return -ENOMEM; 766 return -ENOMEM;
@@ -783,12 +783,12 @@ static void read_rxcmd_callback(struct urb *urb)
783{ 783{
784 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 784 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
785 int result; 785 int result;
786 dbg("%s - enter", __FUNCTION__); 786 dbg("%s - enter", __func__);
787 787
788 dbg("%s - urb->status = %d", __FUNCTION__, urb->status); 788 dbg("%s - urb->status = %d", __func__, urb->status);
789 789
790 if (urb->status) { 790 if (urb->status) {
791 dbg("%s - urb->status = %d", __FUNCTION__, urb->status); 791 dbg("%s - urb->status = %d", __func__, urb->status);
792 /* error stop all */ 792 /* error stop all */
793 return; 793 return;
794 } 794 }
@@ -799,7 +799,7 @@ static void read_rxcmd_callback(struct urb *urb)
799 port->read_urb->transfer_buffer, 256, 799 port->read_urb->transfer_buffer, 256,
800 iuu_uart_read_callback, port); 800 iuu_uart_read_callback, port);
801 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 801 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
802 dbg("%s - submit result = %d", __FUNCTION__, result); 802 dbg("%s - submit result = %d", __func__, result);
803 return; 803 return;
804} 804}
805 805
@@ -820,13 +820,13 @@ static int iuu_uart_on(struct usb_serial_port *port)
820 820
821 status = bulk_immediate(port, buf, 4); 821 status = bulk_immediate(port, buf, 4);
822 if (status != IUU_OPERATION_OK) { 822 if (status != IUU_OPERATION_OK) {
823 dbg("%s - uart_on error", __FUNCTION__); 823 dbg("%s - uart_on error", __func__);
824 goto uart_enable_failed; 824 goto uart_enable_failed;
825 } 825 }
826 /* iuu_reset() the card after iuu_uart_on() */ 826 /* iuu_reset() the card after iuu_uart_on() */
827 status = iuu_uart_flush(port); 827 status = iuu_uart_flush(port);
828 if (status != IUU_OPERATION_OK) 828 if (status != IUU_OPERATION_OK)
829 dbg("%s - uart_flush error", __FUNCTION__); 829 dbg("%s - uart_flush error", __func__);
830uart_enable_failed: 830uart_enable_failed:
831 kfree(buf); 831 kfree(buf);
832 return status; 832 return status;
@@ -844,7 +844,7 @@ static int iuu_uart_off(struct usb_serial_port *port)
844 844
845 status = bulk_immediate(port, buf, 1); 845 status = bulk_immediate(port, buf, 1);
846 if (status != IUU_OPERATION_OK) 846 if (status != IUU_OPERATION_OK)
847 dbg("%s - uart_off error", __FUNCTION__); 847 dbg("%s - uart_off error", __func__);
848 848
849 kfree(buf); 849 kfree(buf);
850 return status; 850 return status;
@@ -938,7 +938,7 @@ static int iuu_uart_baud(struct usb_serial_port *port, u32 baud,
938 938
939 status = bulk_immediate(port, dataout, DataCount); 939 status = bulk_immediate(port, dataout, DataCount);
940 if (status != IUU_OPERATION_OK) 940 if (status != IUU_OPERATION_OK)
941 dbg("%s - uart_off error", __FUNCTION__); 941 dbg("%s - uart_off error", __func__);
942 kfree(dataout); 942 kfree(dataout);
943 return status; 943 return status;
944} 944}
@@ -960,7 +960,7 @@ static void iuu_close(struct usb_serial_port *port, struct file *filp)
960 if (!serial) 960 if (!serial)
961 return; 961 return;
962 962
963 dbg("%s - port %d", __FUNCTION__, port->number); 963 dbg("%s - port %d", __func__, port->number);
964 964
965 iuu_uart_off(port); 965 iuu_uart_off(port);
966 if (serial->dev) { 966 if (serial->dev) {
@@ -977,7 +977,7 @@ static void iuu_close(struct usb_serial_port *port, struct file *filp)
977 } 977 }
978 /* free writebuf */ 978 /* free writebuf */
979 /* shutdown our urbs */ 979 /* shutdown our urbs */
980 dbg("%s - shutting down urbs", __FUNCTION__); 980 dbg("%s - shutting down urbs", __func__);
981 usb_kill_urb(port->write_urb); 981 usb_kill_urb(port->write_urb);
982 usb_kill_urb(port->read_urb); 982 usb_kill_urb(port->read_urb);
983 usb_kill_urb(port->interrupt_in_urb); 983 usb_kill_urb(port->interrupt_in_urb);
@@ -998,7 +998,7 @@ static int iuu_open(struct usb_serial_port *port, struct file *filp)
998 unsigned long flags; 998 unsigned long flags;
999 struct iuu_private *priv = usb_get_serial_port_data(port); 999 struct iuu_private *priv = usb_get_serial_port_data(port);
1000 1000
1001 dbg("%s - port %d", __FUNCTION__, port->number); 1001 dbg("%s - port %d", __func__, port->number);
1002 usb_clear_halt(serial->dev, port->write_urb->pipe); 1002 usb_clear_halt(serial->dev, port->write_urb->pipe);
1003 usb_clear_halt(serial->dev, port->read_urb->pipe); 1003 usb_clear_halt(serial->dev, port->read_urb->pipe);
1004 1004
@@ -1135,7 +1135,7 @@ static int iuu_open(struct usb_serial_port *port, struct file *filp)
1135 1135
1136 iuu_uart_flush(port); 1136 iuu_uart_flush(port);
1137 1137
1138 dbg("%s - initialization done", __FUNCTION__); 1138 dbg("%s - initialization done", __func__);
1139 1139
1140 memset(port->write_urb->transfer_buffer, IUU_UART_RX, 1); 1140 memset(port->write_urb->transfer_buffer, IUU_UART_RX, 1);
1141 usb_fill_bulk_urb(port->write_urb, port->serial->dev, 1141 usb_fill_bulk_urb(port->write_urb, port->serial->dev,
@@ -1147,11 +1147,11 @@ static int iuu_open(struct usb_serial_port *port, struct file *filp)
1147 1147
1148 if (result) { 1148 if (result) {
1149 dev_err(&port->dev, "%s - failed submitting read urb," 1149 dev_err(&port->dev, "%s - failed submitting read urb,"
1150 " error %d\n", __FUNCTION__, result); 1150 " error %d\n", __func__, result);
1151 iuu_close(port, NULL); 1151 iuu_close(port, NULL);
1152 return -EPROTO; 1152 return -EPROTO;
1153 } else { 1153 } else {
1154 dbg("%s - rxcmd OK", __FUNCTION__); 1154 dbg("%s - rxcmd OK", __func__);
1155 } 1155 }
1156 return result; 1156 return result;
1157} 1157}
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index ea7bba69f4da..857c5312555a 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -244,13 +244,13 @@ module_exit(keyspan_exit);
244 244
245static void keyspan_rx_throttle (struct usb_serial_port *port) 245static void keyspan_rx_throttle (struct usb_serial_port *port)
246{ 246{
247 dbg("%s - port %d", __FUNCTION__, port->number); 247 dbg("%s - port %d", __func__, port->number);
248} 248}
249 249
250 250
251static void keyspan_rx_unthrottle (struct usb_serial_port *port) 251static void keyspan_rx_unthrottle (struct usb_serial_port *port)
252{ 252{
253 dbg("%s - port %d", __FUNCTION__, port->number); 253 dbg("%s - port %d", __func__, port->number);
254} 254}
255 255
256 256
@@ -258,7 +258,7 @@ static void keyspan_break_ctl (struct usb_serial_port *port, int break_state)
258{ 258{
259 struct keyspan_port_private *p_priv; 259 struct keyspan_port_private *p_priv;
260 260
261 dbg("%s", __FUNCTION__); 261 dbg("%s", __func__);
262 262
263 p_priv = usb_get_serial_port_data(port); 263 p_priv = usb_get_serial_port_data(port);
264 264
@@ -280,7 +280,7 @@ static void keyspan_set_termios (struct usb_serial_port *port,
280 unsigned int cflag; 280 unsigned int cflag;
281 struct tty_struct *tty = port->tty; 281 struct tty_struct *tty = port->tty;
282 282
283 dbg("%s", __FUNCTION__); 283 dbg("%s", __func__);
284 284
285 p_priv = usb_get_serial_port_data(port); 285 p_priv = usb_get_serial_port_data(port);
286 d_details = p_priv->device_details; 286 d_details = p_priv->device_details;
@@ -377,7 +377,7 @@ static int keyspan_write(struct usb_serial_port *port,
377 } 377 }
378 378
379 dbg("%s - for port %d (%d chars), flip=%d", 379 dbg("%s - for port %d (%d chars), flip=%d",
380 __FUNCTION__, port->number, count, p_priv->out_flip); 380 __func__, port->number, count, p_priv->out_flip);
381 381
382 for (left = count; left > 0; left -= todo) { 382 for (left = count; left > 0; left -= todo) {
383 todo = left; 383 todo = left;
@@ -389,11 +389,11 @@ static int keyspan_write(struct usb_serial_port *port,
389 /* Check we have a valid urb/endpoint before we use it... */ 389 /* Check we have a valid urb/endpoint before we use it... */
390 if ((this_urb = p_priv->out_urbs[flip]) == NULL) { 390 if ((this_urb = p_priv->out_urbs[flip]) == NULL) {
391 /* no bulk out, so return 0 bytes written */ 391 /* no bulk out, so return 0 bytes written */
392 dbg("%s - no output urb :(", __FUNCTION__); 392 dbg("%s - no output urb :(", __func__);
393 return count; 393 return count;
394 } 394 }
395 395
396 dbg("%s - endpoint %d flip %d", __FUNCTION__, usb_pipeendpoint(this_urb->pipe), flip); 396 dbg("%s - endpoint %d flip %d", __func__, usb_pipeendpoint(this_urb->pipe), flip);
397 397
398 if (this_urb->status == -EINPROGRESS) { 398 if (this_urb->status == -EINPROGRESS) {
399 if (time_before(jiffies, p_priv->tx_start_time[flip] + 10 * HZ)) 399 if (time_before(jiffies, p_priv->tx_start_time[flip] + 10 * HZ))
@@ -435,13 +435,13 @@ static void usa26_indat_callback(struct urb *urb)
435 unsigned char *data = urb->transfer_buffer; 435 unsigned char *data = urb->transfer_buffer;
436 int status = urb->status; 436 int status = urb->status;
437 437
438 dbg ("%s", __FUNCTION__); 438 dbg ("%s", __func__);
439 439
440 endpoint = usb_pipeendpoint(urb->pipe); 440 endpoint = usb_pipeendpoint(urb->pipe);
441 441
442 if (status) { 442 if (status) {
443 dbg("%s - nonzero status: %x on endpoint %d.", 443 dbg("%s - nonzero status: %x on endpoint %d.",
444 __FUNCTION__, status, endpoint); 444 __func__, status, endpoint);
445 return; 445 return;
446 } 446 }
447 447
@@ -459,7 +459,7 @@ static void usa26_indat_callback(struct urb *urb)
459 } 459 }
460 } else { 460 } else {
461 /* some bytes had errors, every byte has status */ 461 /* some bytes had errors, every byte has status */
462 dbg("%s - RX error!!!!", __FUNCTION__); 462 dbg("%s - RX error!!!!", __func__);
463 for (i = 0; i + 1 < urb->actual_length; i += 2) { 463 for (i = 0; i + 1 < urb->actual_length; i += 2) {
464 int stat = data[i], flag = 0; 464 int stat = data[i], flag = 0;
465 if (stat & RXERROR_OVERRUN) 465 if (stat & RXERROR_OVERRUN)
@@ -479,7 +479,7 @@ static void usa26_indat_callback(struct urb *urb)
479 urb->dev = port->serial->dev; 479 urb->dev = port->serial->dev;
480 if (port->open_count) 480 if (port->open_count)
481 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 481 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
482 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 482 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
483 } 483 }
484 return; 484 return;
485} 485}
@@ -492,7 +492,7 @@ static void usa2x_outdat_callback(struct urb *urb)
492 492
493 port = (struct usb_serial_port *) urb->context; 493 port = (struct usb_serial_port *) urb->context;
494 p_priv = usb_get_serial_port_data(port); 494 p_priv = usb_get_serial_port_data(port);
495 dbg ("%s - urb %d", __FUNCTION__, urb == p_priv->out_urbs[1]); 495 dbg ("%s - urb %d", __func__, urb == p_priv->out_urbs[1]);
496 496
497 if (port->open_count) 497 if (port->open_count)
498 usb_serial_port_softint(port); 498 usb_serial_port_softint(port);
@@ -500,7 +500,7 @@ static void usa2x_outdat_callback(struct urb *urb)
500 500
501static void usa26_inack_callback(struct urb *urb) 501static void usa26_inack_callback(struct urb *urb)
502{ 502{
503 dbg ("%s", __FUNCTION__); 503 dbg ("%s", __func__);
504 504
505} 505}
506 506
@@ -513,7 +513,7 @@ static void usa26_outcont_callback(struct urb *urb)
513 p_priv = usb_get_serial_port_data(port); 513 p_priv = usb_get_serial_port_data(port);
514 514
515 if (p_priv->resend_cont) { 515 if (p_priv->resend_cont) {
516 dbg ("%s - sending setup", __FUNCTION__); 516 dbg ("%s - sending setup", __func__);
517 keyspan_usa26_send_setup(port->serial, port, p_priv->resend_cont - 1); 517 keyspan_usa26_send_setup(port->serial, port, p_priv->resend_cont - 1);
518 } 518 }
519} 519}
@@ -531,11 +531,11 @@ static void usa26_instat_callback(struct urb *urb)
531 serial = (struct usb_serial *) urb->context; 531 serial = (struct usb_serial *) urb->context;
532 532
533 if (status) { 533 if (status) {
534 dbg("%s - nonzero status: %x", __FUNCTION__, status); 534 dbg("%s - nonzero status: %x", __func__, status);
535 return; 535 return;
536 } 536 }
537 if (urb->actual_length != 9) { 537 if (urb->actual_length != 9) {
538 dbg("%s - %d byte report??", __FUNCTION__, urb->actual_length); 538 dbg("%s - %d byte report??", __func__, urb->actual_length);
539 goto exit; 539 goto exit;
540 } 540 }
541 541
@@ -543,7 +543,7 @@ static void usa26_instat_callback(struct urb *urb)
543 543
544#if 0 544#if 0
545 dbg("%s - port status: port %d cts %d dcd %d dsr %d ri %d toff %d txoff %d rxen %d cr %d", 545 dbg("%s - port status: port %d cts %d dcd %d dsr %d ri %d toff %d txoff %d rxen %d cr %d",
546 __FUNCTION__, msg->port, msg->hskia_cts, msg->gpia_dcd, msg->dsr, msg->ri, msg->_txOff, 546 __func__, msg->port, msg->hskia_cts, msg->gpia_dcd, msg->dsr, msg->ri, msg->_txOff,
547 msg->_txXoff, msg->rxEnabled, msg->controlResponse); 547 msg->_txXoff, msg->rxEnabled, msg->controlResponse);
548#endif 548#endif
549 549
@@ -552,7 +552,7 @@ static void usa26_instat_callback(struct urb *urb)
552 552
553 /* Check port number from message and retrieve private data */ 553 /* Check port number from message and retrieve private data */
554 if (msg->port >= serial->num_ports) { 554 if (msg->port >= serial->num_ports) {
555 dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port); 555 dbg ("%s - Unexpected port number %d", __func__, msg->port);
556 goto exit; 556 goto exit;
557 } 557 }
558 port = serial->port[msg->port]; 558 port = serial->port[msg->port];
@@ -576,14 +576,14 @@ static void usa26_instat_callback(struct urb *urb)
576 /* Resubmit urb so we continue receiving */ 576 /* Resubmit urb so we continue receiving */
577 urb->dev = serial->dev; 577 urb->dev = serial->dev;
578 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 578 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
579 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 579 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
580 } 580 }
581exit: ; 581exit: ;
582} 582}
583 583
584static void usa26_glocont_callback(struct urb *urb) 584static void usa26_glocont_callback(struct urb *urb)
585{ 585{
586 dbg ("%s", __FUNCTION__); 586 dbg ("%s", __func__);
587 587
588} 588}
589 589
@@ -597,7 +597,7 @@ static void usa28_indat_callback(struct urb *urb)
597 struct keyspan_port_private *p_priv; 597 struct keyspan_port_private *p_priv;
598 int status = urb->status; 598 int status = urb->status;
599 599
600 dbg ("%s", __FUNCTION__); 600 dbg ("%s", __func__);
601 601
602 port = (struct usb_serial_port *) urb->context; 602 port = (struct usb_serial_port *) urb->context;
603 p_priv = usb_get_serial_port_data(port); 603 p_priv = usb_get_serial_port_data(port);
@@ -609,7 +609,7 @@ static void usa28_indat_callback(struct urb *urb)
609 do { 609 do {
610 if (status) { 610 if (status) {
611 dbg("%s - nonzero status: %x on endpoint %d.", 611 dbg("%s - nonzero status: %x on endpoint %d.",
612 __FUNCTION__, status, usb_pipeendpoint(urb->pipe)); 612 __func__, status, usb_pipeendpoint(urb->pipe));
613 return; 613 return;
614 } 614 }
615 615
@@ -629,7 +629,7 @@ static void usa28_indat_callback(struct urb *urb)
629 urb->dev = port->serial->dev; 629 urb->dev = port->serial->dev;
630 if (port->open_count) 630 if (port->open_count)
631 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 631 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
632 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 632 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
633 } 633 }
634 p_priv->in_flip ^= 1; 634 p_priv->in_flip ^= 1;
635 635
@@ -639,7 +639,7 @@ static void usa28_indat_callback(struct urb *urb)
639 639
640static void usa28_inack_callback(struct urb *urb) 640static void usa28_inack_callback(struct urb *urb)
641{ 641{
642 dbg ("%s", __FUNCTION__); 642 dbg ("%s", __func__);
643} 643}
644 644
645static void usa28_outcont_callback(struct urb *urb) 645static void usa28_outcont_callback(struct urb *urb)
@@ -651,7 +651,7 @@ static void usa28_outcont_callback(struct urb *urb)
651 p_priv = usb_get_serial_port_data(port); 651 p_priv = usb_get_serial_port_data(port);
652 652
653 if (p_priv->resend_cont) { 653 if (p_priv->resend_cont) {
654 dbg ("%s - sending setup", __FUNCTION__); 654 dbg ("%s - sending setup", __func__);
655 keyspan_usa28_send_setup(port->serial, port, p_priv->resend_cont - 1); 655 keyspan_usa28_send_setup(port->serial, port, p_priv->resend_cont - 1);
656 } 656 }
657} 657}
@@ -670,16 +670,16 @@ static void usa28_instat_callback(struct urb *urb)
670 serial = (struct usb_serial *) urb->context; 670 serial = (struct usb_serial *) urb->context;
671 671
672 if (status) { 672 if (status) {
673 dbg("%s - nonzero status: %x", __FUNCTION__, status); 673 dbg("%s - nonzero status: %x", __func__, status);
674 return; 674 return;
675 } 675 }
676 676
677 if (urb->actual_length != sizeof(struct keyspan_usa28_portStatusMessage)) { 677 if (urb->actual_length != sizeof(struct keyspan_usa28_portStatusMessage)) {
678 dbg("%s - bad length %d", __FUNCTION__, urb->actual_length); 678 dbg("%s - bad length %d", __func__, urb->actual_length);
679 goto exit; 679 goto exit;
680 } 680 }
681 681
682 /*dbg("%s %x %x %x %x %x %x %x %x %x %x %x %x", __FUNCTION__ 682 /*dbg("%s %x %x %x %x %x %x %x %x %x %x %x %x", __func__
683 data[0], data[1], data[2], data[3], data[4], data[5], 683 data[0], data[1], data[2], data[3], data[4], data[5],
684 data[6], data[7], data[8], data[9], data[10], data[11]);*/ 684 data[6], data[7], data[8], data[9], data[10], data[11]);*/
685 685
@@ -689,7 +689,7 @@ static void usa28_instat_callback(struct urb *urb)
689 689
690 /* Check port number from message and retrieve private data */ 690 /* Check port number from message and retrieve private data */
691 if (msg->port >= serial->num_ports) { 691 if (msg->port >= serial->num_ports) {
692 dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port); 692 dbg ("%s - Unexpected port number %d", __func__, msg->port);
693 goto exit; 693 goto exit;
694 } 694 }
695 port = serial->port[msg->port]; 695 port = serial->port[msg->port];
@@ -713,14 +713,14 @@ static void usa28_instat_callback(struct urb *urb)
713 /* Resubmit urb so we continue receiving */ 713 /* Resubmit urb so we continue receiving */
714 urb->dev = serial->dev; 714 urb->dev = serial->dev;
715 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 715 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
716 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 716 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
717 } 717 }
718exit: ; 718exit: ;
719} 719}
720 720
721static void usa28_glocont_callback(struct urb *urb) 721static void usa28_glocont_callback(struct urb *urb)
722{ 722{
723 dbg ("%s", __FUNCTION__); 723 dbg ("%s", __func__);
724} 724}
725 725
726 726
@@ -731,7 +731,7 @@ static void usa49_glocont_callback(struct urb *urb)
731 struct keyspan_port_private *p_priv; 731 struct keyspan_port_private *p_priv;
732 int i; 732 int i;
733 733
734 dbg ("%s", __FUNCTION__); 734 dbg ("%s", __func__);
735 735
736 serial = (struct usb_serial *) urb->context; 736 serial = (struct usb_serial *) urb->context;
737 for (i = 0; i < serial->num_ports; ++i) { 737 for (i = 0; i < serial->num_ports; ++i) {
@@ -739,7 +739,7 @@ static void usa49_glocont_callback(struct urb *urb)
739 p_priv = usb_get_serial_port_data(port); 739 p_priv = usb_get_serial_port_data(port);
740 740
741 if (p_priv->resend_cont) { 741 if (p_priv->resend_cont) {
742 dbg ("%s - sending setup", __FUNCTION__); 742 dbg ("%s - sending setup", __func__);
743 keyspan_usa49_send_setup(serial, port, p_priv->resend_cont - 1); 743 keyspan_usa49_send_setup(serial, port, p_priv->resend_cont - 1);
744 break; 744 break;
745 } 745 }
@@ -759,21 +759,21 @@ static void usa49_instat_callback(struct urb *urb)
759 int old_dcd_state; 759 int old_dcd_state;
760 int status = urb->status; 760 int status = urb->status;
761 761
762 dbg ("%s", __FUNCTION__); 762 dbg ("%s", __func__);
763 763
764 serial = (struct usb_serial *) urb->context; 764 serial = (struct usb_serial *) urb->context;
765 765
766 if (status) { 766 if (status) {
767 dbg("%s - nonzero status: %x", __FUNCTION__, status); 767 dbg("%s - nonzero status: %x", __func__, status);
768 return; 768 return;
769 } 769 }
770 770
771 if (urb->actual_length != sizeof(struct keyspan_usa49_portStatusMessage)) { 771 if (urb->actual_length != sizeof(struct keyspan_usa49_portStatusMessage)) {
772 dbg("%s - bad length %d", __FUNCTION__, urb->actual_length); 772 dbg("%s - bad length %d", __func__, urb->actual_length);
773 goto exit; 773 goto exit;
774 } 774 }
775 775
776 /*dbg(" %x %x %x %x %x %x %x %x %x %x %x", __FUNCTION__, 776 /*dbg(" %x %x %x %x %x %x %x %x %x %x %x", __func__,
777 data[0], data[1], data[2], data[3], data[4], data[5], 777 data[0], data[1], data[2], data[3], data[4], data[5],
778 data[6], data[7], data[8], data[9], data[10]);*/ 778 data[6], data[7], data[8], data[9], data[10]);*/
779 779
@@ -782,7 +782,7 @@ static void usa49_instat_callback(struct urb *urb)
782 782
783 /* Check port number from message and retrieve private data */ 783 /* Check port number from message and retrieve private data */
784 if (msg->portNumber >= serial->num_ports) { 784 if (msg->portNumber >= serial->num_ports) {
785 dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->portNumber); 785 dbg ("%s - Unexpected port number %d", __func__, msg->portNumber);
786 goto exit; 786 goto exit;
787 } 787 }
788 port = serial->port[msg->portNumber]; 788 port = serial->port[msg->portNumber];
@@ -807,14 +807,14 @@ static void usa49_instat_callback(struct urb *urb)
807 urb->dev = serial->dev; 807 urb->dev = serial->dev;
808 808
809 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 809 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
810 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 810 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
811 } 811 }
812exit: ; 812exit: ;
813} 813}
814 814
815static void usa49_inack_callback(struct urb *urb) 815static void usa49_inack_callback(struct urb *urb)
816{ 816{
817 dbg ("%s", __FUNCTION__); 817 dbg ("%s", __func__);
818} 818}
819 819
820static void usa49_indat_callback(struct urb *urb) 820static void usa49_indat_callback(struct urb *urb)
@@ -826,12 +826,12 @@ static void usa49_indat_callback(struct urb *urb)
826 unsigned char *data = urb->transfer_buffer; 826 unsigned char *data = urb->transfer_buffer;
827 int status = urb->status; 827 int status = urb->status;
828 828
829 dbg ("%s", __FUNCTION__); 829 dbg ("%s", __func__);
830 830
831 endpoint = usb_pipeendpoint(urb->pipe); 831 endpoint = usb_pipeendpoint(urb->pipe);
832 832
833 if (status) { 833 if (status) {
834 dbg("%s - nonzero status: %x on endpoint %d.", __FUNCTION__, 834 dbg("%s - nonzero status: %x on endpoint %d.", __func__,
835 status, endpoint); 835 status, endpoint);
836 return; 836 return;
837 } 837 }
@@ -866,7 +866,7 @@ static void usa49_indat_callback(struct urb *urb)
866 urb->dev = port->serial->dev; 866 urb->dev = port->serial->dev;
867 if (port->open_count) 867 if (port->open_count)
868 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 868 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
869 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 869 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
870 } 870 }
871} 871}
872 872
@@ -879,12 +879,12 @@ static void usa49wg_indat_callback(struct urb *urb)
879 unsigned char *data = urb->transfer_buffer; 879 unsigned char *data = urb->transfer_buffer;
880 int status = urb->status; 880 int status = urb->status;
881 881
882 dbg ("%s", __FUNCTION__); 882 dbg ("%s", __func__);
883 883
884 serial = urb->context; 884 serial = urb->context;
885 885
886 if (status) { 886 if (status) {
887 dbg("%s - nonzero status: %x", __FUNCTION__, status); 887 dbg("%s - nonzero status: %x", __func__, status);
888 return; 888 return;
889 } 889 }
890 890
@@ -898,7 +898,7 @@ static void usa49wg_indat_callback(struct urb *urb)
898 /* Check port number from message*/ 898 /* Check port number from message*/
899 if (data[i] >= serial->num_ports) { 899 if (data[i] >= serial->num_ports) {
900 dbg ("%s - Unexpected port number %d", 900 dbg ("%s - Unexpected port number %d",
901 __FUNCTION__, data[i]); 901 __func__, data[i]);
902 return; 902 return;
903 } 903 }
904 port = serial->port[data[i++]]; 904 port = serial->port[data[i++]];
@@ -944,13 +944,13 @@ static void usa49wg_indat_callback(struct urb *urb)
944 944
945 err = usb_submit_urb(urb, GFP_ATOMIC); 945 err = usb_submit_urb(urb, GFP_ATOMIC);
946 if (err != 0) 946 if (err != 0)
947 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 947 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
948} 948}
949 949
950/* not used, usa-49 doesn't have per-port control endpoints */ 950/* not used, usa-49 doesn't have per-port control endpoints */
951static void usa49_outcont_callback(struct urb *urb) 951static void usa49_outcont_callback(struct urb *urb)
952{ 952{
953 dbg ("%s", __FUNCTION__); 953 dbg ("%s", __func__);
954} 954}
955 955
956static void usa90_indat_callback(struct urb *urb) 956static void usa90_indat_callback(struct urb *urb)
@@ -963,13 +963,13 @@ static void usa90_indat_callback(struct urb *urb)
963 unsigned char *data = urb->transfer_buffer; 963 unsigned char *data = urb->transfer_buffer;
964 int status = urb->status; 964 int status = urb->status;
965 965
966 dbg ("%s", __FUNCTION__); 966 dbg ("%s", __func__);
967 967
968 endpoint = usb_pipeendpoint(urb->pipe); 968 endpoint = usb_pipeendpoint(urb->pipe);
969 969
970 if (status) { 970 if (status) {
971 dbg("%s - nonzero status: %x on endpoint %d.", 971 dbg("%s - nonzero status: %x on endpoint %d.",
972 __FUNCTION__, status, endpoint); 972 __func__, status, endpoint);
973 return; 973 return;
974 } 974 }
975 975
@@ -1000,7 +1000,7 @@ static void usa90_indat_callback(struct urb *urb)
1000 } 1000 }
1001 else { 1001 else {
1002 /* some bytes had errors, every byte has status */ 1002 /* some bytes had errors, every byte has status */
1003 dbg("%s - RX error!!!!", __FUNCTION__); 1003 dbg("%s - RX error!!!!", __func__);
1004 for (i = 0; i + 1 < urb->actual_length; i += 2) { 1004 for (i = 0; i + 1 < urb->actual_length; i += 2) {
1005 int stat = data[i], flag = 0; 1005 int stat = data[i], flag = 0;
1006 if (stat & RXERROR_OVERRUN) 1006 if (stat & RXERROR_OVERRUN)
@@ -1021,7 +1021,7 @@ static void usa90_indat_callback(struct urb *urb)
1021 urb->dev = port->serial->dev; 1021 urb->dev = port->serial->dev;
1022 if (port->open_count) 1022 if (port->open_count)
1023 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 1023 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
1024 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 1024 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
1025 } 1025 }
1026 return; 1026 return;
1027} 1027}
@@ -1040,11 +1040,11 @@ static void usa90_instat_callback(struct urb *urb)
1040 serial = (struct usb_serial *) urb->context; 1040 serial = (struct usb_serial *) urb->context;
1041 1041
1042 if (status) { 1042 if (status) {
1043 dbg("%s - nonzero status: %x", __FUNCTION__, status); 1043 dbg("%s - nonzero status: %x", __func__, status);
1044 return; 1044 return;
1045 } 1045 }
1046 if (urb->actual_length < 14) { 1046 if (urb->actual_length < 14) {
1047 dbg("%s - %d byte report??", __FUNCTION__, urb->actual_length); 1047 dbg("%s - %d byte report??", __func__, urb->actual_length);
1048 goto exit; 1048 goto exit;
1049 } 1049 }
1050 1050
@@ -1073,7 +1073,7 @@ static void usa90_instat_callback(struct urb *urb)
1073 /* Resubmit urb so we continue receiving */ 1073 /* Resubmit urb so we continue receiving */
1074 urb->dev = serial->dev; 1074 urb->dev = serial->dev;
1075 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 1075 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
1076 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 1076 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
1077 } 1077 }
1078exit: 1078exit:
1079 ; 1079 ;
@@ -1088,7 +1088,7 @@ static void usa90_outcont_callback(struct urb *urb)
1088 p_priv = usb_get_serial_port_data(port); 1088 p_priv = usb_get_serial_port_data(port);
1089 1089
1090 if (p_priv->resend_cont) { 1090 if (p_priv->resend_cont) {
1091 dbg ("%s - sending setup", __FUNCTION__); 1091 dbg ("%s - sending setup", __func__);
1092 keyspan_usa90_send_setup(port->serial, port, p_priv->resend_cont - 1); 1092 keyspan_usa90_send_setup(port->serial, port, p_priv->resend_cont - 1);
1093 } 1093 }
1094} 1094}
@@ -1105,17 +1105,17 @@ static void usa67_instat_callback(struct urb *urb)
1105 int old_dcd_state; 1105 int old_dcd_state;
1106 int status = urb->status; 1106 int status = urb->status;
1107 1107
1108 dbg ("%s", __FUNCTION__); 1108 dbg ("%s", __func__);
1109 1109
1110 serial = urb->context; 1110 serial = urb->context;
1111 1111
1112 if (status) { 1112 if (status) {
1113 dbg("%s - nonzero status: %x", __FUNCTION__, status); 1113 dbg("%s - nonzero status: %x", __func__, status);
1114 return; 1114 return;
1115 } 1115 }
1116 1116
1117 if (urb->actual_length != sizeof(struct keyspan_usa67_portStatusMessage)) { 1117 if (urb->actual_length != sizeof(struct keyspan_usa67_portStatusMessage)) {
1118 dbg("%s - bad length %d", __FUNCTION__, urb->actual_length); 1118 dbg("%s - bad length %d", __func__, urb->actual_length);
1119 return; 1119 return;
1120 } 1120 }
1121 1121
@@ -1125,7 +1125,7 @@ static void usa67_instat_callback(struct urb *urb)
1125 1125
1126 /* Check port number from message and retrieve private data */ 1126 /* Check port number from message and retrieve private data */
1127 if (msg->port >= serial->num_ports) { 1127 if (msg->port >= serial->num_ports) {
1128 dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port); 1128 dbg ("%s - Unexpected port number %d", __func__, msg->port);
1129 return; 1129 return;
1130 } 1130 }
1131 1131
@@ -1149,7 +1149,7 @@ static void usa67_instat_callback(struct urb *urb)
1149 urb->dev = serial->dev; 1149 urb->dev = serial->dev;
1150 err = usb_submit_urb(urb, GFP_ATOMIC); 1150 err = usb_submit_urb(urb, GFP_ATOMIC);
1151 if (err != 0) 1151 if (err != 0)
1152 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 1152 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
1153} 1153}
1154 1154
1155static void usa67_glocont_callback(struct urb *urb) 1155static void usa67_glocont_callback(struct urb *urb)
@@ -1159,7 +1159,7 @@ static void usa67_glocont_callback(struct urb *urb)
1159 struct keyspan_port_private *p_priv; 1159 struct keyspan_port_private *p_priv;
1160 int i; 1160 int i;
1161 1161
1162 dbg ("%s", __FUNCTION__); 1162 dbg ("%s", __func__);
1163 1163
1164 serial = urb->context; 1164 serial = urb->context;
1165 for (i = 0; i < serial->num_ports; ++i) { 1165 for (i = 0; i < serial->num_ports; ++i) {
@@ -1167,7 +1167,7 @@ static void usa67_glocont_callback(struct urb *urb)
1167 p_priv = usb_get_serial_port_data(port); 1167 p_priv = usb_get_serial_port_data(port);
1168 1168
1169 if (p_priv->resend_cont) { 1169 if (p_priv->resend_cont) {
1170 dbg ("%s - sending setup", __FUNCTION__); 1170 dbg ("%s - sending setup", __func__);
1171 keyspan_usa67_send_setup(serial, port, 1171 keyspan_usa67_send_setup(serial, port,
1172 p_priv->resend_cont - 1); 1172 p_priv->resend_cont - 1);
1173 break; 1173 break;
@@ -1183,7 +1183,7 @@ static int keyspan_write_room (struct usb_serial_port *port)
1183 int data_len; 1183 int data_len;
1184 struct urb *this_urb; 1184 struct urb *this_urb;
1185 1185
1186 dbg("%s", __FUNCTION__); 1186 dbg("%s", __func__);
1187 p_priv = usb_get_serial_port_data(port); 1187 p_priv = usb_get_serial_port_data(port);
1188 d_details = p_priv->device_details; 1188 d_details = p_priv->device_details;
1189 1189
@@ -1228,7 +1228,7 @@ static int keyspan_open (struct usb_serial_port *port, struct file *filp)
1228 p_priv = usb_get_serial_port_data(port); 1228 p_priv = usb_get_serial_port_data(port);
1229 d_details = p_priv->device_details; 1229 d_details = p_priv->device_details;
1230 1230
1231 dbg("%s - port%d.", __FUNCTION__, port->number); 1231 dbg("%s - port%d.", __func__, port->number);
1232 1232
1233 /* Set some sane defaults */ 1233 /* Set some sane defaults */
1234 p_priv->rts_state = 1; 1234 p_priv->rts_state = 1;
@@ -1253,7 +1253,7 @@ static int keyspan_open (struct usb_serial_port *port, struct file *filp)
1253 usb_clear_halt(urb->dev, urb->pipe); 1253 usb_clear_halt(urb->dev, urb->pipe);
1254 1254
1255 if ((err = usb_submit_urb(urb, GFP_KERNEL)) != 0) { 1255 if ((err = usb_submit_urb(urb, GFP_KERNEL)) != 0) {
1256 dbg("%s - submit urb %d failed (%d)", __FUNCTION__, i, err); 1256 dbg("%s - submit urb %d failed (%d)", __func__, i, err);
1257 } 1257 }
1258 } 1258 }
1259 1259
@@ -1305,7 +1305,7 @@ static void keyspan_close(struct usb_serial_port *port, struct file *filp)
1305 struct keyspan_serial_private *s_priv; 1305 struct keyspan_serial_private *s_priv;
1306 struct keyspan_port_private *p_priv; 1306 struct keyspan_port_private *p_priv;
1307 1307
1308 dbg("%s", __FUNCTION__); 1308 dbg("%s", __func__);
1309 s_priv = usb_get_serial_data(serial); 1309 s_priv = usb_get_serial_data(serial);
1310 p_priv = usb_get_serial_port_data(port); 1310 p_priv = usb_get_serial_port_data(port);
1311 1311
@@ -1320,7 +1320,7 @@ static void keyspan_close(struct usb_serial_port *port, struct file *filp)
1320 } 1320 }
1321 1321
1322 /*while (p_priv->outcont_urb->status == -EINPROGRESS) { 1322 /*while (p_priv->outcont_urb->status == -EINPROGRESS) {
1323 dbg("%s - urb in progress", __FUNCTION__); 1323 dbg("%s - urb in progress", __func__);
1324 }*/ 1324 }*/
1325 1325
1326 p_priv->out_flip = 0; 1326 p_priv->out_flip = 0;
@@ -1484,10 +1484,10 @@ static struct urb *keyspan_setup_urb (struct usb_serial *serial, int endpoint,
1484 if (endpoint == -1) 1484 if (endpoint == -1)
1485 return NULL; /* endpoint not needed */ 1485 return NULL; /* endpoint not needed */
1486 1486
1487 dbg ("%s - alloc for endpoint %d.", __FUNCTION__, endpoint); 1487 dbg ("%s - alloc for endpoint %d.", __func__, endpoint);
1488 urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */ 1488 urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */
1489 if (urb == NULL) { 1489 if (urb == NULL) {
1490 dbg ("%s - alloc for endpoint %d failed.", __FUNCTION__, endpoint); 1490 dbg ("%s - alloc for endpoint %d failed.", __func__, endpoint);
1491 return NULL; 1491 return NULL;
1492 } 1492 }
1493 1493
@@ -1588,7 +1588,7 @@ static void keyspan_setup_urbs(struct usb_serial *serial)
1588 struct callbacks *cback; 1588 struct callbacks *cback;
1589 int endp; 1589 int endp;
1590 1590
1591 dbg ("%s", __FUNCTION__); 1591 dbg ("%s", __func__);
1592 1592
1593 s_priv = usb_get_serial_data(serial); 1593 s_priv = usb_get_serial_data(serial);
1594 d_details = s_priv->device_details; 1594 d_details = s_priv->device_details;
@@ -1662,7 +1662,7 @@ static int keyspan_usa19_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
1662 div, /* divisor */ 1662 div, /* divisor */
1663 cnt; /* inverse of divisor (programmed into 8051) */ 1663 cnt; /* inverse of divisor (programmed into 8051) */
1664 1664
1665 dbg ("%s - %d.", __FUNCTION__, baud_rate); 1665 dbg ("%s - %d.", __func__, baud_rate);
1666 1666
1667 /* prevent divide by zero... */ 1667 /* prevent divide by zero... */
1668 if( (b16 = (baud_rate * 16L)) == 0) { 1668 if( (b16 = (baud_rate * 16L)) == 0) {
@@ -1695,7 +1695,7 @@ static int keyspan_usa19_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
1695 *rate_hi = (u8) ((cnt >> 8) & 0xff); 1695 *rate_hi = (u8) ((cnt >> 8) & 0xff);
1696 } 1696 }
1697 if (rate_low && rate_hi) { 1697 if (rate_low && rate_hi) {
1698 dbg ("%s - %d %02x %02x.", __FUNCTION__, baud_rate, *rate_hi, *rate_low); 1698 dbg ("%s - %d %02x %02x.", __func__, baud_rate, *rate_hi, *rate_low);
1699 } 1699 }
1700 1700
1701 return (KEYSPAN_BAUD_RATE_OK); 1701 return (KEYSPAN_BAUD_RATE_OK);
@@ -1708,7 +1708,7 @@ static int keyspan_usa19hs_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
1708 u32 b16, /* baud rate times 16 (actual rate used internally) */ 1708 u32 b16, /* baud rate times 16 (actual rate used internally) */
1709 div; /* divisor */ 1709 div; /* divisor */
1710 1710
1711 dbg ("%s - %d.", __FUNCTION__, baud_rate); 1711 dbg ("%s - %d.", __func__, baud_rate);
1712 1712
1713 /* prevent divide by zero... */ 1713 /* prevent divide by zero... */
1714 if( (b16 = (baud_rate * 16L)) == 0) 1714 if( (b16 = (baud_rate * 16L)) == 0)
@@ -1731,7 +1731,7 @@ static int keyspan_usa19hs_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
1731 *rate_hi = (u8) ((div >> 8) & 0xff); 1731 *rate_hi = (u8) ((div >> 8) & 0xff);
1732 1732
1733 if (rate_low && rate_hi) 1733 if (rate_low && rate_hi)
1734 dbg ("%s - %d %02x %02x.", __FUNCTION__, baud_rate, *rate_hi, *rate_low); 1734 dbg ("%s - %d %02x %02x.", __func__, baud_rate, *rate_hi, *rate_low);
1735 1735
1736 return (KEYSPAN_BAUD_RATE_OK); 1736 return (KEYSPAN_BAUD_RATE_OK);
1737} 1737}
@@ -1748,7 +1748,7 @@ static int keyspan_usa19w_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
1748 u8 best_prescaler; 1748 u8 best_prescaler;
1749 int i; 1749 int i;
1750 1750
1751 dbg ("%s - %d.", __FUNCTION__, baud_rate); 1751 dbg ("%s - %d.", __func__, baud_rate);
1752 1752
1753 /* prevent divide by zero */ 1753 /* prevent divide by zero */
1754 if( (b16 = baud_rate * 16L) == 0) { 1754 if( (b16 = baud_rate * 16L) == 0) {
@@ -1796,7 +1796,7 @@ static int keyspan_usa19w_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
1796 } 1796 }
1797 if (prescaler) { 1797 if (prescaler) {
1798 *prescaler = best_prescaler; 1798 *prescaler = best_prescaler;
1799 /* dbg("%s - %d %d", __FUNCTION__, *prescaler, div); */ 1799 /* dbg("%s - %d %d", __func__, *prescaler, div); */
1800 } 1800 }
1801 return (KEYSPAN_BAUD_RATE_OK); 1801 return (KEYSPAN_BAUD_RATE_OK);
1802} 1802}
@@ -1809,7 +1809,7 @@ static int keyspan_usa28_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
1809 div, /* divisor */ 1809 div, /* divisor */
1810 cnt; /* inverse of divisor (programmed into 8051) */ 1810 cnt; /* inverse of divisor (programmed into 8051) */
1811 1811
1812 dbg ("%s - %d.", __FUNCTION__, baud_rate); 1812 dbg ("%s - %d.", __func__, baud_rate);
1813 1813
1814 /* prevent divide by zero */ 1814 /* prevent divide by zero */
1815 if ((b16 = baud_rate * 16L) == 0) 1815 if ((b16 = baud_rate * 16L) == 0)
@@ -1848,7 +1848,7 @@ static int keyspan_usa28_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
1848 if (rate_hi) { 1848 if (rate_hi) {
1849 *rate_hi = (u8) ((cnt >> 8) & 0xff); 1849 *rate_hi = (u8) ((cnt >> 8) & 0xff);
1850 } 1850 }
1851 dbg ("%s - %d OK.", __FUNCTION__, baud_rate); 1851 dbg ("%s - %d OK.", __func__, baud_rate);
1852 return (KEYSPAN_BAUD_RATE_OK); 1852 return (KEYSPAN_BAUD_RATE_OK);
1853} 1853}
1854 1854
@@ -1864,7 +1864,7 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
1864 struct urb *this_urb; 1864 struct urb *this_urb;
1865 int device_port, err; 1865 int device_port, err;
1866 1866
1867 dbg ("%s reset=%d", __FUNCTION__, reset_port); 1867 dbg ("%s reset=%d", __func__, reset_port);
1868 1868
1869 s_priv = usb_get_serial_data(serial); 1869 s_priv = usb_get_serial_data(serial);
1870 p_priv = usb_get_serial_port_data(port); 1870 p_priv = usb_get_serial_port_data(port);
@@ -1874,11 +1874,11 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
1874 outcont_urb = d_details->outcont_endpoints[port->number]; 1874 outcont_urb = d_details->outcont_endpoints[port->number];
1875 this_urb = p_priv->outcont_urb; 1875 this_urb = p_priv->outcont_urb;
1876 1876
1877 dbg("%s - endpoint %d", __FUNCTION__, usb_pipeendpoint(this_urb->pipe)); 1877 dbg("%s - endpoint %d", __func__, usb_pipeendpoint(this_urb->pipe));
1878 1878
1879 /* Make sure we have an urb then send the message */ 1879 /* Make sure we have an urb then send the message */
1880 if (this_urb == NULL) { 1880 if (this_urb == NULL) {
1881 dbg("%s - oops no urb.", __FUNCTION__); 1881 dbg("%s - oops no urb.", __func__);
1882 return -1; 1882 return -1;
1883 } 1883 }
1884 1884
@@ -1887,7 +1887,7 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
1887 if ((reset_port + 1) > p_priv->resend_cont) 1887 if ((reset_port + 1) > p_priv->resend_cont)
1888 p_priv->resend_cont = reset_port + 1; 1888 p_priv->resend_cont = reset_port + 1;
1889 if (this_urb->status == -EINPROGRESS) { 1889 if (this_urb->status == -EINPROGRESS) {
1890 /* dbg ("%s - already writing", __FUNCTION__); */ 1890 /* dbg ("%s - already writing", __func__); */
1891 mdelay(5); 1891 mdelay(5);
1892 return(-1); 1892 return(-1);
1893 } 1893 }
@@ -1901,7 +1901,7 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
1901 if (d_details->calculate_baud_rate 1901 if (d_details->calculate_baud_rate
1902 (p_priv->baud, d_details->baudclk, &msg.baudHi, 1902 (p_priv->baud, d_details->baudclk, &msg.baudHi,
1903 &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) { 1903 &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
1904 dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__, 1904 dbg("%s - Invalid baud rate %d requested, using 9600.", __func__,
1905 p_priv->baud); 1905 p_priv->baud);
1906 msg.baudLo = 0; 1906 msg.baudLo = 0;
1907 msg.baudHi = 125; /* Values for 9600 baud */ 1907 msg.baudHi = 125; /* Values for 9600 baud */
@@ -1996,11 +1996,11 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
1996 1996
1997 this_urb->dev = serial->dev; 1997 this_urb->dev = serial->dev;
1998 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) { 1998 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
1999 dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, err); 1999 dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err);
2000 } 2000 }
2001#if 0 2001#if 0
2002 else { 2002 else {
2003 dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __FUNCTION__ 2003 dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __func__
2004 outcont_urb, this_urb->transfer_buffer_length, 2004 outcont_urb, this_urb->transfer_buffer_length,
2005 usb_pipeendpoint(this_urb->pipe)); 2005 usb_pipeendpoint(this_urb->pipe));
2006 } 2006 }
@@ -2020,7 +2020,7 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
2020 struct urb *this_urb; 2020 struct urb *this_urb;
2021 int device_port, err; 2021 int device_port, err;
2022 2022
2023 dbg ("%s", __FUNCTION__); 2023 dbg ("%s", __func__);
2024 2024
2025 s_priv = usb_get_serial_data(serial); 2025 s_priv = usb_get_serial_data(serial);
2026 p_priv = usb_get_serial_port_data(port); 2026 p_priv = usb_get_serial_port_data(port);
@@ -2029,7 +2029,7 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
2029 2029
2030 /* only do something if we have a bulk out endpoint */ 2030 /* only do something if we have a bulk out endpoint */
2031 if ((this_urb = p_priv->outcont_urb) == NULL) { 2031 if ((this_urb = p_priv->outcont_urb) == NULL) {
2032 dbg("%s - oops no urb.", __FUNCTION__); 2032 dbg("%s - oops no urb.", __func__);
2033 return -1; 2033 return -1;
2034 } 2034 }
2035 2035
@@ -2038,7 +2038,7 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
2038 if ((reset_port + 1) > p_priv->resend_cont) 2038 if ((reset_port + 1) > p_priv->resend_cont)
2039 p_priv->resend_cont = reset_port + 1; 2039 p_priv->resend_cont = reset_port + 1;
2040 if (this_urb->status == -EINPROGRESS) { 2040 if (this_urb->status == -EINPROGRESS) {
2041 dbg ("%s already writing", __FUNCTION__); 2041 dbg ("%s already writing", __func__);
2042 mdelay(5); 2042 mdelay(5);
2043 return(-1); 2043 return(-1);
2044 } 2044 }
@@ -2048,7 +2048,7 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
2048 msg.setBaudRate = 1; 2048 msg.setBaudRate = 1;
2049 if (d_details->calculate_baud_rate(p_priv->baud, d_details->baudclk, 2049 if (d_details->calculate_baud_rate(p_priv->baud, d_details->baudclk,
2050 &msg.baudHi, &msg.baudLo, NULL, device_port) == KEYSPAN_INVALID_BAUD_RATE ) { 2050 &msg.baudHi, &msg.baudLo, NULL, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
2051 dbg("%s - Invalid baud rate requested %d.", __FUNCTION__, p_priv->baud); 2051 dbg("%s - Invalid baud rate requested %d.", __func__, p_priv->baud);
2052 msg.baudLo = 0xff; 2052 msg.baudLo = 0xff;
2053 msg.baudHi = 0xb2; /* Values for 9600 baud */ 2053 msg.baudHi = 0xb2; /* Values for 9600 baud */
2054 } 2054 }
@@ -2122,11 +2122,11 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
2122 2122
2123 this_urb->dev = serial->dev; 2123 this_urb->dev = serial->dev;
2124 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) { 2124 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
2125 dbg("%s - usb_submit_urb(setup) failed", __FUNCTION__); 2125 dbg("%s - usb_submit_urb(setup) failed", __func__);
2126 } 2126 }
2127#if 0 2127#if 0
2128 else { 2128 else {
2129 dbg("%s - usb_submit_urb(setup) OK %d bytes", __FUNCTION__, 2129 dbg("%s - usb_submit_urb(setup) OK %d bytes", __func__,
2130 this_urb->transfer_buffer_length); 2130 this_urb->transfer_buffer_length);
2131 } 2131 }
2132#endif 2132#endif
@@ -2146,7 +2146,7 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
2146 struct urb *this_urb; 2146 struct urb *this_urb;
2147 int err, device_port; 2147 int err, device_port;
2148 2148
2149 dbg ("%s", __FUNCTION__); 2149 dbg ("%s", __func__);
2150 2150
2151 s_priv = usb_get_serial_data(serial); 2151 s_priv = usb_get_serial_data(serial);
2152 p_priv = usb_get_serial_port_data(port); 2152 p_priv = usb_get_serial_port_data(port);
@@ -2157,11 +2157,11 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
2157 /* Work out which port within the device is being setup */ 2157 /* Work out which port within the device is being setup */
2158 device_port = port->number - port->serial->minor; 2158 device_port = port->number - port->serial->minor;
2159 2159
2160 dbg("%s - endpoint %d port %d (%d)",__FUNCTION__, usb_pipeendpoint(this_urb->pipe), port->number, device_port); 2160 dbg("%s - endpoint %d port %d (%d)",__func__, usb_pipeendpoint(this_urb->pipe), port->number, device_port);
2161 2161
2162 /* Make sure we have an urb then send the message */ 2162 /* Make sure we have an urb then send the message */
2163 if (this_urb == NULL) { 2163 if (this_urb == NULL) {
2164 dbg("%s - oops no urb for port %d.", __FUNCTION__, port->number); 2164 dbg("%s - oops no urb for port %d.", __func__, port->number);
2165 return -1; 2165 return -1;
2166 } 2166 }
2167 2167
@@ -2171,7 +2171,7 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
2171 p_priv->resend_cont = reset_port + 1; 2171 p_priv->resend_cont = reset_port + 1;
2172 2172
2173 if (this_urb->status == -EINPROGRESS) { 2173 if (this_urb->status == -EINPROGRESS) {
2174 /* dbg ("%s - already writing", __FUNCTION__); */ 2174 /* dbg ("%s - already writing", __func__); */
2175 mdelay(5); 2175 mdelay(5);
2176 return(-1); 2176 return(-1);
2177 } 2177 }
@@ -2188,7 +2188,7 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
2188 if (d_details->calculate_baud_rate 2188 if (d_details->calculate_baud_rate
2189 (p_priv->baud, d_details->baudclk, &msg.baudHi, 2189 (p_priv->baud, d_details->baudclk, &msg.baudHi,
2190 &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) { 2190 &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
2191 dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__, 2191 dbg("%s - Invalid baud rate %d requested, using 9600.", __func__,
2192 p_priv->baud); 2192 p_priv->baud);
2193 msg.baudLo = 0; 2193 msg.baudLo = 0;
2194 msg.baudHi = 125; /* Values for 9600 baud */ 2194 msg.baudHi = 125; /* Values for 9600 baud */
@@ -2307,11 +2307,11 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
2307 this_urb->dev = serial->dev; 2307 this_urb->dev = serial->dev;
2308 } 2308 }
2309 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) { 2309 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
2310 dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, err); 2310 dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err);
2311 } 2311 }
2312#if 0 2312#if 0
2313 else { 2313 else {
2314 dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __FUNCTION__, 2314 dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __func__,
2315 outcont_urb, this_urb->transfer_buffer_length, 2315 outcont_urb, this_urb->transfer_buffer_length,
2316 usb_pipeendpoint(this_urb->pipe)); 2316 usb_pipeendpoint(this_urb->pipe));
2317 } 2317 }
@@ -2332,7 +2332,7 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial,
2332 int err; 2332 int err;
2333 u8 prescaler; 2333 u8 prescaler;
2334 2334
2335 dbg ("%s", __FUNCTION__); 2335 dbg ("%s", __func__);
2336 2336
2337 s_priv = usb_get_serial_data(serial); 2337 s_priv = usb_get_serial_data(serial);
2338 p_priv = usb_get_serial_port_data(port); 2338 p_priv = usb_get_serial_port_data(port);
@@ -2340,7 +2340,7 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial,
2340 2340
2341 /* only do something if we have a bulk out endpoint */ 2341 /* only do something if we have a bulk out endpoint */
2342 if ((this_urb = p_priv->outcont_urb) == NULL) { 2342 if ((this_urb = p_priv->outcont_urb) == NULL) {
2343 dbg("%s - oops no urb.", __FUNCTION__); 2343 dbg("%s - oops no urb.", __func__);
2344 return -1; 2344 return -1;
2345 } 2345 }
2346 2346
@@ -2349,7 +2349,7 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial,
2349 if ((reset_port + 1) > p_priv->resend_cont) 2349 if ((reset_port + 1) > p_priv->resend_cont)
2350 p_priv->resend_cont = reset_port + 1; 2350 p_priv->resend_cont = reset_port + 1;
2351 if (this_urb->status == -EINPROGRESS) { 2351 if (this_urb->status == -EINPROGRESS) {
2352 dbg ("%s already writing", __FUNCTION__); 2352 dbg ("%s already writing", __func__);
2353 mdelay(5); 2353 mdelay(5);
2354 return(-1); 2354 return(-1);
2355 } 2355 }
@@ -2363,7 +2363,7 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial,
2363 if (d_details->calculate_baud_rate 2363 if (d_details->calculate_baud_rate
2364 (p_priv->baud, d_details->baudclk, &msg.baudHi, 2364 (p_priv->baud, d_details->baudclk, &msg.baudHi,
2365 &msg.baudLo, &prescaler, 0) == KEYSPAN_INVALID_BAUD_RATE ) { 2365 &msg.baudLo, &prescaler, 0) == KEYSPAN_INVALID_BAUD_RATE ) {
2366 dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__, 2366 dbg("%s - Invalid baud rate %d requested, using 9600.", __func__,
2367 p_priv->baud); 2367 p_priv->baud);
2368 p_priv->baud = 9600; 2368 p_priv->baud = 9600;
2369 d_details->calculate_baud_rate (p_priv->baud, d_details->baudclk, 2369 d_details->calculate_baud_rate (p_priv->baud, d_details->baudclk,
@@ -2453,7 +2453,7 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial,
2453 2453
2454 this_urb->dev = serial->dev; 2454 this_urb->dev = serial->dev;
2455 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) { 2455 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
2456 dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, err); 2456 dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err);
2457 } 2457 }
2458 return (0); 2458 return (0);
2459} 2459}
@@ -2469,7 +2469,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
2469 struct urb *this_urb; 2469 struct urb *this_urb;
2470 int err, device_port; 2470 int err, device_port;
2471 2471
2472 dbg ("%s", __FUNCTION__); 2472 dbg ("%s", __func__);
2473 2473
2474 s_priv = usb_get_serial_data(serial); 2474 s_priv = usb_get_serial_data(serial);
2475 p_priv = usb_get_serial_port_data(port); 2475 p_priv = usb_get_serial_port_data(port);
@@ -2482,7 +2482,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
2482 2482
2483 /* Make sure we have an urb then send the message */ 2483 /* Make sure we have an urb then send the message */
2484 if (this_urb == NULL) { 2484 if (this_urb == NULL) {
2485 dbg("%s - oops no urb for port %d.", __FUNCTION__, 2485 dbg("%s - oops no urb for port %d.", __func__,
2486 port->number); 2486 port->number);
2487 return -1; 2487 return -1;
2488 } 2488 }
@@ -2492,7 +2492,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
2492 if ((reset_port + 1) > p_priv->resend_cont) 2492 if ((reset_port + 1) > p_priv->resend_cont)
2493 p_priv->resend_cont = reset_port + 1; 2493 p_priv->resend_cont = reset_port + 1;
2494 if (this_urb->status == -EINPROGRESS) { 2494 if (this_urb->status == -EINPROGRESS) {
2495 /* dbg ("%s - already writing", __FUNCTION__); */ 2495 /* dbg ("%s - already writing", __func__); */
2496 mdelay(5); 2496 mdelay(5);
2497 return(-1); 2497 return(-1);
2498 } 2498 }
@@ -2508,7 +2508,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
2508 if (d_details->calculate_baud_rate 2508 if (d_details->calculate_baud_rate
2509 (p_priv->baud, d_details->baudclk, &msg.baudHi, 2509 (p_priv->baud, d_details->baudclk, &msg.baudHi,
2510 &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) { 2510 &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
2511 dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__, 2511 dbg("%s - Invalid baud rate %d requested, using 9600.", __func__,
2512 p_priv->baud); 2512 p_priv->baud);
2513 msg.baudLo = 0; 2513 msg.baudLo = 0;
2514 msg.baudHi = 125; /* Values for 9600 baud */ 2514 msg.baudHi = 125; /* Values for 9600 baud */
@@ -2601,7 +2601,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
2601 2601
2602 err = usb_submit_urb(this_urb, GFP_ATOMIC); 2602 err = usb_submit_urb(this_urb, GFP_ATOMIC);
2603 if (err != 0) 2603 if (err != 0)
2604 dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, 2604 dbg("%s - usb_submit_urb(setup) failed (%d)", __func__,
2605 err); 2605 err);
2606 return (0); 2606 return (0);
2607} 2607}
@@ -2612,7 +2612,7 @@ static void keyspan_send_setup(struct usb_serial_port *port, int reset_port)
2612 struct keyspan_serial_private *s_priv; 2612 struct keyspan_serial_private *s_priv;
2613 const struct keyspan_device_details *d_details; 2613 const struct keyspan_device_details *d_details;
2614 2614
2615 dbg ("%s", __FUNCTION__); 2615 dbg ("%s", __func__);
2616 2616
2617 s_priv = usb_get_serial_data(serial); 2617 s_priv = usb_get_serial_data(serial);
2618 d_details = s_priv->device_details; 2618 d_details = s_priv->device_details;
@@ -2647,20 +2647,20 @@ static int keyspan_startup (struct usb_serial *serial)
2647 struct keyspan_port_private *p_priv; 2647 struct keyspan_port_private *p_priv;
2648 const struct keyspan_device_details *d_details; 2648 const struct keyspan_device_details *d_details;
2649 2649
2650 dbg("%s", __FUNCTION__); 2650 dbg("%s", __func__);
2651 2651
2652 for (i = 0; (d_details = keyspan_devices[i]) != NULL; ++i) 2652 for (i = 0; (d_details = keyspan_devices[i]) != NULL; ++i)
2653 if (d_details->product_id == le16_to_cpu(serial->dev->descriptor.idProduct)) 2653 if (d_details->product_id == le16_to_cpu(serial->dev->descriptor.idProduct))
2654 break; 2654 break;
2655 if (d_details == NULL) { 2655 if (d_details == NULL) {
2656 dev_err(&serial->dev->dev, "%s - unknown product id %x\n", __FUNCTION__, le16_to_cpu(serial->dev->descriptor.idProduct)); 2656 dev_err(&serial->dev->dev, "%s - unknown product id %x\n", __func__, le16_to_cpu(serial->dev->descriptor.idProduct));
2657 return 1; 2657 return 1;
2658 } 2658 }
2659 2659
2660 /* Setup private data for serial driver */ 2660 /* Setup private data for serial driver */
2661 s_priv = kzalloc(sizeof(struct keyspan_serial_private), GFP_KERNEL); 2661 s_priv = kzalloc(sizeof(struct keyspan_serial_private), GFP_KERNEL);
2662 if (!s_priv) { 2662 if (!s_priv) {
2663 dbg("%s - kmalloc for keyspan_serial_private failed.", __FUNCTION__); 2663 dbg("%s - kmalloc for keyspan_serial_private failed.", __func__);
2664 return -ENOMEM; 2664 return -ENOMEM;
2665 } 2665 }
2666 2666
@@ -2672,7 +2672,7 @@ static int keyspan_startup (struct usb_serial *serial)
2672 port = serial->port[i]; 2672 port = serial->port[i];
2673 p_priv = kzalloc(sizeof(struct keyspan_port_private), GFP_KERNEL); 2673 p_priv = kzalloc(sizeof(struct keyspan_port_private), GFP_KERNEL);
2674 if (!p_priv) { 2674 if (!p_priv) {
2675 dbg("%s - kmalloc for keyspan_port_private (%d) failed!.", __FUNCTION__, i); 2675 dbg("%s - kmalloc for keyspan_port_private (%d) failed!.", __func__, i);
2676 return (1); 2676 return (1);
2677 } 2677 }
2678 p_priv->device_details = d_details; 2678 p_priv->device_details = d_details;
@@ -2685,14 +2685,14 @@ static int keyspan_startup (struct usb_serial *serial)
2685 s_priv->instat_urb->dev = serial->dev; 2685 s_priv->instat_urb->dev = serial->dev;
2686 err = usb_submit_urb(s_priv->instat_urb, GFP_KERNEL); 2686 err = usb_submit_urb(s_priv->instat_urb, GFP_KERNEL);
2687 if (err != 0) 2687 if (err != 0)
2688 dbg("%s - submit instat urb failed %d", __FUNCTION__, 2688 dbg("%s - submit instat urb failed %d", __func__,
2689 err); 2689 err);
2690 } 2690 }
2691 if (s_priv->indat_urb != NULL) { 2691 if (s_priv->indat_urb != NULL) {
2692 s_priv->indat_urb->dev = serial->dev; 2692 s_priv->indat_urb->dev = serial->dev;
2693 err = usb_submit_urb(s_priv->indat_urb, GFP_KERNEL); 2693 err = usb_submit_urb(s_priv->indat_urb, GFP_KERNEL);
2694 if (err != 0) 2694 if (err != 0)
2695 dbg("%s - submit indat urb failed %d", __FUNCTION__, 2695 dbg("%s - submit indat urb failed %d", __func__,
2696 err); 2696 err);
2697 } 2697 }
2698 2698
@@ -2706,7 +2706,7 @@ static void keyspan_shutdown (struct usb_serial *serial)
2706 struct keyspan_serial_private *s_priv; 2706 struct keyspan_serial_private *s_priv;
2707 struct keyspan_port_private *p_priv; 2707 struct keyspan_port_private *p_priv;
2708 2708
2709 dbg("%s", __FUNCTION__); 2709 dbg("%s", __func__);
2710 2710
2711 s_priv = usb_get_serial_data(serial); 2711 s_priv = usb_get_serial_data(serial);
2712 2712
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index 039847795185..6ce292ef1c47 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -208,7 +208,7 @@ static void keyspan_pda_request_unthrottle(struct work_struct *work)
208 2000); 208 2000);
209 if (result < 0) 209 if (result < 0)
210 dbg("%s - error %d from usb_control_msg", 210 dbg("%s - error %d from usb_control_msg",
211 __FUNCTION__, result); 211 __func__, result);
212} 212}
213 213
214 214
@@ -232,11 +232,11 @@ static void keyspan_pda_rx_interrupt (struct urb *urb)
232 case -ESHUTDOWN: 232 case -ESHUTDOWN:
233 /* this urb is terminated, clean up */ 233 /* this urb is terminated, clean up */
234 dbg("%s - urb shutting down with status: %d", 234 dbg("%s - urb shutting down with status: %d",
235 __FUNCTION__, status); 235 __func__, status);
236 return; 236 return;
237 default: 237 default:
238 dbg("%s - nonzero urb status received: %d", 238 dbg("%s - nonzero urb status received: %d",
239 __FUNCTION__, status); 239 __func__, status);
240 goto exit; 240 goto exit;
241 } 241 }
242 242
@@ -274,7 +274,7 @@ exit:
274 retval = usb_submit_urb (urb, GFP_ATOMIC); 274 retval = usb_submit_urb (urb, GFP_ATOMIC);
275 if (retval) 275 if (retval)
276 err ("%s - usb_submit_urb failed with result %d", 276 err ("%s - usb_submit_urb failed with result %d",
277 __FUNCTION__, retval); 277 __func__, retval);
278} 278}
279 279
280 280
@@ -358,7 +358,7 @@ static void keyspan_pda_break_ctl (struct usb_serial_port *port, int break_state
358 value, 0, NULL, 0, 2000); 358 value, 0, NULL, 0, 2000);
359 if (result < 0) 359 if (result < 0)
360 dbg("%s - error %d from usb_control_msg", 360 dbg("%s - error %d from usb_control_msg",
361 __FUNCTION__, result); 361 __func__, result);
362 /* there is something funky about this.. the TCSBRK that 'cu' performs 362 /* there is something funky about this.. the TCSBRK that 'cu' performs
363 ought to translate into a break_ctl(-1),break_ctl(0) pair HZ/4 363 ought to translate into a break_ctl(-1),break_ctl(0) pair HZ/4
364 seconds apart, but it feels like the break sent isn't as long as it 364 seconds apart, but it feels like the break sent isn't as long as it
@@ -665,11 +665,11 @@ static int keyspan_pda_open (struct usb_serial_port *port, struct file *filp)
665 1, 665 1,
666 2000); 666 2000);
667 if (rc < 0) { 667 if (rc < 0) {
668 dbg("%s - roomquery failed", __FUNCTION__); 668 dbg("%s - roomquery failed", __func__);
669 goto error; 669 goto error;
670 } 670 }
671 if (rc == 0) { 671 if (rc == 0) {
672 dbg("%s - roomquery returned 0 bytes", __FUNCTION__); 672 dbg("%s - roomquery returned 0 bytes", __func__);
673 rc = -EIO; 673 rc = -EIO;
674 goto error; 674 goto error;
675 } 675 }
@@ -688,7 +688,7 @@ static int keyspan_pda_open (struct usb_serial_port *port, struct file *filp)
688 port->interrupt_in_urb->dev = serial->dev; 688 port->interrupt_in_urb->dev = serial->dev;
689 rc = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 689 rc = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
690 if (rc) { 690 if (rc) {
691 dbg("%s - usb_submit_urb(read int) failed", __FUNCTION__); 691 dbg("%s - usb_submit_urb(read int) failed", __func__);
692 goto error; 692 goto error;
693 } 693 }
694 694
@@ -732,7 +732,7 @@ static int keyspan_pda_fake_startup (struct usb_serial *serial)
732 record = &xircom_pgs_firmware[0]; 732 record = &xircom_pgs_firmware[0];
733#endif 733#endif
734 if (record == NULL) { 734 if (record == NULL) {
735 err("%s: unknown vendor, aborting.", __FUNCTION__); 735 err("%s: unknown vendor, aborting.", __func__);
736 return -ENODEV; 736 return -ENODEV;
737 } 737 }
738 738
@@ -779,7 +779,7 @@ static int keyspan_pda_startup (struct usb_serial *serial)
779 779
780static void keyspan_pda_shutdown (struct usb_serial *serial) 780static void keyspan_pda_shutdown (struct usb_serial *serial)
781{ 781{
782 dbg("%s", __FUNCTION__); 782 dbg("%s", __func__);
783 783
784 kfree(usb_get_serial_port_data(serial->port[0])); 784 kfree(usb_get_serial_port_data(serial->port[0]));
785} 785}
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c
index d71004283904..160e19263e25 100644
--- a/drivers/usb/serial/kl5kusb105.c
+++ b/drivers/usb/serial/kl5kusb105.c
@@ -191,7 +191,7 @@ static int klsi_105_chg_port_settings(struct usb_serial_port *port,
191 if (rc < 0) 191 if (rc < 0)
192 err("Change port settings failed (error = %d)", rc); 192 err("Change port settings failed (error = %d)", rc);
193 info("%s - %d byte block, baudrate %x, databits %d, u1 %d, u2 %d", 193 info("%s - %d byte block, baudrate %x, databits %d, u1 %d, u2 %d",
194 __FUNCTION__, 194 __func__,
195 settings->pktlen, 195 settings->pktlen,
196 settings->baudrate, settings->databits, 196 settings->baudrate, settings->databits,
197 settings->unknown1, settings->unknown2); 197 settings->unknown1, settings->unknown2);
@@ -222,7 +222,7 @@ static int klsi_105_get_line_state(struct usb_serial_port *port,
222 __u8 status_buf[KLSI_STATUSBUF_LEN] = { -1,-1}; 222 __u8 status_buf[KLSI_STATUSBUF_LEN] = { -1,-1};
223 __u16 status; 223 __u16 status;
224 224
225 info("%s - sending SIO Poll request", __FUNCTION__); 225 info("%s - sending SIO Poll request", __func__);
226 rc = usb_control_msg(port->serial->dev, 226 rc = usb_control_msg(port->serial->dev,
227 usb_rcvctrlpipe(port->serial->dev, 0), 227 usb_rcvctrlpipe(port->serial->dev, 0),
228 KL5KUSB105A_SIO_POLL, 228 KL5KUSB105A_SIO_POLL,
@@ -237,7 +237,7 @@ static int klsi_105_get_line_state(struct usb_serial_port *port,
237 else { 237 else {
238 status = le16_to_cpu(*(u16 *)status_buf); 238 status = le16_to_cpu(*(u16 *)status_buf);
239 239
240 info("%s - read status %x %x", __FUNCTION__, 240 info("%s - read status %x %x", __func__,
241 status_buf[0], status_buf[1]); 241 status_buf[0], status_buf[1]);
242 242
243 *line_state_p = klsi_105_status2linestate(status); 243 *line_state_p = klsi_105_status2linestate(status);
@@ -265,7 +265,7 @@ static int klsi_105_startup (struct usb_serial *serial)
265 priv = kmalloc(sizeof(struct klsi_105_private), 265 priv = kmalloc(sizeof(struct klsi_105_private),
266 GFP_KERNEL); 266 GFP_KERNEL);
267 if (!priv) { 267 if (!priv) {
268 dbg("%skmalloc for klsi_105_private failed.", __FUNCTION__); 268 dbg("%skmalloc for klsi_105_private failed.", __func__);
269 i--; 269 i--;
270 goto err_cleanup; 270 goto err_cleanup;
271 } 271 }
@@ -295,7 +295,7 @@ static int klsi_105_startup (struct usb_serial *serial)
295 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, 295 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE,
296 GFP_KERNEL); 296 GFP_KERNEL);
297 if (!urb->transfer_buffer) { 297 if (!urb->transfer_buffer) {
298 err("%s - out of memory for urb buffers.", __FUNCTION__); 298 err("%s - out of memory for urb buffers.", __func__);
299 goto err_cleanup; 299 goto err_cleanup;
300 } 300 }
301 } 301 }
@@ -325,7 +325,7 @@ static void klsi_105_shutdown (struct usb_serial *serial)
325{ 325{
326 int i; 326 int i;
327 327
328 dbg("%s", __FUNCTION__); 328 dbg("%s", __func__);
329 329
330 /* stop reads and writes on all ports */ 330 /* stop reads and writes on all ports */
331 for (i=0; i < serial->num_ports; ++i) { 331 for (i=0; i < serial->num_ports; ++i) {
@@ -370,7 +370,7 @@ static int klsi_105_open (struct usb_serial_port *port, struct file *filp)
370 struct klsi_105_port_settings cfg; 370 struct klsi_105_port_settings cfg;
371 unsigned long flags; 371 unsigned long flags;
372 372
373 dbg("%s port %d", __FUNCTION__, port->number); 373 dbg("%s port %d", __func__, port->number);
374 374
375 /* force low_latency on so that our tty_push actually forces 375 /* force low_latency on so that our tty_push actually forces
376 * the data through 376 * the data through
@@ -416,7 +416,7 @@ static int klsi_105_open (struct usb_serial_port *port, struct file *filp)
416 416
417 rc = usb_submit_urb(port->read_urb, GFP_KERNEL); 417 rc = usb_submit_urb(port->read_urb, GFP_KERNEL);
418 if (rc) { 418 if (rc) {
419 err("%s - failed submitting read urb, error %d", __FUNCTION__, rc); 419 err("%s - failed submitting read urb, error %d", __func__, rc);
420 retval = rc; 420 retval = rc;
421 goto exit; 421 goto exit;
422 } 422 }
@@ -434,14 +434,14 @@ static int klsi_105_open (struct usb_serial_port *port, struct file *filp)
434 err("Enabling read failed (error = %d)", rc); 434 err("Enabling read failed (error = %d)", rc);
435 retval = rc; 435 retval = rc;
436 } else 436 } else
437 dbg("%s - enabled reading", __FUNCTION__); 437 dbg("%s - enabled reading", __func__);
438 438
439 rc = klsi_105_get_line_state(port, &line_state); 439 rc = klsi_105_get_line_state(port, &line_state);
440 if (rc >= 0) { 440 if (rc >= 0) {
441 spin_lock_irqsave (&priv->lock, flags); 441 spin_lock_irqsave (&priv->lock, flags);
442 priv->line_state = line_state; 442 priv->line_state = line_state;
443 spin_unlock_irqrestore (&priv->lock, flags); 443 spin_unlock_irqrestore (&priv->lock, flags);
444 dbg("%s - read line state 0x%lx", __FUNCTION__, line_state); 444 dbg("%s - read line state 0x%lx", __func__, line_state);
445 retval = 0; 445 retval = 0;
446 } else 446 } else
447 retval = rc; 447 retval = rc;
@@ -456,7 +456,7 @@ static void klsi_105_close (struct usb_serial_port *port, struct file *filp)
456 struct klsi_105_private *priv = usb_get_serial_port_data(port); 456 struct klsi_105_private *priv = usb_get_serial_port_data(port);
457 int rc; 457 int rc;
458 458
459 dbg("%s port %d", __FUNCTION__, port->number); 459 dbg("%s port %d", __func__, port->number);
460 460
461 mutex_lock(&port->serial->disc_mutex); 461 mutex_lock(&port->serial->disc_mutex);
462 if (!port->serial->disconnected) { 462 if (!port->serial->disconnected) {
@@ -499,7 +499,7 @@ static int klsi_105_write (struct usb_serial_port *port,
499 int result, size; 499 int result, size;
500 int bytes_sent=0; 500 int bytes_sent=0;
501 501
502 dbg("%s - port %d", __FUNCTION__, port->number); 502 dbg("%s - port %d", __func__, port->number);
503 503
504 while (count > 0) { 504 while (count > 0) {
505 /* try to find a free urb (write 0 bytes if none) */ 505 /* try to find a free urb (write 0 bytes if none) */
@@ -511,21 +511,21 @@ static int klsi_105_write (struct usb_serial_port *port,
511 for (i=0; i<NUM_URBS; i++) { 511 for (i=0; i<NUM_URBS; i++) {
512 if (priv->write_urb_pool[i]->status != -EINPROGRESS) { 512 if (priv->write_urb_pool[i]->status != -EINPROGRESS) {
513 urb = priv->write_urb_pool[i]; 513 urb = priv->write_urb_pool[i];
514 dbg("%s - using pool URB %d", __FUNCTION__, i); 514 dbg("%s - using pool URB %d", __func__, i);
515 break; 515 break;
516 } 516 }
517 } 517 }
518 spin_unlock_irqrestore (&priv->lock, flags); 518 spin_unlock_irqrestore (&priv->lock, flags);
519 519
520 if (urb==NULL) { 520 if (urb==NULL) {
521 dbg("%s - no more free urbs", __FUNCTION__); 521 dbg("%s - no more free urbs", __func__);
522 goto exit; 522 goto exit;
523 } 523 }
524 524
525 if (urb->transfer_buffer == NULL) { 525 if (urb->transfer_buffer == NULL) {
526 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC); 526 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
527 if (urb->transfer_buffer == NULL) { 527 if (urb->transfer_buffer == NULL) {
528 err("%s - no more kernel memory...", __FUNCTION__); 528 err("%s - no more kernel memory...", __func__);
529 goto exit; 529 goto exit;
530 } 530 }
531 } 531 }
@@ -551,7 +551,7 @@ static int klsi_105_write (struct usb_serial_port *port,
551 /* send the data out the bulk port */ 551 /* send the data out the bulk port */
552 result = usb_submit_urb(urb, GFP_ATOMIC); 552 result = usb_submit_urb(urb, GFP_ATOMIC);
553 if (result) { 553 if (result) {
554 err("%s - failed submitting write urb, error %d", __FUNCTION__, result); 554 err("%s - failed submitting write urb, error %d", __func__, result);
555 goto exit; 555 goto exit;
556 } 556 }
557 buf += size; 557 buf += size;
@@ -570,10 +570,10 @@ static void klsi_105_write_bulk_callback ( struct urb *urb)
570 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 570 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
571 int status = urb->status; 571 int status = urb->status;
572 572
573 dbg("%s - port %d", __FUNCTION__, port->number); 573 dbg("%s - port %d", __func__, port->number);
574 574
575 if (status) { 575 if (status) {
576 dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, 576 dbg("%s - nonzero write bulk status received: %d", __func__,
577 status); 577 status);
578 return; 578 return;
579 } 579 }
@@ -600,7 +600,7 @@ static int klsi_105_chars_in_buffer (struct usb_serial_port *port)
600 600
601 spin_unlock_irqrestore (&priv->lock, flags); 601 spin_unlock_irqrestore (&priv->lock, flags);
602 602
603 dbg("%s - returns %d", __FUNCTION__, chars); 603 dbg("%s - returns %d", __func__, chars);
604 return (chars); 604 return (chars);
605} 605}
606 606
@@ -620,7 +620,7 @@ static int klsi_105_write_room (struct usb_serial_port *port)
620 620
621 spin_unlock_irqrestore (&priv->lock, flags); 621 spin_unlock_irqrestore (&priv->lock, flags);
622 622
623 dbg("%s - returns %d", __FUNCTION__, room); 623 dbg("%s - returns %d", __func__, room);
624 return (room); 624 return (room);
625} 625}
626 626
@@ -635,11 +635,11 @@ static void klsi_105_read_bulk_callback (struct urb *urb)
635 int rc; 635 int rc;
636 int status = urb->status; 636 int status = urb->status;
637 637
638 dbg("%s - port %d", __FUNCTION__, port->number); 638 dbg("%s - port %d", __func__, port->number);
639 639
640 /* The urb might have been killed. */ 640 /* The urb might have been killed. */
641 if (status) { 641 if (status) {
642 dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, 642 dbg("%s - nonzero read bulk status received: %d", __func__,
643 status); 643 status);
644 return; 644 return;
645 } 645 }
@@ -649,12 +649,12 @@ static void klsi_105_read_bulk_callback (struct urb *urb)
649 */ 649 */
650 if (urb->actual_length == 0) { 650 if (urb->actual_length == 0) {
651 /* empty urbs seem to happen, we ignore them */ 651 /* empty urbs seem to happen, we ignore them */
652 /* dbg("%s - emtpy URB", __FUNCTION__); */ 652 /* dbg("%s - emtpy URB", __func__); */
653 ; 653 ;
654 } else if (urb->actual_length <= 2) { 654 } else if (urb->actual_length <= 2) {
655 dbg("%s - size %d URB not understood", __FUNCTION__, 655 dbg("%s - size %d URB not understood", __func__,
656 urb->actual_length); 656 urb->actual_length);
657 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, 657 usb_serial_debug_data(debug, &port->dev, __func__,
658 urb->actual_length, data); 658 urb->actual_length, data);
659 } else { 659 } else {
660 int bytes_sent = ((__u8 *) data)[0] + 660 int bytes_sent = ((__u8 *) data)[0] +
@@ -666,12 +666,12 @@ static void klsi_105_read_bulk_callback (struct urb *urb)
666 * intermixed tty_flip_buffer_push()s 666 * intermixed tty_flip_buffer_push()s
667 * FIXME 667 * FIXME
668 */ 668 */
669 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, 669 usb_serial_debug_data(debug, &port->dev, __func__,
670 urb->actual_length, data); 670 urb->actual_length, data);
671 671
672 if (bytes_sent + 2 > urb->actual_length) { 672 if (bytes_sent + 2 > urb->actual_length) {
673 dbg("%s - trying to read more data than available" 673 dbg("%s - trying to read more data than available"
674 " (%d vs. %d)", __FUNCTION__, 674 " (%d vs. %d)", __func__,
675 bytes_sent+2, urb->actual_length); 675 bytes_sent+2, urb->actual_length);
676 /* cap at implied limit */ 676 /* cap at implied limit */
677 bytes_sent = urb->actual_length - 2; 677 bytes_sent = urb->actual_length - 2;
@@ -694,7 +694,7 @@ static void klsi_105_read_bulk_callback (struct urb *urb)
694 port); 694 port);
695 rc = usb_submit_urb(port->read_urb, GFP_ATOMIC); 695 rc = usb_submit_urb(port->read_urb, GFP_ATOMIC);
696 if (rc) 696 if (rc)
697 err("%s - failed resubmitting read urb, error %d", __FUNCTION__, rc); 697 err("%s - failed resubmitting read urb, error %d", __func__, rc);
698} /* klsi_105_read_bulk_callback */ 698} /* klsi_105_read_bulk_callback */
699 699
700 700
@@ -718,7 +718,7 @@ static void klsi_105_set_termios (struct usb_serial_port *port,
718 if( (cflag & CBAUD) != (old_cflag & CBAUD) ) { 718 if( (cflag & CBAUD) != (old_cflag & CBAUD) ) {
719 /* reassert DTR and (maybe) RTS on transition from B0 */ 719 /* reassert DTR and (maybe) RTS on transition from B0 */
720 if( (old_cflag & CBAUD) == B0 ) { 720 if( (old_cflag & CBAUD) == B0 ) {
721 dbg("%s: baud was B0", __FUNCTION__); 721 dbg("%s: baud was B0", __func__);
722#if 0 722#if 0
723 priv->control_state |= TIOCM_DTR; 723 priv->control_state |= TIOCM_DTR;
724 /* don't set RTS if using hardware flow control */ 724 /* don't set RTS if using hardware flow control */
@@ -764,7 +764,7 @@ static void klsi_105_set_termios (struct usb_serial_port *port,
764 break; 764 break;
765 } 765 }
766 if ((cflag & CBAUD) == B0 ) { 766 if ((cflag & CBAUD) == B0 ) {
767 dbg("%s: baud is B0", __FUNCTION__); 767 dbg("%s: baud is B0", __func__);
768 /* Drop RTS and DTR */ 768 /* Drop RTS and DTR */
769 /* maybe this should be simulated by sending read 769 /* maybe this should be simulated by sending read
770 * disable and read enable messages? 770 * disable and read enable messages?
@@ -781,11 +781,11 @@ static void klsi_105_set_termios (struct usb_serial_port *port,
781 /* set the number of data bits */ 781 /* set the number of data bits */
782 switch (cflag & CSIZE) { 782 switch (cflag & CSIZE) {
783 case CS5: 783 case CS5:
784 dbg("%s - 5 bits/byte not supported", __FUNCTION__); 784 dbg("%s - 5 bits/byte not supported", __func__);
785 spin_unlock_irqrestore (&priv->lock, flags); 785 spin_unlock_irqrestore (&priv->lock, flags);
786 return ; 786 return ;
787 case CS6: 787 case CS6:
788 dbg("%s - 6 bits/byte not supported", __FUNCTION__); 788 dbg("%s - 6 bits/byte not supported", __func__);
789 spin_unlock_irqrestore (&priv->lock, flags); 789 spin_unlock_irqrestore (&priv->lock, flags);
790 return ; 790 return ;
791 case CS7: 791 case CS7:
@@ -859,7 +859,7 @@ static void mct_u232_break_ctl( struct usb_serial_port *port, int break_state )
859 struct mct_u232_private *priv = (struct mct_u232_private *)port->private; 859 struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
860 unsigned char lcr = priv->last_lcr; 860 unsigned char lcr = priv->last_lcr;
861 861
862 dbg("%sstate=%d", __FUNCTION__, break_state); 862 dbg("%sstate=%d", __func__, break_state);
863 863
864 if (break_state) 864 if (break_state)
865 lcr |= MCT_U232_SET_BREAK; 865 lcr |= MCT_U232_SET_BREAK;
@@ -874,7 +874,7 @@ static int klsi_105_tiocmget (struct usb_serial_port *port, struct file *file)
874 unsigned long flags; 874 unsigned long flags;
875 int rc; 875 int rc;
876 unsigned long line_state; 876 unsigned long line_state;
877 dbg("%s - request, just guessing", __FUNCTION__); 877 dbg("%s - request, just guessing", __func__);
878 878
879 rc = klsi_105_get_line_state(port, &line_state); 879 rc = klsi_105_get_line_state(port, &line_state);
880 if (rc < 0) { 880 if (rc < 0) {
@@ -886,7 +886,7 @@ static int klsi_105_tiocmget (struct usb_serial_port *port, struct file *file)
886 spin_lock_irqsave (&priv->lock, flags); 886 spin_lock_irqsave (&priv->lock, flags);
887 priv->line_state = line_state; 887 priv->line_state = line_state;
888 spin_unlock_irqrestore (&priv->lock, flags); 888 spin_unlock_irqrestore (&priv->lock, flags);
889 dbg("%s - read line state 0x%lx", __FUNCTION__, line_state); 889 dbg("%s - read line state 0x%lx", __func__, line_state);
890 return (int)line_state; 890 return (int)line_state;
891} 891}
892 892
@@ -895,7 +895,7 @@ static int klsi_105_tiocmset (struct usb_serial_port *port, struct file *file,
895{ 895{
896 int retval = -EINVAL; 896 int retval = -EINVAL;
897 897
898 dbg("%s", __FUNCTION__); 898 dbg("%s", __func__);
899 899
900/* if this ever gets implemented, it should be done something like this: 900/* if this ever gets implemented, it should be done something like this:
901 struct usb_serial *serial = port->serial; 901 struct usb_serial *serial = port->serial;
@@ -921,7 +921,7 @@ static int klsi_105_tiocmset (struct usb_serial_port *port, struct file *file,
921 921
922static void klsi_105_throttle (struct usb_serial_port *port) 922static void klsi_105_throttle (struct usb_serial_port *port)
923{ 923{
924 dbg("%s - port %d", __FUNCTION__, port->number); 924 dbg("%s - port %d", __func__, port->number);
925 usb_kill_urb(port->read_urb); 925 usb_kill_urb(port->read_urb);
926} 926}
927 927
@@ -929,12 +929,12 @@ static void klsi_105_unthrottle (struct usb_serial_port *port)
929{ 929{
930 int result; 930 int result;
931 931
932 dbg("%s - port %d", __FUNCTION__, port->number); 932 dbg("%s - port %d", __func__, port->number);
933 933
934 port->read_urb->dev = port->serial->dev; 934 port->read_urb->dev = port->serial->dev;
935 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 935 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
936 if (result) 936 if (result)
937 err("%s - failed submitting read urb, error %d", __FUNCTION__, 937 err("%s - failed submitting read urb, error %d", __func__,
938 result); 938 result);
939} 939}
940 940
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index 78458c807eac..693f00da7c03 100644
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
@@ -183,11 +183,11 @@ static int kobil_startup (struct usb_serial *serial)
183 for (i = 0; i < altsetting->desc.bNumEndpoints; i++) { 183 for (i = 0; i < altsetting->desc.bNumEndpoints; i++) {
184 endpoint = &altsetting->endpoint[i]; 184 endpoint = &altsetting->endpoint[i];
185 if (usb_endpoint_is_int_out(&endpoint->desc)) { 185 if (usb_endpoint_is_int_out(&endpoint->desc)) {
186 dbg("%s Found interrupt out endpoint. Address: %d", __FUNCTION__, endpoint->desc.bEndpointAddress); 186 dbg("%s Found interrupt out endpoint. Address: %d", __func__, endpoint->desc.bEndpointAddress);
187 priv->write_int_endpoint_address = endpoint->desc.bEndpointAddress; 187 priv->write_int_endpoint_address = endpoint->desc.bEndpointAddress;
188 } 188 }
189 if (usb_endpoint_is_int_in(&endpoint->desc)) { 189 if (usb_endpoint_is_int_in(&endpoint->desc)) {
190 dbg("%s Found interrupt in endpoint. Address: %d", __FUNCTION__, endpoint->desc.bEndpointAddress); 190 dbg("%s Found interrupt in endpoint. Address: %d", __func__, endpoint->desc.bEndpointAddress);
191 priv->read_int_endpoint_address = endpoint->desc.bEndpointAddress; 191 priv->read_int_endpoint_address = endpoint->desc.bEndpointAddress;
192 } 192 }
193 } 193 }
@@ -198,7 +198,7 @@ static int kobil_startup (struct usb_serial *serial)
198static void kobil_shutdown (struct usb_serial *serial) 198static void kobil_shutdown (struct usb_serial *serial)
199{ 199{
200 int i; 200 int i;
201 dbg("%s - port %d", __FUNCTION__, serial->port[0]->number); 201 dbg("%s - port %d", __func__, serial->port[0]->number);
202 202
203 for (i=0; i < serial->num_ports; ++i) { 203 for (i=0; i < serial->num_ports; ++i) {
204 while (serial->port[i]->open_count > 0) { 204 while (serial->port[i]->open_count > 0) {
@@ -218,7 +218,7 @@ static int kobil_open (struct usb_serial_port *port, struct file *filp)
218 int transfer_buffer_length = 8; 218 int transfer_buffer_length = 8;
219 int write_urb_transfer_buffer_length = 8; 219 int write_urb_transfer_buffer_length = 8;
220 220
221 dbg("%s - port %d", __FUNCTION__, port->number); 221 dbg("%s - port %d", __func__, port->number);
222 priv = usb_get_serial_port_data(port); 222 priv = usb_get_serial_port_data(port);
223 223
224 // someone sets the dev to 0 if the close method has been called 224 // someone sets the dev to 0 if the close method has been called
@@ -245,10 +245,10 @@ static int kobil_open (struct usb_serial_port *port, struct file *filp)
245 245
246 // allocate write_urb 246 // allocate write_urb
247 if (!port->write_urb) { 247 if (!port->write_urb) {
248 dbg("%s - port %d Allocating port->write_urb", __FUNCTION__, port->number); 248 dbg("%s - port %d Allocating port->write_urb", __func__, port->number);
249 port->write_urb = usb_alloc_urb(0, GFP_KERNEL); 249 port->write_urb = usb_alloc_urb(0, GFP_KERNEL);
250 if (!port->write_urb) { 250 if (!port->write_urb) {
251 dbg("%s - port %d usb_alloc_urb failed", __FUNCTION__, port->number); 251 dbg("%s - port %d usb_alloc_urb failed", __func__, port->number);
252 kfree(transfer_buffer); 252 kfree(transfer_buffer);
253 return -ENOMEM; 253 return -ENOMEM;
254 } 254 }
@@ -274,7 +274,7 @@ static int kobil_open (struct usb_serial_port *port, struct file *filp)
274 transfer_buffer_length, 274 transfer_buffer_length,
275 KOBIL_TIMEOUT 275 KOBIL_TIMEOUT
276 ); 276 );
277 dbg("%s - port %d Send get_HW_version URB returns: %i", __FUNCTION__, port->number, result); 277 dbg("%s - port %d Send get_HW_version URB returns: %i", __func__, port->number, result);
278 dbg("Harware version: %i.%i.%i", transfer_buffer[0], transfer_buffer[1], transfer_buffer[2] ); 278 dbg("Harware version: %i.%i.%i", transfer_buffer[0], transfer_buffer[1], transfer_buffer[2] );
279 279
280 // get firmware version 280 // get firmware version
@@ -288,7 +288,7 @@ static int kobil_open (struct usb_serial_port *port, struct file *filp)
288 transfer_buffer_length, 288 transfer_buffer_length,
289 KOBIL_TIMEOUT 289 KOBIL_TIMEOUT
290 ); 290 );
291 dbg("%s - port %d Send get_FW_version URB returns: %i", __FUNCTION__, port->number, result); 291 dbg("%s - port %d Send get_FW_version URB returns: %i", __func__, port->number, result);
292 dbg("Firmware version: %i.%i.%i", transfer_buffer[0], transfer_buffer[1], transfer_buffer[2] ); 292 dbg("Firmware version: %i.%i.%i", transfer_buffer[0], transfer_buffer[1], transfer_buffer[2] );
293 293
294 if (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID || priv->device_type == KOBIL_ADAPTER_K_PRODUCT_ID) { 294 if (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID || priv->device_type == KOBIL_ADAPTER_K_PRODUCT_ID) {
@@ -303,7 +303,7 @@ static int kobil_open (struct usb_serial_port *port, struct file *filp)
303 0, 303 0,
304 KOBIL_TIMEOUT 304 KOBIL_TIMEOUT
305 ); 305 );
306 dbg("%s - port %d Send set_baudrate URB returns: %i", __FUNCTION__, port->number, result); 306 dbg("%s - port %d Send set_baudrate URB returns: %i", __func__, port->number, result);
307 307
308 // reset all queues 308 // reset all queues
309 result = usb_control_msg( port->serial->dev, 309 result = usb_control_msg( port->serial->dev,
@@ -316,13 +316,13 @@ static int kobil_open (struct usb_serial_port *port, struct file *filp)
316 0, 316 0,
317 KOBIL_TIMEOUT 317 KOBIL_TIMEOUT
318 ); 318 );
319 dbg("%s - port %d Send reset_all_queues URB returns: %i", __FUNCTION__, port->number, result); 319 dbg("%s - port %d Send reset_all_queues URB returns: %i", __func__, port->number, result);
320 } 320 }
321 if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID || priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID || 321 if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID || priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID ||
322 priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID) { 322 priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID) {
323 // start reading (Adapter B 'cause PNP string) 323 // start reading (Adapter B 'cause PNP string)
324 result = usb_submit_urb( port->interrupt_in_urb, GFP_ATOMIC ); 324 result = usb_submit_urb( port->interrupt_in_urb, GFP_ATOMIC );
325 dbg("%s - port %d Send read URB returns: %i", __FUNCTION__, port->number, result); 325 dbg("%s - port %d Send read URB returns: %i", __func__, port->number, result);
326 } 326 }
327 327
328 kfree(transfer_buffer); 328 kfree(transfer_buffer);
@@ -332,7 +332,7 @@ static int kobil_open (struct usb_serial_port *port, struct file *filp)
332 332
333static void kobil_close (struct usb_serial_port *port, struct file *filp) 333static void kobil_close (struct usb_serial_port *port, struct file *filp)
334{ 334{
335 dbg("%s - port %d", __FUNCTION__, port->number); 335 dbg("%s - port %d", __func__, port->number);
336 336
337 if (port->write_urb) { 337 if (port->write_urb) {
338 usb_kill_urb(port->write_urb); 338 usb_kill_urb(port->write_urb);
@@ -352,11 +352,11 @@ static void kobil_read_int_callback(struct urb *urb)
352 int status = urb->status; 352 int status = urb->status;
353// char *dbg_data; 353// char *dbg_data;
354 354
355 dbg("%s - port %d", __FUNCTION__, port->number); 355 dbg("%s - port %d", __func__, port->number);
356 356
357 if (status) { 357 if (status) {
358 dbg("%s - port %d Read int status not zero: %d", 358 dbg("%s - port %d Read int status not zero: %d",
359 __FUNCTION__, port->number, status); 359 __func__, port->number, status);
360 return; 360 return;
361 } 361 }
362 362
@@ -386,7 +386,7 @@ static void kobil_read_int_callback(struct urb *urb)
386 port->interrupt_in_urb->dev = port->serial->dev; 386 port->interrupt_in_urb->dev = port->serial->dev;
387 387
388 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); 388 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
389 dbg("%s - port %d Send read URB returns: %i", __FUNCTION__, port->number, result); 389 dbg("%s - port %d Send read URB returns: %i", __func__, port->number, result);
390} 390}
391 391
392 392
@@ -404,21 +404,21 @@ static int kobil_write (struct usb_serial_port *port,
404 struct kobil_private * priv; 404 struct kobil_private * priv;
405 405
406 if (count == 0) { 406 if (count == 0) {
407 dbg("%s - port %d write request of 0 bytes", __FUNCTION__, port->number); 407 dbg("%s - port %d write request of 0 bytes", __func__, port->number);
408 return 0; 408 return 0;
409 } 409 }
410 410
411 priv = usb_get_serial_port_data(port); 411 priv = usb_get_serial_port_data(port);
412 412
413 if (count > (KOBIL_BUF_LENGTH - priv->filled)) { 413 if (count > (KOBIL_BUF_LENGTH - priv->filled)) {
414 dbg("%s - port %d Error: write request bigger than buffer size", __FUNCTION__, port->number); 414 dbg("%s - port %d Error: write request bigger than buffer size", __func__, port->number);
415 return -ENOMEM; 415 return -ENOMEM;
416 } 416 }
417 417
418 // Copy data to buffer 418 // Copy data to buffer
419 memcpy (priv->buf + priv->filled, buf, count); 419 memcpy (priv->buf + priv->filled, buf, count);
420 420
421 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, priv->buf + priv->filled); 421 usb_serial_debug_data(debug, &port->dev, __func__, count, priv->buf + priv->filled);
422 422
423 priv->filled = priv->filled + count; 423 priv->filled = priv->filled + count;
424 424
@@ -450,7 +450,7 @@ static int kobil_write (struct usb_serial_port *port,
450 450
451 priv->cur_pos = priv->cur_pos + length; 451 priv->cur_pos = priv->cur_pos + length;
452 result = usb_submit_urb( port->write_urb, GFP_NOIO ); 452 result = usb_submit_urb( port->write_urb, GFP_NOIO );
453 dbg("%s - port %d Send write URB returns: %i", __FUNCTION__, port->number, result); 453 dbg("%s - port %d Send write URB returns: %i", __func__, port->number, result);
454 todo = priv->filled - priv->cur_pos; 454 todo = priv->filled - priv->cur_pos;
455 455
456 if (todo > 0) { 456 if (todo > 0) {
@@ -471,7 +471,7 @@ static int kobil_write (struct usb_serial_port *port,
471 port->interrupt_in_urb->dev = port->serial->dev; 471 port->interrupt_in_urb->dev = port->serial->dev;
472 472
473 result = usb_submit_urb( port->interrupt_in_urb, GFP_NOIO ); 473 result = usb_submit_urb( port->interrupt_in_urb, GFP_NOIO );
474 dbg("%s - port %d Send read URB returns: %i", __FUNCTION__, port->number, result); 474 dbg("%s - port %d Send read URB returns: %i", __func__, port->number, result);
475 } 475 }
476 } 476 }
477 return count; 477 return count;
@@ -480,7 +480,7 @@ static int kobil_write (struct usb_serial_port *port,
480 480
481static int kobil_write_room (struct usb_serial_port *port) 481static int kobil_write_room (struct usb_serial_port *port)
482{ 482{
483 //dbg("%s - port %d", __FUNCTION__, port->number); 483 //dbg("%s - port %d", __func__, port->number);
484 return 8; 484 return 8;
485} 485}
486 486
@@ -515,7 +515,7 @@ static int kobil_tiocmget(struct usb_serial_port *port, struct file *file)
515 KOBIL_TIMEOUT); 515 KOBIL_TIMEOUT);
516 516
517 dbg("%s - port %d Send get_status_line_state URB returns: %i. Statusline: %02x", 517 dbg("%s - port %d Send get_status_line_state URB returns: %i. Statusline: %02x",
518 __FUNCTION__, port->number, result, transfer_buffer[0]); 518 __func__, port->number, result, transfer_buffer[0]);
519 519
520 result = 0; 520 result = 0;
521 if ((transfer_buffer[0] & SUSBCR_GSL_DSR) != 0) 521 if ((transfer_buffer[0] & SUSBCR_GSL_DSR) != 0)
@@ -558,9 +558,9 @@ static int kobil_tiocmset(struct usb_serial_port *port, struct file *file,
558 558
559 if (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID) { 559 if (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID) {
560 if (dtr != 0) 560 if (dtr != 0)
561 dbg("%s - port %d Setting DTR", __FUNCTION__, port->number); 561 dbg("%s - port %d Setting DTR", __func__, port->number);
562 else 562 else
563 dbg("%s - port %d Clearing DTR", __FUNCTION__, port->number); 563 dbg("%s - port %d Clearing DTR", __func__, port->number);
564 result = usb_control_msg( port->serial->dev, 564 result = usb_control_msg( port->serial->dev,
565 usb_rcvctrlpipe(port->serial->dev, 0 ), 565 usb_rcvctrlpipe(port->serial->dev, 0 ),
566 SUSBCRequest_SetStatusLinesOrQueues, 566 SUSBCRequest_SetStatusLinesOrQueues,
@@ -572,9 +572,9 @@ static int kobil_tiocmset(struct usb_serial_port *port, struct file *file,
572 KOBIL_TIMEOUT); 572 KOBIL_TIMEOUT);
573 } else { 573 } else {
574 if (rts != 0) 574 if (rts != 0)
575 dbg("%s - port %d Setting RTS", __FUNCTION__, port->number); 575 dbg("%s - port %d Setting RTS", __func__, port->number);
576 else 576 else
577 dbg("%s - port %d Clearing RTS", __FUNCTION__, port->number); 577 dbg("%s - port %d Clearing RTS", __func__, port->number);
578 result = usb_control_msg( port->serial->dev, 578 result = usb_control_msg( port->serial->dev,
579 usb_rcvctrlpipe(port->serial->dev, 0 ), 579 usb_rcvctrlpipe(port->serial->dev, 0 ),
580 SUSBCRequest_SetStatusLinesOrQueues, 580 SUSBCRequest_SetStatusLinesOrQueues,
@@ -585,7 +585,7 @@ static int kobil_tiocmset(struct usb_serial_port *port, struct file *file,
585 0, 585 0,
586 KOBIL_TIMEOUT); 586 KOBIL_TIMEOUT);
587 } 587 }
588 dbg("%s - port %d Send set_status_line URB returns: %i", __FUNCTION__, port->number, result); 588 dbg("%s - port %d Send set_status_line URB returns: %i", __func__, port->number, result);
589 kfree(transfer_buffer); 589 kfree(transfer_buffer);
590 return (result < 0) ? result : 0; 590 return (result < 0) ? result : 0;
591} 591}
@@ -678,7 +678,7 @@ static int kobil_ioctl(struct usb_serial_port *port, struct file * file, unsigne
678 KOBIL_TIMEOUT 678 KOBIL_TIMEOUT
679 ); 679 );
680 680
681 dbg("%s - port %d Send reset_all_queues (FLUSH) URB returns: %i", __FUNCTION__, port->number, result); 681 dbg("%s - port %d Send reset_all_queues (FLUSH) URB returns: %i", __func__, port->number, result);
682 kfree(transfer_buffer); 682 kfree(transfer_buffer);
683 return (result < 0) ? -EFAULT : 0; 683 return (result < 0) ? -EFAULT : 0;
684 default: 684 default:
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
index b9e0fbacc8a4..e25c0c2791eb 100644
--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
@@ -399,7 +399,7 @@ static void mct_u232_shutdown (struct usb_serial *serial)
399 struct mct_u232_private *priv; 399 struct mct_u232_private *priv;
400 int i; 400 int i;
401 401
402 dbg("%s", __FUNCTION__); 402 dbg("%s", __func__);
403 403
404 for (i=0; i < serial->num_ports; ++i) { 404 for (i=0; i < serial->num_ports; ++i) {
405 /* My special items, the standard routines free my urbs */ 405 /* My special items, the standard routines free my urbs */
@@ -421,7 +421,7 @@ static int mct_u232_open (struct usb_serial_port *port, struct file *filp)
421 unsigned char last_lcr; 421 unsigned char last_lcr;
422 unsigned char last_msr; 422 unsigned char last_msr;
423 423
424 dbg("%s port %d", __FUNCTION__, port->number); 424 dbg("%s port %d", __func__, port->number);
425 425
426 /* Compensate for a hardware bug: although the Sitecom U232-P25 426 /* Compensate for a hardware bug: although the Sitecom U232-P25
427 * device reports a maximum output packet size of 32 bytes, 427 * device reports a maximum output packet size of 32 bytes,
@@ -486,7 +486,7 @@ static void mct_u232_close (struct usb_serial_port *port, struct file *filp)
486 unsigned int c_cflag; 486 unsigned int c_cflag;
487 unsigned int control_state; 487 unsigned int control_state;
488 struct mct_u232_private *priv = usb_get_serial_port_data(port); 488 struct mct_u232_private *priv = usb_get_serial_port_data(port);
489 dbg("%s port %d", __FUNCTION__, port->number); 489 dbg("%s port %d", __func__, port->number);
490 490
491 if (port->tty) { 491 if (port->tty) {
492 c_cflag = port->tty->termios->c_cflag; 492 c_cflag = port->tty->termios->c_cflag;
@@ -532,21 +532,21 @@ static void mct_u232_read_int_callback (struct urb *urb)
532 case -ESHUTDOWN: 532 case -ESHUTDOWN:
533 /* this urb is terminated, clean up */ 533 /* this urb is terminated, clean up */
534 dbg("%s - urb shutting down with status: %d", 534 dbg("%s - urb shutting down with status: %d",
535 __FUNCTION__, status); 535 __func__, status);
536 return; 536 return;
537 default: 537 default:
538 dbg("%s - nonzero urb status received: %d", 538 dbg("%s - nonzero urb status received: %d",
539 __FUNCTION__, status); 539 __func__, status);
540 goto exit; 540 goto exit;
541 } 541 }
542 542
543 if (!serial) { 543 if (!serial) {
544 dbg("%s - bad serial pointer, exiting", __FUNCTION__); 544 dbg("%s - bad serial pointer, exiting", __func__);
545 return; 545 return;
546 } 546 }
547 547
548 dbg("%s - port %d", __FUNCTION__, port->number); 548 dbg("%s - port %d", __func__, port->number);
549 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 549 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
550 550
551 /* 551 /*
552 * Work-a-round: handle the 'usual' bulk-in pipe here 552 * Work-a-round: handle the 'usual' bulk-in pipe here
@@ -603,7 +603,7 @@ exit:
603 retval = usb_submit_urb (urb, GFP_ATOMIC); 603 retval = usb_submit_urb (urb, GFP_ATOMIC);
604 if (retval) 604 if (retval)
605 err ("%s - usb_submit_urb failed with result %d", 605 err ("%s - usb_submit_urb failed with result %d",
606 __FUNCTION__, retval); 606 __func__, retval);
607} /* mct_u232_read_int_callback */ 607} /* mct_u232_read_int_callback */
608 608
609static void mct_u232_set_termios (struct usb_serial_port *port, 609static void mct_u232_set_termios (struct usb_serial_port *port,
@@ -633,7 +633,7 @@ static void mct_u232_set_termios (struct usb_serial_port *port,
633 633
634 /* reassert DTR and RTS on transition from B0 */ 634 /* reassert DTR and RTS on transition from B0 */
635 if ((old_cflag & CBAUD) == B0) { 635 if ((old_cflag & CBAUD) == B0) {
636 dbg("%s: baud was B0", __FUNCTION__); 636 dbg("%s: baud was B0", __func__);
637 control_state |= TIOCM_DTR | TIOCM_RTS; 637 control_state |= TIOCM_DTR | TIOCM_RTS;
638 mct_u232_set_modem_ctrl(serial, control_state); 638 mct_u232_set_modem_ctrl(serial, control_state);
639 } 639 }
@@ -641,7 +641,7 @@ static void mct_u232_set_termios (struct usb_serial_port *port,
641 mct_u232_set_baud_rate(serial, port, tty_get_baud_rate(port->tty)); 641 mct_u232_set_baud_rate(serial, port, tty_get_baud_rate(port->tty));
642 642
643 if ((cflag & CBAUD) == B0 ) { 643 if ((cflag & CBAUD) == B0 ) {
644 dbg("%s: baud is B0", __FUNCTION__); 644 dbg("%s: baud is B0", __func__);
645 /* Drop RTS and DTR */ 645 /* Drop RTS and DTR */
646 control_state &= ~(TIOCM_DTR | TIOCM_RTS); 646 control_state &= ~(TIOCM_DTR | TIOCM_RTS);
647 mct_u232_set_modem_ctrl(serial, control_state); 647 mct_u232_set_modem_ctrl(serial, control_state);
@@ -696,7 +696,7 @@ static void mct_u232_break_ctl( struct usb_serial_port *port, int break_state )
696 unsigned char lcr; 696 unsigned char lcr;
697 unsigned long flags; 697 unsigned long flags;
698 698
699 dbg("%sstate=%d", __FUNCTION__, break_state); 699 dbg("%sstate=%d", __func__, break_state);
700 700
701 spin_lock_irqsave(&priv->lock, flags); 701 spin_lock_irqsave(&priv->lock, flags);
702 lcr = priv->last_lcr; 702 lcr = priv->last_lcr;
@@ -715,7 +715,7 @@ static int mct_u232_tiocmget (struct usb_serial_port *port, struct file *file)
715 unsigned int control_state; 715 unsigned int control_state;
716 unsigned long flags; 716 unsigned long flags;
717 717
718 dbg("%s", __FUNCTION__); 718 dbg("%s", __func__);
719 719
720 spin_lock_irqsave(&priv->lock, flags); 720 spin_lock_irqsave(&priv->lock, flags);
721 control_state = priv->control_state; 721 control_state = priv->control_state;
@@ -732,7 +732,7 @@ static int mct_u232_tiocmset (struct usb_serial_port *port, struct file *file,
732 unsigned int control_state; 732 unsigned int control_state;
733 unsigned long flags; 733 unsigned long flags;
734 734
735 dbg("%s", __FUNCTION__); 735 dbg("%s", __func__);
736 736
737 spin_lock_irqsave(&priv->lock, flags); 737 spin_lock_irqsave(&priv->lock, flags);
738 control_state = priv->control_state; 738 control_state = priv->control_state;
@@ -754,7 +754,7 @@ static int mct_u232_tiocmset (struct usb_serial_port *port, struct file *file,
754static int mct_u232_ioctl (struct usb_serial_port *port, struct file * file, 754static int mct_u232_ioctl (struct usb_serial_port *port, struct file * file,
755 unsigned int cmd, unsigned long arg) 755 unsigned int cmd, unsigned long arg)
756{ 756{
757 dbg("%scmd=0x%x", __FUNCTION__, cmd); 757 dbg("%scmd=0x%x", __func__, cmd);
758 758
759 /* Based on code from acm.c and others */ 759 /* Based on code from acm.c and others */
760 switch (cmd) { 760 switch (cmd) {
@@ -769,7 +769,7 @@ static int mct_u232_ioctl (struct usb_serial_port *port, struct file * file,
769 return 0; 769 return 0;
770 770
771 default: 771 default:
772 dbg("%s: arg not supported - 0x%04x", __FUNCTION__,cmd); 772 dbg("%s: arg not supported - 0x%04x", __func__,cmd);
773 return(-ENOIOCTLCMD); 773 return(-ENOIOCTLCMD);
774 break; 774 break;
775 } 775 }
@@ -784,7 +784,7 @@ static void mct_u232_throttle (struct usb_serial_port *port)
784 struct tty_struct *tty; 784 struct tty_struct *tty;
785 785
786 tty = port->tty; 786 tty = port->tty;
787 dbg("%s - port %d", __FUNCTION__, port->number); 787 dbg("%s - port %d", __func__, port->number);
788 788
789 spin_lock_irqsave(&priv->lock, flags); 789 spin_lock_irqsave(&priv->lock, flags);
790 priv->rx_flags |= THROTTLED; 790 priv->rx_flags |= THROTTLED;
@@ -806,7 +806,7 @@ static void mct_u232_unthrottle (struct usb_serial_port *port)
806 unsigned int control_state; 806 unsigned int control_state;
807 struct tty_struct *tty; 807 struct tty_struct *tty;
808 808
809 dbg("%s - port %d", __FUNCTION__, port->number); 809 dbg("%s - port %d", __func__, port->number);
810 810
811 tty = port->tty; 811 tty = port->tty;
812 spin_lock_irqsave(&priv->lock, flags); 812 spin_lock_irqsave(&priv->lock, flags);
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index 2e14fdd08464..74b889bf19cf 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -118,11 +118,11 @@ static void mos7720_interrupt_callback(struct urb *urb)
118 case -ENOENT: 118 case -ENOENT:
119 case -ESHUTDOWN: 119 case -ESHUTDOWN:
120 /* this urb is terminated, clean up */ 120 /* this urb is terminated, clean up */
121 dbg("%s - urb shutting down with status: %d", __FUNCTION__, 121 dbg("%s - urb shutting down with status: %d", __func__,
122 status); 122 status);
123 return; 123 return;
124 default: 124 default:
125 dbg("%s - nonzero urb status received: %d", __FUNCTION__, 125 dbg("%s - nonzero urb status received: %d", __func__,
126 status); 126 status);
127 goto exit; 127 goto exit;
128 } 128 }
@@ -183,7 +183,7 @@ exit:
183 if (result) 183 if (result)
184 dev_err(&urb->dev->dev, 184 dev_err(&urb->dev->dev,
185 "%s - Error %d submitting control urb\n", 185 "%s - Error %d submitting control urb\n",
186 __FUNCTION__, result); 186 __func__, result);
187 return; 187 return;
188} 188}
189 189
@@ -214,7 +214,7 @@ static void mos7720_bulk_in_callback(struct urb *urb)
214 214
215 port = mos7720_port->port; 215 port = mos7720_port->port;
216 216
217 dbg("Entering...%s", __FUNCTION__); 217 dbg("Entering...%s", __func__);
218 218
219 data = urb->transfer_buffer; 219 data = urb->transfer_buffer;
220 220
@@ -362,7 +362,7 @@ static int mos7720_open(struct usb_serial_port *port, struct file * filp)
362 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE, 362 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
363 GFP_KERNEL); 363 GFP_KERNEL);
364 if (!urb->transfer_buffer) { 364 if (!urb->transfer_buffer) {
365 err("%s-out of memory for urb buffers.", __FUNCTION__); 365 err("%s-out of memory for urb buffers.", __func__);
366 usb_free_urb(mos7720_port->write_urb_pool[j]); 366 usb_free_urb(mos7720_port->write_urb_pool[j]);
367 mos7720_port->write_urb_pool[j] = NULL; 367 mos7720_port->write_urb_pool[j] = NULL;
368 continue; 368 continue;
@@ -479,7 +479,7 @@ static int mos7720_open(struct usb_serial_port *port, struct file * filp)
479 if (response) 479 if (response)
480 dev_err(&port->dev, 480 dev_err(&port->dev,
481 "%s - Error %d submitting control urb\n", 481 "%s - Error %d submitting control urb\n",
482 __FUNCTION__, response); 482 __func__, response);
483 } 483 }
484 484
485 /* set up our bulk in urb */ 485 /* set up our bulk in urb */
@@ -492,7 +492,7 @@ static int mos7720_open(struct usb_serial_port *port, struct file * filp)
492 response = usb_submit_urb(port->read_urb, GFP_KERNEL); 492 response = usb_submit_urb(port->read_urb, GFP_KERNEL);
493 if (response) 493 if (response)
494 dev_err(&port->dev, 494 dev_err(&port->dev,
495 "%s - Error %d submitting read urb\n", __FUNCTION__, response); 495 "%s - Error %d submitting read urb\n", __func__, response);
496 496
497 /* initialize our icount structure */ 497 /* initialize our icount structure */
498 memset(&(mos7720_port->icount), 0x00, sizeof(mos7720_port->icount)); 498 memset(&(mos7720_port->icount), 0x00, sizeof(mos7720_port->icount));
@@ -521,11 +521,11 @@ static int mos7720_chars_in_buffer(struct usb_serial_port *port)
521 int chars = 0; 521 int chars = 0;
522 struct moschip_port *mos7720_port; 522 struct moschip_port *mos7720_port;
523 523
524 dbg("%s:entering ...........", __FUNCTION__); 524 dbg("%s:entering ...........", __func__);
525 525
526 mos7720_port = usb_get_serial_port_data(port); 526 mos7720_port = usb_get_serial_port_data(port);
527 if (mos7720_port == NULL) { 527 if (mos7720_port == NULL) {
528 dbg("%s:leaving ...........", __FUNCTION__); 528 dbg("%s:leaving ...........", __func__);
529 return -ENODEV; 529 return -ENODEV;
530 } 530 }
531 531
@@ -533,7 +533,7 @@ static int mos7720_chars_in_buffer(struct usb_serial_port *port)
533 if (mos7720_port->write_urb_pool[i] && mos7720_port->write_urb_pool[i]->status == -EINPROGRESS) 533 if (mos7720_port->write_urb_pool[i] && mos7720_port->write_urb_pool[i]->status == -EINPROGRESS)
534 chars += URB_TRANSFER_BUFFER_SIZE; 534 chars += URB_TRANSFER_BUFFER_SIZE;
535 } 535 }
536 dbg("%s - returns %d", __FUNCTION__, chars); 536 dbg("%s - returns %d", __func__, chars);
537 return chars; 537 return chars;
538} 538}
539 539
@@ -585,7 +585,7 @@ static void mos7720_close(struct usb_serial_port *port, struct file *filp)
585 mutex_unlock(&serial->disc_mutex); 585 mutex_unlock(&serial->disc_mutex);
586 mos7720_port->open = 0; 586 mos7720_port->open = 0;
587 587
588 dbg("Leaving %s", __FUNCTION__); 588 dbg("Leaving %s", __func__);
589} 589}
590 590
591static void mos7720_break(struct usb_serial_port *port, int break_state) 591static void mos7720_break(struct usb_serial_port *port, int break_state)
@@ -594,7 +594,7 @@ static void mos7720_break(struct usb_serial_port *port, int break_state)
594 struct usb_serial *serial; 594 struct usb_serial *serial;
595 struct moschip_port *mos7720_port; 595 struct moschip_port *mos7720_port;
596 596
597 dbg("Entering %s", __FUNCTION__); 597 dbg("Entering %s", __func__);
598 598
599 serial = port->serial; 599 serial = port->serial;
600 600
@@ -627,11 +627,11 @@ static int mos7720_write_room(struct usb_serial_port *port)
627 int room = 0; 627 int room = 0;
628 int i; 628 int i;
629 629
630 dbg("%s:entering ...........", __FUNCTION__); 630 dbg("%s:entering ...........", __func__);
631 631
632 mos7720_port = usb_get_serial_port_data(port); 632 mos7720_port = usb_get_serial_port_data(port);
633 if (mos7720_port == NULL) { 633 if (mos7720_port == NULL) {
634 dbg("%s:leaving ...........", __FUNCTION__); 634 dbg("%s:leaving ...........", __func__);
635 return -ENODEV; 635 return -ENODEV;
636 } 636 }
637 637
@@ -640,7 +640,7 @@ static int mos7720_write_room(struct usb_serial_port *port)
640 room += URB_TRANSFER_BUFFER_SIZE; 640 room += URB_TRANSFER_BUFFER_SIZE;
641 } 641 }
642 642
643 dbg("%s - returns %d", __FUNCTION__, room); 643 dbg("%s - returns %d", __func__, room);
644 return room; 644 return room;
645} 645}
646 646
@@ -657,7 +657,7 @@ static int mos7720_write(struct usb_serial_port *port,
657 struct urb *urb; 657 struct urb *urb;
658 const unsigned char *current_position = data; 658 const unsigned char *current_position = data;
659 659
660 dbg("%s:entering ...........", __FUNCTION__); 660 dbg("%s:entering ...........", __func__);
661 661
662 serial = port->serial; 662 serial = port->serial;
663 663
@@ -679,7 +679,7 @@ static int mos7720_write(struct usb_serial_port *port,
679 } 679 }
680 680
681 if (urb == NULL) { 681 if (urb == NULL) {
682 dbg("%s - no more free urbs", __FUNCTION__); 682 dbg("%s - no more free urbs", __func__);
683 goto exit; 683 goto exit;
684 } 684 }
685 685
@@ -687,14 +687,14 @@ static int mos7720_write(struct usb_serial_port *port,
687 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE, 687 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
688 GFP_KERNEL); 688 GFP_KERNEL);
689 if (urb->transfer_buffer == NULL) { 689 if (urb->transfer_buffer == NULL) {
690 err("%s no more kernel memory...", __FUNCTION__); 690 err("%s no more kernel memory...", __func__);
691 goto exit; 691 goto exit;
692 } 692 }
693 } 693 }
694 transfer_size = min (count, URB_TRANSFER_BUFFER_SIZE); 694 transfer_size = min (count, URB_TRANSFER_BUFFER_SIZE);
695 695
696 memcpy(urb->transfer_buffer, current_position, transfer_size); 696 memcpy(urb->transfer_buffer, current_position, transfer_size);
697 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, transfer_size, 697 usb_serial_debug_data(debug, &port->dev, __func__, transfer_size,
698 urb->transfer_buffer); 698 urb->transfer_buffer);
699 699
700 /* fill urb with data and submit */ 700 /* fill urb with data and submit */
@@ -708,7 +708,7 @@ static int mos7720_write(struct usb_serial_port *port,
708 status = usb_submit_urb(urb,GFP_ATOMIC); 708 status = usb_submit_urb(urb,GFP_ATOMIC);
709 if (status) { 709 if (status) {
710 err("%s - usb_submit_urb(write bulk) failed with status = %d", 710 err("%s - usb_submit_urb(write bulk) failed with status = %d",
711 __FUNCTION__, status); 711 __func__, status);
712 bytes_sent = status; 712 bytes_sent = status;
713 goto exit; 713 goto exit;
714 } 714 }
@@ -724,7 +724,7 @@ static void mos7720_throttle(struct usb_serial_port *port)
724 struct tty_struct *tty; 724 struct tty_struct *tty;
725 int status; 725 int status;
726 726
727 dbg("%s- port %d\n", __FUNCTION__, port->number); 727 dbg("%s- port %d\n", __func__, port->number);
728 728
729 mos7720_port = usb_get_serial_port_data(port); 729 mos7720_port = usb_get_serial_port_data(port);
730 730
@@ -736,11 +736,11 @@ static void mos7720_throttle(struct usb_serial_port *port)
736 return; 736 return;
737 } 737 }
738 738
739 dbg("%s: Entering ..........", __FUNCTION__); 739 dbg("%s: Entering ..........", __func__);
740 740
741 tty = port->tty; 741 tty = port->tty;
742 if (!tty) { 742 if (!tty) {
743 dbg("%s - no tty available", __FUNCTION__); 743 dbg("%s - no tty available", __func__);
744 return; 744 return;
745 } 745 }
746 746
@@ -773,15 +773,15 @@ static void mos7720_unthrottle(struct usb_serial_port *port)
773 return; 773 return;
774 774
775 if (!mos7720_port->open) { 775 if (!mos7720_port->open) {
776 dbg("%s - port not opened", __FUNCTION__); 776 dbg("%s - port not opened", __func__);
777 return; 777 return;
778 } 778 }
779 779
780 dbg("%s: Entering ..........", __FUNCTION__); 780 dbg("%s: Entering ..........", __func__);
781 781
782 tty = port->tty; 782 tty = port->tty;
783 if (!tty) { 783 if (!tty) {
784 dbg("%s - no tty available", __FUNCTION__); 784 dbg("%s - no tty available", __func__);
785 return; 785 return;
786 } 786 }
787 787
@@ -922,7 +922,7 @@ static int calc_baud_rate_divisor(int baudrate, int *divisor)
922 __u16 round; 922 __u16 round;
923 923
924 924
925 dbg("%s - %d", __FUNCTION__, baudrate); 925 dbg("%s - %d", __func__, baudrate);
926 926
927 for (i = 0; i < ARRAY_SIZE(divisor_table); i++) { 927 for (i = 0; i < ARRAY_SIZE(divisor_table); i++) {
928 if (divisor_table[i].baudrate == baudrate) { 928 if (divisor_table[i].baudrate == baudrate) {
@@ -973,15 +973,15 @@ static int send_cmd_write_baud_rate(struct moschip_port *mos7720_port,
973 port = mos7720_port->port; 973 port = mos7720_port->port;
974 serial = port->serial; 974 serial = port->serial;
975 975
976 dbg("%s: Entering ..........", __FUNCTION__); 976 dbg("%s: Entering ..........", __func__);
977 977
978 number = port->number - port->serial->minor; 978 number = port->number - port->serial->minor;
979 dbg("%s - port = %d, baud = %d", __FUNCTION__, port->number, baudrate); 979 dbg("%s - port = %d, baud = %d", __func__, port->number, baudrate);
980 980
981 /* Calculate the Divisor */ 981 /* Calculate the Divisor */
982 status = calc_baud_rate_divisor(baudrate, &divisor); 982 status = calc_baud_rate_divisor(baudrate, &divisor);
983 if (status) { 983 if (status) {
984 err("%s - bad baud rate", __FUNCTION__); 984 err("%s - bad baud rate", __func__);
985 return status; 985 return status;
986 } 986 }
987 987
@@ -1034,16 +1034,16 @@ static void change_port_settings(struct moschip_port *mos7720_port,
1034 serial = port->serial; 1034 serial = port->serial;
1035 port_number = port->number - port->serial->minor; 1035 port_number = port->number - port->serial->minor;
1036 1036
1037 dbg("%s - port %d", __FUNCTION__, port->number); 1037 dbg("%s - port %d", __func__, port->number);
1038 1038
1039 if (!mos7720_port->open) { 1039 if (!mos7720_port->open) {
1040 dbg("%s - port not opened", __FUNCTION__); 1040 dbg("%s - port not opened", __func__);
1041 return; 1041 return;
1042 } 1042 }
1043 1043
1044 tty = mos7720_port->port->tty; 1044 tty = mos7720_port->port->tty;
1045 1045
1046 dbg("%s: Entering ..........", __FUNCTION__); 1046 dbg("%s: Entering ..........", __func__);
1047 1047
1048 lData = UART_LCR_WLEN8; 1048 lData = UART_LCR_WLEN8;
1049 lStop = 0x00; /* 1 stop bit */ 1049 lStop = 0x00; /* 1 stop bit */
@@ -1078,14 +1078,14 @@ static void change_port_settings(struct moschip_port *mos7720_port,
1078 if (cflag & PARENB) { 1078 if (cflag & PARENB) {
1079 if (cflag & PARODD) { 1079 if (cflag & PARODD) {
1080 lParity = UART_LCR_PARITY; 1080 lParity = UART_LCR_PARITY;
1081 dbg("%s - parity = odd", __FUNCTION__); 1081 dbg("%s - parity = odd", __func__);
1082 } else { 1082 } else {
1083 lParity = (UART_LCR_EPAR | UART_LCR_PARITY); 1083 lParity = (UART_LCR_EPAR | UART_LCR_PARITY);
1084 dbg("%s - parity = even", __FUNCTION__); 1084 dbg("%s - parity = even", __func__);
1085 } 1085 }
1086 1086
1087 } else { 1087 } else {
1088 dbg("%s - parity = none", __FUNCTION__); 1088 dbg("%s - parity = none", __func__);
1089 } 1089 }
1090 1090
1091 if (cflag & CMSPAR) 1091 if (cflag & CMSPAR)
@@ -1094,10 +1094,10 @@ static void change_port_settings(struct moschip_port *mos7720_port,
1094 /* Change the Stop bit */ 1094 /* Change the Stop bit */
1095 if (cflag & CSTOPB) { 1095 if (cflag & CSTOPB) {
1096 lStop = UART_LCR_STOP; 1096 lStop = UART_LCR_STOP;
1097 dbg("%s - stop bits = 2", __FUNCTION__); 1097 dbg("%s - stop bits = 2", __func__);
1098 } else { 1098 } else {
1099 lStop = 0x00; 1099 lStop = 0x00;
1100 dbg("%s - stop bits = 1", __FUNCTION__); 1100 dbg("%s - stop bits = 1", __func__);
1101 } 1101 }
1102 1102
1103#define LCR_BITS_MASK 0x03 /* Mask for bits/char field */ 1103#define LCR_BITS_MASK 0x03 /* Mask for bits/char field */
@@ -1171,7 +1171,7 @@ static void change_port_settings(struct moschip_port *mos7720_port,
1171 return; 1171 return;
1172 } 1172 }
1173 1173
1174 dbg("%s - baud rate = %d", __FUNCTION__, baud); 1174 dbg("%s - baud rate = %d", __func__, baud);
1175 status = send_cmd_write_baud_rate(mos7720_port, baud); 1175 status = send_cmd_write_baud_rate(mos7720_port, baud);
1176 /* FIXME: needs to write actual resulting baud back not just 1176 /* FIXME: needs to write actual resulting baud back not just
1177 blindly do so */ 1177 blindly do so */
@@ -1217,7 +1217,7 @@ static void mos7720_set_termios(struct usb_serial_port *port,
1217 1217
1218 1218
1219 if (!mos7720_port->open) { 1219 if (!mos7720_port->open) {
1220 dbg("%s - port not opened", __FUNCTION__); 1220 dbg("%s - port not opened", __func__);
1221 return; 1221 return;
1222 } 1222 }
1223 1223
@@ -1225,15 +1225,15 @@ static void mos7720_set_termios(struct usb_serial_port *port,
1225 1225
1226 cflag = tty->termios->c_cflag; 1226 cflag = tty->termios->c_cflag;
1227 1227
1228 dbg("%s - cflag %08x iflag %08x", __FUNCTION__, 1228 dbg("%s - cflag %08x iflag %08x", __func__,
1229 tty->termios->c_cflag, 1229 tty->termios->c_cflag,
1230 RELEVANT_IFLAG(tty->termios->c_iflag)); 1230 RELEVANT_IFLAG(tty->termios->c_iflag));
1231 1231
1232 dbg("%s - old cflag %08x old iflag %08x", __FUNCTION__, 1232 dbg("%s - old cflag %08x old iflag %08x", __func__,
1233 old_termios->c_cflag, 1233 old_termios->c_cflag,
1234 RELEVANT_IFLAG(old_termios->c_iflag)); 1234 RELEVANT_IFLAG(old_termios->c_iflag));
1235 1235
1236 dbg("%s - port %d", __FUNCTION__, port->number); 1236 dbg("%s - port %d", __func__, port->number);
1237 1237
1238 /* change the port settings to the new ones specified */ 1238 /* change the port settings to the new ones specified */
1239 change_port_settings(mos7720_port, old_termios); 1239 change_port_settings(mos7720_port, old_termios);
@@ -1271,7 +1271,7 @@ static int get_lsr_info(struct moschip_port *mos7720_port,
1271 1271
1272 count = mos7720_chars_in_buffer(mos7720_port->port); 1272 count = mos7720_chars_in_buffer(mos7720_port->port);
1273 if (count == 0) { 1273 if (count == 0) {
1274 dbg("%s -- Empty", __FUNCTION__); 1274 dbg("%s -- Empty", __func__);
1275 result = TIOCSER_TEMT; 1275 result = TIOCSER_TEMT;
1276 } 1276 }
1277 1277
@@ -1296,7 +1296,7 @@ static int get_number_bytes_avail(struct moschip_port *mos7720_port,
1296 1296
1297 result = tty->read_cnt; 1297 result = tty->read_cnt;
1298 1298
1299 dbg("%s(%d) = %d", __FUNCTION__, mos7720_port->port->number, result); 1299 dbg("%s(%d) = %d", __func__, mos7720_port->port->number, result);
1300 if (copy_to_user(value, &result, sizeof(int))) 1300 if (copy_to_user(value, &result, sizeof(int)))
1301 return -EFAULT; 1301 return -EFAULT;
1302 1302
@@ -1374,7 +1374,7 @@ static int get_modem_info(struct moschip_port *mos7720_port,
1374 | ((msr & UART_MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */ 1374 | ((msr & UART_MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */
1375 1375
1376 1376
1377 dbg("%s -- %x", __FUNCTION__, result); 1377 dbg("%s -- %x", __func__, result);
1378 1378
1379 if (copy_to_user(value, &result, sizeof(int))) 1379 if (copy_to_user(value, &result, sizeof(int)))
1380 return -EFAULT; 1380 return -EFAULT;
@@ -1418,45 +1418,45 @@ static int mos7720_ioctl(struct usb_serial_port *port, struct file *file,
1418 if (mos7720_port == NULL) 1418 if (mos7720_port == NULL)
1419 return -ENODEV; 1419 return -ENODEV;
1420 1420
1421 dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd); 1421 dbg("%s - port %d, cmd = 0x%x", __func__, port->number, cmd);
1422 1422
1423 switch (cmd) { 1423 switch (cmd) {
1424 case TIOCINQ: 1424 case TIOCINQ:
1425 /* return number of bytes available */ 1425 /* return number of bytes available */
1426 dbg("%s (%d) TIOCINQ", __FUNCTION__, port->number); 1426 dbg("%s (%d) TIOCINQ", __func__, port->number);
1427 return get_number_bytes_avail(mos7720_port, 1427 return get_number_bytes_avail(mos7720_port,
1428 (unsigned int __user *)arg); 1428 (unsigned int __user *)arg);
1429 break; 1429 break;
1430 1430
1431 case TIOCSERGETLSR: 1431 case TIOCSERGETLSR:
1432 dbg("%s (%d) TIOCSERGETLSR", __FUNCTION__, port->number); 1432 dbg("%s (%d) TIOCSERGETLSR", __func__, port->number);
1433 return get_lsr_info(mos7720_port, (unsigned int __user *)arg); 1433 return get_lsr_info(mos7720_port, (unsigned int __user *)arg);
1434 return 0; 1434 return 0;
1435 1435
1436 case TIOCMBIS: 1436 case TIOCMBIS:
1437 case TIOCMBIC: 1437 case TIOCMBIC:
1438 case TIOCMSET: 1438 case TIOCMSET:
1439 dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__, 1439 dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __func__,
1440 port->number); 1440 port->number);
1441 return set_modem_info(mos7720_port, cmd, 1441 return set_modem_info(mos7720_port, cmd,
1442 (unsigned int __user *)arg); 1442 (unsigned int __user *)arg);
1443 1443
1444 case TIOCMGET: 1444 case TIOCMGET:
1445 dbg("%s (%d) TIOCMGET", __FUNCTION__, port->number); 1445 dbg("%s (%d) TIOCMGET", __func__, port->number);
1446 return get_modem_info(mos7720_port, 1446 return get_modem_info(mos7720_port,
1447 (unsigned int __user *)arg); 1447 (unsigned int __user *)arg);
1448 1448
1449 case TIOCGSERIAL: 1449 case TIOCGSERIAL:
1450 dbg("%s (%d) TIOCGSERIAL", __FUNCTION__, port->number); 1450 dbg("%s (%d) TIOCGSERIAL", __func__, port->number);
1451 return get_serial_info(mos7720_port, 1451 return get_serial_info(mos7720_port,
1452 (struct serial_struct __user *)arg); 1452 (struct serial_struct __user *)arg);
1453 1453
1454 case TIOCSSERIAL: 1454 case TIOCSSERIAL:
1455 dbg("%s (%d) TIOCSSERIAL", __FUNCTION__, port->number); 1455 dbg("%s (%d) TIOCSSERIAL", __func__, port->number);
1456 break; 1456 break;
1457 1457
1458 case TIOCMIWAIT: 1458 case TIOCMIWAIT:
1459 dbg("%s (%d) TIOCMIWAIT", __FUNCTION__, port->number); 1459 dbg("%s (%d) TIOCMIWAIT", __func__, port->number);
1460 cprev = mos7720_port->icount; 1460 cprev = mos7720_port->icount;
1461 while (1) { 1461 while (1) {
1462 if (signal_pending(current)) 1462 if (signal_pending(current))
@@ -1490,7 +1490,7 @@ static int mos7720_ioctl(struct usb_serial_port *port, struct file *file,
1490 icount.brk = cnow.brk; 1490 icount.brk = cnow.brk;
1491 icount.buf_overrun = cnow.buf_overrun; 1491 icount.buf_overrun = cnow.buf_overrun;
1492 1492
1493 dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__, 1493 dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __func__,
1494 port->number, icount.rx, icount.tx ); 1494 port->number, icount.rx, icount.tx );
1495 if (copy_to_user((void __user *)arg, &icount, sizeof(icount))) 1495 if (copy_to_user((void __user *)arg, &icount, sizeof(icount)))
1496 return -EFAULT; 1496 return -EFAULT;
@@ -1508,7 +1508,7 @@ static int mos7720_startup(struct usb_serial *serial)
1508 int i; 1508 int i;
1509 char data; 1509 char data;
1510 1510
1511 dbg("%s: Entering ..........", __FUNCTION__); 1511 dbg("%s: Entering ..........", __func__);
1512 1512
1513 if (!serial) { 1513 if (!serial) {
1514 dbg("Invalid Handler"); 1514 dbg("Invalid Handler");
@@ -1520,7 +1520,7 @@ static int mos7720_startup(struct usb_serial *serial)
1520 /* create our private serial structure */ 1520 /* create our private serial structure */
1521 mos7720_serial = kzalloc(sizeof(struct moschip_serial), GFP_KERNEL); 1521 mos7720_serial = kzalloc(sizeof(struct moschip_serial), GFP_KERNEL);
1522 if (mos7720_serial == NULL) { 1522 if (mos7720_serial == NULL) {
1523 err("%s - Out of memory", __FUNCTION__); 1523 err("%s - Out of memory", __func__);
1524 return -ENOMEM; 1524 return -ENOMEM;
1525 } 1525 }
1526 1526
@@ -1533,7 +1533,7 @@ static int mos7720_startup(struct usb_serial *serial)
1533 for (i = 0; i < serial->num_ports; ++i) { 1533 for (i = 0; i < serial->num_ports; ++i) {
1534 mos7720_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL); 1534 mos7720_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL);
1535 if (mos7720_port == NULL) { 1535 if (mos7720_port == NULL) {
1536 err("%s - Out of memory", __FUNCTION__); 1536 err("%s - Out of memory", __func__);
1537 usb_set_serial_data(serial, NULL); 1537 usb_set_serial_data(serial, NULL);
1538 kfree(mos7720_serial); 1538 kfree(mos7720_serial);
1539 return -ENOMEM; 1539 return -ENOMEM;
@@ -1617,7 +1617,7 @@ static int __init moschip7720_init(void)
1617{ 1617{
1618 int retval; 1618 int retval;
1619 1619
1620 dbg("%s: Entering ..........", __FUNCTION__); 1620 dbg("%s: Entering ..........", __func__);
1621 1621
1622 /* Register with the usb serial */ 1622 /* Register with the usb serial */
1623 retval = usb_serial_register(&moschip7720_2port_driver); 1623 retval = usb_serial_register(&moschip7720_2port_driver);
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 37c4f0736bc1..7823222570b6 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -403,7 +403,7 @@ static void mos7840_handle_new_lsr(struct moschip_port *port, __u8 new_lsr)
403{ 403{
404 struct async_icount *icount; 404 struct async_icount *icount;
405 405
406 dbg("%s - %02x", __FUNCTION__, new_lsr); 406 dbg("%s - %02x", __func__, new_lsr);
407 407
408 if (new_lsr & SERIAL_LSR_BI) { 408 if (new_lsr & SERIAL_LSR_BI) {
409 // 409 //
@@ -459,21 +459,21 @@ static void mos7840_control_callback(struct urb *urb)
459 case -ENOENT: 459 case -ENOENT:
460 case -ESHUTDOWN: 460 case -ESHUTDOWN:
461 /* this urb is terminated, clean up */ 461 /* this urb is terminated, clean up */
462 dbg("%s - urb shutting down with status: %d", __FUNCTION__, 462 dbg("%s - urb shutting down with status: %d", __func__,
463 status); 463 status);
464 return; 464 return;
465 default: 465 default:
466 dbg("%s - nonzero urb status received: %d", __FUNCTION__, 466 dbg("%s - nonzero urb status received: %d", __func__,
467 status); 467 status);
468 goto exit; 468 goto exit;
469 } 469 }
470 470
471 dbg("%s urb buffer size is %d\n", __FUNCTION__, urb->actual_length); 471 dbg("%s urb buffer size is %d\n", __func__, urb->actual_length);
472 dbg("%s mos7840_port->MsrLsr is %d port %d\n", __FUNCTION__, 472 dbg("%s mos7840_port->MsrLsr is %d port %d\n", __func__,
473 mos7840_port->MsrLsr, mos7840_port->port_num); 473 mos7840_port->MsrLsr, mos7840_port->port_num);
474 data = urb->transfer_buffer; 474 data = urb->transfer_buffer;
475 regval = (__u8) data[0]; 475 regval = (__u8) data[0];
476 dbg("%s data is %x\n", __FUNCTION__, regval); 476 dbg("%s data is %x\n", __func__, regval);
477 if (mos7840_port->MsrLsr == 0) 477 if (mos7840_port->MsrLsr == 0)
478 mos7840_handle_new_msr(mos7840_port, regval); 478 mos7840_handle_new_msr(mos7840_port, regval);
479 else if (mos7840_port->MsrLsr == 1) 479 else if (mos7840_port->MsrLsr == 1)
@@ -487,7 +487,7 @@ exit:
487 if (result) { 487 if (result) {
488 dev_err(&urb->dev->dev, 488 dev_err(&urb->dev->dev,
489 "%s - Error %d submitting interrupt urb\n", 489 "%s - Error %d submitting interrupt urb\n",
490 __FUNCTION__, result); 490 __func__, result);
491 } 491 }
492} 492}
493 493
@@ -542,11 +542,11 @@ static void mos7840_interrupt_callback(struct urb *urb)
542 case -ENOENT: 542 case -ENOENT:
543 case -ESHUTDOWN: 543 case -ESHUTDOWN:
544 /* this urb is terminated, clean up */ 544 /* this urb is terminated, clean up */
545 dbg("%s - urb shutting down with status: %d", __FUNCTION__, 545 dbg("%s - urb shutting down with status: %d", __func__,
546 status); 546 status);
547 return; 547 return;
548 default: 548 default:
549 dbg("%s - nonzero urb status received: %d", __FUNCTION__, 549 dbg("%s - nonzero urb status received: %d", __func__,
550 status); 550 status);
551 goto exit; 551 goto exit;
552 } 552 }
@@ -614,7 +614,7 @@ exit:
614 if (result) { 614 if (result) {
615 dev_err(&urb->dev->dev, 615 dev_err(&urb->dev->dev,
616 "%s - Error %d submitting interrupt urb\n", 616 "%s - Error %d submitting interrupt urb\n",
617 __FUNCTION__, result); 617 __func__, result);
618 } 618 }
619} 619}
620 620
@@ -692,12 +692,12 @@ static void mos7840_bulk_in_callback(struct urb *urb)
692 } 692 }
693 693
694 port = (struct usb_serial_port *)mos7840_port->port; 694 port = (struct usb_serial_port *)mos7840_port->port;
695 if (mos7840_port_paranoia_check(port, __FUNCTION__)) { 695 if (mos7840_port_paranoia_check(port, __func__)) {
696 dbg("%s", "Port Paranoia failed \n"); 696 dbg("%s", "Port Paranoia failed \n");
697 return; 697 return;
698 } 698 }
699 699
700 serial = mos7840_get_usb_serial(port, __FUNCTION__); 700 serial = mos7840_get_usb_serial(port, __func__);
701 if (!serial) { 701 if (!serial) {
702 dbg("%s\n", "Bad serial pointer "); 702 dbg("%s\n", "Bad serial pointer ");
703 return; 703 return;
@@ -767,7 +767,7 @@ static void mos7840_bulk_out_data_callback(struct urb *urb)
767 return; 767 return;
768 } 768 }
769 769
770 if (mos7840_port_paranoia_check(mos7840_port->port, __FUNCTION__)) { 770 if (mos7840_port_paranoia_check(mos7840_port->port, __func__)) {
771 dbg("%s", "Port Paranoia failed \n"); 771 dbg("%s", "Port Paranoia failed \n");
772 return; 772 return;
773 } 773 }
@@ -815,14 +815,14 @@ static int mos7840_open(struct usb_serial_port *port, struct file *filp)
815 struct moschip_port *mos7840_port; 815 struct moschip_port *mos7840_port;
816 struct moschip_port *port0; 816 struct moschip_port *port0;
817 817
818 if (mos7840_port_paranoia_check(port, __FUNCTION__)) { 818 if (mos7840_port_paranoia_check(port, __func__)) {
819 dbg("%s", "Port Paranoia failed \n"); 819 dbg("%s", "Port Paranoia failed \n");
820 return -ENODEV; 820 return -ENODEV;
821 } 821 }
822 822
823 serial = port->serial; 823 serial = port->serial;
824 824
825 if (mos7840_serial_paranoia_check(serial, __FUNCTION__)) { 825 if (mos7840_serial_paranoia_check(serial, __func__)) {
826 dbg("%s", "Serial Paranoia failed \n"); 826 dbg("%s", "Serial Paranoia failed \n");
827 return -ENODEV; 827 return -ENODEV;
828 } 828 }
@@ -851,7 +851,7 @@ static int mos7840_open(struct usb_serial_port *port, struct file *filp)
851 if (!urb->transfer_buffer) { 851 if (!urb->transfer_buffer) {
852 usb_free_urb(urb); 852 usb_free_urb(urb);
853 mos7840_port->write_urb_pool[j] = NULL; 853 mos7840_port->write_urb_pool[j] = NULL;
854 err("%s-out of memory for urb buffers.", __FUNCTION__); 854 err("%s-out of memory for urb buffers.", __func__);
855 continue; 855 continue;
856 } 856 }
857 } 857 }
@@ -1039,7 +1039,7 @@ static int mos7840_open(struct usb_serial_port *port, struct file *filp)
1039 GFP_KERNEL); 1039 GFP_KERNEL);
1040 if (response) { 1040 if (response) {
1041 err("%s - Error %d submitting interrupt urb", 1041 err("%s - Error %d submitting interrupt urb",
1042 __FUNCTION__, response); 1042 __func__, response);
1043 } 1043 }
1044 1044
1045 } 1045 }
@@ -1072,7 +1072,7 @@ static int mos7840_open(struct usb_serial_port *port, struct file *filp)
1072 port->bulk_in_endpointAddress); 1072 port->bulk_in_endpointAddress);
1073 response = usb_submit_urb(mos7840_port->read_urb, GFP_KERNEL); 1073 response = usb_submit_urb(mos7840_port->read_urb, GFP_KERNEL);
1074 if (response) { 1074 if (response) {
1075 err("%s - Error %d submitting control urb", __FUNCTION__, 1075 err("%s - Error %d submitting control urb", __func__,
1076 response); 1076 response);
1077 } 1077 }
1078 1078
@@ -1116,7 +1116,7 @@ static int mos7840_chars_in_buffer(struct usb_serial_port *port)
1116 1116
1117 dbg("%s \n", " mos7840_chars_in_buffer:entering ..........."); 1117 dbg("%s \n", " mos7840_chars_in_buffer:entering ...........");
1118 1118
1119 if (mos7840_port_paranoia_check(port, __FUNCTION__)) { 1119 if (mos7840_port_paranoia_check(port, __func__)) {
1120 dbg("%s", "Invalid port \n"); 1120 dbg("%s", "Invalid port \n");
1121 return -1; 1121 return -1;
1122 } 1122 }
@@ -1134,7 +1134,7 @@ static int mos7840_chars_in_buffer(struct usb_serial_port *port)
1134 } 1134 }
1135 } 1135 }
1136 spin_unlock_irqrestore(&mos7840_port->pool_lock,flags); 1136 spin_unlock_irqrestore(&mos7840_port->pool_lock,flags);
1137 dbg("%s - returns %d", __FUNCTION__, chars); 1137 dbg("%s - returns %d", __func__, chars);
1138 return chars; 1138 return chars;
1139 1139
1140} 1140}
@@ -1171,7 +1171,7 @@ static void mos7840_block_until_tx_empty(struct moschip_port *mos7840_port)
1171 /* No activity.. count down section */ 1171 /* No activity.. count down section */
1172 wait--; 1172 wait--;
1173 if (wait == 0) { 1173 if (wait == 0) {
1174 dbg("%s - TIMEOUT", __FUNCTION__); 1174 dbg("%s - TIMEOUT", __func__);
1175 return; 1175 return;
1176 } else { 1176 } else {
1177 /* Reset timeout value back to seconds */ 1177 /* Reset timeout value back to seconds */
@@ -1195,12 +1195,12 @@ static void mos7840_close(struct usb_serial_port *port, struct file *filp)
1195 1195
1196 dbg("%s\n", "mos7840_close:entering..."); 1196 dbg("%s\n", "mos7840_close:entering...");
1197 1197
1198 if (mos7840_port_paranoia_check(port, __FUNCTION__)) { 1198 if (mos7840_port_paranoia_check(port, __func__)) {
1199 dbg("%s", "Port Paranoia failed \n"); 1199 dbg("%s", "Port Paranoia failed \n");
1200 return; 1200 return;
1201 } 1201 }
1202 1202
1203 serial = mos7840_get_usb_serial(port, __FUNCTION__); 1203 serial = mos7840_get_usb_serial(port, __func__);
1204 if (!serial) { 1204 if (!serial) {
1205 dbg("%s", "Serial Paranoia failed \n"); 1205 dbg("%s", "Serial Paranoia failed \n");
1206 return; 1206 return;
@@ -1314,7 +1314,7 @@ static void mos7840_block_until_chase_response(struct moschip_port
1314 /* No activity.. count down section */ 1314 /* No activity.. count down section */
1315 wait--; 1315 wait--;
1316 if (wait == 0) { 1316 if (wait == 0) {
1317 dbg("%s - TIMEOUT", __FUNCTION__); 1317 dbg("%s - TIMEOUT", __func__);
1318 return; 1318 return;
1319 } else { 1319 } else {
1320 /* Reset timeout value back to seconds */ 1320 /* Reset timeout value back to seconds */
@@ -1337,12 +1337,12 @@ static void mos7840_break(struct usb_serial_port *port, int break_state)
1337 dbg("%s \n", "Entering ..........."); 1337 dbg("%s \n", "Entering ...........");
1338 dbg("mos7840_break: Start\n"); 1338 dbg("mos7840_break: Start\n");
1339 1339
1340 if (mos7840_port_paranoia_check(port, __FUNCTION__)) { 1340 if (mos7840_port_paranoia_check(port, __func__)) {
1341 dbg("%s", "Port Paranoia failed \n"); 1341 dbg("%s", "Port Paranoia failed \n");
1342 return; 1342 return;
1343 } 1343 }
1344 1344
1345 serial = mos7840_get_usb_serial(port, __FUNCTION__); 1345 serial = mos7840_get_usb_serial(port, __func__);
1346 if (!serial) { 1346 if (!serial) {
1347 dbg("%s", "Serial Paranoia failed \n"); 1347 dbg("%s", "Serial Paranoia failed \n");
1348 return; 1348 return;
@@ -1392,7 +1392,7 @@ static int mos7840_write_room(struct usb_serial_port *port)
1392 1392
1393 dbg("%s \n", " mos7840_write_room:entering ..........."); 1393 dbg("%s \n", " mos7840_write_room:entering ...........");
1394 1394
1395 if (mos7840_port_paranoia_check(port, __FUNCTION__)) { 1395 if (mos7840_port_paranoia_check(port, __func__)) {
1396 dbg("%s", "Invalid port \n"); 1396 dbg("%s", "Invalid port \n");
1397 dbg("%s \n", " mos7840_write_room:leaving ..........."); 1397 dbg("%s \n", " mos7840_write_room:leaving ...........");
1398 return -1; 1398 return -1;
@@ -1413,7 +1413,7 @@ static int mos7840_write_room(struct usb_serial_port *port)
1413 spin_unlock_irqrestore(&mos7840_port->pool_lock, flags); 1413 spin_unlock_irqrestore(&mos7840_port->pool_lock, flags);
1414 1414
1415 room = (room == 0) ? 0 : room - URB_TRANSFER_BUFFER_SIZE + 1; 1415 room = (room == 0) ? 0 : room - URB_TRANSFER_BUFFER_SIZE + 1;
1416 dbg("%s - returns %d", __FUNCTION__, room); 1416 dbg("%s - returns %d", __func__, room);
1417 return room; 1417 return room;
1418 1418
1419} 1419}
@@ -1480,13 +1480,13 @@ static int mos7840_write(struct usb_serial_port *port,
1480 status = mos7840_set_uart_reg(port, LINE_CONTROL_REGISTER, Data); 1480 status = mos7840_set_uart_reg(port, LINE_CONTROL_REGISTER, Data);
1481#endif 1481#endif
1482 1482
1483 if (mos7840_port_paranoia_check(port, __FUNCTION__)) { 1483 if (mos7840_port_paranoia_check(port, __func__)) {
1484 dbg("%s", "Port Paranoia failed \n"); 1484 dbg("%s", "Port Paranoia failed \n");
1485 return -1; 1485 return -1;
1486 } 1486 }
1487 1487
1488 serial = port->serial; 1488 serial = port->serial;
1489 if (mos7840_serial_paranoia_check(serial, __FUNCTION__)) { 1489 if (mos7840_serial_paranoia_check(serial, __func__)) {
1490 dbg("%s", "Serial Paranoia failed \n"); 1490 dbg("%s", "Serial Paranoia failed \n");
1491 return -1; 1491 return -1;
1492 } 1492 }
@@ -1512,7 +1512,7 @@ static int mos7840_write(struct usb_serial_port *port,
1512 spin_unlock_irqrestore(&mos7840_port->pool_lock, flags); 1512 spin_unlock_irqrestore(&mos7840_port->pool_lock, flags);
1513 1513
1514 if (urb == NULL) { 1514 if (urb == NULL) {
1515 dbg("%s - no more free urbs", __FUNCTION__); 1515 dbg("%s - no more free urbs", __func__);
1516 goto exit; 1516 goto exit;
1517 } 1517 }
1518 1518
@@ -1521,7 +1521,7 @@ static int mos7840_write(struct usb_serial_port *port,
1521 kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL); 1521 kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
1522 1522
1523 if (urb->transfer_buffer == NULL) { 1523 if (urb->transfer_buffer == NULL) {
1524 err("%s no more kernel memory...", __FUNCTION__); 1524 err("%s no more kernel memory...", __func__);
1525 goto exit; 1525 goto exit;
1526 } 1526 }
1527 } 1527 }
@@ -1547,7 +1547,7 @@ static int mos7840_write(struct usb_serial_port *port,
1547 if (status) { 1547 if (status) {
1548 mos7840_port->busy[i] = 0; 1548 mos7840_port->busy[i] = 0;
1549 err("%s - usb_submit_urb(write bulk) failed with status = %d", 1549 err("%s - usb_submit_urb(write bulk) failed with status = %d",
1550 __FUNCTION__, status); 1550 __func__, status);
1551 bytes_sent = status; 1551 bytes_sent = status;
1552 goto exit; 1552 goto exit;
1553 } 1553 }
@@ -1573,7 +1573,7 @@ static void mos7840_throttle(struct usb_serial_port *port)
1573 struct tty_struct *tty; 1573 struct tty_struct *tty;
1574 int status; 1574 int status;
1575 1575
1576 if (mos7840_port_paranoia_check(port, __FUNCTION__)) { 1576 if (mos7840_port_paranoia_check(port, __func__)) {
1577 dbg("%s", "Invalid port \n"); 1577 dbg("%s", "Invalid port \n");
1578 return; 1578 return;
1579 } 1579 }
@@ -1594,7 +1594,7 @@ static void mos7840_throttle(struct usb_serial_port *port)
1594 1594
1595 tty = port->tty; 1595 tty = port->tty;
1596 if (!tty) { 1596 if (!tty) {
1597 dbg("%s - no tty available", __FUNCTION__); 1597 dbg("%s - no tty available", __func__);
1598 return; 1598 return;
1599 } 1599 }
1600 1600
@@ -1634,7 +1634,7 @@ static void mos7840_unthrottle(struct usb_serial_port *port)
1634 int status; 1634 int status;
1635 struct moschip_port *mos7840_port = mos7840_get_port_private(port); 1635 struct moschip_port *mos7840_port = mos7840_get_port_private(port);
1636 1636
1637 if (mos7840_port_paranoia_check(port, __FUNCTION__)) { 1637 if (mos7840_port_paranoia_check(port, __func__)) {
1638 dbg("%s", "Invalid port \n"); 1638 dbg("%s", "Invalid port \n");
1639 return; 1639 return;
1640 } 1640 }
@@ -1643,7 +1643,7 @@ static void mos7840_unthrottle(struct usb_serial_port *port)
1643 return; 1643 return;
1644 1644
1645 if (!mos7840_port->open) { 1645 if (!mos7840_port->open) {
1646 dbg("%s - port not opened", __FUNCTION__); 1646 dbg("%s - port not opened", __func__);
1647 return; 1647 return;
1648 } 1648 }
1649 1649
@@ -1651,7 +1651,7 @@ static void mos7840_unthrottle(struct usb_serial_port *port)
1651 1651
1652 tty = port->tty; 1652 tty = port->tty;
1653 if (!tty) { 1653 if (!tty) {
1654 dbg("%s - no tty available", __FUNCTION__); 1654 dbg("%s - no tty available", __func__);
1655 return; 1655 return;
1656 } 1656 }
1657 1657
@@ -1688,7 +1688,7 @@ static int mos7840_tiocmget(struct usb_serial_port *port, struct file *file)
1688 int status = 0; 1688 int status = 0;
1689 mos7840_port = mos7840_get_port_private(port); 1689 mos7840_port = mos7840_get_port_private(port);
1690 1690
1691 dbg("%s - port %d", __FUNCTION__, port->number); 1691 dbg("%s - port %d", __func__, port->number);
1692 1692
1693 if (mos7840_port == NULL) 1693 if (mos7840_port == NULL)
1694 return -ENODEV; 1694 return -ENODEV;
@@ -1703,7 +1703,7 @@ static int mos7840_tiocmget(struct usb_serial_port *port, struct file *file)
1703 | ((msr & MOS7840_MSR_RI) ? TIOCM_RI : 0) 1703 | ((msr & MOS7840_MSR_RI) ? TIOCM_RI : 0)
1704 | ((msr & MOS7840_MSR_DSR) ? TIOCM_DSR : 0); 1704 | ((msr & MOS7840_MSR_DSR) ? TIOCM_DSR : 0);
1705 1705
1706 dbg("%s - 0x%04X", __FUNCTION__, result); 1706 dbg("%s - 0x%04X", __func__, result);
1707 1707
1708 return result; 1708 return result;
1709} 1709}
@@ -1715,7 +1715,7 @@ static int mos7840_tiocmset(struct usb_serial_port *port, struct file *file,
1715 unsigned int mcr; 1715 unsigned int mcr;
1716 unsigned int status; 1716 unsigned int status;
1717 1717
1718 dbg("%s - port %d", __FUNCTION__, port->number); 1718 dbg("%s - port %d", __func__, port->number);
1719 1719
1720 mos7840_port = mos7840_get_port_private(port); 1720 mos7840_port = mos7840_get_port_private(port);
1721 1721
@@ -1759,7 +1759,7 @@ static int mos7840_calc_baud_rate_divisor(int baudRate, int *divisor,
1759 __u16 * clk_sel_val) 1759 __u16 * clk_sel_val)
1760{ 1760{
1761 1761
1762 dbg("%s - %d", __FUNCTION__, baudRate); 1762 dbg("%s - %d", __func__, baudRate);
1763 1763
1764 if (baudRate <= 115200) { 1764 if (baudRate <= 115200) {
1765 *divisor = 115200 / baudRate; 1765 *divisor = 115200 / baudRate;
@@ -1842,12 +1842,12 @@ static int mos7840_send_cmd_write_baud_rate(struct moschip_port *mos7840_port,
1842 return -1; 1842 return -1;
1843 1843
1844 port = (struct usb_serial_port *)mos7840_port->port; 1844 port = (struct usb_serial_port *)mos7840_port->port;
1845 if (mos7840_port_paranoia_check(port, __FUNCTION__)) { 1845 if (mos7840_port_paranoia_check(port, __func__)) {
1846 dbg("%s", "Invalid port \n"); 1846 dbg("%s", "Invalid port \n");
1847 return -1; 1847 return -1;
1848 } 1848 }
1849 1849
1850 if (mos7840_serial_paranoia_check(port->serial, __FUNCTION__)) { 1850 if (mos7840_serial_paranoia_check(port->serial, __func__)) {
1851 dbg("%s", "Invalid Serial \n"); 1851 dbg("%s", "Invalid Serial \n");
1852 return -1; 1852 return -1;
1853 } 1853 }
@@ -1856,7 +1856,7 @@ static int mos7840_send_cmd_write_baud_rate(struct moschip_port *mos7840_port,
1856 1856
1857 number = mos7840_port->port->number - mos7840_port->port->serial->minor; 1857 number = mos7840_port->port->number - mos7840_port->port->serial->minor;
1858 1858
1859 dbg("%s - port = %d, baud = %d", __FUNCTION__, 1859 dbg("%s - port = %d, baud = %d", __func__,
1860 mos7840_port->port->number, baudRate); 1860 mos7840_port->port->number, baudRate);
1861 //reset clk_uart_sel in spregOffset 1861 //reset clk_uart_sel in spregOffset
1862 if (baudRate > 115200) { 1862 if (baudRate > 115200) {
@@ -1916,7 +1916,7 @@ static int mos7840_send_cmd_write_baud_rate(struct moschip_port *mos7840_port,
1916 /* Calculate the Divisor */ 1916 /* Calculate the Divisor */
1917 1917
1918 if (status) { 1918 if (status) {
1919 err("%s - bad baud rate", __FUNCTION__); 1919 err("%s - bad baud rate", __func__);
1920 dbg("%s\n", "bad baud rate"); 1920 dbg("%s\n", "bad baud rate");
1921 return status; 1921 return status;
1922 } 1922 }
@@ -1970,22 +1970,22 @@ static void mos7840_change_port_settings(struct moschip_port *mos7840_port,
1970 1970
1971 port = (struct usb_serial_port *)mos7840_port->port; 1971 port = (struct usb_serial_port *)mos7840_port->port;
1972 1972
1973 if (mos7840_port_paranoia_check(port, __FUNCTION__)) { 1973 if (mos7840_port_paranoia_check(port, __func__)) {
1974 dbg("%s", "Invalid port \n"); 1974 dbg("%s", "Invalid port \n");
1975 return; 1975 return;
1976 } 1976 }
1977 1977
1978 if (mos7840_serial_paranoia_check(port->serial, __FUNCTION__)) { 1978 if (mos7840_serial_paranoia_check(port->serial, __func__)) {
1979 dbg("%s", "Invalid Serial \n"); 1979 dbg("%s", "Invalid Serial \n");
1980 return; 1980 return;
1981 } 1981 }
1982 1982
1983 serial = port->serial; 1983 serial = port->serial;
1984 1984
1985 dbg("%s - port %d", __FUNCTION__, mos7840_port->port->number); 1985 dbg("%s - port %d", __func__, mos7840_port->port->number);
1986 1986
1987 if (!mos7840_port->open) { 1987 if (!mos7840_port->open) {
1988 dbg("%s - port not opened", __FUNCTION__); 1988 dbg("%s - port not opened", __func__);
1989 return; 1989 return;
1990 } 1990 }
1991 1991
@@ -2024,14 +2024,14 @@ static void mos7840_change_port_settings(struct moschip_port *mos7840_port,
2024 if (cflag & PARENB) { 2024 if (cflag & PARENB) {
2025 if (cflag & PARODD) { 2025 if (cflag & PARODD) {
2026 lParity = LCR_PAR_ODD; 2026 lParity = LCR_PAR_ODD;
2027 dbg("%s - parity = odd", __FUNCTION__); 2027 dbg("%s - parity = odd", __func__);
2028 } else { 2028 } else {
2029 lParity = LCR_PAR_EVEN; 2029 lParity = LCR_PAR_EVEN;
2030 dbg("%s - parity = even", __FUNCTION__); 2030 dbg("%s - parity = even", __func__);
2031 } 2031 }
2032 2032
2033 } else { 2033 } else {
2034 dbg("%s - parity = none", __FUNCTION__); 2034 dbg("%s - parity = none", __func__);
2035 } 2035 }
2036 2036
2037 if (cflag & CMSPAR) { 2037 if (cflag & CMSPAR) {
@@ -2041,10 +2041,10 @@ static void mos7840_change_port_settings(struct moschip_port *mos7840_port,
2041 /* Change the Stop bit */ 2041 /* Change the Stop bit */
2042 if (cflag & CSTOPB) { 2042 if (cflag & CSTOPB) {
2043 lStop = LCR_STOP_2; 2043 lStop = LCR_STOP_2;
2044 dbg("%s - stop bits = 2", __FUNCTION__); 2044 dbg("%s - stop bits = 2", __func__);
2045 } else { 2045 } else {
2046 lStop = LCR_STOP_1; 2046 lStop = LCR_STOP_1;
2047 dbg("%s - stop bits = 1", __FUNCTION__); 2047 dbg("%s - stop bits = 1", __func__);
2048 } 2048 }
2049 2049
2050 /* Update the LCR with the correct value */ 2050 /* Update the LCR with the correct value */
@@ -2101,7 +2101,7 @@ static void mos7840_change_port_settings(struct moschip_port *mos7840_port,
2101 baud = 9600; 2101 baud = 9600;
2102 } 2102 }
2103 2103
2104 dbg("%s - baud rate = %d", __FUNCTION__, baud); 2104 dbg("%s - baud rate = %d", __func__, baud);
2105 status = mos7840_send_cmd_write_baud_rate(mos7840_port, baud); 2105 status = mos7840_send_cmd_write_baud_rate(mos7840_port, baud);
2106 2106
2107 /* Enable Interrupts */ 2107 /* Enable Interrupts */
@@ -2141,14 +2141,14 @@ static void mos7840_set_termios(struct usb_serial_port *port,
2141 struct moschip_port *mos7840_port; 2141 struct moschip_port *mos7840_port;
2142 struct tty_struct *tty; 2142 struct tty_struct *tty;
2143 dbg("mos7840_set_termios: START\n"); 2143 dbg("mos7840_set_termios: START\n");
2144 if (mos7840_port_paranoia_check(port, __FUNCTION__)) { 2144 if (mos7840_port_paranoia_check(port, __func__)) {
2145 dbg("%s", "Invalid port \n"); 2145 dbg("%s", "Invalid port \n");
2146 return; 2146 return;
2147 } 2147 }
2148 2148
2149 serial = port->serial; 2149 serial = port->serial;
2150 2150
2151 if (mos7840_serial_paranoia_check(serial, __FUNCTION__)) { 2151 if (mos7840_serial_paranoia_check(serial, __func__)) {
2152 dbg("%s", "Invalid Serial \n"); 2152 dbg("%s", "Invalid Serial \n");
2153 return; 2153 return;
2154 } 2154 }
@@ -2161,7 +2161,7 @@ static void mos7840_set_termios(struct usb_serial_port *port,
2161 tty = port->tty; 2161 tty = port->tty;
2162 2162
2163 if (!mos7840_port->open) { 2163 if (!mos7840_port->open) {
2164 dbg("%s - port not opened", __FUNCTION__); 2164 dbg("%s - port not opened", __func__);
2165 return; 2165 return;
2166 } 2166 }
2167 2167
@@ -2169,11 +2169,11 @@ static void mos7840_set_termios(struct usb_serial_port *port,
2169 2169
2170 cflag = tty->termios->c_cflag; 2170 cflag = tty->termios->c_cflag;
2171 2171
2172 dbg("%s - clfag %08x iflag %08x", __FUNCTION__, 2172 dbg("%s - clfag %08x iflag %08x", __func__,
2173 tty->termios->c_cflag, RELEVANT_IFLAG(tty->termios->c_iflag)); 2173 tty->termios->c_cflag, RELEVANT_IFLAG(tty->termios->c_iflag));
2174 dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__, 2174 dbg("%s - old clfag %08x old iflag %08x", __func__,
2175 old_termios->c_cflag, RELEVANT_IFLAG(old_termios->c_iflag)); 2175 old_termios->c_cflag, RELEVANT_IFLAG(old_termios->c_iflag));
2176 dbg("%s - port %d", __FUNCTION__, port->number); 2176 dbg("%s - port %d", __func__, port->number);
2177 2177
2178 /* change the port settings to the new ones specified */ 2178 /* change the port settings to the new ones specified */
2179 2179
@@ -2214,7 +2214,7 @@ static int mos7840_get_lsr_info(struct moschip_port *mos7840_port,
2214 2214
2215 count = mos7840_chars_in_buffer(mos7840_port->port); 2215 count = mos7840_chars_in_buffer(mos7840_port->port);
2216 if (count == 0) { 2216 if (count == 0) {
2217 dbg("%s -- Empty", __FUNCTION__); 2217 dbg("%s -- Empty", __func__);
2218 result = TIOCSER_TEMT; 2218 result = TIOCSER_TEMT;
2219 } 2219 }
2220 2220
@@ -2241,7 +2241,7 @@ static int mos7840_set_modem_info(struct moschip_port *mos7840_port,
2241 return -1; 2241 return -1;
2242 2242
2243 port = (struct usb_serial_port *)mos7840_port->port; 2243 port = (struct usb_serial_port *)mos7840_port->port;
2244 if (mos7840_port_paranoia_check(port, __FUNCTION__)) { 2244 if (mos7840_port_paranoia_check(port, __func__)) {
2245 dbg("%s", "Invalid port \n"); 2245 dbg("%s", "Invalid port \n");
2246 return -1; 2246 return -1;
2247 } 2247 }
@@ -2315,7 +2315,7 @@ static int mos7840_get_modem_info(struct moschip_port *mos7840_port,
2315 |((msr & MOS7840_MSR_RI) ? TIOCM_RI : 0) /* 0x080 */ 2315 |((msr & MOS7840_MSR_RI) ? TIOCM_RI : 0) /* 0x080 */
2316 |((msr & MOS7840_MSR_DSR) ? TIOCM_DSR : 0); /* 0x100 */ 2316 |((msr & MOS7840_MSR_DSR) ? TIOCM_DSR : 0); /* 0x100 */
2317 2317
2318 dbg("%s -- %x", __FUNCTION__, result); 2318 dbg("%s -- %x", __func__, result);
2319 2319
2320 if (copy_to_user(value, &result, sizeof(int))) 2320 if (copy_to_user(value, &result, sizeof(int)))
2321 return -EFAULT; 2321 return -EFAULT;
@@ -2372,7 +2372,7 @@ static int mos7840_ioctl(struct usb_serial_port *port, struct file *file,
2372 struct serial_icounter_struct icount; 2372 struct serial_icounter_struct icount;
2373 int mosret = 0; 2373 int mosret = 0;
2374 2374
2375 if (mos7840_port_paranoia_check(port, __FUNCTION__)) { 2375 if (mos7840_port_paranoia_check(port, __func__)) {
2376 dbg("%s", "Invalid port \n"); 2376 dbg("%s", "Invalid port \n");
2377 return -1; 2377 return -1;
2378 } 2378 }
@@ -2384,39 +2384,39 @@ static int mos7840_ioctl(struct usb_serial_port *port, struct file *file,
2384 2384
2385 tty = mos7840_port->port->tty; 2385 tty = mos7840_port->port->tty;
2386 2386
2387 dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd); 2387 dbg("%s - port %d, cmd = 0x%x", __func__, port->number, cmd);
2388 2388
2389 switch (cmd) { 2389 switch (cmd) {
2390 /* return number of bytes available */ 2390 /* return number of bytes available */
2391 2391
2392 case TIOCSERGETLSR: 2392 case TIOCSERGETLSR:
2393 dbg("%s (%d) TIOCSERGETLSR", __FUNCTION__, port->number); 2393 dbg("%s (%d) TIOCSERGETLSR", __func__, port->number);
2394 return mos7840_get_lsr_info(mos7840_port, argp); 2394 return mos7840_get_lsr_info(mos7840_port, argp);
2395 return 0; 2395 return 0;
2396 2396
2397 case TIOCMBIS: 2397 case TIOCMBIS:
2398 case TIOCMBIC: 2398 case TIOCMBIC:
2399 case TIOCMSET: 2399 case TIOCMSET:
2400 dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__, 2400 dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __func__,
2401 port->number); 2401 port->number);
2402 mosret = 2402 mosret =
2403 mos7840_set_modem_info(mos7840_port, cmd, argp); 2403 mos7840_set_modem_info(mos7840_port, cmd, argp);
2404 return mosret; 2404 return mosret;
2405 2405
2406 case TIOCMGET: 2406 case TIOCMGET:
2407 dbg("%s (%d) TIOCMGET", __FUNCTION__, port->number); 2407 dbg("%s (%d) TIOCMGET", __func__, port->number);
2408 return mos7840_get_modem_info(mos7840_port, argp); 2408 return mos7840_get_modem_info(mos7840_port, argp);
2409 2409
2410 case TIOCGSERIAL: 2410 case TIOCGSERIAL:
2411 dbg("%s (%d) TIOCGSERIAL", __FUNCTION__, port->number); 2411 dbg("%s (%d) TIOCGSERIAL", __func__, port->number);
2412 return mos7840_get_serial_info(mos7840_port, argp); 2412 return mos7840_get_serial_info(mos7840_port, argp);
2413 2413
2414 case TIOCSSERIAL: 2414 case TIOCSSERIAL:
2415 dbg("%s (%d) TIOCSSERIAL", __FUNCTION__, port->number); 2415 dbg("%s (%d) TIOCSSERIAL", __func__, port->number);
2416 break; 2416 break;
2417 2417
2418 case TIOCMIWAIT: 2418 case TIOCMIWAIT:
2419 dbg("%s (%d) TIOCMIWAIT", __FUNCTION__, port->number); 2419 dbg("%s (%d) TIOCMIWAIT", __func__, port->number);
2420 cprev = mos7840_port->icount; 2420 cprev = mos7840_port->icount;
2421 while (1) { 2421 while (1) {
2422 //interruptible_sleep_on(&mos7840_port->delta_msr_wait); 2422 //interruptible_sleep_on(&mos7840_port->delta_msr_wait);
@@ -2459,7 +2459,7 @@ static int mos7840_ioctl(struct usb_serial_port *port, struct file *file,
2459 icount.brk = cnow.brk; 2459 icount.brk = cnow.brk;
2460 icount.buf_overrun = cnow.buf_overrun; 2460 icount.buf_overrun = cnow.buf_overrun;
2461 2461
2462 dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__, 2462 dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __func__,
2463 port->number, icount.rx, icount.tx); 2463 port->number, icount.rx, icount.tx);
2464 if (copy_to_user(argp, &icount, sizeof(icount))) 2464 if (copy_to_user(argp, &icount, sizeof(icount)))
2465 return -EFAULT; 2465 return -EFAULT;
@@ -2522,7 +2522,7 @@ static int mos7840_startup(struct usb_serial *serial)
2522 for (i = 0; i < serial->num_ports; ++i) { 2522 for (i = 0; i < serial->num_ports; ++i) {
2523 mos7840_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL); 2523 mos7840_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL);
2524 if (mos7840_port == NULL) { 2524 if (mos7840_port == NULL) {
2525 err("%s - Out of memory", __FUNCTION__); 2525 err("%s - Out of memory", __func__);
2526 status = -ENOMEM; 2526 status = -ENOMEM;
2527 i--; /* don't follow NULL pointer cleaning up */ 2527 i--; /* don't follow NULL pointer cleaning up */
2528 goto error; 2528 goto error;
diff --git a/drivers/usb/serial/navman.c b/drivers/usb/serial/navman.c
index ddaccbcde84d..7cea325d577c 100644
--- a/drivers/usb/serial/navman.c
+++ b/drivers/usb/serial/navman.c
@@ -49,15 +49,15 @@ static void navman_read_int_callback(struct urb *urb)
49 case -ESHUTDOWN: 49 case -ESHUTDOWN:
50 /* this urb is terminated, clean up */ 50 /* this urb is terminated, clean up */
51 dbg("%s - urb shutting down with status: %d", 51 dbg("%s - urb shutting down with status: %d",
52 __FUNCTION__, status); 52 __func__, status);
53 return; 53 return;
54 default: 54 default:
55 dbg("%s - nonzero urb status received: %d", 55 dbg("%s - nonzero urb status received: %d",
56 __FUNCTION__, status); 56 __func__, status);
57 goto exit; 57 goto exit;
58 } 58 }
59 59
60 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, 60 usb_serial_debug_data(debug, &port->dev, __func__,
61 urb->actual_length, data); 61 urb->actual_length, data);
62 62
63 tty = port->tty; 63 tty = port->tty;
@@ -72,29 +72,29 @@ exit:
72 if (result) 72 if (result)
73 dev_err(&urb->dev->dev, 73 dev_err(&urb->dev->dev,
74 "%s - Error %d submitting interrupt urb\n", 74 "%s - Error %d submitting interrupt urb\n",
75 __FUNCTION__, result); 75 __func__, result);
76} 76}
77 77
78static int navman_open(struct usb_serial_port *port, struct file *filp) 78static int navman_open(struct usb_serial_port *port, struct file *filp)
79{ 79{
80 int result = 0; 80 int result = 0;
81 81
82 dbg("%s - port %d", __FUNCTION__, port->number); 82 dbg("%s - port %d", __func__, port->number);
83 83
84 if (port->interrupt_in_urb) { 84 if (port->interrupt_in_urb) {
85 dbg("%s - adding interrupt input for treo", __FUNCTION__); 85 dbg("%s - adding interrupt input for treo", __func__);
86 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 86 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
87 if (result) 87 if (result)
88 dev_err(&port->dev, 88 dev_err(&port->dev,
89 "%s - failed submitting interrupt urb, error %d\n", 89 "%s - failed submitting interrupt urb, error %d\n",
90 __FUNCTION__, result); 90 __func__, result);
91 } 91 }
92 return result; 92 return result;
93} 93}
94 94
95static void navman_close(struct usb_serial_port *port, struct file *filp) 95static void navman_close(struct usb_serial_port *port, struct file *filp)
96{ 96{
97 dbg("%s - port %d", __FUNCTION__, port->number); 97 dbg("%s - port %d", __func__, port->number);
98 98
99 usb_kill_urb(port->interrupt_in_urb); 99 usb_kill_urb(port->interrupt_in_urb);
100} 100}
@@ -102,7 +102,7 @@ static void navman_close(struct usb_serial_port *port, struct file *filp)
102static int navman_write(struct usb_serial_port *port, 102static int navman_write(struct usb_serial_port *port,
103 const unsigned char *buf, int count) 103 const unsigned char *buf, int count)
104{ 104{
105 dbg("%s - port %d", __FUNCTION__, port->number); 105 dbg("%s - port %d", __func__, port->number);
106 106
107 /* 107 /*
108 * This device can't write any data, only read from the device 108 * This device can't write any data, only read from the device
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
index 050511ff2b17..1b041c59aab2 100644
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
@@ -150,7 +150,7 @@ static int omninet_attach (struct usb_serial *serial)
150 150
151 od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL ); 151 od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL );
152 if( !od ) { 152 if( !od ) {
153 err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct omninet_data)); 153 err("%s- kmalloc(%Zd) failed.", __func__, sizeof(struct omninet_data));
154 return -ENOMEM; 154 return -ENOMEM;
155 } 155 }
156 usb_set_serial_port_data(port, od); 156 usb_set_serial_port_data(port, od);
@@ -163,7 +163,7 @@ static int omninet_open (struct usb_serial_port *port, struct file *filp)
163 struct usb_serial_port *wport; 163 struct usb_serial_port *wport;
164 int result = 0; 164 int result = 0;
165 165
166 dbg("%s - port %d", __FUNCTION__, port->number); 166 dbg("%s - port %d", __func__, port->number);
167 167
168 wport = serial->port[1]; 168 wport = serial->port[1];
169 wport->tty = port->tty; 169 wport->tty = port->tty;
@@ -175,7 +175,7 @@ static int omninet_open (struct usb_serial_port *port, struct file *filp)
175 omninet_read_bulk_callback, port); 175 omninet_read_bulk_callback, port);
176 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 176 result = usb_submit_urb(port->read_urb, GFP_KERNEL);
177 if (result) { 177 if (result) {
178 err("%s - failed submitting read urb, error %d", __FUNCTION__, result); 178 err("%s - failed submitting read urb, error %d", __func__, result);
179 } 179 }
180 180
181 return result; 181 return result;
@@ -183,7 +183,7 @@ static int omninet_open (struct usb_serial_port *port, struct file *filp)
183 183
184static void omninet_close (struct usb_serial_port *port, struct file * filp) 184static void omninet_close (struct usb_serial_port *port, struct file * filp)
185{ 185{
186 dbg("%s - port %d", __FUNCTION__, port->number); 186 dbg("%s - port %d", __func__, port->number);
187 usb_kill_urb(port->read_urb); 187 usb_kill_urb(port->read_urb);
188} 188}
189 189
@@ -201,11 +201,11 @@ static void omninet_read_bulk_callback (struct urb *urb)
201 int i; 201 int i;
202 int result; 202 int result;
203 203
204 dbg("%s - port %d", __FUNCTION__, port->number); 204 dbg("%s - port %d", __func__, port->number);
205 205
206 if (status) { 206 if (status) {
207 dbg("%s - nonzero read bulk status received: %d", 207 dbg("%s - nonzero read bulk status received: %d",
208 __FUNCTION__, status); 208 __func__, status);
209 return; 209 return;
210 } 210 }
211 211
@@ -233,7 +233,7 @@ static void omninet_read_bulk_callback (struct urb *urb)
233 omninet_read_bulk_callback, port); 233 omninet_read_bulk_callback, port);
234 result = usb_submit_urb(urb, GFP_ATOMIC); 234 result = usb_submit_urb(urb, GFP_ATOMIC);
235 if (result) 235 if (result)
236 err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); 236 err("%s - failed resubmitting read urb, error %d", __func__, result);
237 237
238 return; 238 return;
239} 239}
@@ -248,17 +248,17 @@ static int omninet_write (struct usb_serial_port *port, const unsigned char *buf
248 248
249 int result; 249 int result;
250 250
251 dbg("%s - port %d", __FUNCTION__, port->number); 251 dbg("%s - port %d", __func__, port->number);
252 252
253 if (count == 0) { 253 if (count == 0) {
254 dbg("%s - write request of 0 bytes", __FUNCTION__); 254 dbg("%s - write request of 0 bytes", __func__);
255 return (0); 255 return (0);
256 } 256 }
257 257
258 spin_lock_bh(&wport->lock); 258 spin_lock_bh(&wport->lock);
259 if (wport->write_urb_busy) { 259 if (wport->write_urb_busy) {
260 spin_unlock_bh(&wport->lock); 260 spin_unlock_bh(&wport->lock);
261 dbg("%s - already writing", __FUNCTION__); 261 dbg("%s - already writing", __func__);
262 return 0; 262 return 0;
263 } 263 }
264 wport->write_urb_busy = 1; 264 wport->write_urb_busy = 1;
@@ -268,7 +268,7 @@ static int omninet_write (struct usb_serial_port *port, const unsigned char *buf
268 268
269 memcpy (wport->write_urb->transfer_buffer + OMNINET_DATAOFFSET, buf, count); 269 memcpy (wport->write_urb->transfer_buffer + OMNINET_DATAOFFSET, buf, count);
270 270
271 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, wport->write_urb->transfer_buffer); 271 usb_serial_debug_data(debug, &port->dev, __func__, count, wport->write_urb->transfer_buffer);
272 272
273 header->oh_seq = od->od_outseq++; 273 header->oh_seq = od->od_outseq++;
274 header->oh_len = count; 274 header->oh_len = count;
@@ -282,7 +282,7 @@ static int omninet_write (struct usb_serial_port *port, const unsigned char *buf
282 result = usb_submit_urb(wport->write_urb, GFP_ATOMIC); 282 result = usb_submit_urb(wport->write_urb, GFP_ATOMIC);
283 if (result) { 283 if (result) {
284 wport->write_urb_busy = 0; 284 wport->write_urb_busy = 0;
285 err("%s - failed submitting write urb, error %d", __FUNCTION__, result); 285 err("%s - failed submitting write urb, error %d", __func__, result);
286 } else 286 } else
287 result = count; 287 result = count;
288 288
@@ -300,7 +300,7 @@ static int omninet_write_room (struct usb_serial_port *port)
300 if (wport->write_urb_busy) 300 if (wport->write_urb_busy)
301 room = wport->bulk_out_size - OMNINET_HEADERLEN; 301 room = wport->bulk_out_size - OMNINET_HEADERLEN;
302 302
303 dbg("%s - returns %d", __FUNCTION__, room); 303 dbg("%s - returns %d", __func__, room);
304 304
305 return (room); 305 return (room);
306} 306}
@@ -311,12 +311,12 @@ static void omninet_write_bulk_callback (struct urb *urb)
311 struct usb_serial_port *port = (struct usb_serial_port *) urb->context; 311 struct usb_serial_port *port = (struct usb_serial_port *) urb->context;
312 int status = urb->status; 312 int status = urb->status;
313 313
314 dbg("%s - port %0x\n", __FUNCTION__, port->number); 314 dbg("%s - port %0x\n", __func__, port->number);
315 315
316 port->write_urb_busy = 0; 316 port->write_urb_busy = 0;
317 if (status) { 317 if (status) {
318 dbg("%s - nonzero write bulk status received: %d", 318 dbg("%s - nonzero write bulk status received: %d",
319 __FUNCTION__, status); 319 __func__, status);
320 return; 320 return;
321 } 321 }
322 322
@@ -328,7 +328,7 @@ static void omninet_shutdown (struct usb_serial *serial)
328{ 328{
329 struct usb_serial_port *wport = serial->port[1]; 329 struct usb_serial_port *wport = serial->port[1];
330 struct usb_serial_port *port = serial->port[0]; 330 struct usb_serial_port *port = serial->port[0];
331 dbg ("%s", __FUNCTION__); 331 dbg ("%s", __func__);
332 332
333 usb_kill_urb(wport->write_urb); 333 usb_kill_urb(wport->write_urb);
334 kfree(usb_get_serial_port_data(port)); 334 kfree(usb_get_serial_port_data(port));
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index f4914209871d..920241897c95 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -408,24 +408,24 @@ module_exit(option_exit);
408 408
409static void option_rx_throttle(struct usb_serial_port *port) 409static void option_rx_throttle(struct usb_serial_port *port)
410{ 410{
411 dbg("%s", __FUNCTION__); 411 dbg("%s", __func__);
412} 412}
413 413
414static void option_rx_unthrottle(struct usb_serial_port *port) 414static void option_rx_unthrottle(struct usb_serial_port *port)
415{ 415{
416 dbg("%s", __FUNCTION__); 416 dbg("%s", __func__);
417} 417}
418 418
419static void option_break_ctl(struct usb_serial_port *port, int break_state) 419static void option_break_ctl(struct usb_serial_port *port, int break_state)
420{ 420{
421 /* Unfortunately, I don't know how to send a break */ 421 /* Unfortunately, I don't know how to send a break */
422 dbg("%s", __FUNCTION__); 422 dbg("%s", __func__);
423} 423}
424 424
425static void option_set_termios(struct usb_serial_port *port, 425static void option_set_termios(struct usb_serial_port *port,
426 struct ktermios *old_termios) 426 struct ktermios *old_termios)
427{ 427{
428 dbg("%s", __FUNCTION__); 428 dbg("%s", __func__);
429 /* Doesn't support option setting */ 429 /* Doesn't support option setting */
430 tty_termios_copy_hw(port->tty->termios, old_termios); 430 tty_termios_copy_hw(port->tty->termios, old_termios);
431 option_send_setup(port); 431 option_send_setup(port);
@@ -486,7 +486,7 @@ static int option_write(struct usb_serial_port *port,
486 486
487 portdata = usb_get_serial_port_data(port); 487 portdata = usb_get_serial_port_data(port);
488 488
489 dbg("%s: write (%d chars)", __FUNCTION__, count); 489 dbg("%s: write (%d chars)", __func__, count);
490 490
491 i = 0; 491 i = 0;
492 left = count; 492 left = count;
@@ -507,7 +507,7 @@ static int option_write(struct usb_serial_port *port,
507 dbg("usb_write %p failed (err=%d)", 507 dbg("usb_write %p failed (err=%d)",
508 this_urb, this_urb->status); 508 this_urb, this_urb->status);
509 509
510 dbg("%s: endpoint %d buf %d", __FUNCTION__, 510 dbg("%s: endpoint %d buf %d", __func__,
511 usb_pipeendpoint(this_urb->pipe), i); 511 usb_pipeendpoint(this_urb->pipe), i);
512 512
513 /* send the data */ 513 /* send the data */
@@ -529,7 +529,7 @@ static int option_write(struct usb_serial_port *port,
529 } 529 }
530 530
531 count -= left; 531 count -= left;
532 dbg("%s: wrote (did %d)", __FUNCTION__, count); 532 dbg("%s: wrote (did %d)", __func__, count);
533 return count; 533 return count;
534} 534}
535 535
@@ -542,14 +542,14 @@ static void option_indat_callback(struct urb *urb)
542 unsigned char *data = urb->transfer_buffer; 542 unsigned char *data = urb->transfer_buffer;
543 int status = urb->status; 543 int status = urb->status;
544 544
545 dbg("%s: %p", __FUNCTION__, urb); 545 dbg("%s: %p", __func__, urb);
546 546
547 endpoint = usb_pipeendpoint(urb->pipe); 547 endpoint = usb_pipeendpoint(urb->pipe);
548 port = (struct usb_serial_port *) urb->context; 548 port = (struct usb_serial_port *) urb->context;
549 549
550 if (status) { 550 if (status) {
551 dbg("%s: nonzero status: %d on endpoint %02x.", 551 dbg("%s: nonzero status: %d on endpoint %02x.",
552 __FUNCTION__, status, endpoint); 552 __func__, status, endpoint);
553 } else { 553 } else {
554 tty = port->tty; 554 tty = port->tty;
555 if (urb->actual_length) { 555 if (urb->actual_length) {
@@ -557,7 +557,7 @@ static void option_indat_callback(struct urb *urb)
557 tty_insert_flip_string(tty, data, urb->actual_length); 557 tty_insert_flip_string(tty, data, urb->actual_length);
558 tty_flip_buffer_push(tty); 558 tty_flip_buffer_push(tty);
559 } else { 559 } else {
560 dbg("%s: empty read urb received", __FUNCTION__); 560 dbg("%s: empty read urb received", __func__);
561 } 561 }
562 562
563 /* Resubmit urb so we continue receiving */ 563 /* Resubmit urb so we continue receiving */
@@ -565,7 +565,7 @@ static void option_indat_callback(struct urb *urb)
565 err = usb_submit_urb(urb, GFP_ATOMIC); 565 err = usb_submit_urb(urb, GFP_ATOMIC);
566 if (err) 566 if (err)
567 printk(KERN_ERR "%s: resubmit read urb failed. " 567 printk(KERN_ERR "%s: resubmit read urb failed. "
568 "(%d)", __FUNCTION__, err); 568 "(%d)", __func__, err);
569 } 569 }
570 } 570 }
571 return; 571 return;
@@ -577,7 +577,7 @@ static void option_outdat_callback(struct urb *urb)
577 struct option_port_private *portdata; 577 struct option_port_private *portdata;
578 int i; 578 int i;
579 579
580 dbg("%s", __FUNCTION__); 580 dbg("%s", __func__);
581 581
582 port = (struct usb_serial_port *) urb->context; 582 port = (struct usb_serial_port *) urb->context;
583 583
@@ -601,15 +601,15 @@ static void option_instat_callback(struct urb *urb)
601 struct option_port_private *portdata = usb_get_serial_port_data(port); 601 struct option_port_private *portdata = usb_get_serial_port_data(port);
602 struct usb_serial *serial = port->serial; 602 struct usb_serial *serial = port->serial;
603 603
604 dbg("%s", __FUNCTION__); 604 dbg("%s", __func__);
605 dbg("%s: urb %p port %p has data %p", __FUNCTION__,urb,port,portdata); 605 dbg("%s: urb %p port %p has data %p", __func__,urb,port,portdata);
606 606
607 if (status == 0) { 607 if (status == 0) {
608 struct usb_ctrlrequest *req_pkt = 608 struct usb_ctrlrequest *req_pkt =
609 (struct usb_ctrlrequest *)urb->transfer_buffer; 609 (struct usb_ctrlrequest *)urb->transfer_buffer;
610 610
611 if (!req_pkt) { 611 if (!req_pkt) {
612 dbg("%s: NULL req_pkt\n", __FUNCTION__); 612 dbg("%s: NULL req_pkt\n", __func__);
613 return; 613 return;
614 } 614 }
615 if ((req_pkt->bRequestType == 0xA1) && 615 if ((req_pkt->bRequestType == 0xA1) &&
@@ -619,7 +619,7 @@ static void option_instat_callback(struct urb *urb)
619 urb->transfer_buffer + 619 urb->transfer_buffer +
620 sizeof(struct usb_ctrlrequest)); 620 sizeof(struct usb_ctrlrequest));
621 621
622 dbg("%s: signal x%x", __FUNCTION__, signals); 622 dbg("%s: signal x%x", __func__, signals);
623 623
624 old_dcd_state = portdata->dcd_state; 624 old_dcd_state = portdata->dcd_state;
625 portdata->cts_state = 1; 625 portdata->cts_state = 1;
@@ -631,11 +631,11 @@ static void option_instat_callback(struct urb *urb)
631 old_dcd_state && !portdata->dcd_state) 631 old_dcd_state && !portdata->dcd_state)
632 tty_hangup(port->tty); 632 tty_hangup(port->tty);
633 } else { 633 } else {
634 dbg("%s: type %x req %x", __FUNCTION__, 634 dbg("%s: type %x req %x", __func__,
635 req_pkt->bRequestType,req_pkt->bRequest); 635 req_pkt->bRequestType,req_pkt->bRequest);
636 } 636 }
637 } else 637 } else
638 dbg("%s: error %d", __FUNCTION__, status); 638 dbg("%s: error %d", __func__, status);
639 639
640 /* Resubmit urb so we continue receiving IRQ data */ 640 /* Resubmit urb so we continue receiving IRQ data */
641 if (status != -ESHUTDOWN) { 641 if (status != -ESHUTDOWN) {
@@ -643,7 +643,7 @@ static void option_instat_callback(struct urb *urb)
643 err = usb_submit_urb(urb, GFP_ATOMIC); 643 err = usb_submit_urb(urb, GFP_ATOMIC);
644 if (err) 644 if (err)
645 dbg("%s: resubmit intr urb failed. (%d)", 645 dbg("%s: resubmit intr urb failed. (%d)",
646 __FUNCTION__, err); 646 __func__, err);
647 } 647 }
648} 648}
649 649
@@ -662,7 +662,7 @@ static int option_write_room(struct usb_serial_port *port)
662 data_len += OUT_BUFLEN; 662 data_len += OUT_BUFLEN;
663 } 663 }
664 664
665 dbg("%s: %d", __FUNCTION__, data_len); 665 dbg("%s: %d", __func__, data_len);
666 return data_len; 666 return data_len;
667} 667}
668 668
@@ -680,7 +680,7 @@ static int option_chars_in_buffer(struct usb_serial_port *port)
680 if (this_urb && test_bit(i, &portdata->out_busy)) 680 if (this_urb && test_bit(i, &portdata->out_busy))
681 data_len += this_urb->transfer_buffer_length; 681 data_len += this_urb->transfer_buffer_length;
682 } 682 }
683 dbg("%s: %d", __FUNCTION__, data_len); 683 dbg("%s: %d", __func__, data_len);
684 return data_len; 684 return data_len;
685} 685}
686 686
@@ -693,7 +693,7 @@ static int option_open(struct usb_serial_port *port, struct file *filp)
693 693
694 portdata = usb_get_serial_port_data(port); 694 portdata = usb_get_serial_port_data(port);
695 695
696 dbg("%s", __FUNCTION__); 696 dbg("%s", __func__);
697 697
698 /* Set some sane defaults */ 698 /* Set some sane defaults */
699 portdata->rts_state = 1; 699 portdata->rts_state = 1;
@@ -705,7 +705,7 @@ static int option_open(struct usb_serial_port *port, struct file *filp)
705 if (! urb) 705 if (! urb)
706 continue; 706 continue;
707 if (urb->dev != serial->dev) { 707 if (urb->dev != serial->dev) {
708 dbg("%s: dev %p != %p", __FUNCTION__, 708 dbg("%s: dev %p != %p", __func__,
709 urb->dev, serial->dev); 709 urb->dev, serial->dev);
710 continue; 710 continue;
711 } 711 }
@@ -719,7 +719,7 @@ static int option_open(struct usb_serial_port *port, struct file *filp)
719 err = usb_submit_urb(urb, GFP_KERNEL); 719 err = usb_submit_urb(urb, GFP_KERNEL);
720 if (err) { 720 if (err) {
721 dbg("%s: submit urb %d failed (%d) %d", 721 dbg("%s: submit urb %d failed (%d) %d",
722 __FUNCTION__, i, err, 722 __func__, i, err,
723 urb->transfer_buffer_length); 723 urb->transfer_buffer_length);
724 } 724 }
725 } 725 }
@@ -747,7 +747,7 @@ static void option_close(struct usb_serial_port *port, struct file *filp)
747 struct usb_serial *serial = port->serial; 747 struct usb_serial *serial = port->serial;
748 struct option_port_private *portdata; 748 struct option_port_private *portdata;
749 749
750 dbg("%s", __FUNCTION__); 750 dbg("%s", __func__);
751 portdata = usb_get_serial_port_data(port); 751 portdata = usb_get_serial_port_data(port);
752 752
753 portdata->rts_state = 0; 753 portdata->rts_state = 0;
@@ -780,7 +780,7 @@ static struct urb *option_setup_urb(struct usb_serial *serial, int endpoint,
780 780
781 urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */ 781 urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */
782 if (urb == NULL) { 782 if (urb == NULL) {
783 dbg("%s: alloc for endpoint %d failed.", __FUNCTION__, endpoint); 783 dbg("%s: alloc for endpoint %d failed.", __func__, endpoint);
784 return NULL; 784 return NULL;
785 } 785 }
786 786
@@ -799,7 +799,7 @@ static void option_setup_urbs(struct usb_serial *serial)
799 struct usb_serial_port *port; 799 struct usb_serial_port *port;
800 struct option_port_private *portdata; 800 struct option_port_private *portdata;
801 801
802 dbg("%s", __FUNCTION__); 802 dbg("%s", __func__);
803 803
804 for (i = 0; i < serial->num_ports; i++) { 804 for (i = 0; i < serial->num_ports; i++) {
805 port = serial->port[i]; 805 port = serial->port[i];
@@ -832,7 +832,7 @@ static int option_send_setup(struct usb_serial_port *port)
832 struct usb_serial *serial = port->serial; 832 struct usb_serial *serial = port->serial;
833 struct option_port_private *portdata; 833 struct option_port_private *portdata;
834 int ifNum = serial->interface->cur_altsetting->desc.bInterfaceNumber; 834 int ifNum = serial->interface->cur_altsetting->desc.bInterfaceNumber;
835 dbg("%s", __FUNCTION__); 835 dbg("%s", __func__);
836 836
837 portdata = usb_get_serial_port_data(port); 837 portdata = usb_get_serial_port_data(port);
838 838
@@ -858,7 +858,7 @@ static int option_startup(struct usb_serial *serial)
858 struct option_port_private *portdata; 858 struct option_port_private *portdata;
859 u8 *buffer; 859 u8 *buffer;
860 860
861 dbg("%s", __FUNCTION__); 861 dbg("%s", __func__);
862 862
863 /* Now setup per port private data */ 863 /* Now setup per port private data */
864 for (i = 0; i < serial->num_ports; i++) { 864 for (i = 0; i < serial->num_ports; i++) {
@@ -866,7 +866,7 @@ static int option_startup(struct usb_serial *serial)
866 portdata = kzalloc(sizeof(*portdata), GFP_KERNEL); 866 portdata = kzalloc(sizeof(*portdata), GFP_KERNEL);
867 if (!portdata) { 867 if (!portdata) {
868 dbg("%s: kmalloc for option_port_private (%d) failed!.", 868 dbg("%s: kmalloc for option_port_private (%d) failed!.",
869 __FUNCTION__, i); 869 __func__, i);
870 return (1); 870 return (1);
871 } 871 }
872 872
@@ -891,7 +891,7 @@ static int option_startup(struct usb_serial *serial)
891 err = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 891 err = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
892 if (err) 892 if (err)
893 dbg("%s: submit irq_in urb failed %d", 893 dbg("%s: submit irq_in urb failed %d",
894 __FUNCTION__, err); 894 __func__, err);
895 } 895 }
896 896
897 option_setup_urbs(serial); 897 option_setup_urbs(serial);
@@ -915,7 +915,7 @@ static void option_shutdown(struct usb_serial *serial)
915 struct usb_serial_port *port; 915 struct usb_serial_port *port;
916 struct option_port_private *portdata; 916 struct option_port_private *portdata;
917 917
918 dbg("%s", __FUNCTION__); 918 dbg("%s", __func__);
919 919
920 /* Stop reading/writing urbs */ 920 /* Stop reading/writing urbs */
921 for (i = 0; i < serial->num_ports; ++i) { 921 for (i = 0; i < serial->num_ports; ++i) {
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index 20a680ed0cc7..87f33e06301c 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -235,10 +235,10 @@ static void setup_line(struct work_struct *work)
235 unsigned long flags; 235 unsigned long flags;
236 int result; 236 int result;
237 237
238 dbg("%s(port = %d)", __FUNCTION__, port->number); 238 dbg("%s(port = %d)", __func__, port->number);
239 239
240 if ((new_setup = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL)) == NULL) { 240 if ((new_setup = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL)) == NULL) {
241 dev_err(&port->dev, "%s(): out of memory!\n", __FUNCTION__); 241 dev_err(&port->dev, "%s(): out of memory!\n", __func__);
242 /* we will try again */ 242 /* we will try again */
243 schedule_delayed_work(&priv->delayed_setup_work, msecs_to_jiffies(2)); 243 schedule_delayed_work(&priv->delayed_setup_work, msecs_to_jiffies(2));
244 return; 244 return;
@@ -253,7 +253,7 @@ static void setup_line(struct work_struct *work)
253 100); 253 100);
254 254
255 if (result != OTI6858_CTRL_PKT_SIZE) { 255 if (result != OTI6858_CTRL_PKT_SIZE) {
256 dev_err(&port->dev, "%s(): error reading status\n", __FUNCTION__); 256 dev_err(&port->dev, "%s(): error reading status\n", __func__);
257 kfree(new_setup); 257 kfree(new_setup);
258 /* we will try again */ 258 /* we will try again */
259 schedule_delayed_work(&priv->delayed_setup_work, msecs_to_jiffies(2)); 259 schedule_delayed_work(&priv->delayed_setup_work, msecs_to_jiffies(2));
@@ -286,12 +286,12 @@ static void setup_line(struct work_struct *work)
286 priv->setup_done = 1; 286 priv->setup_done = 1;
287 spin_unlock_irqrestore(&priv->lock, flags); 287 spin_unlock_irqrestore(&priv->lock, flags);
288 288
289 dbg("%s(): submitting interrupt urb", __FUNCTION__); 289 dbg("%s(): submitting interrupt urb", __func__);
290 port->interrupt_in_urb->dev = port->serial->dev; 290 port->interrupt_in_urb->dev = port->serial->dev;
291 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); 291 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
292 if (result != 0) { 292 if (result != 0) {
293 dev_err(&port->dev, "%s(): usb_submit_urb() failed" 293 dev_err(&port->dev, "%s(): usb_submit_urb() failed"
294 " with error %d\n", __FUNCTION__, result); 294 " with error %d\n", __func__, result);
295 } 295 }
296} 296}
297 297
@@ -303,7 +303,7 @@ void send_data(struct work_struct *work)
303 unsigned long flags; 303 unsigned long flags;
304 unsigned char allow; 304 unsigned char allow;
305 305
306 dbg("%s(port = %d)", __FUNCTION__, port->number); 306 dbg("%s(port = %d)", __func__, port->number);
307 307
308 spin_lock_irqsave(&priv->lock, flags); 308 spin_lock_irqsave(&priv->lock, flags);
309 if (priv->flags.write_urb_in_use) { 309 if (priv->flags.write_urb_in_use) {
@@ -331,12 +331,12 @@ void send_data(struct work_struct *work)
331 if (count == 0) { 331 if (count == 0) {
332 priv->flags.write_urb_in_use = 0; 332 priv->flags.write_urb_in_use = 0;
333 333
334 dbg("%s(): submitting interrupt urb", __FUNCTION__); 334 dbg("%s(): submitting interrupt urb", __func__);
335 port->interrupt_in_urb->dev = port->serial->dev; 335 port->interrupt_in_urb->dev = port->serial->dev;
336 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); 336 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
337 if (result != 0) { 337 if (result != 0) {
338 dev_err(&port->dev, "%s(): usb_submit_urb() failed" 338 dev_err(&port->dev, "%s(): usb_submit_urb() failed"
339 " with error %d\n", __FUNCTION__, result); 339 " with error %d\n", __func__, result);
340 } 340 }
341 return; 341 return;
342 } 342 }
@@ -350,7 +350,7 @@ void send_data(struct work_struct *work)
350 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 350 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
351 if (result != 0) { 351 if (result != 0) {
352 dev_err(&port->dev, "%s(): usb_submit_urb() failed" 352 dev_err(&port->dev, "%s(): usb_submit_urb() failed"
353 " with error %d\n", __FUNCTION__, result); 353 " with error %d\n", __func__, result);
354 priv->flags.write_urb_in_use = 0; 354 priv->flags.write_urb_in_use = 0;
355 } 355 }
356 356
@@ -401,7 +401,7 @@ static int oti6858_write(struct usb_serial_port *port,
401 struct oti6858_private *priv = usb_get_serial_port_data(port); 401 struct oti6858_private *priv = usb_get_serial_port_data(port);
402 unsigned long flags; 402 unsigned long flags;
403 403
404 dbg("%s(port = %d, count = %d)", __FUNCTION__, port->number, count); 404 dbg("%s(port = %d, count = %d)", __func__, port->number, count);
405 405
406 if (!count) 406 if (!count)
407 return count; 407 return count;
@@ -419,7 +419,7 @@ static int oti6858_write_room(struct usb_serial_port *port)
419 int room = 0; 419 int room = 0;
420 unsigned long flags; 420 unsigned long flags;
421 421
422 dbg("%s(port = %d)", __FUNCTION__, port->number); 422 dbg("%s(port = %d)", __func__, port->number);
423 423
424 spin_lock_irqsave(&priv->lock, flags); 424 spin_lock_irqsave(&priv->lock, flags);
425 room = oti6858_buf_space_avail(priv->buf); 425 room = oti6858_buf_space_avail(priv->buf);
@@ -434,7 +434,7 @@ static int oti6858_chars_in_buffer(struct usb_serial_port *port)
434 int chars = 0; 434 int chars = 0;
435 unsigned long flags; 435 unsigned long flags;
436 436
437 dbg("%s(port = %d)", __FUNCTION__, port->number); 437 dbg("%s(port = %d)", __func__, port->number);
438 438
439 spin_lock_irqsave(&priv->lock, flags); 439 spin_lock_irqsave(&priv->lock, flags);
440 chars = oti6858_buf_data_avail(priv->buf); 440 chars = oti6858_buf_data_avail(priv->buf);
@@ -453,10 +453,10 @@ static void oti6858_set_termios(struct usb_serial_port *port,
453 u16 divisor; 453 u16 divisor;
454 int br; 454 int br;
455 455
456 dbg("%s(port = %d)", __FUNCTION__, port->number); 456 dbg("%s(port = %d)", __func__, port->number);
457 457
458 if (!port->tty || !port->tty->termios) { 458 if (!port->tty || !port->tty->termios) {
459 dbg("%s(): no tty structures", __FUNCTION__); 459 dbg("%s(): no tty structures", __func__);
460 return; 460 return;
461 } 461 }
462 462
@@ -572,7 +572,7 @@ static int oti6858_open(struct usb_serial_port *port, struct file *filp)
572 unsigned long flags; 572 unsigned long flags;
573 int result; 573 int result;
574 574
575 dbg("%s(port = %d)", __FUNCTION__, port->number); 575 dbg("%s(port = %d)", __func__, port->number);
576 576
577 usb_clear_halt(serial->dev, port->write_urb->pipe); 577 usb_clear_halt(serial->dev, port->write_urb->pipe);
578 usb_clear_halt(serial->dev, port->read_urb->pipe); 578 usb_clear_halt(serial->dev, port->read_urb->pipe);
@@ -581,7 +581,7 @@ static int oti6858_open(struct usb_serial_port *port, struct file *filp)
581 return 0; 581 return 0;
582 582
583 if ((buf = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL)) == NULL) { 583 if ((buf = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL)) == NULL) {
584 dev_err(&port->dev, "%s(): out of memory!\n", __FUNCTION__); 584 dev_err(&port->dev, "%s(): out of memory!\n", __func__);
585 return -ENOMEM; 585 return -ENOMEM;
586 } 586 }
587 587
@@ -610,12 +610,12 @@ static int oti6858_open(struct usb_serial_port *port, struct file *filp)
610 spin_unlock_irqrestore(&priv->lock, flags); 610 spin_unlock_irqrestore(&priv->lock, flags);
611 kfree(buf); 611 kfree(buf);
612 612
613 dbg("%s(): submitting interrupt urb", __FUNCTION__); 613 dbg("%s(): submitting interrupt urb", __func__);
614 port->interrupt_in_urb->dev = serial->dev; 614 port->interrupt_in_urb->dev = serial->dev;
615 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 615 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
616 if (result != 0) { 616 if (result != 0) {
617 dev_err(&port->dev, "%s(): usb_submit_urb() failed" 617 dev_err(&port->dev, "%s(): usb_submit_urb() failed"
618 " with error %d\n", __FUNCTION__, result); 618 " with error %d\n", __func__, result);
619 oti6858_close(port, NULL); 619 oti6858_close(port, NULL);
620 return -EPROTO; 620 return -EPROTO;
621 } 621 }
@@ -634,14 +634,14 @@ static void oti6858_close(struct usb_serial_port *port, struct file *filp)
634 long timeout; 634 long timeout;
635 wait_queue_t wait; 635 wait_queue_t wait;
636 636
637 dbg("%s(port = %d)", __FUNCTION__, port->number); 637 dbg("%s(port = %d)", __func__, port->number);
638 638
639 /* wait for data to drain from the buffer */ 639 /* wait for data to drain from the buffer */
640 spin_lock_irqsave(&priv->lock, flags); 640 spin_lock_irqsave(&priv->lock, flags);
641 timeout = 30 * HZ; /* PL2303_CLOSING_WAIT */ 641 timeout = 30 * HZ; /* PL2303_CLOSING_WAIT */
642 init_waitqueue_entry(&wait, current); 642 init_waitqueue_entry(&wait, current);
643 add_wait_queue(&port->tty->write_wait, &wait); 643 add_wait_queue(&port->tty->write_wait, &wait);
644 dbg("%s(): entering wait loop", __FUNCTION__); 644 dbg("%s(): entering wait loop", __func__);
645 for (;;) { 645 for (;;) {
646 set_current_state(TASK_INTERRUPTIBLE); 646 set_current_state(TASK_INTERRUPTIBLE);
647 if (oti6858_buf_data_avail(priv->buf) == 0 647 if (oti6858_buf_data_avail(priv->buf) == 0
@@ -654,7 +654,7 @@ static void oti6858_close(struct usb_serial_port *port, struct file *filp)
654 } 654 }
655 set_current_state(TASK_RUNNING); 655 set_current_state(TASK_RUNNING);
656 remove_wait_queue(&port->tty->write_wait, &wait); 656 remove_wait_queue(&port->tty->write_wait, &wait);
657 dbg("%s(): after wait loop", __FUNCTION__); 657 dbg("%s(): after wait loop", __func__);
658 658
659 /* clear out any remaining data in the buffer */ 659 /* clear out any remaining data in the buffer */
660 oti6858_buf_clear(priv->buf); 660 oti6858_buf_clear(priv->buf);
@@ -675,7 +675,7 @@ static void oti6858_close(struct usb_serial_port *port, struct file *filp)
675 */ 675 */
676 timeout = 2*HZ; 676 timeout = 2*HZ;
677 schedule_timeout_interruptible(timeout); 677 schedule_timeout_interruptible(timeout);
678 dbg("%s(): after schedule_timeout_interruptible()", __FUNCTION__); 678 dbg("%s(): after schedule_timeout_interruptible()", __func__);
679 679
680 /* cancel scheduled setup */ 680 /* cancel scheduled setup */
681 cancel_delayed_work(&priv->delayed_setup_work); 681 cancel_delayed_work(&priv->delayed_setup_work);
@@ -683,7 +683,7 @@ static void oti6858_close(struct usb_serial_port *port, struct file *filp)
683 flush_scheduled_work(); 683 flush_scheduled_work();
684 684
685 /* shutdown our urbs */ 685 /* shutdown our urbs */
686 dbg("%s(): shutting down urbs", __FUNCTION__); 686 dbg("%s(): shutting down urbs", __func__);
687 usb_kill_urb(port->write_urb); 687 usb_kill_urb(port->write_urb);
688 usb_kill_urb(port->read_urb); 688 usb_kill_urb(port->read_urb);
689 usb_kill_urb(port->interrupt_in_urb); 689 usb_kill_urb(port->interrupt_in_urb);
@@ -706,7 +706,7 @@ static int oti6858_tiocmset(struct usb_serial_port *port, struct file *file,
706 u8 control; 706 u8 control;
707 707
708 dbg("%s(port = %d, set = 0x%08x, clear = 0x%08x)", 708 dbg("%s(port = %d, set = 0x%08x, clear = 0x%08x)",
709 __FUNCTION__, port->number, set, clear); 709 __func__, port->number, set, clear);
710 710
711 if (!usb_get_intfdata(port->serial->interface)) 711 if (!usb_get_intfdata(port->serial->interface))
712 return -ENODEV; 712 return -ENODEV;
@@ -738,7 +738,7 @@ static int oti6858_tiocmget(struct usb_serial_port *port, struct file *file)
738 unsigned pin_state; 738 unsigned pin_state;
739 unsigned result = 0; 739 unsigned result = 0;
740 740
741 dbg("%s(port = %d)", __FUNCTION__, port->number); 741 dbg("%s(port = %d)", __func__, port->number);
742 742
743 if (!usb_get_intfdata(port->serial->interface)) 743 if (!usb_get_intfdata(port->serial->interface))
744 return -ENODEV; 744 return -ENODEV;
@@ -761,7 +761,7 @@ static int oti6858_tiocmget(struct usb_serial_port *port, struct file *file)
761 if ((pin_state & PIN_DCD) != 0) 761 if ((pin_state & PIN_DCD) != 0)
762 result |= TIOCM_CD; 762 result |= TIOCM_CD;
763 763
764 dbg("%s() = 0x%08x", __FUNCTION__, result); 764 dbg("%s() = 0x%08x", __func__, result);
765 765
766 return result; 766 return result;
767} 767}
@@ -808,7 +808,7 @@ static int oti6858_ioctl(struct usb_serial_port *port, struct file *file,
808 unsigned int x; 808 unsigned int x;
809 809
810 dbg("%s(port = %d, cmd = 0x%04x, arg = 0x%08lx)", 810 dbg("%s(port = %d, cmd = 0x%04x, arg = 0x%08lx)",
811 __FUNCTION__, port->number, cmd, arg); 811 __func__, port->number, cmd, arg);
812 812
813 switch (cmd) { 813 switch (cmd) {
814 case TIOCMBIS: 814 case TIOCMBIS:
@@ -822,11 +822,11 @@ static int oti6858_ioctl(struct usb_serial_port *port, struct file *file,
822 return oti6858_tiocmset(port, NULL, 0, x); 822 return oti6858_tiocmset(port, NULL, 0, x);
823 823
824 case TIOCMIWAIT: 824 case TIOCMIWAIT:
825 dbg("%s(): TIOCMIWAIT", __FUNCTION__); 825 dbg("%s(): TIOCMIWAIT", __func__);
826 return wait_modem_info(port, arg); 826 return wait_modem_info(port, arg);
827 827
828 default: 828 default:
829 dbg("%s(): 0x%04x not supported", __FUNCTION__, cmd); 829 dbg("%s(): 0x%04x not supported", __func__, cmd);
830 break; 830 break;
831 } 831 }
832 832
@@ -837,10 +837,10 @@ static void oti6858_break_ctl(struct usb_serial_port *port, int break_state)
837{ 837{
838 int state; 838 int state;
839 839
840 dbg("%s(port = %d)", __FUNCTION__, port->number); 840 dbg("%s(port = %d)", __func__, port->number);
841 841
842 state = (break_state == 0) ? 0 : 1; 842 state = (break_state == 0) ? 0 : 1;
843 dbg("%s(): turning break %s", __FUNCTION__, state ? "on" : "off"); 843 dbg("%s(): turning break %s", __func__, state ? "on" : "off");
844 844
845 /* FIXME */ 845 /* FIXME */
846/* 846/*
@@ -848,7 +848,7 @@ static void oti6858_break_ctl(struct usb_serial_port *port, int break_state)
848 BREAK_REQUEST, BREAK_REQUEST_TYPE, state, 848 BREAK_REQUEST, BREAK_REQUEST_TYPE, state,
849 0, NULL, 0, 100); 849 0, NULL, 0, 100);
850 if (result != 0) 850 if (result != 0)
851 dbg("%s(): error sending break", __FUNCTION__); 851 dbg("%s(): error sending break", __func__);
852 */ 852 */
853} 853}
854 854
@@ -857,7 +857,7 @@ static void oti6858_shutdown(struct usb_serial *serial)
857 struct oti6858_private *priv; 857 struct oti6858_private *priv;
858 int i; 858 int i;
859 859
860 dbg("%s()", __FUNCTION__); 860 dbg("%s()", __func__);
861 861
862 for (i = 0; i < serial->num_ports; ++i) { 862 for (i = 0; i < serial->num_ports; ++i) {
863 priv = usb_get_serial_port_data(serial->port[i]); 863 priv = usb_get_serial_port_data(serial->port[i]);
@@ -877,7 +877,7 @@ static void oti6858_read_int_callback(struct urb *urb)
877 int status = urb->status; 877 int status = urb->status;
878 878
879 dbg("%s(port = %d, status = %d)", 879 dbg("%s(port = %d, status = %d)",
880 __FUNCTION__, port->number, status); 880 __func__, port->number, status);
881 881
882 switch (status) { 882 switch (status) {
883 case 0: 883 case 0:
@@ -888,11 +888,11 @@ static void oti6858_read_int_callback(struct urb *urb)
888 case -ESHUTDOWN: 888 case -ESHUTDOWN:
889 /* this urb is terminated, clean up */ 889 /* this urb is terminated, clean up */
890 dbg("%s(): urb shutting down with status: %d", 890 dbg("%s(): urb shutting down with status: %d",
891 __FUNCTION__, status); 891 __func__, status);
892 return; 892 return;
893 default: 893 default:
894 dbg("%s(): nonzero urb status received: %d", 894 dbg("%s(): nonzero urb status received: %d",
895 __FUNCTION__, status); 895 __func__, status);
896 break; 896 break;
897 } 897 }
898 898
@@ -909,7 +909,7 @@ static void oti6858_read_int_callback(struct urb *urb)
909 priv->setup_done = 0; 909 priv->setup_done = 0;
910 resubmit = 0; 910 resubmit = 0;
911 dbg("%s(): scheduling setup_line()", 911 dbg("%s(): scheduling setup_line()",
912 __FUNCTION__); 912 __func__);
913 schedule_delayed_work(&priv->delayed_setup_work, 0); 913 schedule_delayed_work(&priv->delayed_setup_work, 0);
914 } 914 }
915 } 915 }
@@ -924,7 +924,7 @@ static void oti6858_read_int_callback(struct urb *urb)
924 priv->setup_done = 0; 924 priv->setup_done = 0;
925 resubmit = 0; 925 resubmit = 0;
926 dbg("%s(): scheduling setup_line()", 926 dbg("%s(): scheduling setup_line()",
927 __FUNCTION__); 927 __func__);
928 schedule_delayed_work(&priv->delayed_setup_work, 0); 928 schedule_delayed_work(&priv->delayed_setup_work, 0);
929 } 929 }
930 } 930 }
@@ -953,7 +953,7 @@ static void oti6858_read_int_callback(struct urb *urb)
953 if (result != 0) { 953 if (result != 0) {
954 priv->flags.read_urb_in_use = 0; 954 priv->flags.read_urb_in_use = 0;
955 dev_err(&port->dev, "%s(): usb_submit_urb() failed," 955 dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
956 " error %d\n", __FUNCTION__, result); 956 " error %d\n", __func__, result);
957 } else { 957 } else {
958 resubmit = 0; 958 resubmit = 0;
959 } 959 }
@@ -972,13 +972,13 @@ static void oti6858_read_int_callback(struct urb *urb)
972 if (resubmit) { 972 if (resubmit) {
973 int result; 973 int result;
974 974
975// dbg("%s(): submitting interrupt urb", __FUNCTION__); 975// dbg("%s(): submitting interrupt urb", __func__);
976 urb->dev = port->serial->dev; 976 urb->dev = port->serial->dev;
977 result = usb_submit_urb(urb, GFP_ATOMIC); 977 result = usb_submit_urb(urb, GFP_ATOMIC);
978 if (result != 0) { 978 if (result != 0) {
979 dev_err(&urb->dev->dev, 979 dev_err(&urb->dev->dev,
980 "%s(): usb_submit_urb() failed with" 980 "%s(): usb_submit_urb() failed with"
981 " error %d\n", __FUNCTION__, result); 981 " error %d\n", __func__, result);
982 } 982 }
983 } 983 }
984} 984}
@@ -994,7 +994,7 @@ static void oti6858_read_bulk_callback(struct urb *urb)
994 int result; 994 int result;
995 995
996 dbg("%s(port = %d, status = %d)", 996 dbg("%s(port = %d, status = %d)",
997 __FUNCTION__, port->number, status); 997 __func__, port->number, status);
998 998
999 spin_lock_irqsave(&priv->lock, flags); 999 spin_lock_irqsave(&priv->lock, flags);
1000 priv->flags.read_urb_in_use = 0; 1000 priv->flags.read_urb_in_use = 0;
@@ -1002,20 +1002,20 @@ static void oti6858_read_bulk_callback(struct urb *urb)
1002 1002
1003 if (status != 0) { 1003 if (status != 0) {
1004 if (!port->open_count) { 1004 if (!port->open_count) {
1005 dbg("%s(): port is closed, exiting", __FUNCTION__); 1005 dbg("%s(): port is closed, exiting", __func__);
1006 return; 1006 return;
1007 } 1007 }
1008 /* 1008 /*
1009 if (status == -EPROTO) { 1009 if (status == -EPROTO) {
1010 // PL2303 mysteriously fails with -EPROTO reschedule the read 1010 // PL2303 mysteriously fails with -EPROTO reschedule the read
1011 dbg("%s - caught -EPROTO, resubmitting the urb", __FUNCTION__); 1011 dbg("%s - caught -EPROTO, resubmitting the urb", __func__);
1012 result = usb_submit_urb(urb, GFP_ATOMIC); 1012 result = usb_submit_urb(urb, GFP_ATOMIC);
1013 if (result) 1013 if (result)
1014 dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); 1014 dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __func__, result);
1015 return; 1015 return;
1016 } 1016 }
1017 */ 1017 */
1018 dbg("%s(): unable to handle the error, exiting", __FUNCTION__); 1018 dbg("%s(): unable to handle the error, exiting", __func__);
1019 return; 1019 return;
1020 } 1020 }
1021 1021
@@ -1031,7 +1031,7 @@ static void oti6858_read_bulk_callback(struct urb *urb)
1031 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); 1031 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
1032 if (result != 0) { 1032 if (result != 0) {
1033 dev_err(&port->dev, "%s(): usb_submit_urb() failed," 1033 dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
1034 " error %d\n", __FUNCTION__, result); 1034 " error %d\n", __func__, result);
1035 } 1035 }
1036 } 1036 }
1037} 1037}
@@ -1044,7 +1044,7 @@ static void oti6858_write_bulk_callback(struct urb *urb)
1044 int result; 1044 int result;
1045 1045
1046 dbg("%s(port = %d, status = %d)", 1046 dbg("%s(port = %d, status = %d)",
1047 __FUNCTION__, port->number, status); 1047 __func__, port->number, status);
1048 1048
1049 switch (status) { 1049 switch (status) {
1050 case 0: 1050 case 0:
@@ -1055,21 +1055,21 @@ static void oti6858_write_bulk_callback(struct urb *urb)
1055 case -ESHUTDOWN: 1055 case -ESHUTDOWN:
1056 /* this urb is terminated, clean up */ 1056 /* this urb is terminated, clean up */
1057 dbg("%s(): urb shutting down with status: %d", 1057 dbg("%s(): urb shutting down with status: %d",
1058 __FUNCTION__, status); 1058 __func__, status);
1059 priv->flags.write_urb_in_use = 0; 1059 priv->flags.write_urb_in_use = 0;
1060 return; 1060 return;
1061 default: 1061 default:
1062 /* error in the urb, so we have to resubmit it */ 1062 /* error in the urb, so we have to resubmit it */
1063 dbg("%s(): nonzero write bulk status received: %d", 1063 dbg("%s(): nonzero write bulk status received: %d",
1064 __FUNCTION__, status); 1064 __func__, status);
1065 dbg("%s(): overflow in write", __FUNCTION__); 1065 dbg("%s(): overflow in write", __func__);
1066 1066
1067 port->write_urb->transfer_buffer_length = 1; 1067 port->write_urb->transfer_buffer_length = 1;
1068 port->write_urb->dev = port->serial->dev; 1068 port->write_urb->dev = port->serial->dev;
1069 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 1069 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
1070 if (result) { 1070 if (result) {
1071 dev_err(&port->dev, "%s(): usb_submit_urb() failed," 1071 dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
1072 " error %d\n", __FUNCTION__, result); 1072 " error %d\n", __func__, result);
1073 } else { 1073 } else {
1074 return; 1074 return;
1075 } 1075 }
@@ -1079,11 +1079,11 @@ static void oti6858_write_bulk_callback(struct urb *urb)
1079 1079
1080 // schedule the interrupt urb if we are still open */ 1080 // schedule the interrupt urb if we are still open */
1081 port->interrupt_in_urb->dev = port->serial->dev; 1081 port->interrupt_in_urb->dev = port->serial->dev;
1082 dbg("%s(): submitting interrupt urb", __FUNCTION__); 1082 dbg("%s(): submitting interrupt urb", __func__);
1083 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); 1083 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
1084 if (result != 0) { 1084 if (result != 0) {
1085 dev_err(&port->dev, "%s(): failed submitting int urb," 1085 dev_err(&port->dev, "%s(): failed submitting int urb,"
1086 " error %d\n", __FUNCTION__, result); 1086 " error %d\n", __func__, result);
1087 } 1087 }
1088} 1088}
1089 1089
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 1fbb4dbdf23d..2b4ab371c762 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -410,7 +410,7 @@ static int set_control_lines(struct usb_device *dev, u8 value)
410 retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 410 retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
411 SET_CONTROL_REQUEST, SET_CONTROL_REQUEST_TYPE, 411 SET_CONTROL_REQUEST, SET_CONTROL_REQUEST_TYPE,
412 value, 0, NULL, 0, 100); 412 value, 0, NULL, 0, 100);
413 dbg("%s - value = %d, retval = %d", __FUNCTION__, value, retval); 413 dbg("%s - value = %d, retval = %d", __func__, value, retval);
414 return retval; 414 return retval;
415} 415}
416 416
@@ -420,7 +420,7 @@ static void pl2303_send(struct usb_serial_port *port)
420 struct pl2303_private *priv = usb_get_serial_port_data(port); 420 struct pl2303_private *priv = usb_get_serial_port_data(port);
421 unsigned long flags; 421 unsigned long flags;
422 422
423 dbg("%s - port %d", __FUNCTION__, port->number); 423 dbg("%s - port %d", __func__, port->number);
424 424
425 spin_lock_irqsave(&priv->lock, flags); 425 spin_lock_irqsave(&priv->lock, flags);
426 426
@@ -441,7 +441,7 @@ static void pl2303_send(struct usb_serial_port *port)
441 441
442 spin_unlock_irqrestore(&priv->lock, flags); 442 spin_unlock_irqrestore(&priv->lock, flags);
443 443
444 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, 444 usb_serial_debug_data(debug, &port->dev, __func__, count,
445 port->write_urb->transfer_buffer); 445 port->write_urb->transfer_buffer);
446 446
447 port->write_urb->transfer_buffer_length = count; 447 port->write_urb->transfer_buffer_length = count;
@@ -449,7 +449,7 @@ static void pl2303_send(struct usb_serial_port *port)
449 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 449 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
450 if (result) { 450 if (result) {
451 dev_err(&port->dev, "%s - failed submitting write urb," 451 dev_err(&port->dev, "%s - failed submitting write urb,"
452 " error %d\n", __FUNCTION__, result); 452 " error %d\n", __func__, result);
453 priv->write_urb_in_use = 0; 453 priv->write_urb_in_use = 0;
454 // TODO: reschedule pl2303_send 454 // TODO: reschedule pl2303_send
455 } 455 }
@@ -463,7 +463,7 @@ static int pl2303_write(struct usb_serial_port *port, const unsigned char *buf,
463 struct pl2303_private *priv = usb_get_serial_port_data(port); 463 struct pl2303_private *priv = usb_get_serial_port_data(port);
464 unsigned long flags; 464 unsigned long flags;
465 465
466 dbg("%s - port %d, %d bytes", __FUNCTION__, port->number, count); 466 dbg("%s - port %d, %d bytes", __func__, port->number, count);
467 467
468 if (!count) 468 if (!count)
469 return count; 469 return count;
@@ -483,13 +483,13 @@ static int pl2303_write_room(struct usb_serial_port *port)
483 int room = 0; 483 int room = 0;
484 unsigned long flags; 484 unsigned long flags;
485 485
486 dbg("%s - port %d", __FUNCTION__, port->number); 486 dbg("%s - port %d", __func__, port->number);
487 487
488 spin_lock_irqsave(&priv->lock, flags); 488 spin_lock_irqsave(&priv->lock, flags);
489 room = pl2303_buf_space_avail(priv->buf); 489 room = pl2303_buf_space_avail(priv->buf);
490 spin_unlock_irqrestore(&priv->lock, flags); 490 spin_unlock_irqrestore(&priv->lock, flags);
491 491
492 dbg("%s - returns %d", __FUNCTION__, room); 492 dbg("%s - returns %d", __func__, room);
493 return room; 493 return room;
494} 494}
495 495
@@ -499,13 +499,13 @@ static int pl2303_chars_in_buffer(struct usb_serial_port *port)
499 int chars = 0; 499 int chars = 0;
500 unsigned long flags; 500 unsigned long flags;
501 501
502 dbg("%s - port %d", __FUNCTION__, port->number); 502 dbg("%s - port %d", __func__, port->number);
503 503
504 spin_lock_irqsave(&priv->lock, flags); 504 spin_lock_irqsave(&priv->lock, flags);
505 chars = pl2303_buf_data_avail(priv->buf); 505 chars = pl2303_buf_data_avail(priv->buf);
506 spin_unlock_irqrestore(&priv->lock, flags); 506 spin_unlock_irqrestore(&priv->lock, flags);
507 507
508 dbg("%s - returns %d", __FUNCTION__, chars); 508 dbg("%s - returns %d", __func__, chars);
509 return chars; 509 return chars;
510} 510}
511 511
@@ -521,7 +521,7 @@ static void pl2303_set_termios(struct usb_serial_port *port,
521 int i; 521 int i;
522 u8 control; 522 u8 control;
523 523
524 dbg("%s - port %d", __FUNCTION__, port->number); 524 dbg("%s - port %d", __func__, port->number);
525 525
526 spin_lock_irqsave(&priv->lock, flags); 526 spin_lock_irqsave(&priv->lock, flags);
527 if (!priv->termios_initialized) { 527 if (!priv->termios_initialized) {
@@ -545,7 +545,7 @@ static void pl2303_set_termios(struct usb_serial_port *port,
545 545
546 buf = kzalloc(7, GFP_KERNEL); 546 buf = kzalloc(7, GFP_KERNEL);
547 if (!buf) { 547 if (!buf) {
548 dev_err(&port->dev, "%s - out of memory.\n", __FUNCTION__); 548 dev_err(&port->dev, "%s - out of memory.\n", __func__);
549 return; 549 return;
550 } 550 }
551 551
@@ -563,11 +563,11 @@ static void pl2303_set_termios(struct usb_serial_port *port,
563 default: 563 default:
564 case CS8: buf[6] = 8; break; 564 case CS8: buf[6] = 8; break;
565 } 565 }
566 dbg("%s - data bits = %d", __FUNCTION__, buf[6]); 566 dbg("%s - data bits = %d", __func__, buf[6]);
567 } 567 }
568 568
569 baud = tty_get_baud_rate(port->tty);; 569 baud = tty_get_baud_rate(port->tty);;
570 dbg("%s - baud = %d", __FUNCTION__, baud); 570 dbg("%s - baud = %d", __func__, baud);
571 if (baud) { 571 if (baud) {
572 buf[0] = baud & 0xff; 572 buf[0] = baud & 0xff;
573 buf[1] = (baud >> 8) & 0xff; 573 buf[1] = (baud >> 8) & 0xff;
@@ -580,10 +580,10 @@ static void pl2303_set_termios(struct usb_serial_port *port,
580 /* For reference buf[4]=2 is 2 stop bits */ 580 /* For reference buf[4]=2 is 2 stop bits */
581 if (cflag & CSTOPB) { 581 if (cflag & CSTOPB) {
582 buf[4] = 2; 582 buf[4] = 2;
583 dbg("%s - stop bits = 2", __FUNCTION__); 583 dbg("%s - stop bits = 2", __func__);
584 } else { 584 } else {
585 buf[4] = 0; 585 buf[4] = 0;
586 dbg("%s - stop bits = 1", __FUNCTION__); 586 dbg("%s - stop bits = 1", __func__);
587 } 587 }
588 588
589 if (cflag & PARENB) { 589 if (cflag & PARENB) {
@@ -594,14 +594,14 @@ static void pl2303_set_termios(struct usb_serial_port *port,
594 /* For reference buf[5]=4 is space parity */ 594 /* For reference buf[5]=4 is space parity */
595 if (cflag & PARODD) { 595 if (cflag & PARODD) {
596 buf[5] = 1; 596 buf[5] = 1;
597 dbg("%s - parity = odd", __FUNCTION__); 597 dbg("%s - parity = odd", __func__);
598 } else { 598 } else {
599 buf[5] = 2; 599 buf[5] = 2;
600 dbg("%s - parity = even", __FUNCTION__); 600 dbg("%s - parity = even", __func__);
601 } 601 }
602 } else { 602 } else {
603 buf[5] = 0; 603 buf[5] = 0;
604 dbg("%s - parity = none", __FUNCTION__); 604 dbg("%s - parity = none", __func__);
605 } 605 }
606 606
607 i = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), 607 i = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
@@ -657,7 +657,7 @@ static void pl2303_close(struct usb_serial_port *port, struct file *filp)
657 long timeout; 657 long timeout;
658 wait_queue_t wait; 658 wait_queue_t wait;
659 659
660 dbg("%s - port %d", __FUNCTION__, port->number); 660 dbg("%s - port %d", __func__, port->number);
661 661
662 /* wait for data to drain from the buffer */ 662 /* wait for data to drain from the buffer */
663 spin_lock_irqsave(&priv->lock, flags); 663 spin_lock_irqsave(&priv->lock, flags);
@@ -695,7 +695,7 @@ static void pl2303_close(struct usb_serial_port *port, struct file *filp)
695 schedule_timeout_interruptible(timeout); 695 schedule_timeout_interruptible(timeout);
696 696
697 /* shutdown our urbs */ 697 /* shutdown our urbs */
698 dbg("%s - shutting down urbs", __FUNCTION__); 698 dbg("%s - shutting down urbs", __func__);
699 usb_kill_urb(port->write_urb); 699 usb_kill_urb(port->write_urb);
700 usb_kill_urb(port->read_urb); 700 usb_kill_urb(port->read_urb);
701 usb_kill_urb(port->interrupt_in_urb); 701 usb_kill_urb(port->interrupt_in_urb);
@@ -719,7 +719,7 @@ static int pl2303_open(struct usb_serial_port *port, struct file *filp)
719 struct pl2303_private *priv = usb_get_serial_port_data(port); 719 struct pl2303_private *priv = usb_get_serial_port_data(port);
720 int result; 720 int result;
721 721
722 dbg("%s - port %d", __FUNCTION__, port->number); 722 dbg("%s - port %d", __func__, port->number);
723 723
724 if (priv->type != HX) { 724 if (priv->type != HX) {
725 usb_clear_halt(serial->dev, port->write_urb->pipe); 725 usb_clear_halt(serial->dev, port->write_urb->pipe);
@@ -737,22 +737,22 @@ static int pl2303_open(struct usb_serial_port *port, struct file *filp)
737 737
738 //FIXME: need to assert RTS and DTR if CRTSCTS off 738 //FIXME: need to assert RTS and DTR if CRTSCTS off
739 739
740 dbg("%s - submitting read urb", __FUNCTION__); 740 dbg("%s - submitting read urb", __func__);
741 port->read_urb->dev = serial->dev; 741 port->read_urb->dev = serial->dev;
742 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 742 result = usb_submit_urb(port->read_urb, GFP_KERNEL);
743 if (result) { 743 if (result) {
744 dev_err(&port->dev, "%s - failed submitting read urb," 744 dev_err(&port->dev, "%s - failed submitting read urb,"
745 " error %d\n", __FUNCTION__, result); 745 " error %d\n", __func__, result);
746 pl2303_close(port, NULL); 746 pl2303_close(port, NULL);
747 return -EPROTO; 747 return -EPROTO;
748 } 748 }
749 749
750 dbg("%s - submitting interrupt urb", __FUNCTION__); 750 dbg("%s - submitting interrupt urb", __func__);
751 port->interrupt_in_urb->dev = serial->dev; 751 port->interrupt_in_urb->dev = serial->dev;
752 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 752 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
753 if (result) { 753 if (result) {
754 dev_err(&port->dev, "%s - failed submitting interrupt urb," 754 dev_err(&port->dev, "%s - failed submitting interrupt urb,"
755 " error %d\n", __FUNCTION__, result); 755 " error %d\n", __func__, result);
756 pl2303_close(port, NULL); 756 pl2303_close(port, NULL);
757 return -EPROTO; 757 return -EPROTO;
758 } 758 }
@@ -792,7 +792,7 @@ static int pl2303_tiocmget(struct usb_serial_port *port, struct file *file)
792 unsigned int status; 792 unsigned int status;
793 unsigned int result; 793 unsigned int result;
794 794
795 dbg("%s (%d)", __FUNCTION__, port->number); 795 dbg("%s (%d)", __func__, port->number);
796 796
797 if (!usb_get_intfdata(port->serial->interface)) 797 if (!usb_get_intfdata(port->serial->interface))
798 return -ENODEV; 798 return -ENODEV;
@@ -809,7 +809,7 @@ static int pl2303_tiocmget(struct usb_serial_port *port, struct file *file)
809 | ((status & UART_RING) ? TIOCM_RI : 0) 809 | ((status & UART_RING) ? TIOCM_RI : 0)
810 | ((status & UART_DCD) ? TIOCM_CD : 0); 810 | ((status & UART_DCD) ? TIOCM_CD : 0);
811 811
812 dbg("%s - result = %x", __FUNCTION__, result); 812 dbg("%s - result = %x", __func__, result);
813 813
814 return result; 814 return result;
815} 815}
@@ -853,15 +853,15 @@ static int wait_modem_info(struct usb_serial_port *port, unsigned int arg)
853static int pl2303_ioctl(struct usb_serial_port *port, struct file *file, 853static int pl2303_ioctl(struct usb_serial_port *port, struct file *file,
854 unsigned int cmd, unsigned long arg) 854 unsigned int cmd, unsigned long arg)
855{ 855{
856 dbg("%s (%d) cmd = 0x%04x", __FUNCTION__, port->number, cmd); 856 dbg("%s (%d) cmd = 0x%04x", __func__, port->number, cmd);
857 857
858 switch (cmd) { 858 switch (cmd) {
859 case TIOCMIWAIT: 859 case TIOCMIWAIT:
860 dbg("%s (%d) TIOCMIWAIT", __FUNCTION__, port->number); 860 dbg("%s (%d) TIOCMIWAIT", __func__, port->number);
861 return wait_modem_info(port, arg); 861 return wait_modem_info(port, arg);
862 862
863 default: 863 default:
864 dbg("%s not supported = 0x%04x", __FUNCTION__, cmd); 864 dbg("%s not supported = 0x%04x", __func__, cmd);
865 break; 865 break;
866 } 866 }
867 867
@@ -874,19 +874,19 @@ static void pl2303_break_ctl(struct usb_serial_port *port, int break_state)
874 u16 state; 874 u16 state;
875 int result; 875 int result;
876 876
877 dbg("%s - port %d", __FUNCTION__, port->number); 877 dbg("%s - port %d", __func__, port->number);
878 878
879 if (break_state == 0) 879 if (break_state == 0)
880 state = BREAK_OFF; 880 state = BREAK_OFF;
881 else 881 else
882 state = BREAK_ON; 882 state = BREAK_ON;
883 dbg("%s - turning break %s", __FUNCTION__, state==BREAK_OFF ? "off" : "on"); 883 dbg("%s - turning break %s", __func__, state==BREAK_OFF ? "off" : "on");
884 884
885 result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), 885 result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
886 BREAK_REQUEST, BREAK_REQUEST_TYPE, state, 886 BREAK_REQUEST, BREAK_REQUEST_TYPE, state,
887 0, NULL, 0, 100); 887 0, NULL, 0, 100);
888 if (result) 888 if (result)
889 dbg("%s - error sending break = %d", __FUNCTION__, result); 889 dbg("%s - error sending break = %d", __func__, result);
890} 890}
891 891
892static void pl2303_shutdown(struct usb_serial *serial) 892static void pl2303_shutdown(struct usb_serial *serial)
@@ -894,7 +894,7 @@ static void pl2303_shutdown(struct usb_serial *serial)
894 int i; 894 int i;
895 struct pl2303_private *priv; 895 struct pl2303_private *priv;
896 896
897 dbg("%s", __FUNCTION__); 897 dbg("%s", __func__);
898 898
899 for (i = 0; i < serial->num_ports; ++i) { 899 for (i = 0; i < serial->num_ports; ++i) {
900 priv = usb_get_serial_port_data(serial->port[i]); 900 priv = usb_get_serial_port_data(serial->port[i]);
@@ -949,7 +949,7 @@ static void pl2303_read_int_callback(struct urb *urb)
949 int status = urb->status; 949 int status = urb->status;
950 int retval; 950 int retval;
951 951
952 dbg("%s (%d)", __FUNCTION__, port->number); 952 dbg("%s (%d)", __func__, port->number);
953 953
954 switch (status) { 954 switch (status) {
955 case 0: 955 case 0:
@@ -959,16 +959,16 @@ static void pl2303_read_int_callback(struct urb *urb)
959 case -ENOENT: 959 case -ENOENT:
960 case -ESHUTDOWN: 960 case -ESHUTDOWN:
961 /* this urb is terminated, clean up */ 961 /* this urb is terminated, clean up */
962 dbg("%s - urb shutting down with status: %d", __FUNCTION__, 962 dbg("%s - urb shutting down with status: %d", __func__,
963 status); 963 status);
964 return; 964 return;
965 default: 965 default:
966 dbg("%s - nonzero urb status received: %d", __FUNCTION__, 966 dbg("%s - nonzero urb status received: %d", __func__,
967 status); 967 status);
968 goto exit; 968 goto exit;
969 } 969 }
970 970
971 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, 971 usb_serial_debug_data(debug, &port->dev, __func__,
972 urb->actual_length, urb->transfer_buffer); 972 urb->actual_length, urb->transfer_buffer);
973 973
974 pl2303_update_line_status(port, data, actual_length); 974 pl2303_update_line_status(port, data, actual_length);
@@ -978,7 +978,7 @@ exit:
978 if (retval) 978 if (retval)
979 dev_err(&urb->dev->dev, 979 dev_err(&urb->dev->dev,
980 "%s - usb_submit_urb failed with result %d\n", 980 "%s - usb_submit_urb failed with result %d\n",
981 __FUNCTION__, retval); 981 __func__, retval);
982} 982}
983 983
984static void pl2303_read_bulk_callback(struct urb *urb) 984static void pl2303_read_bulk_callback(struct urb *urb)
@@ -994,32 +994,32 @@ static void pl2303_read_bulk_callback(struct urb *urb)
994 u8 line_status; 994 u8 line_status;
995 char tty_flag; 995 char tty_flag;
996 996
997 dbg("%s - port %d", __FUNCTION__, port->number); 997 dbg("%s - port %d", __func__, port->number);
998 998
999 if (status) { 999 if (status) {
1000 dbg("%s - urb status = %d", __FUNCTION__, status); 1000 dbg("%s - urb status = %d", __func__, status);
1001 if (!port->open_count) { 1001 if (!port->open_count) {
1002 dbg("%s - port is closed, exiting.", __FUNCTION__); 1002 dbg("%s - port is closed, exiting.", __func__);
1003 return; 1003 return;
1004 } 1004 }
1005 if (status == -EPROTO) { 1005 if (status == -EPROTO) {
1006 /* PL2303 mysteriously fails with -EPROTO reschedule 1006 /* PL2303 mysteriously fails with -EPROTO reschedule
1007 * the read */ 1007 * the read */
1008 dbg("%s - caught -EPROTO, resubmitting the urb", 1008 dbg("%s - caught -EPROTO, resubmitting the urb",
1009 __FUNCTION__); 1009 __func__);
1010 urb->dev = port->serial->dev; 1010 urb->dev = port->serial->dev;
1011 result = usb_submit_urb(urb, GFP_ATOMIC); 1011 result = usb_submit_urb(urb, GFP_ATOMIC);
1012 if (result) 1012 if (result)
1013 dev_err(&urb->dev->dev, "%s - failed" 1013 dev_err(&urb->dev->dev, "%s - failed"
1014 " resubmitting read urb, error %d\n", 1014 " resubmitting read urb, error %d\n",
1015 __FUNCTION__, result); 1015 __func__, result);
1016 return; 1016 return;
1017 } 1017 }
1018 dbg("%s - unable to handle the error, exiting.", __FUNCTION__); 1018 dbg("%s - unable to handle the error, exiting.", __func__);
1019 return; 1019 return;
1020 } 1020 }
1021 1021
1022 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, 1022 usb_serial_debug_data(debug, &port->dev, __func__,
1023 urb->actual_length, data); 1023 urb->actual_length, data);
1024 1024
1025 /* get tty_flag from status */ 1025 /* get tty_flag from status */
@@ -1039,7 +1039,7 @@ static void pl2303_read_bulk_callback(struct urb *urb)
1039 tty_flag = TTY_PARITY; 1039 tty_flag = TTY_PARITY;
1040 else if (line_status & UART_FRAME_ERROR) 1040 else if (line_status & UART_FRAME_ERROR)
1041 tty_flag = TTY_FRAME; 1041 tty_flag = TTY_FRAME;
1042 dbg("%s - tty_flag = %d", __FUNCTION__, tty_flag); 1042 dbg("%s - tty_flag = %d", __func__, tty_flag);
1043 1043
1044 tty = port->tty; 1044 tty = port->tty;
1045 if (tty && urb->actual_length) { 1045 if (tty && urb->actual_length) {
@@ -1058,7 +1058,7 @@ static void pl2303_read_bulk_callback(struct urb *urb)
1058 result = usb_submit_urb(urb, GFP_ATOMIC); 1058 result = usb_submit_urb(urb, GFP_ATOMIC);
1059 if (result) 1059 if (result)
1060 dev_err(&urb->dev->dev, "%s - failed resubmitting" 1060 dev_err(&urb->dev->dev, "%s - failed resubmitting"
1061 " read urb, error %d\n", __FUNCTION__, result); 1061 " read urb, error %d\n", __func__, result);
1062 } 1062 }
1063 1063
1064 return; 1064 return;
@@ -1071,7 +1071,7 @@ static void pl2303_write_bulk_callback(struct urb *urb)
1071 int result; 1071 int result;
1072 int status = urb->status; 1072 int status = urb->status;
1073 1073
1074 dbg("%s - port %d", __FUNCTION__, port->number); 1074 dbg("%s - port %d", __func__, port->number);
1075 1075
1076 switch (status) { 1076 switch (status) {
1077 case 0: 1077 case 0:
@@ -1081,21 +1081,21 @@ static void pl2303_write_bulk_callback(struct urb *urb)
1081 case -ENOENT: 1081 case -ENOENT:
1082 case -ESHUTDOWN: 1082 case -ESHUTDOWN:
1083 /* this urb is terminated, clean up */ 1083 /* this urb is terminated, clean up */
1084 dbg("%s - urb shutting down with status: %d", __FUNCTION__, 1084 dbg("%s - urb shutting down with status: %d", __func__,
1085 status); 1085 status);
1086 priv->write_urb_in_use = 0; 1086 priv->write_urb_in_use = 0;
1087 return; 1087 return;
1088 default: 1088 default:
1089 /* error in the urb, so we have to resubmit it */ 1089 /* error in the urb, so we have to resubmit it */
1090 dbg("%s - Overflow in write", __FUNCTION__); 1090 dbg("%s - Overflow in write", __func__);
1091 dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, 1091 dbg("%s - nonzero write bulk status received: %d", __func__,
1092 status); 1092 status);
1093 port->write_urb->transfer_buffer_length = 1; 1093 port->write_urb->transfer_buffer_length = 1;
1094 port->write_urb->dev = port->serial->dev; 1094 port->write_urb->dev = port->serial->dev;
1095 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 1095 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
1096 if (result) 1096 if (result)
1097 dev_err(&urb->dev->dev, "%s - failed resubmitting write" 1097 dev_err(&urb->dev->dev, "%s - failed resubmitting write"
1098 " urb, error %d\n", __FUNCTION__, result); 1098 " urb, error %d\n", __func__, result);
1099 else 1099 else
1100 return; 1100 return;
1101 } 1101 }
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
index 353c54fa0580..3fe98a52b914 100644
--- a/drivers/usb/serial/safe_serial.c
+++ b/drivers/usb/serial/safe_serial.c
@@ -202,11 +202,11 @@ static void safe_read_bulk_callback (struct urb *urb)
202 int result; 202 int result;
203 int status = urb->status; 203 int status = urb->status;
204 204
205 dbg ("%s", __FUNCTION__); 205 dbg ("%s", __func__);
206 206
207 if (status) { 207 if (status) {
208 dbg("%s - nonzero read bulk status received: %d", 208 dbg("%s - nonzero read bulk status received: %d",
209 __FUNCTION__, status); 209 __func__, status);
210 return; 210 return;
211 } 211 }
212 212
@@ -232,18 +232,18 @@ static void safe_read_bulk_callback (struct urb *urb)
232 232
233 if (actual_length <= (length - 2)) { 233 if (actual_length <= (length - 2)) {
234 234
235 info ("%s - actual: %d", __FUNCTION__, actual_length); 235 info ("%s - actual: %d", __func__, actual_length);
236 236
237 for (i = 0; i < actual_length; i++) { 237 for (i = 0; i < actual_length; i++) {
238 tty_insert_flip_char (port->tty, data[i], 0); 238 tty_insert_flip_char (port->tty, data[i], 0);
239 } 239 }
240 tty_flip_buffer_push (port->tty); 240 tty_flip_buffer_push (port->tty);
241 } else { 241 } else {
242 err ("%s - inconsistent lengths %d:%d", __FUNCTION__, 242 err ("%s - inconsistent lengths %d:%d", __func__,
243 actual_length, length); 243 actual_length, length);
244 } 244 }
245 } else { 245 } else {
246 err ("%s - bad CRC %x", __FUNCTION__, fcs); 246 err ("%s - bad CRC %x", __func__, fcs);
247 } 247 }
248 } else { 248 } else {
249 for (i = 0; i < length; i++) { 249 for (i = 0; i < length; i++) {
@@ -259,7 +259,7 @@ static void safe_read_bulk_callback (struct urb *urb)
259 safe_read_bulk_callback, port); 259 safe_read_bulk_callback, port);
260 260
261 if ((result = usb_submit_urb (urb, GFP_ATOMIC))) { 261 if ((result = usb_submit_urb (urb, GFP_ATOMIC))) {
262 err ("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); 262 err ("%s - failed resubmitting read urb, error %d", __func__, result);
263 } 263 }
264} 264}
265 265
@@ -274,7 +274,7 @@ static int safe_write (struct usb_serial_port *port, const unsigned char *buf, i
274 count); 274 count);
275 275
276 if (!port->write_urb) { 276 if (!port->write_urb) {
277 dbg ("%s - write urb NULL", __FUNCTION__); 277 dbg ("%s - write urb NULL", __func__);
278 return (0); 278 return (0);
279 } 279 }
280 280
@@ -282,17 +282,17 @@ static int safe_write (struct usb_serial_port *port, const unsigned char *buf, i
282 port->write_urb->transfer_buffer_length); 282 port->write_urb->transfer_buffer_length);
283 283
284 if (!port->write_urb->transfer_buffer_length) { 284 if (!port->write_urb->transfer_buffer_length) {
285 dbg ("%s - write urb transfer_buffer_length zero", __FUNCTION__); 285 dbg ("%s - write urb transfer_buffer_length zero", __func__);
286 return (0); 286 return (0);
287 } 287 }
288 if (count == 0) { 288 if (count == 0) {
289 dbg ("%s - write request of 0 bytes", __FUNCTION__); 289 dbg ("%s - write request of 0 bytes", __func__);
290 return (0); 290 return (0);
291 } 291 }
292 spin_lock_bh(&port->lock); 292 spin_lock_bh(&port->lock);
293 if (port->write_urb_busy) { 293 if (port->write_urb_busy) {
294 spin_unlock_bh(&port->lock); 294 spin_unlock_bh(&port->lock);
295 dbg("%s - already writing", __FUNCTION__); 295 dbg("%s - already writing", __func__);
296 return 0; 296 return 0;
297 } 297 }
298 port->write_urb_busy = 1; 298 port->write_urb_busy = 1;
@@ -332,7 +332,7 @@ static int safe_write (struct usb_serial_port *port, const unsigned char *buf, i
332 port->write_urb->transfer_buffer_length = count; 332 port->write_urb->transfer_buffer_length = count;
333 } 333 }
334 334
335 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, port->write_urb->transfer_buffer); 335 usb_serial_debug_data(debug, &port->dev, __func__, count, port->write_urb->transfer_buffer);
336#ifdef ECHO_TX 336#ifdef ECHO_TX
337 { 337 {
338 int i; 338 int i;
@@ -349,10 +349,10 @@ static int safe_write (struct usb_serial_port *port, const unsigned char *buf, i
349 port->write_urb->dev = port->serial->dev; 349 port->write_urb->dev = port->serial->dev;
350 if ((result = usb_submit_urb (port->write_urb, GFP_KERNEL))) { 350 if ((result = usb_submit_urb (port->write_urb, GFP_KERNEL))) {
351 port->write_urb_busy = 0; 351 port->write_urb_busy = 0;
352 err ("%s - failed submitting write urb, error %d", __FUNCTION__, result); 352 err ("%s - failed submitting write urb, error %d", __func__, result);
353 return 0; 353 return 0;
354 } 354 }
355 dbg ("%s urb: %p submitted", __FUNCTION__, port->write_urb); 355 dbg ("%s urb: %p submitted", __func__, port->write_urb);
356 356
357 return (count); 357 return (count);
358} 358}
@@ -361,7 +361,7 @@ static int safe_write_room (struct usb_serial_port *port)
361{ 361{
362 int room = 0; // Default: no room 362 int room = 0; // Default: no room
363 363
364 dbg ("%s", __FUNCTION__); 364 dbg ("%s", __func__);
365 365
366 if (port->write_urb_busy) 366 if (port->write_urb_busy)
367 room = port->bulk_out_size - (safe ? 2 : 0); 367 room = port->bulk_out_size - (safe ? 2 : 0);
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index 07eabaf9f044..ed30adefff85 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -256,7 +256,7 @@ static int sierra_send_setup(struct usb_serial_port *port)
256 struct sierra_port_private *portdata; 256 struct sierra_port_private *portdata;
257 __u16 interface = 0; 257 __u16 interface = 0;
258 258
259 dbg("%s", __FUNCTION__); 259 dbg("%s", __func__);
260 260
261 portdata = usb_get_serial_port_data(port); 261 portdata = usb_get_serial_port_data(port);
262 262
@@ -286,24 +286,24 @@ static int sierra_send_setup(struct usb_serial_port *port)
286 286
287static void sierra_rx_throttle(struct usb_serial_port *port) 287static void sierra_rx_throttle(struct usb_serial_port *port)
288{ 288{
289 dbg("%s", __FUNCTION__); 289 dbg("%s", __func__);
290} 290}
291 291
292static void sierra_rx_unthrottle(struct usb_serial_port *port) 292static void sierra_rx_unthrottle(struct usb_serial_port *port)
293{ 293{
294 dbg("%s", __FUNCTION__); 294 dbg("%s", __func__);
295} 295}
296 296
297static void sierra_break_ctl(struct usb_serial_port *port, int break_state) 297static void sierra_break_ctl(struct usb_serial_port *port, int break_state)
298{ 298{
299 /* Unfortunately, I don't know how to send a break */ 299 /* Unfortunately, I don't know how to send a break */
300 dbg("%s", __FUNCTION__); 300 dbg("%s", __func__);
301} 301}
302 302
303static void sierra_set_termios(struct usb_serial_port *port, 303static void sierra_set_termios(struct usb_serial_port *port,
304 struct ktermios *old_termios) 304 struct ktermios *old_termios)
305{ 305{
306 dbg("%s", __FUNCTION__); 306 dbg("%s", __func__);
307 tty_termios_copy_hw(port->tty->termios, old_termios); 307 tty_termios_copy_hw(port->tty->termios, old_termios);
308 sierra_send_setup(port); 308 sierra_send_setup(port);
309} 309}
@@ -357,14 +357,14 @@ static void sierra_outdat_callback(struct urb *urb)
357 int status = urb->status; 357 int status = urb->status;
358 unsigned long flags; 358 unsigned long flags;
359 359
360 dbg("%s - port %d", __FUNCTION__, port->number); 360 dbg("%s - port %d", __func__, port->number);
361 361
362 /* free up the transfer buffer, as usb_free_urb() does not do this */ 362 /* free up the transfer buffer, as usb_free_urb() does not do this */
363 kfree(urb->transfer_buffer); 363 kfree(urb->transfer_buffer);
364 364
365 if (status) 365 if (status)
366 dbg("%s - nonzero write bulk status received: %d", 366 dbg("%s - nonzero write bulk status received: %d",
367 __FUNCTION__, status); 367 __func__, status);
368 368
369 spin_lock_irqsave(&portdata->lock, flags); 369 spin_lock_irqsave(&portdata->lock, flags);
370 --portdata->outstanding_urbs; 370 --portdata->outstanding_urbs;
@@ -386,12 +386,12 @@ static int sierra_write(struct usb_serial_port *port,
386 386
387 portdata = usb_get_serial_port_data(port); 387 portdata = usb_get_serial_port_data(port);
388 388
389 dbg("%s: write (%d chars)", __FUNCTION__, count); 389 dbg("%s: write (%d chars)", __func__, count);
390 390
391 spin_lock_irqsave(&portdata->lock, flags); 391 spin_lock_irqsave(&portdata->lock, flags);
392 if (portdata->outstanding_urbs > N_OUT_URB) { 392 if (portdata->outstanding_urbs > N_OUT_URB) {
393 spin_unlock_irqrestore(&portdata->lock, flags); 393 spin_unlock_irqrestore(&portdata->lock, flags);
394 dbg("%s - write limit hit\n", __FUNCTION__); 394 dbg("%s - write limit hit\n", __func__);
395 return 0; 395 return 0;
396 } 396 }
397 portdata->outstanding_urbs++; 397 portdata->outstanding_urbs++;
@@ -413,7 +413,7 @@ static int sierra_write(struct usb_serial_port *port,
413 413
414 memcpy(buffer, buf, count); 414 memcpy(buffer, buf, count);
415 415
416 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buffer); 416 usb_serial_debug_data(debug, &port->dev, __func__, count, buffer);
417 417
418 usb_fill_bulk_urb(urb, serial->dev, 418 usb_fill_bulk_urb(urb, serial->dev,
419 usb_sndbulkpipe(serial->dev, 419 usb_sndbulkpipe(serial->dev,
@@ -424,7 +424,7 @@ static int sierra_write(struct usb_serial_port *port,
424 status = usb_submit_urb(urb, GFP_ATOMIC); 424 status = usb_submit_urb(urb, GFP_ATOMIC);
425 if (status) { 425 if (status) {
426 dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed " 426 dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed "
427 "with status = %d\n", __FUNCTION__, status); 427 "with status = %d\n", __func__, status);
428 count = status; 428 count = status;
429 goto error; 429 goto error;
430 } 430 }
@@ -454,14 +454,14 @@ static void sierra_indat_callback(struct urb *urb)
454 unsigned char *data = urb->transfer_buffer; 454 unsigned char *data = urb->transfer_buffer;
455 int status = urb->status; 455 int status = urb->status;
456 456
457 dbg("%s: %p", __FUNCTION__, urb); 457 dbg("%s: %p", __func__, urb);
458 458
459 endpoint = usb_pipeendpoint(urb->pipe); 459 endpoint = usb_pipeendpoint(urb->pipe);
460 port = (struct usb_serial_port *) urb->context; 460 port = (struct usb_serial_port *) urb->context;
461 461
462 if (status) { 462 if (status) {
463 dbg("%s: nonzero status: %d on endpoint %02x.", 463 dbg("%s: nonzero status: %d on endpoint %02x.",
464 __FUNCTION__, status, endpoint); 464 __func__, status, endpoint);
465 } else { 465 } else {
466 tty = port->tty; 466 tty = port->tty;
467 if (urb->actual_length) { 467 if (urb->actual_length) {
@@ -469,7 +469,7 @@ static void sierra_indat_callback(struct urb *urb)
469 tty_insert_flip_string(tty, data, urb->actual_length); 469 tty_insert_flip_string(tty, data, urb->actual_length);
470 tty_flip_buffer_push(tty); 470 tty_flip_buffer_push(tty);
471 } else { 471 } else {
472 dbg("%s: empty read urb received", __FUNCTION__); 472 dbg("%s: empty read urb received", __func__);
473 } 473 }
474 474
475 /* Resubmit urb so we continue receiving */ 475 /* Resubmit urb so we continue receiving */
@@ -491,15 +491,15 @@ static void sierra_instat_callback(struct urb *urb)
491 struct sierra_port_private *portdata = usb_get_serial_port_data(port); 491 struct sierra_port_private *portdata = usb_get_serial_port_data(port);
492 struct usb_serial *serial = port->serial; 492 struct usb_serial *serial = port->serial;
493 493
494 dbg("%s", __FUNCTION__); 494 dbg("%s", __func__);
495 dbg("%s: urb %p port %p has data %p", __FUNCTION__, urb, port, portdata); 495 dbg("%s: urb %p port %p has data %p", __func__, urb, port, portdata);
496 496
497 if (status == 0) { 497 if (status == 0) {
498 struct usb_ctrlrequest *req_pkt = 498 struct usb_ctrlrequest *req_pkt =
499 (struct usb_ctrlrequest *)urb->transfer_buffer; 499 (struct usb_ctrlrequest *)urb->transfer_buffer;
500 500
501 if (!req_pkt) { 501 if (!req_pkt) {
502 dbg("%s: NULL req_pkt\n", __FUNCTION__); 502 dbg("%s: NULL req_pkt\n", __func__);
503 return; 503 return;
504 } 504 }
505 if ((req_pkt->bRequestType == 0xA1) && 505 if ((req_pkt->bRequestType == 0xA1) &&
@@ -509,7 +509,7 @@ static void sierra_instat_callback(struct urb *urb)
509 urb->transfer_buffer + 509 urb->transfer_buffer +
510 sizeof(struct usb_ctrlrequest)); 510 sizeof(struct usb_ctrlrequest));
511 511
512 dbg("%s: signal x%x", __FUNCTION__, signals); 512 dbg("%s: signal x%x", __func__, signals);
513 513
514 old_dcd_state = portdata->dcd_state; 514 old_dcd_state = portdata->dcd_state;
515 portdata->cts_state = 1; 515 portdata->cts_state = 1;
@@ -521,11 +521,11 @@ static void sierra_instat_callback(struct urb *urb)
521 old_dcd_state && !portdata->dcd_state) 521 old_dcd_state && !portdata->dcd_state)
522 tty_hangup(port->tty); 522 tty_hangup(port->tty);
523 } else { 523 } else {
524 dbg("%s: type %x req %x", __FUNCTION__, 524 dbg("%s: type %x req %x", __func__,
525 req_pkt->bRequestType, req_pkt->bRequest); 525 req_pkt->bRequestType, req_pkt->bRequest);
526 } 526 }
527 } else 527 } else
528 dbg("%s: error %d", __FUNCTION__, status); 528 dbg("%s: error %d", __func__, status);
529 529
530 /* Resubmit urb so we continue receiving IRQ data */ 530 /* Resubmit urb so we continue receiving IRQ data */
531 if (status != -ESHUTDOWN) { 531 if (status != -ESHUTDOWN) {
@@ -533,7 +533,7 @@ static void sierra_instat_callback(struct urb *urb)
533 err = usb_submit_urb(urb, GFP_ATOMIC); 533 err = usb_submit_urb(urb, GFP_ATOMIC);
534 if (err) 534 if (err)
535 dbg("%s: resubmit intr urb failed. (%d)", 535 dbg("%s: resubmit intr urb failed. (%d)",
536 __FUNCTION__, err); 536 __func__, err);
537 } 537 }
538} 538}
539 539
@@ -542,14 +542,14 @@ static int sierra_write_room(struct usb_serial_port *port)
542 struct sierra_port_private *portdata = usb_get_serial_port_data(port); 542 struct sierra_port_private *portdata = usb_get_serial_port_data(port);
543 unsigned long flags; 543 unsigned long flags;
544 544
545 dbg("%s - port %d", __FUNCTION__, port->number); 545 dbg("%s - port %d", __func__, port->number);
546 546
547 /* try to give a good number back based on if we have any free urbs at 547 /* try to give a good number back based on if we have any free urbs at
548 * this point in time */ 548 * this point in time */
549 spin_lock_irqsave(&portdata->lock, flags); 549 spin_lock_irqsave(&portdata->lock, flags);
550 if (portdata->outstanding_urbs > N_OUT_URB * 2 / 3) { 550 if (portdata->outstanding_urbs > N_OUT_URB * 2 / 3) {
551 spin_unlock_irqrestore(&portdata->lock, flags); 551 spin_unlock_irqrestore(&portdata->lock, flags);
552 dbg("%s - write limit hit\n", __FUNCTION__); 552 dbg("%s - write limit hit\n", __func__);
553 return 0; 553 return 0;
554 } 554 }
555 spin_unlock_irqrestore(&portdata->lock, flags); 555 spin_unlock_irqrestore(&portdata->lock, flags);
@@ -559,7 +559,7 @@ static int sierra_write_room(struct usb_serial_port *port)
559 559
560static int sierra_chars_in_buffer(struct usb_serial_port *port) 560static int sierra_chars_in_buffer(struct usb_serial_port *port)
561{ 561{
562 dbg("%s - port %d", __FUNCTION__, port->number); 562 dbg("%s - port %d", __func__, port->number);
563 563
564 /* 564 /*
565 * We can't really account for how much data we 565 * We can't really account for how much data we
@@ -580,7 +580,7 @@ static int sierra_open(struct usb_serial_port *port, struct file *filp)
580 580
581 portdata = usb_get_serial_port_data(port); 581 portdata = usb_get_serial_port_data(port);
582 582
583 dbg("%s", __FUNCTION__); 583 dbg("%s", __func__);
584 584
585 /* Set some sane defaults */ 585 /* Set some sane defaults */
586 portdata->rts_state = 1; 586 portdata->rts_state = 1;
@@ -592,7 +592,7 @@ static int sierra_open(struct usb_serial_port *port, struct file *filp)
592 if (!urb) 592 if (!urb)
593 continue; 593 continue;
594 if (urb->dev != serial->dev) { 594 if (urb->dev != serial->dev) {
595 dbg("%s: dev %p != %p", __FUNCTION__, 595 dbg("%s: dev %p != %p", __func__,
596 urb->dev, serial->dev); 596 urb->dev, serial->dev);
597 continue; 597 continue;
598 } 598 }
@@ -630,7 +630,7 @@ static void sierra_close(struct usb_serial_port *port, struct file *filp)
630 struct usb_serial *serial = port->serial; 630 struct usb_serial *serial = port->serial;
631 struct sierra_port_private *portdata; 631 struct sierra_port_private *portdata;
632 632
633 dbg("%s", __FUNCTION__); 633 dbg("%s", __func__);
634 portdata = usb_get_serial_port_data(port); 634 portdata = usb_get_serial_port_data(port);
635 635
636 portdata->rts_state = 0; 636 portdata->rts_state = 0;
@@ -660,7 +660,7 @@ static int sierra_startup(struct usb_serial *serial)
660 int i; 660 int i;
661 int j; 661 int j;
662 662
663 dbg("%s", __FUNCTION__); 663 dbg("%s", __func__);
664 664
665 /* Set Device mode to D0 */ 665 /* Set Device mode to D0 */
666 sierra_set_power_state(serial->dev, 0x0000); 666 sierra_set_power_state(serial->dev, 0x0000);
@@ -675,7 +675,7 @@ static int sierra_startup(struct usb_serial *serial)
675 portdata = kzalloc(sizeof(*portdata), GFP_KERNEL); 675 portdata = kzalloc(sizeof(*portdata), GFP_KERNEL);
676 if (!portdata) { 676 if (!portdata) {
677 dbg("%s: kmalloc for sierra_port_private (%d) failed!.", 677 dbg("%s: kmalloc for sierra_port_private (%d) failed!.",
678 __FUNCTION__, i); 678 __func__, i);
679 return -ENOMEM; 679 return -ENOMEM;
680 } 680 }
681 spin_lock_init(&portdata->lock); 681 spin_lock_init(&portdata->lock);
@@ -696,7 +696,7 @@ static int sierra_startup(struct usb_serial *serial)
696 urb = usb_alloc_urb(0, GFP_KERNEL); 696 urb = usb_alloc_urb(0, GFP_KERNEL);
697 if (urb == NULL) { 697 if (urb == NULL) {
698 dbg("%s: alloc for in port failed.", 698 dbg("%s: alloc for in port failed.",
699 __FUNCTION__); 699 __func__);
700 continue; 700 continue;
701 } 701 }
702 /* Fill URB using supplied data. */ 702 /* Fill URB using supplied data. */
@@ -718,7 +718,7 @@ static void sierra_shutdown(struct usb_serial *serial)
718 struct usb_serial_port *port; 718 struct usb_serial_port *port;
719 struct sierra_port_private *portdata; 719 struct sierra_port_private *portdata;
720 720
721 dbg("%s", __FUNCTION__); 721 dbg("%s", __func__);
722 722
723 for (i = 0; i < serial->num_ports; ++i) { 723 for (i = 0; i < serial->num_ports; ++i) {
724 port = serial->port[i]; 724 port = serial->port[i];
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index f3bbf777c81a..e0b1564de900 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -408,14 +408,14 @@ static int ti_startup(struct usb_serial *serial)
408 408
409 409
410 dbg("%s - product 0x%4X, num configurations %d, configuration value %d", 410 dbg("%s - product 0x%4X, num configurations %d, configuration value %d",
411 __FUNCTION__, le16_to_cpu(dev->descriptor.idProduct), 411 __func__, le16_to_cpu(dev->descriptor.idProduct),
412 dev->descriptor.bNumConfigurations, 412 dev->descriptor.bNumConfigurations,
413 dev->actconfig->desc.bConfigurationValue); 413 dev->actconfig->desc.bConfigurationValue);
414 414
415 /* create device structure */ 415 /* create device structure */
416 tdev = kzalloc(sizeof(struct ti_device), GFP_KERNEL); 416 tdev = kzalloc(sizeof(struct ti_device), GFP_KERNEL);
417 if (tdev == NULL) { 417 if (tdev == NULL) {
418 dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__); 418 dev_err(&dev->dev, "%s - out of memory\n", __func__);
419 return -ENOMEM; 419 return -ENOMEM;
420 } 420 }
421 mutex_init(&tdev->td_open_close_lock); 421 mutex_init(&tdev->td_open_close_lock);
@@ -425,7 +425,7 @@ static int ti_startup(struct usb_serial *serial)
425 /* determine device type */ 425 /* determine device type */
426 if (usb_match_id(serial->interface, ti_id_table_3410)) 426 if (usb_match_id(serial->interface, ti_id_table_3410))
427 tdev->td_is_3410 = 1; 427 tdev->td_is_3410 = 1;
428 dbg("%s - device type is %s", __FUNCTION__, tdev->td_is_3410 ? "3410" : "5052"); 428 dbg("%s - device type is %s", __func__, tdev->td_is_3410 ? "3410" : "5052");
429 429
430 /* if we have only 1 configuration, download firmware */ 430 /* if we have only 1 configuration, download firmware */
431 if (dev->descriptor.bNumConfigurations == 1) { 431 if (dev->descriptor.bNumConfigurations == 1) {
@@ -459,7 +459,7 @@ static int ti_startup(struct usb_serial *serial)
459 for (i = 0; i < serial->num_ports; ++i) { 459 for (i = 0; i < serial->num_ports; ++i) {
460 tport = kzalloc(sizeof(struct ti_port), GFP_KERNEL); 460 tport = kzalloc(sizeof(struct ti_port), GFP_KERNEL);
461 if (tport == NULL) { 461 if (tport == NULL) {
462 dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__); 462 dev_err(&dev->dev, "%s - out of memory\n", __func__);
463 status = -ENOMEM; 463 status = -ENOMEM;
464 goto free_tports; 464 goto free_tports;
465 } 465 }
@@ -471,7 +471,7 @@ static int ti_startup(struct usb_serial *serial)
471 init_waitqueue_head(&tport->tp_write_wait); 471 init_waitqueue_head(&tport->tp_write_wait);
472 tport->tp_write_buf = ti_buf_alloc(); 472 tport->tp_write_buf = ti_buf_alloc();
473 if (tport->tp_write_buf == NULL) { 473 if (tport->tp_write_buf == NULL) {
474 dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__); 474 dev_err(&dev->dev, "%s - out of memory\n", __func__);
475 kfree(tport); 475 kfree(tport);
476 status = -ENOMEM; 476 status = -ENOMEM;
477 goto free_tports; 477 goto free_tports;
@@ -504,7 +504,7 @@ static void ti_shutdown(struct usb_serial *serial)
504 struct ti_device *tdev = usb_get_serial_data(serial); 504 struct ti_device *tdev = usb_get_serial_data(serial);
505 struct ti_port *tport; 505 struct ti_port *tport;
506 506
507 dbg("%s", __FUNCTION__); 507 dbg("%s", __func__);
508 508
509 for (i=0; i < serial->num_ports; ++i) { 509 for (i=0; i < serial->num_ports; ++i) {
510 tport = usb_get_serial_port_data(serial->port[i]); 510 tport = usb_get_serial_port_data(serial->port[i]);
@@ -532,7 +532,7 @@ static int ti_open(struct usb_serial_port *port, struct file *file)
532 TI_PIPE_TIMEOUT_ENABLE | 532 TI_PIPE_TIMEOUT_ENABLE |
533 (TI_TRANSFER_TIMEOUT << 2)); 533 (TI_TRANSFER_TIMEOUT << 2));
534 534
535 dbg("%s - port %d", __FUNCTION__, port->number); 535 dbg("%s - port %d", __func__, port->number);
536 536
537 if (tport == NULL) 537 if (tport == NULL)
538 return -ENODEV; 538 return -ENODEV;
@@ -557,10 +557,10 @@ static int ti_open(struct usb_serial_port *port, struct file *file)
557 557
558 /* start interrupt urb the first time a port is opened on this device */ 558 /* start interrupt urb the first time a port is opened on this device */
559 if (tdev->td_open_port_count == 0) { 559 if (tdev->td_open_port_count == 0) {
560 dbg("%s - start interrupt in urb", __FUNCTION__); 560 dbg("%s - start interrupt in urb", __func__);
561 urb = tdev->td_serial->port[0]->interrupt_in_urb; 561 urb = tdev->td_serial->port[0]->interrupt_in_urb;
562 if (!urb) { 562 if (!urb) {
563 dev_err(&port->dev, "%s - no interrupt urb\n", __FUNCTION__); 563 dev_err(&port->dev, "%s - no interrupt urb\n", __func__);
564 status = -EINVAL; 564 status = -EINVAL;
565 goto release_lock; 565 goto release_lock;
566 } 566 }
@@ -569,40 +569,40 @@ static int ti_open(struct usb_serial_port *port, struct file *file)
569 urb->dev = dev; 569 urb->dev = dev;
570 status = usb_submit_urb(urb, GFP_KERNEL); 570 status = usb_submit_urb(urb, GFP_KERNEL);
571 if (status) { 571 if (status) {
572 dev_err(&port->dev, "%s - submit interrupt urb failed, %d\n", __FUNCTION__, status); 572 dev_err(&port->dev, "%s - submit interrupt urb failed, %d\n", __func__, status);
573 goto release_lock; 573 goto release_lock;
574 } 574 }
575 } 575 }
576 576
577 ti_set_termios(port, port->tty->termios); 577 ti_set_termios(port, port->tty->termios);
578 578
579 dbg("%s - sending TI_OPEN_PORT", __FUNCTION__); 579 dbg("%s - sending TI_OPEN_PORT", __func__);
580 status = ti_command_out_sync(tdev, TI_OPEN_PORT, 580 status = ti_command_out_sync(tdev, TI_OPEN_PORT,
581 (__u8)(TI_UART1_PORT + port_number), open_settings, NULL, 0); 581 (__u8)(TI_UART1_PORT + port_number), open_settings, NULL, 0);
582 if (status) { 582 if (status) {
583 dev_err(&port->dev, "%s - cannot send open command, %d\n", __FUNCTION__, status); 583 dev_err(&port->dev, "%s - cannot send open command, %d\n", __func__, status);
584 goto unlink_int_urb; 584 goto unlink_int_urb;
585 } 585 }
586 586
587 dbg("%s - sending TI_START_PORT", __FUNCTION__); 587 dbg("%s - sending TI_START_PORT", __func__);
588 status = ti_command_out_sync(tdev, TI_START_PORT, 588 status = ti_command_out_sync(tdev, TI_START_PORT,
589 (__u8)(TI_UART1_PORT + port_number), 0, NULL, 0); 589 (__u8)(TI_UART1_PORT + port_number), 0, NULL, 0);
590 if (status) { 590 if (status) {
591 dev_err(&port->dev, "%s - cannot send start command, %d\n", __FUNCTION__, status); 591 dev_err(&port->dev, "%s - cannot send start command, %d\n", __func__, status);
592 goto unlink_int_urb; 592 goto unlink_int_urb;
593 } 593 }
594 594
595 dbg("%s - sending TI_PURGE_PORT", __FUNCTION__); 595 dbg("%s - sending TI_PURGE_PORT", __func__);
596 status = ti_command_out_sync(tdev, TI_PURGE_PORT, 596 status = ti_command_out_sync(tdev, TI_PURGE_PORT,
597 (__u8)(TI_UART1_PORT + port_number), TI_PURGE_INPUT, NULL, 0); 597 (__u8)(TI_UART1_PORT + port_number), TI_PURGE_INPUT, NULL, 0);
598 if (status) { 598 if (status) {
599 dev_err(&port->dev, "%s - cannot clear input buffers, %d\n", __FUNCTION__, status); 599 dev_err(&port->dev, "%s - cannot clear input buffers, %d\n", __func__, status);
600 goto unlink_int_urb; 600 goto unlink_int_urb;
601 } 601 }
602 status = ti_command_out_sync(tdev, TI_PURGE_PORT, 602 status = ti_command_out_sync(tdev, TI_PURGE_PORT,
603 (__u8)(TI_UART1_PORT + port_number), TI_PURGE_OUTPUT, NULL, 0); 603 (__u8)(TI_UART1_PORT + port_number), TI_PURGE_OUTPUT, NULL, 0);
604 if (status) { 604 if (status) {
605 dev_err(&port->dev, "%s - cannot clear output buffers, %d\n", __FUNCTION__, status); 605 dev_err(&port->dev, "%s - cannot clear output buffers, %d\n", __func__, status);
606 goto unlink_int_urb; 606 goto unlink_int_urb;
607 } 607 }
608 608
@@ -613,27 +613,27 @@ static int ti_open(struct usb_serial_port *port, struct file *file)
613 613
614 ti_set_termios(port, port->tty->termios); 614 ti_set_termios(port, port->tty->termios);
615 615
616 dbg("%s - sending TI_OPEN_PORT (2)", __FUNCTION__); 616 dbg("%s - sending TI_OPEN_PORT (2)", __func__);
617 status = ti_command_out_sync(tdev, TI_OPEN_PORT, 617 status = ti_command_out_sync(tdev, TI_OPEN_PORT,
618 (__u8)(TI_UART1_PORT + port_number), open_settings, NULL, 0); 618 (__u8)(TI_UART1_PORT + port_number), open_settings, NULL, 0);
619 if (status) { 619 if (status) {
620 dev_err(&port->dev, "%s - cannot send open command (2), %d\n", __FUNCTION__, status); 620 dev_err(&port->dev, "%s - cannot send open command (2), %d\n", __func__, status);
621 goto unlink_int_urb; 621 goto unlink_int_urb;
622 } 622 }
623 623
624 dbg("%s - sending TI_START_PORT (2)", __FUNCTION__); 624 dbg("%s - sending TI_START_PORT (2)", __func__);
625 status = ti_command_out_sync(tdev, TI_START_PORT, 625 status = ti_command_out_sync(tdev, TI_START_PORT,
626 (__u8)(TI_UART1_PORT + port_number), 0, NULL, 0); 626 (__u8)(TI_UART1_PORT + port_number), 0, NULL, 0);
627 if (status) { 627 if (status) {
628 dev_err(&port->dev, "%s - cannot send start command (2), %d\n", __FUNCTION__, status); 628 dev_err(&port->dev, "%s - cannot send start command (2), %d\n", __func__, status);
629 goto unlink_int_urb; 629 goto unlink_int_urb;
630 } 630 }
631 631
632 /* start read urb */ 632 /* start read urb */
633 dbg("%s - start read urb", __FUNCTION__); 633 dbg("%s - start read urb", __func__);
634 urb = port->read_urb; 634 urb = port->read_urb;
635 if (!urb) { 635 if (!urb) {
636 dev_err(&port->dev, "%s - no read urb\n", __FUNCTION__); 636 dev_err(&port->dev, "%s - no read urb\n", __func__);
637 status = -EINVAL; 637 status = -EINVAL;
638 goto unlink_int_urb; 638 goto unlink_int_urb;
639 } 639 }
@@ -643,7 +643,7 @@ static int ti_open(struct usb_serial_port *port, struct file *file)
643 urb->dev = dev; 643 urb->dev = dev;
644 status = usb_submit_urb(urb, GFP_KERNEL); 644 status = usb_submit_urb(urb, GFP_KERNEL);
645 if (status) { 645 if (status) {
646 dev_err(&port->dev, "%s - submit read urb failed, %d\n", __FUNCTION__, status); 646 dev_err(&port->dev, "%s - submit read urb failed, %d\n", __func__, status);
647 goto unlink_int_urb; 647 goto unlink_int_urb;
648 } 648 }
649 649
@@ -657,7 +657,7 @@ unlink_int_urb:
657 usb_kill_urb(port->serial->port[0]->interrupt_in_urb); 657 usb_kill_urb(port->serial->port[0]->interrupt_in_urb);
658release_lock: 658release_lock:
659 mutex_unlock(&tdev->td_open_close_lock); 659 mutex_unlock(&tdev->td_open_close_lock);
660 dbg("%s - exit %d", __FUNCTION__, status); 660 dbg("%s - exit %d", __func__, status);
661 return status; 661 return status;
662} 662}
663 663
@@ -670,7 +670,7 @@ static void ti_close(struct usb_serial_port *port, struct file *file)
670 int status; 670 int status;
671 int do_unlock; 671 int do_unlock;
672 672
673 dbg("%s - port %d", __FUNCTION__, port->number); 673 dbg("%s - port %d", __func__, port->number);
674 674
675 tdev = usb_get_serial_data(port->serial); 675 tdev = usb_get_serial_data(port->serial);
676 tport = usb_get_serial_port_data(port); 676 tport = usb_get_serial_port_data(port);
@@ -687,11 +687,11 @@ static void ti_close(struct usb_serial_port *port, struct file *file)
687 687
688 port_number = port->number - port->serial->minor; 688 port_number = port->number - port->serial->minor;
689 689
690 dbg("%s - sending TI_CLOSE_PORT", __FUNCTION__); 690 dbg("%s - sending TI_CLOSE_PORT", __func__);
691 status = ti_command_out_sync(tdev, TI_CLOSE_PORT, 691 status = ti_command_out_sync(tdev, TI_CLOSE_PORT,
692 (__u8)(TI_UART1_PORT + port_number), 0, NULL, 0); 692 (__u8)(TI_UART1_PORT + port_number), 0, NULL, 0);
693 if (status) 693 if (status)
694 dev_err(&port->dev, "%s - cannot send close port command, %d\n" , __FUNCTION__, status); 694 dev_err(&port->dev, "%s - cannot send close port command, %d\n" , __func__, status);
695 695
696 /* if mutex_lock is interrupted, continue anyway */ 696 /* if mutex_lock is interrupted, continue anyway */
697 do_unlock = !mutex_lock_interruptible(&tdev->td_open_close_lock); 697 do_unlock = !mutex_lock_interruptible(&tdev->td_open_close_lock);
@@ -704,7 +704,7 @@ static void ti_close(struct usb_serial_port *port, struct file *file)
704 if (do_unlock) 704 if (do_unlock)
705 mutex_unlock(&tdev->td_open_close_lock); 705 mutex_unlock(&tdev->td_open_close_lock);
706 706
707 dbg("%s - exit", __FUNCTION__); 707 dbg("%s - exit", __func__);
708} 708}
709 709
710 710
@@ -714,10 +714,10 @@ static int ti_write(struct usb_serial_port *port, const unsigned char *data,
714 struct ti_port *tport = usb_get_serial_port_data(port); 714 struct ti_port *tport = usb_get_serial_port_data(port);
715 unsigned long flags; 715 unsigned long flags;
716 716
717 dbg("%s - port %d", __FUNCTION__, port->number); 717 dbg("%s - port %d", __func__, port->number);
718 718
719 if (count == 0) { 719 if (count == 0) {
720 dbg("%s - write request of 0 bytes", __FUNCTION__); 720 dbg("%s - write request of 0 bytes", __func__);
721 return 0; 721 return 0;
722 } 722 }
723 723
@@ -740,7 +740,7 @@ static int ti_write_room(struct usb_serial_port *port)
740 int room = 0; 740 int room = 0;
741 unsigned long flags; 741 unsigned long flags;
742 742
743 dbg("%s - port %d", __FUNCTION__, port->number); 743 dbg("%s - port %d", __func__, port->number);
744 744
745 if (tport == NULL) 745 if (tport == NULL)
746 return -ENODEV; 746 return -ENODEV;
@@ -749,7 +749,7 @@ static int ti_write_room(struct usb_serial_port *port)
749 room = ti_buf_space_avail(tport->tp_write_buf); 749 room = ti_buf_space_avail(tport->tp_write_buf);
750 spin_unlock_irqrestore(&tport->tp_lock, flags); 750 spin_unlock_irqrestore(&tport->tp_lock, flags);
751 751
752 dbg("%s - returns %d", __FUNCTION__, room); 752 dbg("%s - returns %d", __func__, room);
753 return room; 753 return room;
754} 754}
755 755
@@ -760,7 +760,7 @@ static int ti_chars_in_buffer(struct usb_serial_port *port)
760 int chars = 0; 760 int chars = 0;
761 unsigned long flags; 761 unsigned long flags;
762 762
763 dbg("%s - port %d", __FUNCTION__, port->number); 763 dbg("%s - port %d", __func__, port->number);
764 764
765 if (tport == NULL) 765 if (tport == NULL)
766 return -ENODEV; 766 return -ENODEV;
@@ -769,7 +769,7 @@ static int ti_chars_in_buffer(struct usb_serial_port *port)
769 chars = ti_buf_data_avail(tport->tp_write_buf); 769 chars = ti_buf_data_avail(tport->tp_write_buf);
770 spin_unlock_irqrestore(&tport->tp_lock, flags); 770 spin_unlock_irqrestore(&tport->tp_lock, flags);
771 771
772 dbg("%s - returns %d", __FUNCTION__, chars); 772 dbg("%s - returns %d", __func__, chars);
773 return chars; 773 return chars;
774} 774}
775 775
@@ -779,14 +779,14 @@ static void ti_throttle(struct usb_serial_port *port)
779 struct ti_port *tport = usb_get_serial_port_data(port); 779 struct ti_port *tport = usb_get_serial_port_data(port);
780 struct tty_struct *tty; 780 struct tty_struct *tty;
781 781
782 dbg("%s - port %d", __FUNCTION__, port->number); 782 dbg("%s - port %d", __func__, port->number);
783 783
784 if (tport == NULL) 784 if (tport == NULL)
785 return; 785 return;
786 786
787 tty = port->tty; 787 tty = port->tty;
788 if (!tty) { 788 if (!tty) {
789 dbg("%s - no tty", __FUNCTION__); 789 dbg("%s - no tty", __func__);
790 return; 790 return;
791 } 791 }
792 792
@@ -802,21 +802,21 @@ static void ti_unthrottle(struct usb_serial_port *port)
802 struct tty_struct *tty; 802 struct tty_struct *tty;
803 int status; 803 int status;
804 804
805 dbg("%s - port %d", __FUNCTION__, port->number); 805 dbg("%s - port %d", __func__, port->number);
806 806
807 if (tport == NULL) 807 if (tport == NULL)
808 return; 808 return;
809 809
810 tty = port->tty; 810 tty = port->tty;
811 if (!tty) { 811 if (!tty) {
812 dbg("%s - no tty", __FUNCTION__); 812 dbg("%s - no tty", __func__);
813 return; 813 return;
814 } 814 }
815 815
816 if (I_IXOFF(tty) || C_CRTSCTS(tty)) { 816 if (I_IXOFF(tty) || C_CRTSCTS(tty)) {
817 status = ti_restart_read(tport, tty); 817 status = ti_restart_read(tport, tty);
818 if (status) 818 if (status)
819 dev_err(&port->dev, "%s - cannot restart read, %d\n", __FUNCTION__, status); 819 dev_err(&port->dev, "%s - cannot restart read, %d\n", __func__, status);
820 } 820 }
821} 821}
822 822
@@ -828,24 +828,24 @@ static int ti_ioctl(struct usb_serial_port *port, struct file *file,
828 struct async_icount cnow; 828 struct async_icount cnow;
829 struct async_icount cprev; 829 struct async_icount cprev;
830 830
831 dbg("%s - port %d, cmd = 0x%04X", __FUNCTION__, port->number, cmd); 831 dbg("%s - port %d, cmd = 0x%04X", __func__, port->number, cmd);
832 832
833 if (tport == NULL) 833 if (tport == NULL)
834 return -ENODEV; 834 return -ENODEV;
835 835
836 switch (cmd) { 836 switch (cmd) {
837 case TIOCGSERIAL: 837 case TIOCGSERIAL:
838 dbg("%s - (%d) TIOCGSERIAL", __FUNCTION__, port->number); 838 dbg("%s - (%d) TIOCGSERIAL", __func__, port->number);
839 return ti_get_serial_info(tport, (struct serial_struct __user *)arg); 839 return ti_get_serial_info(tport, (struct serial_struct __user *)arg);
840 break; 840 break;
841 841
842 case TIOCSSERIAL: 842 case TIOCSSERIAL:
843 dbg("%s - (%d) TIOCSSERIAL", __FUNCTION__, port->number); 843 dbg("%s - (%d) TIOCSSERIAL", __func__, port->number);
844 return ti_set_serial_info(tport, (struct serial_struct __user *)arg); 844 return ti_set_serial_info(tport, (struct serial_struct __user *)arg);
845 break; 845 break;
846 846
847 case TIOCMIWAIT: 847 case TIOCMIWAIT:
848 dbg("%s - (%d) TIOCMIWAIT", __FUNCTION__, port->number); 848 dbg("%s - (%d) TIOCMIWAIT", __func__, port->number);
849 cprev = tport->tp_icount; 849 cprev = tport->tp_icount;
850 while (1) { 850 while (1) {
851 interruptible_sleep_on(&tport->tp_msr_wait); 851 interruptible_sleep_on(&tport->tp_msr_wait);
@@ -866,7 +866,7 @@ static int ti_ioctl(struct usb_serial_port *port, struct file *file,
866 break; 866 break;
867 867
868 case TIOCGICOUNT: 868 case TIOCGICOUNT:
869 dbg("%s - (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__, port->number, tport->tp_icount.rx, tport->tp_icount.tx); 869 dbg("%s - (%d) TIOCGICOUNT RX=%d, TX=%d", __func__, port->number, tport->tp_icount.rx, tport->tp_icount.tx);
870 if (copy_to_user((void __user *)arg, &tport->tp_icount, sizeof(tport->tp_icount))) 870 if (copy_to_user((void __user *)arg, &tport->tp_icount, sizeof(tport->tp_icount)))
871 return -EFAULT; 871 return -EFAULT;
872 return 0; 872 return 0;
@@ -888,20 +888,20 @@ static void ti_set_termios(struct usb_serial_port *port,
888 int port_number = port->number - port->serial->minor; 888 int port_number = port->number - port->serial->minor;
889 unsigned int mcr; 889 unsigned int mcr;
890 890
891 dbg("%s - port %d", __FUNCTION__, port->number); 891 dbg("%s - port %d", __func__, port->number);
892 892
893 cflag = tty->termios->c_cflag; 893 cflag = tty->termios->c_cflag;
894 iflag = tty->termios->c_iflag; 894 iflag = tty->termios->c_iflag;
895 895
896 dbg("%s - cflag %08x, iflag %08x", __FUNCTION__, cflag, iflag); 896 dbg("%s - cflag %08x, iflag %08x", __func__, cflag, iflag);
897 dbg("%s - old clfag %08x, old iflag %08x", __FUNCTION__, old_termios->c_cflag, old_termios->c_iflag); 897 dbg("%s - old clfag %08x, old iflag %08x", __func__, old_termios->c_cflag, old_termios->c_iflag);
898 898
899 if (tport == NULL) 899 if (tport == NULL)
900 return; 900 return;
901 901
902 config = kmalloc(sizeof(*config), GFP_KERNEL); 902 config = kmalloc(sizeof(*config), GFP_KERNEL);
903 if (!config) { 903 if (!config) {
904 dev_err(&port->dev, "%s - out of memory\n", __FUNCTION__); 904 dev_err(&port->dev, "%s - out of memory\n", __func__);
905 return; 905 return;
906 } 906 }
907 907
@@ -985,7 +985,7 @@ static void ti_set_termios(struct usb_serial_port *port,
985 tty_encode_baud_rate(tty, baud, baud); 985 tty_encode_baud_rate(tty, baud, baud);
986 986
987 dbg("%s - BaudRate=%d, wBaudRate=%d, wFlags=0x%04X, bDataBits=%d, bParity=%d, bStopBits=%d, cXon=%d, cXoff=%d, bUartMode=%d", 987 dbg("%s - BaudRate=%d, wBaudRate=%d, wFlags=0x%04X, bDataBits=%d, bParity=%d, bStopBits=%d, cXon=%d, cXoff=%d, bUartMode=%d",
988 __FUNCTION__, baud, config->wBaudRate, config->wFlags, config->bDataBits, config->bParity, config->bStopBits, config->cXon, config->cXoff, config->bUartMode); 988 __func__, baud, config->wBaudRate, config->wFlags, config->bDataBits, config->bParity, config->bStopBits, config->cXon, config->cXoff, config->bUartMode);
989 989
990 cpu_to_be16s(&config->wBaudRate); 990 cpu_to_be16s(&config->wBaudRate);
991 cpu_to_be16s(&config->wFlags); 991 cpu_to_be16s(&config->wFlags);
@@ -994,7 +994,7 @@ static void ti_set_termios(struct usb_serial_port *port,
994 (__u8)(TI_UART1_PORT + port_number), 0, (__u8 *)config, 994 (__u8)(TI_UART1_PORT + port_number), 0, (__u8 *)config,
995 sizeof(*config)); 995 sizeof(*config));
996 if (status) 996 if (status)
997 dev_err(&port->dev, "%s - cannot set config on port %d, %d\n", __FUNCTION__, port_number, status); 997 dev_err(&port->dev, "%s - cannot set config on port %d, %d\n", __func__, port_number, status);
998 998
999 /* SET_CONFIG asserts RTS and DTR, reset them correctly */ 999 /* SET_CONFIG asserts RTS and DTR, reset them correctly */
1000 mcr = tport->tp_shadow_mcr; 1000 mcr = tport->tp_shadow_mcr;
@@ -1003,7 +1003,7 @@ static void ti_set_termios(struct usb_serial_port *port,
1003 mcr &= ~(TI_MCR_DTR | TI_MCR_RTS); 1003 mcr &= ~(TI_MCR_DTR | TI_MCR_RTS);
1004 status = ti_set_mcr(tport, mcr); 1004 status = ti_set_mcr(tport, mcr);
1005 if (status) 1005 if (status)
1006 dev_err(&port->dev, "%s - cannot set modem control on port %d, %d\n", __FUNCTION__, port_number, status); 1006 dev_err(&port->dev, "%s - cannot set modem control on port %d, %d\n", __func__, port_number, status);
1007 1007
1008 kfree(config); 1008 kfree(config);
1009} 1009}
@@ -1017,7 +1017,7 @@ static int ti_tiocmget(struct usb_serial_port *port, struct file *file)
1017 unsigned int mcr; 1017 unsigned int mcr;
1018 unsigned long flags; 1018 unsigned long flags;
1019 1019
1020 dbg("%s - port %d", __FUNCTION__, port->number); 1020 dbg("%s - port %d", __func__, port->number);
1021 1021
1022 if (tport == NULL) 1022 if (tport == NULL)
1023 return -ENODEV; 1023 return -ENODEV;
@@ -1035,7 +1035,7 @@ static int ti_tiocmget(struct usb_serial_port *port, struct file *file)
1035 | ((msr & TI_MSR_RI) ? TIOCM_RI : 0) 1035 | ((msr & TI_MSR_RI) ? TIOCM_RI : 0)
1036 | ((msr & TI_MSR_DSR) ? TIOCM_DSR : 0); 1036 | ((msr & TI_MSR_DSR) ? TIOCM_DSR : 0);
1037 1037
1038 dbg("%s - 0x%04X", __FUNCTION__, result); 1038 dbg("%s - 0x%04X", __func__, result);
1039 1039
1040 return result; 1040 return result;
1041} 1041}
@@ -1048,7 +1048,7 @@ static int ti_tiocmset(struct usb_serial_port *port, struct file *file,
1048 unsigned int mcr; 1048 unsigned int mcr;
1049 unsigned long flags; 1049 unsigned long flags;
1050 1050
1051 dbg("%s - port %d", __FUNCTION__, port->number); 1051 dbg("%s - port %d", __func__, port->number);
1052 1052
1053 if (tport == NULL) 1053 if (tport == NULL)
1054 return -ENODEV; 1054 return -ENODEV;
@@ -1080,7 +1080,7 @@ static void ti_break(struct usb_serial_port *port, int break_state)
1080 struct ti_port *tport = usb_get_serial_port_data(port); 1080 struct ti_port *tport = usb_get_serial_port_data(port);
1081 int status; 1081 int status;
1082 1082
1083 dbg("%s - state = %d", __FUNCTION__, break_state); 1083 dbg("%s - state = %d", __func__, break_state);
1084 1084
1085 if (tport == NULL) 1085 if (tport == NULL)
1086 return; 1086 return;
@@ -1092,7 +1092,7 @@ static void ti_break(struct usb_serial_port *port, int break_state)
1092 TI_LCR_BREAK, break_state == -1 ? TI_LCR_BREAK : 0); 1092 TI_LCR_BREAK, break_state == -1 ? TI_LCR_BREAK : 0);
1093 1093
1094 if (status) 1094 if (status)
1095 dbg("%s - error setting break, %d", __FUNCTION__, status); 1095 dbg("%s - error setting break, %d", __func__, status);
1096} 1096}
1097 1097
1098 1098
@@ -1111,7 +1111,7 @@ static void ti_interrupt_callback(struct urb *urb)
1111 int retval; 1111 int retval;
1112 __u8 msr; 1112 __u8 msr;
1113 1113
1114 dbg("%s", __FUNCTION__); 1114 dbg("%s", __func__);
1115 1115
1116 switch (status) { 1116 switch (status) {
1117 case 0: 1117 case 0:
@@ -1119,33 +1119,33 @@ static void ti_interrupt_callback(struct urb *urb)
1119 case -ECONNRESET: 1119 case -ECONNRESET:
1120 case -ENOENT: 1120 case -ENOENT:
1121 case -ESHUTDOWN: 1121 case -ESHUTDOWN:
1122 dbg("%s - urb shutting down, %d", __FUNCTION__, status); 1122 dbg("%s - urb shutting down, %d", __func__, status);
1123 tdev->td_urb_error = 1; 1123 tdev->td_urb_error = 1;
1124 return; 1124 return;
1125 default: 1125 default:
1126 dev_err(dev, "%s - nonzero urb status, %d\n", 1126 dev_err(dev, "%s - nonzero urb status, %d\n",
1127 __FUNCTION__, status); 1127 __func__, status);
1128 tdev->td_urb_error = 1; 1128 tdev->td_urb_error = 1;
1129 goto exit; 1129 goto exit;
1130 } 1130 }
1131 1131
1132 if (length != 2) { 1132 if (length != 2) {
1133 dbg("%s - bad packet size, %d", __FUNCTION__, length); 1133 dbg("%s - bad packet size, %d", __func__, length);
1134 goto exit; 1134 goto exit;
1135 } 1135 }
1136 1136
1137 if (data[0] == TI_CODE_HARDWARE_ERROR) { 1137 if (data[0] == TI_CODE_HARDWARE_ERROR) {
1138 dev_err(dev, "%s - hardware error, %d\n", __FUNCTION__, data[1]); 1138 dev_err(dev, "%s - hardware error, %d\n", __func__, data[1]);
1139 goto exit; 1139 goto exit;
1140 } 1140 }
1141 1141
1142 port_number = TI_GET_PORT_FROM_CODE(data[0]); 1142 port_number = TI_GET_PORT_FROM_CODE(data[0]);
1143 function = TI_GET_FUNC_FROM_CODE(data[0]); 1143 function = TI_GET_FUNC_FROM_CODE(data[0]);
1144 1144
1145 dbg("%s - port_number %d, function %d, data 0x%02X", __FUNCTION__, port_number, function, data[1]); 1145 dbg("%s - port_number %d, function %d, data 0x%02X", __func__, port_number, function, data[1]);
1146 1146
1147 if (port_number >= serial->num_ports) { 1147 if (port_number >= serial->num_ports) {
1148 dev_err(dev, "%s - bad port number, %d\n", __FUNCTION__, port_number); 1148 dev_err(dev, "%s - bad port number, %d\n", __func__, port_number);
1149 goto exit; 1149 goto exit;
1150 } 1150 }
1151 1151
@@ -1157,17 +1157,17 @@ static void ti_interrupt_callback(struct urb *urb)
1157 1157
1158 switch (function) { 1158 switch (function) {
1159 case TI_CODE_DATA_ERROR: 1159 case TI_CODE_DATA_ERROR:
1160 dev_err(dev, "%s - DATA ERROR, port %d, data 0x%02X\n", __FUNCTION__, port_number, data[1]); 1160 dev_err(dev, "%s - DATA ERROR, port %d, data 0x%02X\n", __func__, port_number, data[1]);
1161 break; 1161 break;
1162 1162
1163 case TI_CODE_MODEM_STATUS: 1163 case TI_CODE_MODEM_STATUS:
1164 msr = data[1]; 1164 msr = data[1];
1165 dbg("%s - port %d, msr 0x%02X", __FUNCTION__, port_number, msr); 1165 dbg("%s - port %d, msr 0x%02X", __func__, port_number, msr);
1166 ti_handle_new_msr(tport, msr); 1166 ti_handle_new_msr(tport, msr);
1167 break; 1167 break;
1168 1168
1169 default: 1169 default:
1170 dev_err(dev, "%s - unknown interrupt code, 0x%02X\n", __FUNCTION__, data[1]); 1170 dev_err(dev, "%s - unknown interrupt code, 0x%02X\n", __func__, data[1]);
1171 break; 1171 break;
1172 } 1172 }
1173 1173
@@ -1175,7 +1175,7 @@ exit:
1175 retval = usb_submit_urb(urb, GFP_ATOMIC); 1175 retval = usb_submit_urb(urb, GFP_ATOMIC);
1176 if (retval) 1176 if (retval)
1177 dev_err(dev, "%s - resubmit interrupt urb failed, %d\n", 1177 dev_err(dev, "%s - resubmit interrupt urb failed, %d\n",
1178 __FUNCTION__, retval); 1178 __func__, retval);
1179} 1179}
1180 1180
1181 1181
@@ -1187,7 +1187,7 @@ static void ti_bulk_in_callback(struct urb *urb)
1187 int status = urb->status; 1187 int status = urb->status;
1188 int retval = 0; 1188 int retval = 0;
1189 1189
1190 dbg("%s", __FUNCTION__); 1190 dbg("%s", __func__);
1191 1191
1192 switch (status) { 1192 switch (status) {
1193 case 0: 1193 case 0:
@@ -1195,13 +1195,13 @@ static void ti_bulk_in_callback(struct urb *urb)
1195 case -ECONNRESET: 1195 case -ECONNRESET:
1196 case -ENOENT: 1196 case -ENOENT:
1197 case -ESHUTDOWN: 1197 case -ESHUTDOWN:
1198 dbg("%s - urb shutting down, %d", __FUNCTION__, status); 1198 dbg("%s - urb shutting down, %d", __func__, status);
1199 tport->tp_tdev->td_urb_error = 1; 1199 tport->tp_tdev->td_urb_error = 1;
1200 wake_up_interruptible(&tport->tp_write_wait); 1200 wake_up_interruptible(&tport->tp_write_wait);
1201 return; 1201 return;
1202 default: 1202 default:
1203 dev_err(dev, "%s - nonzero urb status, %d\n", 1203 dev_err(dev, "%s - nonzero urb status, %d\n",
1204 __FUNCTION__, status ); 1204 __func__, status );
1205 tport->tp_tdev->td_urb_error = 1; 1205 tport->tp_tdev->td_urb_error = 1;
1206 wake_up_interruptible(&tport->tp_write_wait); 1206 wake_up_interruptible(&tport->tp_write_wait);
1207 } 1207 }
@@ -1210,16 +1210,16 @@ static void ti_bulk_in_callback(struct urb *urb)
1210 goto exit; 1210 goto exit;
1211 1211
1212 if (status) { 1212 if (status) {
1213 dev_err(dev, "%s - stopping read!\n", __FUNCTION__); 1213 dev_err(dev, "%s - stopping read!\n", __func__);
1214 return; 1214 return;
1215 } 1215 }
1216 1216
1217 if (port->tty && urb->actual_length) { 1217 if (port->tty && urb->actual_length) {
1218 usb_serial_debug_data(debug, dev, __FUNCTION__, 1218 usb_serial_debug_data(debug, dev, __func__,
1219 urb->actual_length, urb->transfer_buffer); 1219 urb->actual_length, urb->transfer_buffer);
1220 1220
1221 if (!tport->tp_is_open) 1221 if (!tport->tp_is_open)
1222 dbg("%s - port closed, dropping data", __FUNCTION__); 1222 dbg("%s - port closed, dropping data", __func__);
1223 else 1223 else
1224 ti_recv(&urb->dev->dev, port->tty, urb->transfer_buffer, 1224 ti_recv(&urb->dev->dev, port->tty, urb->transfer_buffer,
1225 urb->actual_length); 1225 urb->actual_length);
@@ -1241,7 +1241,7 @@ exit:
1241 spin_unlock(&tport->tp_lock); 1241 spin_unlock(&tport->tp_lock);
1242 if (retval) 1242 if (retval)
1243 dev_err(dev, "%s - resubmit read urb failed, %d\n", 1243 dev_err(dev, "%s - resubmit read urb failed, %d\n",
1244 __FUNCTION__, retval); 1244 __func__, retval);
1245} 1245}
1246 1246
1247 1247
@@ -1252,7 +1252,7 @@ static void ti_bulk_out_callback(struct urb *urb)
1252 struct device *dev = &urb->dev->dev; 1252 struct device *dev = &urb->dev->dev;
1253 int status = urb->status; 1253 int status = urb->status;
1254 1254
1255 dbg("%s - port %d", __FUNCTION__, port->number); 1255 dbg("%s - port %d", __func__, port->number);
1256 1256
1257 tport->tp_write_urb_in_use = 0; 1257 tport->tp_write_urb_in_use = 0;
1258 1258
@@ -1262,13 +1262,13 @@ static void ti_bulk_out_callback(struct urb *urb)
1262 case -ECONNRESET: 1262 case -ECONNRESET:
1263 case -ENOENT: 1263 case -ENOENT:
1264 case -ESHUTDOWN: 1264 case -ESHUTDOWN:
1265 dbg("%s - urb shutting down, %d", __FUNCTION__, status); 1265 dbg("%s - urb shutting down, %d", __func__, status);
1266 tport->tp_tdev->td_urb_error = 1; 1266 tport->tp_tdev->td_urb_error = 1;
1267 wake_up_interruptible(&tport->tp_write_wait); 1267 wake_up_interruptible(&tport->tp_write_wait);
1268 return; 1268 return;
1269 default: 1269 default:
1270 dev_err(dev, "%s - nonzero urb status, %d\n", 1270 dev_err(dev, "%s - nonzero urb status, %d\n",
1271 __FUNCTION__, status); 1271 __func__, status);
1272 tport->tp_tdev->td_urb_error = 1; 1272 tport->tp_tdev->td_urb_error = 1;
1273 wake_up_interruptible(&tport->tp_write_wait); 1273 wake_up_interruptible(&tport->tp_write_wait);
1274 } 1274 }
@@ -1286,7 +1286,7 @@ static void ti_recv(struct device *dev, struct tty_struct *tty,
1286 do { 1286 do {
1287 cnt = tty_buffer_request_room(tty, length); 1287 cnt = tty_buffer_request_room(tty, length);
1288 if (cnt < length) { 1288 if (cnt < length) {
1289 dev_err(dev, "%s - dropping data, %d bytes lost\n", __FUNCTION__, length - cnt); 1289 dev_err(dev, "%s - dropping data, %d bytes lost\n", __func__, length - cnt);
1290 if(cnt == 0) 1290 if(cnt == 0)
1291 break; 1291 break;
1292 } 1292 }
@@ -1307,7 +1307,7 @@ static void ti_send(struct ti_port *tport)
1307 unsigned long flags; 1307 unsigned long flags;
1308 1308
1309 1309
1310 dbg("%s - port %d", __FUNCTION__, port->number); 1310 dbg("%s - port %d", __func__, port->number);
1311 1311
1312 spin_lock_irqsave(&tport->tp_lock, flags); 1312 spin_lock_irqsave(&tport->tp_lock, flags);
1313 1313
@@ -1329,7 +1329,7 @@ static void ti_send(struct ti_port *tport)
1329 1329
1330 spin_unlock_irqrestore(&tport->tp_lock, flags); 1330 spin_unlock_irqrestore(&tport->tp_lock, flags);
1331 1331
1332 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, port->write_urb->transfer_buffer); 1332 usb_serial_debug_data(debug, &port->dev, __func__, count, port->write_urb->transfer_buffer);
1333 1333
1334 usb_fill_bulk_urb(port->write_urb, port->serial->dev, 1334 usb_fill_bulk_urb(port->write_urb, port->serial->dev,
1335 usb_sndbulkpipe(port->serial->dev, 1335 usb_sndbulkpipe(port->serial->dev,
@@ -1339,7 +1339,7 @@ static void ti_send(struct ti_port *tport)
1339 1339
1340 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 1340 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
1341 if (result) { 1341 if (result) {
1342 dev_err(&port->dev, "%s - submit write urb failed, %d\n", __FUNCTION__, result); 1342 dev_err(&port->dev, "%s - submit write urb failed, %d\n", __func__, result);
1343 tport->tp_write_urb_in_use = 0; 1343 tport->tp_write_urb_in_use = 0;
1344 /* TODO: reschedule ti_send */ 1344 /* TODO: reschedule ti_send */
1345 } else { 1345 } else {
@@ -1381,23 +1381,23 @@ static int ti_get_lsr(struct ti_port *tport)
1381 int port_number = port->number - port->serial->minor; 1381 int port_number = port->number - port->serial->minor;
1382 struct ti_port_status *data; 1382 struct ti_port_status *data;
1383 1383
1384 dbg("%s - port %d", __FUNCTION__, port->number); 1384 dbg("%s - port %d", __func__, port->number);
1385 1385
1386 size = sizeof(struct ti_port_status); 1386 size = sizeof(struct ti_port_status);
1387 data = kmalloc(size, GFP_KERNEL); 1387 data = kmalloc(size, GFP_KERNEL);
1388 if (!data) { 1388 if (!data) {
1389 dev_err(&port->dev, "%s - out of memory\n", __FUNCTION__); 1389 dev_err(&port->dev, "%s - out of memory\n", __func__);
1390 return -ENOMEM; 1390 return -ENOMEM;
1391 } 1391 }
1392 1392
1393 status = ti_command_in_sync(tdev, TI_GET_PORT_STATUS, 1393 status = ti_command_in_sync(tdev, TI_GET_PORT_STATUS,
1394 (__u8)(TI_UART1_PORT+port_number), 0, (__u8 *)data, size); 1394 (__u8)(TI_UART1_PORT+port_number), 0, (__u8 *)data, size);
1395 if (status) { 1395 if (status) {
1396 dev_err(&port->dev, "%s - get port status command failed, %d\n", __FUNCTION__, status); 1396 dev_err(&port->dev, "%s - get port status command failed, %d\n", __func__, status);
1397 goto free_data; 1397 goto free_data;
1398 } 1398 }
1399 1399
1400 dbg("%s - lsr 0x%02X", __FUNCTION__, data->bLSR); 1400 dbg("%s - lsr 0x%02X", __func__, data->bLSR);
1401 1401
1402 tport->tp_lsr = data->bLSR; 1402 tport->tp_lsr = data->bLSR;
1403 1403
@@ -1458,7 +1458,7 @@ static void ti_handle_new_msr(struct ti_port *tport, __u8 msr)
1458 struct tty_struct *tty; 1458 struct tty_struct *tty;
1459 unsigned long flags; 1459 unsigned long flags;
1460 1460
1461 dbg("%s - msr 0x%02X", __FUNCTION__, msr); 1461 dbg("%s - msr 0x%02X", __func__, msr);
1462 1462
1463 if (msr & TI_MSR_DELTA_MASK) { 1463 if (msr & TI_MSR_DELTA_MASK) {
1464 spin_lock_irqsave(&tport->tp_lock, flags); 1464 spin_lock_irqsave(&tport->tp_lock, flags);
@@ -1496,7 +1496,7 @@ static void ti_drain(struct ti_port *tport, unsigned long timeout, int flush)
1496 struct usb_serial_port *port = tport->tp_port; 1496 struct usb_serial_port *port = tport->tp_port;
1497 wait_queue_t wait; 1497 wait_queue_t wait;
1498 1498
1499 dbg("%s - port %d", __FUNCTION__, port->number); 1499 dbg("%s - port %d", __func__, port->number);
1500 1500
1501 spin_lock_irq(&tport->tp_lock); 1501 spin_lock_irq(&tport->tp_lock);
1502 1502
@@ -1628,12 +1628,12 @@ static int ti_write_byte(struct ti_device *tdev, unsigned long addr,
1628 struct ti_write_data_bytes *data; 1628 struct ti_write_data_bytes *data;
1629 struct device *dev = &tdev->td_serial->dev->dev; 1629 struct device *dev = &tdev->td_serial->dev->dev;
1630 1630
1631 dbg("%s - addr 0x%08lX, mask 0x%02X, byte 0x%02X", __FUNCTION__, addr, mask, byte); 1631 dbg("%s - addr 0x%08lX, mask 0x%02X, byte 0x%02X", __func__, addr, mask, byte);
1632 1632
1633 size = sizeof(struct ti_write_data_bytes) + 2; 1633 size = sizeof(struct ti_write_data_bytes) + 2;
1634 data = kmalloc(size, GFP_KERNEL); 1634 data = kmalloc(size, GFP_KERNEL);
1635 if (!data) { 1635 if (!data) {
1636 dev_err(dev, "%s - out of memory\n", __FUNCTION__); 1636 dev_err(dev, "%s - out of memory\n", __func__);
1637 return -ENOMEM; 1637 return -ENOMEM;
1638 } 1638 }
1639 1639
@@ -1649,7 +1649,7 @@ static int ti_write_byte(struct ti_device *tdev, unsigned long addr,
1649 (__u8 *)data, size); 1649 (__u8 *)data, size);
1650 1650
1651 if (status < 0) 1651 if (status < 0)
1652 dev_err(dev, "%s - failed, %d\n", __FUNCTION__, status); 1652 dev_err(dev, "%s - failed, %d\n", __func__, status);
1653 1653
1654 kfree(data); 1654 kfree(data);
1655 1655
@@ -1676,7 +1676,7 @@ static int ti_download_firmware(struct ti_device *tdev,
1676 buffer_size = TI_FIRMWARE_BUF_SIZE + sizeof(struct ti_firmware_header); 1676 buffer_size = TI_FIRMWARE_BUF_SIZE + sizeof(struct ti_firmware_header);
1677 buffer = kmalloc(buffer_size, GFP_KERNEL); 1677 buffer = kmalloc(buffer_size, GFP_KERNEL);
1678 if (!buffer) { 1678 if (!buffer) {
1679 dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__); 1679 dev_err(&dev->dev, "%s - out of memory\n", __func__);
1680 return -ENOMEM; 1680 return -ENOMEM;
1681 } 1681 }
1682 1682
@@ -1690,7 +1690,7 @@ static int ti_download_firmware(struct ti_device *tdev,
1690 header->wLength = cpu_to_le16((__u16)(buffer_size - sizeof(struct ti_firmware_header))); 1690 header->wLength = cpu_to_le16((__u16)(buffer_size - sizeof(struct ti_firmware_header)));
1691 header->bCheckSum = cs; 1691 header->bCheckSum = cs;
1692 1692
1693 dbg("%s - downloading firmware", __FUNCTION__); 1693 dbg("%s - downloading firmware", __func__);
1694 for (pos = 0; pos < buffer_size; pos += done) { 1694 for (pos = 0; pos < buffer_size; pos += done) {
1695 len = min(buffer_size - pos, TI_DOWNLOAD_MAX_PACKET_SIZE); 1695 len = min(buffer_size - pos, TI_DOWNLOAD_MAX_PACKET_SIZE);
1696 status = usb_bulk_msg(dev, pipe, buffer+pos, len, &done, 1000); 1696 status = usb_bulk_msg(dev, pipe, buffer+pos, len, &done, 1000);
@@ -1701,11 +1701,11 @@ static int ti_download_firmware(struct ti_device *tdev,
1701 kfree(buffer); 1701 kfree(buffer);
1702 1702
1703 if (status) { 1703 if (status) {
1704 dev_err(&dev->dev, "%s - error downloading firmware, %d\n", __FUNCTION__, status); 1704 dev_err(&dev->dev, "%s - error downloading firmware, %d\n", __func__, status);
1705 return status; 1705 return status;
1706 } 1706 }
1707 1707
1708 dbg("%s - download successful", __FUNCTION__); 1708 dbg("%s - download successful", __func__);
1709 1709
1710 return 0; 1710 return 0;
1711} 1711}
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 5b464811fa4d..baf953d14d82 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -81,7 +81,7 @@ static struct usb_serial *get_free_serial (struct usb_serial *serial, int num_po
81 unsigned int i, j; 81 unsigned int i, j;
82 int good_spot; 82 int good_spot;
83 83
84 dbg("%s %d", __FUNCTION__, num_ports); 84 dbg("%s %d", __func__, num_ports);
85 85
86 *minor = 0; 86 *minor = 0;
87 mutex_lock(&table_lock); 87 mutex_lock(&table_lock);
@@ -101,7 +101,7 @@ static struct usb_serial *get_free_serial (struct usb_serial *serial, int num_po
101 101
102 *minor = i; 102 *minor = i;
103 j = 0; 103 j = 0;
104 dbg("%s - minor base = %d", __FUNCTION__, *minor); 104 dbg("%s - minor base = %d", __func__, *minor);
105 for (i = *minor; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i) { 105 for (i = *minor; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i) {
106 serial_table[i] = serial; 106 serial_table[i] = serial;
107 serial->port[j++]->number = i; 107 serial->port[j++]->number = i;
@@ -117,7 +117,7 @@ static void return_serial(struct usb_serial *serial)
117{ 117{
118 int i; 118 int i;
119 119
120 dbg("%s", __FUNCTION__); 120 dbg("%s", __func__);
121 121
122 if (serial == NULL) 122 if (serial == NULL)
123 return; 123 return;
@@ -135,7 +135,7 @@ static void destroy_serial(struct kref *kref)
135 135
136 serial = to_usb_serial(kref); 136 serial = to_usb_serial(kref);
137 137
138 dbg("%s - %s", __FUNCTION__, serial->type->description); 138 dbg("%s - %s", __func__, serial->type->description);
139 139
140 serial->type->shutdown(serial); 140 serial->type->shutdown(serial);
141 141
@@ -187,7 +187,7 @@ static int serial_open (struct tty_struct *tty, struct file * filp)
187 unsigned int portNumber; 187 unsigned int portNumber;
188 int retval; 188 int retval;
189 189
190 dbg("%s", __FUNCTION__); 190 dbg("%s", __func__);
191 191
192 /* get the serial object associated with this tty pointer */ 192 /* get the serial object associated with this tty pointer */
193 serial = usb_serial_get_by_index(tty->index); 193 serial = usb_serial_get_by_index(tty->index);
@@ -259,7 +259,7 @@ static void serial_close(struct tty_struct *tty, struct file * filp)
259 if (!port) 259 if (!port)
260 return; 260 return;
261 261
262 dbg("%s - port %d", __FUNCTION__, port->number); 262 dbg("%s - port %d", __func__, port->number);
263 263
264 mutex_lock(&port->mutex); 264 mutex_lock(&port->mutex);
265 265
@@ -299,11 +299,11 @@ static int serial_write (struct tty_struct * tty, const unsigned char *buf, int
299 if (!port || port->serial->dev->state == USB_STATE_NOTATTACHED) 299 if (!port || port->serial->dev->state == USB_STATE_NOTATTACHED)
300 goto exit; 300 goto exit;
301 301
302 dbg("%s - port %d, %d byte(s)", __FUNCTION__, port->number, count); 302 dbg("%s - port %d, %d byte(s)", __func__, port->number, count);
303 303
304 if (!port->open_count) { 304 if (!port->open_count) {
305 retval = -EINVAL; 305 retval = -EINVAL;
306 dbg("%s - port not opened", __FUNCTION__); 306 dbg("%s - port not opened", __func__);
307 goto exit; 307 goto exit;
308 } 308 }
309 309
@@ -322,10 +322,10 @@ static int serial_write_room (struct tty_struct *tty)
322 if (!port) 322 if (!port)
323 goto exit; 323 goto exit;
324 324
325 dbg("%s - port %d", __FUNCTION__, port->number); 325 dbg("%s - port %d", __func__, port->number);
326 326
327 if (!port->open_count) { 327 if (!port->open_count) {
328 dbg("%s - port not open", __FUNCTION__); 328 dbg("%s - port not open", __func__);
329 goto exit; 329 goto exit;
330 } 330 }
331 331
@@ -344,10 +344,10 @@ static int serial_chars_in_buffer (struct tty_struct *tty)
344 if (!port) 344 if (!port)
345 goto exit; 345 goto exit;
346 346
347 dbg("%s = port %d", __FUNCTION__, port->number); 347 dbg("%s = port %d", __func__, port->number);
348 348
349 if (!port->open_count) { 349 if (!port->open_count) {
350 dbg("%s - port not open", __FUNCTION__); 350 dbg("%s - port not open", __func__);
351 goto exit; 351 goto exit;
352 } 352 }
353 353
@@ -365,10 +365,10 @@ static void serial_throttle (struct tty_struct * tty)
365 if (!port) 365 if (!port)
366 return; 366 return;
367 367
368 dbg("%s - port %d", __FUNCTION__, port->number); 368 dbg("%s - port %d", __func__, port->number);
369 369
370 if (!port->open_count) { 370 if (!port->open_count) {
371 dbg ("%s - port not open", __FUNCTION__); 371 dbg ("%s - port not open", __func__);
372 return; 372 return;
373 } 373 }
374 374
@@ -384,10 +384,10 @@ static void serial_unthrottle (struct tty_struct * tty)
384 if (!port) 384 if (!port)
385 return; 385 return;
386 386
387 dbg("%s - port %d", __FUNCTION__, port->number); 387 dbg("%s - port %d", __func__, port->number);
388 388
389 if (!port->open_count) { 389 if (!port->open_count) {
390 dbg("%s - port not open", __FUNCTION__); 390 dbg("%s - port not open", __func__);
391 return; 391 return;
392 } 392 }
393 393
@@ -405,11 +405,11 @@ static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned in
405 if (!port) 405 if (!port)
406 goto exit; 406 goto exit;
407 407
408 dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd); 408 dbg("%s - port %d, cmd 0x%.4x", __func__, port->number, cmd);
409 409
410 /* Caution - port->open_count is BKL protected */ 410 /* Caution - port->open_count is BKL protected */
411 if (!port->open_count) { 411 if (!port->open_count) {
412 dbg ("%s - port not open", __FUNCTION__); 412 dbg ("%s - port not open", __func__);
413 goto exit; 413 goto exit;
414 } 414 }
415 415
@@ -430,10 +430,10 @@ static void serial_set_termios (struct tty_struct *tty, struct ktermios * old)
430 if (!port) 430 if (!port)
431 return; 431 return;
432 432
433 dbg("%s - port %d", __FUNCTION__, port->number); 433 dbg("%s - port %d", __func__, port->number);
434 434
435 if (!port->open_count) { 435 if (!port->open_count) {
436 dbg("%s - port not open", __FUNCTION__); 436 dbg("%s - port not open", __func__);
437 return; 437 return;
438 } 438 }
439 439
@@ -454,10 +454,10 @@ static void serial_break (struct tty_struct *tty, int break_state)
454 return; 454 return;
455 } 455 }
456 456
457 dbg("%s - port %d", __FUNCTION__, port->number); 457 dbg("%s - port %d", __func__, port->number);
458 458
459 if (!port->open_count) { 459 if (!port->open_count) {
460 dbg("%s - port not open", __FUNCTION__); 460 dbg("%s - port not open", __func__);
461 unlock_kernel(); 461 unlock_kernel();
462 return; 462 return;
463 } 463 }
@@ -476,7 +476,7 @@ static int serial_read_proc (char *page, char **start, off_t off, int count, int
476 off_t begin = 0; 476 off_t begin = 0;
477 char tmp[40]; 477 char tmp[40];
478 478
479 dbg("%s", __FUNCTION__); 479 dbg("%s", __func__);
480 length += sprintf (page, "usbserinfo:1.0 driver:2.0\n"); 480 length += sprintf (page, "usbserinfo:1.0 driver:2.0\n");
481 for (i = 0; i < SERIAL_TTY_MINORS && length < PAGE_SIZE; ++i) { 481 for (i = 0; i < SERIAL_TTY_MINORS && length < PAGE_SIZE; ++i) {
482 serial = usb_serial_get_by_index(i); 482 serial = usb_serial_get_by_index(i);
@@ -522,10 +522,10 @@ static int serial_tiocmget (struct tty_struct *tty, struct file *file)
522 if (!port) 522 if (!port)
523 return -ENODEV; 523 return -ENODEV;
524 524
525 dbg("%s - port %d", __FUNCTION__, port->number); 525 dbg("%s - port %d", __func__, port->number);
526 526
527 if (!port->open_count) { 527 if (!port->open_count) {
528 dbg("%s - port not open", __FUNCTION__); 528 dbg("%s - port not open", __func__);
529 return -ENODEV; 529 return -ENODEV;
530 } 530 }
531 531
@@ -543,10 +543,10 @@ static int serial_tiocmset (struct tty_struct *tty, struct file *file,
543 if (!port) 543 if (!port)
544 return -ENODEV; 544 return -ENODEV;
545 545
546 dbg("%s - port %d", __FUNCTION__, port->number); 546 dbg("%s - port %d", __func__, port->number);
547 547
548 if (!port->open_count) { 548 if (!port->open_count) {
549 dbg("%s - port not open", __FUNCTION__); 549 dbg("%s - port not open", __func__);
550 return -ENODEV; 550 return -ENODEV;
551 } 551 }
552 552
@@ -572,7 +572,7 @@ static void usb_serial_port_work(struct work_struct *work)
572 container_of(work, struct usb_serial_port, work); 572 container_of(work, struct usb_serial_port, work);
573 struct tty_struct *tty; 573 struct tty_struct *tty;
574 574
575 dbg("%s - port %d", __FUNCTION__, port->number); 575 dbg("%s - port %d", __func__, port->number);
576 576
577 if (!port) 577 if (!port)
578 return; 578 return;
@@ -588,7 +588,7 @@ static void port_release(struct device *dev)
588{ 588{
589 struct usb_serial_port *port = to_usb_serial_port(dev); 589 struct usb_serial_port *port = to_usb_serial_port(dev);
590 590
591 dbg ("%s - %s", __FUNCTION__, dev->bus_id); 591 dbg ("%s - %s", __func__, dev->bus_id);
592 port_free(port); 592 port_free(port);
593} 593}
594 594
@@ -634,7 +634,7 @@ static struct usb_serial * create_serial (struct usb_device *dev,
634 634
635 serial = kzalloc(sizeof(*serial), GFP_KERNEL); 635 serial = kzalloc(sizeof(*serial), GFP_KERNEL);
636 if (!serial) { 636 if (!serial) {
637 dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__); 637 dev_err(&dev->dev, "%s - out of memory\n", __func__);
638 return NULL; 638 return NULL;
639 } 639 }
640 serial->dev = usb_get_dev(dev); 640 serial->dev = usb_get_dev(dev);
@@ -729,7 +729,7 @@ int usb_serial_probe(struct usb_interface *interface,
729 serial = create_serial (dev, interface, type); 729 serial = create_serial (dev, interface, type);
730 if (!serial) { 730 if (!serial) {
731 unlock_kernel(); 731 unlock_kernel();
732 dev_err(&interface->dev, "%s - out of memory\n", __FUNCTION__); 732 dev_err(&interface->dev, "%s - out of memory\n", __func__);
733 return -ENOMEM; 733 return -ENOMEM;
734 } 734 }
735 735
@@ -874,7 +874,7 @@ int usb_serial_probe(struct usb_interface *interface,
874 serial->num_port_pointers = max_endpoints; 874 serial->num_port_pointers = max_endpoints;
875 unlock_kernel(); 875 unlock_kernel();
876 876
877 dbg("%s - setting up %d port structures for this device", __FUNCTION__, max_endpoints); 877 dbg("%s - setting up %d port structures for this device", __func__, max_endpoints);
878 for (i = 0; i < max_endpoints; ++i) { 878 for (i = 0; i < max_endpoints; ++i) {
879 port = kzalloc(sizeof(struct usb_serial_port), GFP_KERNEL); 879 port = kzalloc(sizeof(struct usb_serial_port), GFP_KERNEL);
880 if (!port) 880 if (!port)
@@ -1022,7 +1022,7 @@ int usb_serial_probe(struct usb_interface *interface,
1022 port->dev.release = &port_release; 1022 port->dev.release = &port_release;
1023 1023
1024 snprintf (&port->dev.bus_id[0], sizeof(port->dev.bus_id), "ttyUSB%d", port->number); 1024 snprintf (&port->dev.bus_id[0], sizeof(port->dev.bus_id), "ttyUSB%d", port->number);
1025 dbg ("%s - registering %s", __FUNCTION__, port->dev.bus_id); 1025 dbg ("%s - registering %s", __func__, port->dev.bus_id);
1026 retval = device_register(&port->dev); 1026 retval = device_register(&port->dev);
1027 if (retval) 1027 if (retval)
1028 dev_err(&port->dev, "Error registering port device, " 1028 dev_err(&port->dev, "Error registering port device, "
@@ -1081,7 +1081,7 @@ void usb_serial_disconnect(struct usb_interface *interface)
1081 struct usb_serial_port *port; 1081 struct usb_serial_port *port;
1082 1082
1083 usb_serial_console_disconnect(serial); 1083 usb_serial_console_disconnect(serial);
1084 dbg ("%s", __FUNCTION__); 1084 dbg ("%s", __func__);
1085 1085
1086 mutex_lock(&serial->disc_mutex); 1086 mutex_lock(&serial->disc_mutex);
1087 usb_set_intfdata (interface, NULL); 1087 usb_set_intfdata (interface, NULL);
@@ -1165,7 +1165,7 @@ static int __init usb_serial_init(void)
1165 1165
1166 result = bus_register(&usb_serial_bus_type); 1166 result = bus_register(&usb_serial_bus_type);
1167 if (result) { 1167 if (result) {
1168 err("%s - registering bus driver failed", __FUNCTION__); 1168 err("%s - registering bus driver failed", __func__);
1169 goto exit_bus; 1169 goto exit_bus;
1170 } 1170 }
1171 1171
@@ -1182,21 +1182,21 @@ static int __init usb_serial_init(void)
1182 tty_set_operations(usb_serial_tty_driver, &serial_ops); 1182 tty_set_operations(usb_serial_tty_driver, &serial_ops);
1183 result = tty_register_driver(usb_serial_tty_driver); 1183 result = tty_register_driver(usb_serial_tty_driver);
1184 if (result) { 1184 if (result) {
1185 err("%s - tty_register_driver failed", __FUNCTION__); 1185 err("%s - tty_register_driver failed", __func__);
1186 goto exit_reg_driver; 1186 goto exit_reg_driver;
1187 } 1187 }
1188 1188
1189 /* register the USB driver */ 1189 /* register the USB driver */
1190 result = usb_register(&usb_serial_driver); 1190 result = usb_register(&usb_serial_driver);
1191 if (result < 0) { 1191 if (result < 0) {
1192 err("%s - usb_register failed", __FUNCTION__); 1192 err("%s - usb_register failed", __func__);
1193 goto exit_tty; 1193 goto exit_tty;
1194 } 1194 }
1195 1195
1196 /* register the generic driver, if we should */ 1196 /* register the generic driver, if we should */
1197 result = usb_serial_generic_register(debug); 1197 result = usb_serial_generic_register(debug);
1198 if (result < 0) { 1198 if (result < 0) {
1199 err("%s - registering generic driver failed", __FUNCTION__); 1199 err("%s - registering generic driver failed", __func__);
1200 goto exit_generic; 1200 goto exit_generic;
1201 } 1201 }
1202 1202
@@ -1214,7 +1214,7 @@ exit_reg_driver:
1214 bus_unregister(&usb_serial_bus_type); 1214 bus_unregister(&usb_serial_bus_type);
1215 1215
1216exit_bus: 1216exit_bus:
1217 err ("%s - returning with error %d", __FUNCTION__, result); 1217 err ("%s - returning with error %d", __func__, result);
1218 put_tty_driver(usb_serial_tty_driver); 1218 put_tty_driver(usb_serial_tty_driver);
1219 return result; 1219 return result;
1220} 1220}
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index f2d59b06c364..137df445e296 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -281,7 +281,7 @@ static int visor_open (struct usb_serial_port *port, struct file *filp)
281 unsigned long flags; 281 unsigned long flags;
282 int result = 0; 282 int result = 0;
283 283
284 dbg("%s - port %d", __FUNCTION__, port->number); 284 dbg("%s - port %d", __func__, port->number);
285 285
286 if (!port->read_urb) { 286 if (!port->read_urb) {
287 /* this is needed for some brain dead Sony devices */ 287 /* this is needed for some brain dead Sony devices */
@@ -313,16 +313,16 @@ static int visor_open (struct usb_serial_port *port, struct file *filp)
313 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 313 result = usb_submit_urb(port->read_urb, GFP_KERNEL);
314 if (result) { 314 if (result) {
315 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", 315 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n",
316 __FUNCTION__, result); 316 __func__, result);
317 goto exit; 317 goto exit;
318 } 318 }
319 319
320 if (port->interrupt_in_urb) { 320 if (port->interrupt_in_urb) {
321 dbg("%s - adding interrupt input for treo", __FUNCTION__); 321 dbg("%s - adding interrupt input for treo", __func__);
322 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 322 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
323 if (result) 323 if (result)
324 dev_err(&port->dev, "%s - failed submitting interrupt urb, error %d\n", 324 dev_err(&port->dev, "%s - failed submitting interrupt urb, error %d\n",
325 __FUNCTION__, result); 325 __func__, result);
326 } 326 }
327exit: 327exit:
328 return result; 328 return result;
@@ -334,7 +334,7 @@ static void visor_close (struct usb_serial_port *port, struct file * filp)
334 struct visor_private *priv = usb_get_serial_port_data(port); 334 struct visor_private *priv = usb_get_serial_port_data(port);
335 unsigned char *transfer_buffer; 335 unsigned char *transfer_buffer;
336 336
337 dbg("%s - port %d", __FUNCTION__, port->number); 337 dbg("%s - port %d", __func__, port->number);
338 338
339 /* shutdown our urbs */ 339 /* shutdown our urbs */
340 usb_kill_urb(port->read_urb); 340 usb_kill_urb(port->read_urb);
@@ -370,12 +370,12 @@ static int visor_write (struct usb_serial_port *port, const unsigned char *buf,
370 unsigned long flags; 370 unsigned long flags;
371 int status; 371 int status;
372 372
373 dbg("%s - port %d", __FUNCTION__, port->number); 373 dbg("%s - port %d", __func__, port->number);
374 374
375 spin_lock_irqsave(&priv->lock, flags); 375 spin_lock_irqsave(&priv->lock, flags);
376 if (priv->outstanding_urbs > URB_UPPER_LIMIT) { 376 if (priv->outstanding_urbs > URB_UPPER_LIMIT) {
377 spin_unlock_irqrestore(&priv->lock, flags); 377 spin_unlock_irqrestore(&priv->lock, flags);
378 dbg("%s - write limit hit\n", __FUNCTION__); 378 dbg("%s - write limit hit\n", __func__);
379 return 0; 379 return 0;
380 } 380 }
381 priv->outstanding_urbs++; 381 priv->outstanding_urbs++;
@@ -397,7 +397,7 @@ static int visor_write (struct usb_serial_port *port, const unsigned char *buf,
397 397
398 memcpy (buffer, buf, count); 398 memcpy (buffer, buf, count);
399 399
400 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buffer); 400 usb_serial_debug_data(debug, &port->dev, __func__, count, buffer);
401 401
402 usb_fill_bulk_urb (urb, serial->dev, 402 usb_fill_bulk_urb (urb, serial->dev,
403 usb_sndbulkpipe (serial->dev, 403 usb_sndbulkpipe (serial->dev,
@@ -409,7 +409,7 @@ static int visor_write (struct usb_serial_port *port, const unsigned char *buf,
409 status = usb_submit_urb(urb, GFP_ATOMIC); 409 status = usb_submit_urb(urb, GFP_ATOMIC);
410 if (status) { 410 if (status) {
411 dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n", 411 dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n",
412 __FUNCTION__, status); 412 __func__, status);
413 count = status; 413 count = status;
414 goto error; 414 goto error;
415 } else { 415 } else {
@@ -440,7 +440,7 @@ static int visor_write_room (struct usb_serial_port *port)
440 struct visor_private *priv = usb_get_serial_port_data(port); 440 struct visor_private *priv = usb_get_serial_port_data(port);
441 unsigned long flags; 441 unsigned long flags;
442 442
443 dbg("%s - port %d", __FUNCTION__, port->number); 443 dbg("%s - port %d", __func__, port->number);
444 444
445 /* 445 /*
446 * We really can take anything the user throws at us 446 * We really can take anything the user throws at us
@@ -451,7 +451,7 @@ static int visor_write_room (struct usb_serial_port *port)
451 spin_lock_irqsave(&priv->lock, flags); 451 spin_lock_irqsave(&priv->lock, flags);
452 if (priv->outstanding_urbs > URB_UPPER_LIMIT * 2 / 3) { 452 if (priv->outstanding_urbs > URB_UPPER_LIMIT * 2 / 3) {
453 spin_unlock_irqrestore(&priv->lock, flags); 453 spin_unlock_irqrestore(&priv->lock, flags);
454 dbg("%s - write limit hit\n", __FUNCTION__); 454 dbg("%s - write limit hit\n", __func__);
455 return 0; 455 return 0;
456 } 456 }
457 spin_unlock_irqrestore(&priv->lock, flags); 457 spin_unlock_irqrestore(&priv->lock, flags);
@@ -462,7 +462,7 @@ static int visor_write_room (struct usb_serial_port *port)
462 462
463static int visor_chars_in_buffer (struct usb_serial_port *port) 463static int visor_chars_in_buffer (struct usb_serial_port *port)
464{ 464{
465 dbg("%s - port %d", __FUNCTION__, port->number); 465 dbg("%s - port %d", __func__, port->number);
466 466
467 /* 467 /*
468 * We can't really account for how much data we 468 * We can't really account for how much data we
@@ -484,11 +484,11 @@ static void visor_write_bulk_callback (struct urb *urb)
484 /* free up the transfer buffer, as usb_free_urb() does not do this */ 484 /* free up the transfer buffer, as usb_free_urb() does not do this */
485 kfree (urb->transfer_buffer); 485 kfree (urb->transfer_buffer);
486 486
487 dbg("%s - port %d", __FUNCTION__, port->number); 487 dbg("%s - port %d", __func__, port->number);
488 488
489 if (status) 489 if (status)
490 dbg("%s - nonzero write bulk status received: %d", 490 dbg("%s - nonzero write bulk status received: %d",
491 __FUNCTION__, status); 491 __func__, status);
492 492
493 spin_lock_irqsave(&priv->lock, flags); 493 spin_lock_irqsave(&priv->lock, flags);
494 --priv->outstanding_urbs; 494 --priv->outstanding_urbs;
@@ -508,15 +508,15 @@ static void visor_read_bulk_callback (struct urb *urb)
508 int result; 508 int result;
509 int available_room; 509 int available_room;
510 510
511 dbg("%s - port %d", __FUNCTION__, port->number); 511 dbg("%s - port %d", __func__, port->number);
512 512
513 if (status) { 513 if (status) {
514 dbg("%s - nonzero read bulk status received: %d", 514 dbg("%s - nonzero read bulk status received: %d",
515 __FUNCTION__, status); 515 __func__, status);
516 return; 516 return;
517 } 517 }
518 518
519 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 519 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
520 520
521 tty = port->tty; 521 tty = port->tty;
522 if (tty && urb->actual_length) { 522 if (tty && urb->actual_length) {
@@ -542,7 +542,7 @@ static void visor_read_bulk_callback (struct urb *urb)
542 visor_read_bulk_callback, port); 542 visor_read_bulk_callback, port);
543 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 543 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
544 if (result) 544 if (result)
545 dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); 545 dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __func__, result);
546 } else { 546 } else {
547 priv->actually_throttled = 1; 547 priv->actually_throttled = 1;
548 } 548 }
@@ -564,11 +564,11 @@ static void visor_read_int_callback (struct urb *urb)
564 case -ESHUTDOWN: 564 case -ESHUTDOWN:
565 /* this urb is terminated, clean up */ 565 /* this urb is terminated, clean up */
566 dbg("%s - urb shutting down with status: %d", 566 dbg("%s - urb shutting down with status: %d",
567 __FUNCTION__, status); 567 __func__, status);
568 return; 568 return;
569 default: 569 default:
570 dbg("%s - nonzero urb status received: %d", 570 dbg("%s - nonzero urb status received: %d",
571 __FUNCTION__, status); 571 __func__, status);
572 goto exit; 572 goto exit;
573 } 573 }
574 574
@@ -579,14 +579,14 @@ static void visor_read_int_callback (struct urb *urb)
579 * Rumor has it this endpoint is used to notify when data 579 * Rumor has it this endpoint is used to notify when data
580 * is ready to be read from the bulk ones. 580 * is ready to be read from the bulk ones.
581 */ 581 */
582 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, 582 usb_serial_debug_data(debug, &port->dev, __func__,
583 urb->actual_length, urb->transfer_buffer); 583 urb->actual_length, urb->transfer_buffer);
584 584
585exit: 585exit:
586 result = usb_submit_urb (urb, GFP_ATOMIC); 586 result = usb_submit_urb (urb, GFP_ATOMIC);
587 if (result) 587 if (result)
588 dev_err(&urb->dev->dev, "%s - Error %d submitting interrupt urb\n", 588 dev_err(&urb->dev->dev, "%s - Error %d submitting interrupt urb\n",
589 __FUNCTION__, result); 589 __func__, result);
590} 590}
591 591
592static void visor_throttle (struct usb_serial_port *port) 592static void visor_throttle (struct usb_serial_port *port)
@@ -594,7 +594,7 @@ static void visor_throttle (struct usb_serial_port *port)
594 struct visor_private *priv = usb_get_serial_port_data(port); 594 struct visor_private *priv = usb_get_serial_port_data(port);
595 unsigned long flags; 595 unsigned long flags;
596 596
597 dbg("%s - port %d", __FUNCTION__, port->number); 597 dbg("%s - port %d", __func__, port->number);
598 spin_lock_irqsave(&priv->lock, flags); 598 spin_lock_irqsave(&priv->lock, flags);
599 priv->throttled = 1; 599 priv->throttled = 1;
600 spin_unlock_irqrestore(&priv->lock, flags); 600 spin_unlock_irqrestore(&priv->lock, flags);
@@ -607,7 +607,7 @@ static void visor_unthrottle (struct usb_serial_port *port)
607 unsigned long flags; 607 unsigned long flags;
608 int result; 608 int result;
609 609
610 dbg("%s - port %d", __FUNCTION__, port->number); 610 dbg("%s - port %d", __func__, port->number);
611 spin_lock_irqsave(&priv->lock, flags); 611 spin_lock_irqsave(&priv->lock, flags);
612 priv->throttled = 0; 612 priv->throttled = 0;
613 priv->actually_throttled = 0; 613 priv->actually_throttled = 0;
@@ -616,7 +616,7 @@ static void visor_unthrottle (struct usb_serial_port *port)
616 port->read_urb->dev = port->serial->dev; 616 port->read_urb->dev = port->serial->dev;
617 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 617 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
618 if (result) 618 if (result)
619 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result); 619 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __func__, result);
620} 620}
621 621
622static int palm_os_3_probe (struct usb_serial *serial, const struct usb_device_id *id) 622static int palm_os_3_probe (struct usb_serial *serial, const struct usb_device_id *id)
@@ -629,11 +629,11 @@ static int palm_os_3_probe (struct usb_serial *serial, const struct usb_device_i
629 int i; 629 int i;
630 int num_ports = 0; 630 int num_ports = 0;
631 631
632 dbg("%s", __FUNCTION__); 632 dbg("%s", __func__);
633 633
634 transfer_buffer = kmalloc (sizeof (*connection_info), GFP_KERNEL); 634 transfer_buffer = kmalloc (sizeof (*connection_info), GFP_KERNEL);
635 if (!transfer_buffer) { 635 if (!transfer_buffer) {
636 dev_err(dev, "%s - kmalloc(%Zd) failed.\n", __FUNCTION__, 636 dev_err(dev, "%s - kmalloc(%Zd) failed.\n", __func__,
637 sizeof(*connection_info)); 637 sizeof(*connection_info));
638 return -ENOMEM; 638 return -ENOMEM;
639 } 639 }
@@ -646,7 +646,7 @@ static int palm_os_3_probe (struct usb_serial *serial, const struct usb_device_i
646 sizeof(*connection_info), 300); 646 sizeof(*connection_info), 300);
647 if (retval < 0) { 647 if (retval < 0) {
648 dev_err(dev, "%s - error %d getting connection information\n", 648 dev_err(dev, "%s - error %d getting connection information\n",
649 __FUNCTION__, retval); 649 __func__, retval);
650 goto exit; 650 goto exit;
651 } 651 }
652 652
@@ -706,7 +706,7 @@ static int palm_os_3_probe (struct usb_serial *serial, const struct usb_device_i
706 0x02, 300); 706 0x02, 300);
707 if (retval < 0) 707 if (retval < 0)
708 dev_err(dev, "%s - error %d getting bytes available request\n", 708 dev_err(dev, "%s - error %d getting bytes available request\n",
709 __FUNCTION__, retval); 709 __func__, retval);
710 retval = 0; 710 retval = 0;
711 711
712exit: 712exit:
@@ -722,11 +722,11 @@ static int palm_os_4_probe (struct usb_serial *serial, const struct usb_device_i
722 unsigned char *transfer_buffer; 722 unsigned char *transfer_buffer;
723 int retval; 723 int retval;
724 724
725 dbg("%s", __FUNCTION__); 725 dbg("%s", __func__);
726 726
727 transfer_buffer = kmalloc (sizeof (*connection_info), GFP_KERNEL); 727 transfer_buffer = kmalloc (sizeof (*connection_info), GFP_KERNEL);
728 if (!transfer_buffer) { 728 if (!transfer_buffer) {
729 dev_err(dev, "%s - kmalloc(%Zd) failed.\n", __FUNCTION__, 729 dev_err(dev, "%s - kmalloc(%Zd) failed.\n", __func__,
730 sizeof(*connection_info)); 730 sizeof(*connection_info));
731 return -ENOMEM; 731 return -ENOMEM;
732 } 732 }
@@ -738,9 +738,9 @@ static int palm_os_4_probe (struct usb_serial *serial, const struct usb_device_i
738 sizeof (*connection_info), 300); 738 sizeof (*connection_info), 300);
739 if (retval < 0) 739 if (retval < 0)
740 dev_err(dev, "%s - error %d getting connection info\n", 740 dev_err(dev, "%s - error %d getting connection info\n",
741 __FUNCTION__, retval); 741 __func__, retval);
742 else 742 else
743 usb_serial_debug_data(debug, &serial->dev->dev, __FUNCTION__, 743 usb_serial_debug_data(debug, &serial->dev->dev, __func__,
744 retval, transfer_buffer); 744 retval, transfer_buffer);
745 745
746 kfree (transfer_buffer); 746 kfree (transfer_buffer);
@@ -753,7 +753,7 @@ static int visor_probe (struct usb_serial *serial, const struct usb_device_id *i
753 int retval = 0; 753 int retval = 0;
754 int (*startup) (struct usb_serial *serial, const struct usb_device_id *id); 754 int (*startup) (struct usb_serial *serial, const struct usb_device_id *id);
755 755
756 dbg("%s", __FUNCTION__); 756 dbg("%s", __func__);
757 757
758 if (serial->dev->actconfig->desc.bConfigurationValue != 1) { 758 if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
759 err("active config #%d != 1 ??", 759 err("active config #%d != 1 ??",
@@ -807,7 +807,7 @@ static int clie_3_5_startup (struct usb_serial *serial)
807 int result; 807 int result;
808 u8 data; 808 u8 data;
809 809
810 dbg("%s", __FUNCTION__); 810 dbg("%s", __func__);
811 811
812 /* 812 /*
813 * Note that PEG-300 series devices expect the following two calls. 813 * Note that PEG-300 series devices expect the following two calls.
@@ -818,11 +818,11 @@ static int clie_3_5_startup (struct usb_serial *serial)
818 USB_REQ_GET_CONFIGURATION, USB_DIR_IN, 818 USB_REQ_GET_CONFIGURATION, USB_DIR_IN,
819 0, 0, &data, 1, 3000); 819 0, 0, &data, 1, 3000);
820 if (result < 0) { 820 if (result < 0) {
821 dev_err(dev, "%s: get config number failed: %d\n", __FUNCTION__, result); 821 dev_err(dev, "%s: get config number failed: %d\n", __func__, result);
822 return result; 822 return result;
823 } 823 }
824 if (result != 1) { 824 if (result != 1) {
825 dev_err(dev, "%s: get config number bad return length: %d\n", __FUNCTION__, result); 825 dev_err(dev, "%s: get config number bad return length: %d\n", __func__, result);
826 return -EIO; 826 return -EIO;
827 } 827 }
828 828
@@ -832,11 +832,11 @@ static int clie_3_5_startup (struct usb_serial *serial)
832 USB_DIR_IN | USB_RECIP_INTERFACE, 832 USB_DIR_IN | USB_RECIP_INTERFACE,
833 0, 0, &data, 1, 3000); 833 0, 0, &data, 1, 3000);
834 if (result < 0) { 834 if (result < 0) {
835 dev_err(dev, "%s: get interface number failed: %d\n", __FUNCTION__, result); 835 dev_err(dev, "%s: get interface number failed: %d\n", __func__, result);
836 return result; 836 return result;
837 } 837 }
838 if (result != 1) { 838 if (result != 1) {
839 dev_err(dev, "%s: get interface number bad return length: %d\n", __FUNCTION__, result); 839 dev_err(dev, "%s: get interface number bad return length: %d\n", __func__, result);
840 return -EIO; 840 return -EIO;
841 } 841 }
842 842
@@ -854,7 +854,7 @@ static int treo_attach (struct usb_serial *serial)
854 (serial->num_interrupt_in == 0)) 854 (serial->num_interrupt_in == 0))
855 goto generic_startup; 855 goto generic_startup;
856 856
857 dbg("%s", __FUNCTION__); 857 dbg("%s", __func__);
858 858
859 /* 859 /*
860 * It appears that Treos and Kyoceras want to use the 860 * It appears that Treos and Kyoceras want to use the
@@ -885,7 +885,7 @@ generic_startup:
885 885
886static int clie_5_attach (struct usb_serial *serial) 886static int clie_5_attach (struct usb_serial *serial)
887{ 887{
888 dbg("%s", __FUNCTION__); 888 dbg("%s", __func__);
889 889
890 /* TH55 registers 2 ports. 890 /* TH55 registers 2 ports.
891 Communication in from the UX50/TH55 uses bulk_in_endpointAddress from port 0 891 Communication in from the UX50/TH55 uses bulk_in_endpointAddress from port 0
@@ -909,7 +909,7 @@ static void visor_shutdown (struct usb_serial *serial)
909 struct visor_private *priv; 909 struct visor_private *priv;
910 int i; 910 int i;
911 911
912 dbg("%s", __FUNCTION__); 912 dbg("%s", __func__);
913 913
914 for (i = 0; i < serial->num_ports; i++) { 914 for (i = 0; i < serial->num_ports; i++) {
915 priv = usb_get_serial_port_data(serial->port[i]); 915 priv = usb_get_serial_port_data(serial->port[i]);
@@ -922,7 +922,7 @@ static void visor_shutdown (struct usb_serial *serial)
922 922
923static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg) 923static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
924{ 924{
925 dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd); 925 dbg("%s - port %d, cmd 0x%.4x", __func__, port->number, cmd);
926 926
927 return -ENOIOCTLCMD; 927 return -ENOIOCTLCMD;
928} 928}
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index c5af57be62f4..fb02424de4a0 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -282,7 +282,7 @@ static int whiteheat_firmware_download (struct usb_serial *serial, const struct
282 int response; 282 int response;
283 const struct whiteheat_hex_record *record; 283 const struct whiteheat_hex_record *record;
284 284
285 dbg("%s", __FUNCTION__); 285 dbg("%s", __func__);
286 286
287 response = ezusb_set_reset (serial, 1); 287 response = ezusb_set_reset (serial, 1);
288 288
@@ -292,7 +292,7 @@ static int whiteheat_firmware_download (struct usb_serial *serial, const struct
292 (unsigned char *)record->data, record->data_size, 0xa0); 292 (unsigned char *)record->data, record->data_size, 0xa0);
293 if (response < 0) { 293 if (response < 0) {
294 err("%s - ezusb_writememory failed for loader (%d %04X %p %d)", 294 err("%s - ezusb_writememory failed for loader (%d %04X %p %d)",
295 __FUNCTION__, response, record->address, record->data, record->data_size); 295 __func__, response, record->address, record->data, record->data_size);
296 break; 296 break;
297 } 297 }
298 ++record; 298 ++record;
@@ -309,7 +309,7 @@ static int whiteheat_firmware_download (struct usb_serial *serial, const struct
309 (unsigned char *)record->data, record->data_size, 0xa3); 309 (unsigned char *)record->data, record->data_size, 0xa3);
310 if (response < 0) { 310 if (response < 0) {
311 err("%s - ezusb_writememory failed for first firmware step (%d %04X %p %d)", 311 err("%s - ezusb_writememory failed for first firmware step (%d %04X %p %d)",
312 __FUNCTION__, response, record->address, record->data, record->data_size); 312 __func__, response, record->address, record->data, record->data_size);
313 break; 313 break;
314 } 314 }
315 ++record; 315 ++record;
@@ -323,7 +323,7 @@ static int whiteheat_firmware_download (struct usb_serial *serial, const struct
323 (unsigned char *)record->data, record->data_size, 0xa0); 323 (unsigned char *)record->data, record->data_size, 0xa0);
324 if (response < 0) { 324 if (response < 0) {
325 err("%s - ezusb_writememory failed for second firmware step (%d %04X %p %d)", 325 err("%s - ezusb_writememory failed for second firmware step (%d %04X %p %d)",
326 __FUNCTION__, response, record->address, record->data, record->data_size); 326 __func__, response, record->address, record->data, record->data_size);
327 break; 327 break;
328 } 328 }
329 ++record; 329 ++record;
@@ -561,7 +561,7 @@ static void whiteheat_shutdown (struct usb_serial *serial)
561 struct list_head *tmp2; 561 struct list_head *tmp2;
562 int i; 562 int i;
563 563
564 dbg("%s", __FUNCTION__); 564 dbg("%s", __func__);
565 565
566 /* free up our private data for our command port */ 566 /* free up our private data for our command port */
567 command_port = serial->port[COMMAND_PORT]; 567 command_port = serial->port[COMMAND_PORT];
@@ -598,7 +598,7 @@ static int whiteheat_open (struct usb_serial_port *port, struct file *filp)
598 int retval = 0; 598 int retval = 0;
599 struct ktermios old_term; 599 struct ktermios old_term;
600 600
601 dbg("%s - port %d", __FUNCTION__, port->number); 601 dbg("%s - port %d", __func__, port->number);
602 602
603 retval = start_command_port(port->serial); 603 retval = start_command_port(port->serial);
604 if (retval) 604 if (retval)
@@ -631,14 +631,14 @@ static int whiteheat_open (struct usb_serial_port *port, struct file *filp)
631 /* Start reading from the device */ 631 /* Start reading from the device */
632 retval = start_port_read(port); 632 retval = start_port_read(port);
633 if (retval) { 633 if (retval) {
634 err("%s - failed submitting read urb, error %d", __FUNCTION__, retval); 634 err("%s - failed submitting read urb, error %d", __func__, retval);
635 firm_close(port); 635 firm_close(port);
636 stop_command_port(port->serial); 636 stop_command_port(port->serial);
637 goto exit; 637 goto exit;
638 } 638 }
639 639
640exit: 640exit:
641 dbg("%s - exit, retval = %d", __FUNCTION__, retval); 641 dbg("%s - exit, retval = %d", __func__, retval);
642 return retval; 642 return retval;
643} 643}
644 644
@@ -651,7 +651,7 @@ static void whiteheat_close(struct usb_serial_port *port, struct file * filp)
651 struct list_head *tmp; 651 struct list_head *tmp;
652 struct list_head *tmp2; 652 struct list_head *tmp2;
653 653
654 dbg("%s - port %d", __FUNCTION__, port->number); 654 dbg("%s - port %d", __func__, port->number);
655 655
656 mutex_lock(&port->serial->disc_mutex); 656 mutex_lock(&port->serial->disc_mutex);
657 /* filp is NULL when called from usb_serial_disconnect */ 657 /* filp is NULL when called from usb_serial_disconnect */
@@ -726,10 +726,10 @@ static int whiteheat_write(struct usb_serial_port *port, const unsigned char *bu
726 unsigned long flags; 726 unsigned long flags;
727 struct list_head *tmp; 727 struct list_head *tmp;
728 728
729 dbg("%s - port %d", __FUNCTION__, port->number); 729 dbg("%s - port %d", __func__, port->number);
730 730
731 if (count == 0) { 731 if (count == 0) {
732 dbg("%s - write request of 0 bytes", __FUNCTION__); 732 dbg("%s - write request of 0 bytes", __func__);
733 return (0); 733 return (0);
734 } 734 }
735 735
@@ -748,13 +748,13 @@ static int whiteheat_write(struct usb_serial_port *port, const unsigned char *bu
748 bytes = (count > port->bulk_out_size) ? port->bulk_out_size : count; 748 bytes = (count > port->bulk_out_size) ? port->bulk_out_size : count;
749 memcpy (urb->transfer_buffer, buf + sent, bytes); 749 memcpy (urb->transfer_buffer, buf + sent, bytes);
750 750
751 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, bytes, urb->transfer_buffer); 751 usb_serial_debug_data(debug, &port->dev, __func__, bytes, urb->transfer_buffer);
752 752
753 urb->dev = serial->dev; 753 urb->dev = serial->dev;
754 urb->transfer_buffer_length = bytes; 754 urb->transfer_buffer_length = bytes;
755 result = usb_submit_urb(urb, GFP_ATOMIC); 755 result = usb_submit_urb(urb, GFP_ATOMIC);
756 if (result) { 756 if (result) {
757 err("%s - failed submitting write urb, error %d", __FUNCTION__, result); 757 err("%s - failed submitting write urb, error %d", __func__, result);
758 sent = result; 758 sent = result;
759 spin_lock_irqsave(&info->lock, flags); 759 spin_lock_irqsave(&info->lock, flags);
760 list_add(tmp, &info->tx_urbs_free); 760 list_add(tmp, &info->tx_urbs_free);
@@ -780,7 +780,7 @@ static int whiteheat_write_room(struct usb_serial_port *port)
780 int room = 0; 780 int room = 0;
781 unsigned long flags; 781 unsigned long flags;
782 782
783 dbg("%s - port %d", __FUNCTION__, port->number); 783 dbg("%s - port %d", __func__, port->number);
784 784
785 spin_lock_irqsave(&info->lock, flags); 785 spin_lock_irqsave(&info->lock, flags);
786 list_for_each(tmp, &info->tx_urbs_free) 786 list_for_each(tmp, &info->tx_urbs_free)
@@ -788,7 +788,7 @@ static int whiteheat_write_room(struct usb_serial_port *port)
788 spin_unlock_irqrestore(&info->lock, flags); 788 spin_unlock_irqrestore(&info->lock, flags);
789 room *= port->bulk_out_size; 789 room *= port->bulk_out_size;
790 790
791 dbg("%s - returns %d", __FUNCTION__, room); 791 dbg("%s - returns %d", __func__, room);
792 return (room); 792 return (room);
793} 793}
794 794
@@ -798,7 +798,7 @@ static int whiteheat_tiocmget (struct usb_serial_port *port, struct file *file)
798 struct whiteheat_private *info = usb_get_serial_port_data(port); 798 struct whiteheat_private *info = usb_get_serial_port_data(port);
799 unsigned int modem_signals = 0; 799 unsigned int modem_signals = 0;
800 800
801 dbg("%s - port %d", __FUNCTION__, port->number); 801 dbg("%s - port %d", __func__, port->number);
802 802
803 firm_get_dtr_rts(port); 803 firm_get_dtr_rts(port);
804 if (info->mcr & UART_MCR_DTR) 804 if (info->mcr & UART_MCR_DTR)
@@ -815,7 +815,7 @@ static int whiteheat_tiocmset (struct usb_serial_port *port, struct file *file,
815{ 815{
816 struct whiteheat_private *info = usb_get_serial_port_data(port); 816 struct whiteheat_private *info = usb_get_serial_port_data(port);
817 817
818 dbg("%s - port %d", __FUNCTION__, port->number); 818 dbg("%s - port %d", __func__, port->number);
819 819
820 if (set & TIOCM_RTS) 820 if (set & TIOCM_RTS)
821 info->mcr |= UART_MCR_RTS; 821 info->mcr |= UART_MCR_RTS;
@@ -838,7 +838,7 @@ static int whiteheat_ioctl (struct usb_serial_port *port, struct file * file, un
838 struct serial_struct serstruct; 838 struct serial_struct serstruct;
839 void __user *user_arg = (void __user *)arg; 839 void __user *user_arg = (void __user *)arg;
840 840
841 dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd); 841 dbg("%s - port %d, cmd 0x%.4x", __func__, port->number, cmd);
842 842
843 switch (cmd) { 843 switch (cmd) {
844 case TIOCGSERIAL: 844 case TIOCGSERIAL:
@@ -880,7 +880,7 @@ static int whiteheat_ioctl (struct usb_serial_port *port, struct file * file, un
880 880
881static void whiteheat_set_termios(struct usb_serial_port *port, struct ktermios *old_termios) 881static void whiteheat_set_termios(struct usb_serial_port *port, struct ktermios *old_termios)
882{ 882{
883 dbg("%s -port %d", __FUNCTION__, port->number); 883 dbg("%s -port %d", __func__, port->number);
884 firm_setup_port(port); 884 firm_setup_port(port);
885} 885}
886 886
@@ -898,7 +898,7 @@ static int whiteheat_chars_in_buffer(struct usb_serial_port *port)
898 int chars = 0; 898 int chars = 0;
899 unsigned long flags; 899 unsigned long flags;
900 900
901 dbg("%s - port %d", __FUNCTION__, port->number); 901 dbg("%s - port %d", __func__, port->number);
902 902
903 spin_lock_irqsave(&info->lock, flags); 903 spin_lock_irqsave(&info->lock, flags);
904 list_for_each(tmp, &info->tx_urbs_submitted) { 904 list_for_each(tmp, &info->tx_urbs_submitted) {
@@ -907,7 +907,7 @@ static int whiteheat_chars_in_buffer(struct usb_serial_port *port)
907 } 907 }
908 spin_unlock_irqrestore(&info->lock, flags); 908 spin_unlock_irqrestore(&info->lock, flags);
909 909
910 dbg ("%s - returns %d", __FUNCTION__, chars); 910 dbg ("%s - returns %d", __func__, chars);
911 return chars; 911 return chars;
912} 912}
913 913
@@ -917,7 +917,7 @@ static void whiteheat_throttle (struct usb_serial_port *port)
917 struct whiteheat_private *info = usb_get_serial_port_data(port); 917 struct whiteheat_private *info = usb_get_serial_port_data(port);
918 unsigned long flags; 918 unsigned long flags;
919 919
920 dbg("%s - port %d", __FUNCTION__, port->number); 920 dbg("%s - port %d", __func__, port->number);
921 921
922 spin_lock_irqsave(&info->lock, flags); 922 spin_lock_irqsave(&info->lock, flags);
923 info->flags |= THROTTLED; 923 info->flags |= THROTTLED;
@@ -933,7 +933,7 @@ static void whiteheat_unthrottle (struct usb_serial_port *port)
933 int actually_throttled; 933 int actually_throttled;
934 unsigned long flags; 934 unsigned long flags;
935 935
936 dbg("%s - port %d", __FUNCTION__, port->number); 936 dbg("%s - port %d", __func__, port->number);
937 937
938 spin_lock_irqsave(&info->lock, flags); 938 spin_lock_irqsave(&info->lock, flags);
939 actually_throttled = info->flags & ACTUALLY_THROTTLED; 939 actually_throttled = info->flags & ACTUALLY_THROTTLED;
@@ -954,7 +954,7 @@ static void command_port_write_callback(struct urb *urb)
954{ 954{
955 int status = urb->status; 955 int status = urb->status;
956 956
957 dbg("%s", __FUNCTION__); 957 dbg("%s", __func__);
958 958
959 if (status) { 959 if (status) {
960 dbg("nonzero urb status: %d", status); 960 dbg("nonzero urb status: %d", status);
@@ -971,22 +971,22 @@ static void command_port_read_callback(struct urb *urb)
971 unsigned char *data = urb->transfer_buffer; 971 unsigned char *data = urb->transfer_buffer;
972 int result; 972 int result;
973 973
974 dbg("%s", __FUNCTION__); 974 dbg("%s", __func__);
975 975
976 command_info = usb_get_serial_port_data(command_port); 976 command_info = usb_get_serial_port_data(command_port);
977 if (!command_info) { 977 if (!command_info) {
978 dbg ("%s - command_info is NULL, exiting.", __FUNCTION__); 978 dbg ("%s - command_info is NULL, exiting.", __func__);
979 return; 979 return;
980 } 980 }
981 if (status) { 981 if (status) {
982 dbg("%s - nonzero urb status: %d", __FUNCTION__, status); 982 dbg("%s - nonzero urb status: %d", __func__, status);
983 if (status != -ENOENT) 983 if (status != -ENOENT)
984 command_info->command_finished = WHITEHEAT_CMD_FAILURE; 984 command_info->command_finished = WHITEHEAT_CMD_FAILURE;
985 wake_up(&command_info->wait_command); 985 wake_up(&command_info->wait_command);
986 return; 986 return;
987 } 987 }
988 988
989 usb_serial_debug_data(debug, &command_port->dev, __FUNCTION__, urb->actual_length, data); 989 usb_serial_debug_data(debug, &command_port->dev, __func__, urb->actual_length, data);
990 990
991 if (data[0] == WHITEHEAT_CMD_COMPLETE) { 991 if (data[0] == WHITEHEAT_CMD_COMPLETE) {
992 command_info->command_finished = WHITEHEAT_CMD_COMPLETE; 992 command_info->command_finished = WHITEHEAT_CMD_COMPLETE;
@@ -996,20 +996,20 @@ static void command_port_read_callback(struct urb *urb)
996 wake_up(&command_info->wait_command); 996 wake_up(&command_info->wait_command);
997 } else if (data[0] == WHITEHEAT_EVENT) { 997 } else if (data[0] == WHITEHEAT_EVENT) {
998 /* These are unsolicited reports from the firmware, hence no waiting command to wakeup */ 998 /* These are unsolicited reports from the firmware, hence no waiting command to wakeup */
999 dbg("%s - event received", __FUNCTION__); 999 dbg("%s - event received", __func__);
1000 } else if (data[0] == WHITEHEAT_GET_DTR_RTS) { 1000 } else if (data[0] == WHITEHEAT_GET_DTR_RTS) {
1001 memcpy(command_info->result_buffer, &data[1], urb->actual_length - 1); 1001 memcpy(command_info->result_buffer, &data[1], urb->actual_length - 1);
1002 command_info->command_finished = WHITEHEAT_CMD_COMPLETE; 1002 command_info->command_finished = WHITEHEAT_CMD_COMPLETE;
1003 wake_up(&command_info->wait_command); 1003 wake_up(&command_info->wait_command);
1004 } else { 1004 } else {
1005 dbg("%s - bad reply from firmware", __FUNCTION__); 1005 dbg("%s - bad reply from firmware", __func__);
1006 } 1006 }
1007 1007
1008 /* Continue trying to always read */ 1008 /* Continue trying to always read */
1009 command_port->read_urb->dev = command_port->serial->dev; 1009 command_port->read_urb->dev = command_port->serial->dev;
1010 result = usb_submit_urb(command_port->read_urb, GFP_ATOMIC); 1010 result = usb_submit_urb(command_port->read_urb, GFP_ATOMIC);
1011 if (result) 1011 if (result)
1012 dbg("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); 1012 dbg("%s - failed resubmitting read urb, error %d", __func__, result);
1013} 1013}
1014 1014
1015 1015
@@ -1021,13 +1021,13 @@ static void whiteheat_read_callback(struct urb *urb)
1021 struct whiteheat_private *info = usb_get_serial_port_data(port); 1021 struct whiteheat_private *info = usb_get_serial_port_data(port);
1022 int status = urb->status; 1022 int status = urb->status;
1023 1023
1024 dbg("%s - port %d", __FUNCTION__, port->number); 1024 dbg("%s - port %d", __func__, port->number);
1025 1025
1026 spin_lock(&info->lock); 1026 spin_lock(&info->lock);
1027 wrap = urb_to_wrap(urb, &info->rx_urbs_submitted); 1027 wrap = urb_to_wrap(urb, &info->rx_urbs_submitted);
1028 if (!wrap) { 1028 if (!wrap) {
1029 spin_unlock(&info->lock); 1029 spin_unlock(&info->lock);
1030 err("%s - Not my urb!", __FUNCTION__); 1030 err("%s - Not my urb!", __func__);
1031 return; 1031 return;
1032 } 1032 }
1033 list_del(&wrap->list); 1033 list_del(&wrap->list);
@@ -1035,14 +1035,14 @@ static void whiteheat_read_callback(struct urb *urb)
1035 1035
1036 if (status) { 1036 if (status) {
1037 dbg("%s - nonzero read bulk status received: %d", 1037 dbg("%s - nonzero read bulk status received: %d",
1038 __FUNCTION__, status); 1038 __func__, status);
1039 spin_lock(&info->lock); 1039 spin_lock(&info->lock);
1040 list_add(&wrap->list, &info->rx_urbs_free); 1040 list_add(&wrap->list, &info->rx_urbs_free);
1041 spin_unlock(&info->lock); 1041 spin_unlock(&info->lock);
1042 return; 1042 return;
1043 } 1043 }
1044 1044
1045 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 1045 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
1046 1046
1047 spin_lock(&info->lock); 1047 spin_lock(&info->lock);
1048 list_add_tail(&wrap->list, &info->rx_urb_q); 1048 list_add_tail(&wrap->list, &info->rx_urb_q);
@@ -1064,13 +1064,13 @@ static void whiteheat_write_callback(struct urb *urb)
1064 struct whiteheat_urb_wrap *wrap; 1064 struct whiteheat_urb_wrap *wrap;
1065 int status = urb->status; 1065 int status = urb->status;
1066 1066
1067 dbg("%s - port %d", __FUNCTION__, port->number); 1067 dbg("%s - port %d", __func__, port->number);
1068 1068
1069 spin_lock(&info->lock); 1069 spin_lock(&info->lock);
1070 wrap = urb_to_wrap(urb, &info->tx_urbs_submitted); 1070 wrap = urb_to_wrap(urb, &info->tx_urbs_submitted);
1071 if (!wrap) { 1071 if (!wrap) {
1072 spin_unlock(&info->lock); 1072 spin_unlock(&info->lock);
1073 err("%s - Not my urb!", __FUNCTION__); 1073 err("%s - Not my urb!", __func__);
1074 return; 1074 return;
1075 } 1075 }
1076 list_move(&wrap->list, &info->tx_urbs_free); 1076 list_move(&wrap->list, &info->tx_urbs_free);
@@ -1078,7 +1078,7 @@ static void whiteheat_write_callback(struct urb *urb)
1078 1078
1079 if (status) { 1079 if (status) {
1080 dbg("%s - nonzero write bulk status received: %d", 1080 dbg("%s - nonzero write bulk status received: %d",
1081 __FUNCTION__, status); 1081 __func__, status);
1082 return; 1082 return;
1083 } 1083 }
1084 1084
@@ -1098,7 +1098,7 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command, __u8 *d
1098 int retval = 0; 1098 int retval = 0;
1099 int t; 1099 int t;
1100 1100
1101 dbg("%s - command %d", __FUNCTION__, command); 1101 dbg("%s - command %d", __func__, command);
1102 1102
1103 command_port = port->serial->port[COMMAND_PORT]; 1103 command_port = port->serial->port[COMMAND_PORT];
1104 command_info = usb_get_serial_port_data(command_port); 1104 command_info = usb_get_serial_port_data(command_port);
@@ -1112,7 +1112,7 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command, __u8 *d
1112 command_port->write_urb->dev = port->serial->dev; 1112 command_port->write_urb->dev = port->serial->dev;
1113 retval = usb_submit_urb (command_port->write_urb, GFP_NOIO); 1113 retval = usb_submit_urb (command_port->write_urb, GFP_NOIO);
1114 if (retval) { 1114 if (retval) {
1115 dbg("%s - submit urb failed", __FUNCTION__); 1115 dbg("%s - submit urb failed", __func__);
1116 goto exit; 1116 goto exit;
1117 } 1117 }
1118 1118
@@ -1123,19 +1123,19 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command, __u8 *d
1123 usb_kill_urb(command_port->write_urb); 1123 usb_kill_urb(command_port->write_urb);
1124 1124
1125 if (command_info->command_finished == false) { 1125 if (command_info->command_finished == false) {
1126 dbg("%s - command timed out.", __FUNCTION__); 1126 dbg("%s - command timed out.", __func__);
1127 retval = -ETIMEDOUT; 1127 retval = -ETIMEDOUT;
1128 goto exit; 1128 goto exit;
1129 } 1129 }
1130 1130
1131 if (command_info->command_finished == WHITEHEAT_CMD_FAILURE) { 1131 if (command_info->command_finished == WHITEHEAT_CMD_FAILURE) {
1132 dbg("%s - command failed.", __FUNCTION__); 1132 dbg("%s - command failed.", __func__);
1133 retval = -EIO; 1133 retval = -EIO;
1134 goto exit; 1134 goto exit;
1135 } 1135 }
1136 1136
1137 if (command_info->command_finished == WHITEHEAT_CMD_COMPLETE) { 1137 if (command_info->command_finished == WHITEHEAT_CMD_COMPLETE) {
1138 dbg("%s - command completed.", __FUNCTION__); 1138 dbg("%s - command completed.", __func__);
1139 switch (command) { 1139 switch (command) {
1140 case WHITEHEAT_GET_DTR_RTS: 1140 case WHITEHEAT_GET_DTR_RTS:
1141 info = usb_get_serial_port_data(port); 1141 info = usb_get_serial_port_data(port);
@@ -1180,7 +1180,7 @@ static int firm_setup_port(struct usb_serial_port *port) {
1180 default: 1180 default:
1181 case CS8: port_settings.bits = 8; break; 1181 case CS8: port_settings.bits = 8; break;
1182 } 1182 }
1183 dbg("%s - data bits = %d", __FUNCTION__, port_settings.bits); 1183 dbg("%s - data bits = %d", __func__, port_settings.bits);
1184 1184
1185 /* determine the parity */ 1185 /* determine the parity */
1186 if (cflag & PARENB) 1186 if (cflag & PARENB)
@@ -1196,21 +1196,21 @@ static int firm_setup_port(struct usb_serial_port *port) {
1196 port_settings.parity = WHITEHEAT_PAR_EVEN; 1196 port_settings.parity = WHITEHEAT_PAR_EVEN;
1197 else 1197 else
1198 port_settings.parity = WHITEHEAT_PAR_NONE; 1198 port_settings.parity = WHITEHEAT_PAR_NONE;
1199 dbg("%s - parity = %c", __FUNCTION__, port_settings.parity); 1199 dbg("%s - parity = %c", __func__, port_settings.parity);
1200 1200
1201 /* figure out the stop bits requested */ 1201 /* figure out the stop bits requested */
1202 if (cflag & CSTOPB) 1202 if (cflag & CSTOPB)
1203 port_settings.stop = 2; 1203 port_settings.stop = 2;
1204 else 1204 else
1205 port_settings.stop = 1; 1205 port_settings.stop = 1;
1206 dbg("%s - stop bits = %d", __FUNCTION__, port_settings.stop); 1206 dbg("%s - stop bits = %d", __func__, port_settings.stop);
1207 1207
1208 /* figure out the flow control settings */ 1208 /* figure out the flow control settings */
1209 if (cflag & CRTSCTS) 1209 if (cflag & CRTSCTS)
1210 port_settings.hflow = (WHITEHEAT_HFLOW_CTS | WHITEHEAT_HFLOW_RTS); 1210 port_settings.hflow = (WHITEHEAT_HFLOW_CTS | WHITEHEAT_HFLOW_RTS);
1211 else 1211 else
1212 port_settings.hflow = WHITEHEAT_HFLOW_NONE; 1212 port_settings.hflow = WHITEHEAT_HFLOW_NONE;
1213 dbg("%s - hardware flow control = %s %s %s %s", __FUNCTION__, 1213 dbg("%s - hardware flow control = %s %s %s %s", __func__,
1214 (port_settings.hflow & WHITEHEAT_HFLOW_CTS) ? "CTS" : "", 1214 (port_settings.hflow & WHITEHEAT_HFLOW_CTS) ? "CTS" : "",
1215 (port_settings.hflow & WHITEHEAT_HFLOW_RTS) ? "RTS" : "", 1215 (port_settings.hflow & WHITEHEAT_HFLOW_RTS) ? "RTS" : "",
1216 (port_settings.hflow & WHITEHEAT_HFLOW_DSR) ? "DSR" : "", 1216 (port_settings.hflow & WHITEHEAT_HFLOW_DSR) ? "DSR" : "",
@@ -1221,15 +1221,15 @@ static int firm_setup_port(struct usb_serial_port *port) {
1221 port_settings.sflow = WHITEHEAT_SFLOW_RXTX; 1221 port_settings.sflow = WHITEHEAT_SFLOW_RXTX;
1222 else 1222 else
1223 port_settings.sflow = WHITEHEAT_SFLOW_NONE; 1223 port_settings.sflow = WHITEHEAT_SFLOW_NONE;
1224 dbg("%s - software flow control = %c", __FUNCTION__, port_settings.sflow); 1224 dbg("%s - software flow control = %c", __func__, port_settings.sflow);
1225 1225
1226 port_settings.xon = START_CHAR(port->tty); 1226 port_settings.xon = START_CHAR(port->tty);
1227 port_settings.xoff = STOP_CHAR(port->tty); 1227 port_settings.xoff = STOP_CHAR(port->tty);
1228 dbg("%s - XON = %2x, XOFF = %2x", __FUNCTION__, port_settings.xon, port_settings.xoff); 1228 dbg("%s - XON = %2x, XOFF = %2x", __func__, port_settings.xon, port_settings.xoff);
1229 1229
1230 /* get the baud rate wanted */ 1230 /* get the baud rate wanted */
1231 port_settings.baud = tty_get_baud_rate(port->tty); 1231 port_settings.baud = tty_get_baud_rate(port->tty);
1232 dbg("%s - baud rate = %d", __FUNCTION__, port_settings.baud); 1232 dbg("%s - baud rate = %d", __func__, port_settings.baud);
1233 1233
1234 /* fixme: should set validated settings */ 1234 /* fixme: should set validated settings */
1235 tty_encode_baud_rate(port->tty, port_settings.baud, port_settings.baud); 1235 tty_encode_baud_rate(port->tty, port_settings.baud, port_settings.baud);
@@ -1312,7 +1312,7 @@ static int start_command_port(struct usb_serial *serial)
1312 command_port->read_urb->dev = serial->dev; 1312 command_port->read_urb->dev = serial->dev;
1313 retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL); 1313 retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL);
1314 if (retval) { 1314 if (retval) {
1315 err("%s - failed submitting read urb, error %d", __FUNCTION__, retval); 1315 err("%s - failed submitting read urb, error %d", __func__, retval);
1316 goto exit; 1316 goto exit;
1317 } 1317 }
1318 } 1318 }
@@ -1448,7 +1448,7 @@ static void rx_data_softint(struct work_struct *work)
1448 urb->dev = port->serial->dev; 1448 urb->dev = port->serial->dev;
1449 result = usb_submit_urb(urb, GFP_ATOMIC); 1449 result = usb_submit_urb(urb, GFP_ATOMIC);
1450 if (result) { 1450 if (result) {
1451 err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); 1451 err("%s - failed resubmitting read urb, error %d", __func__, result);
1452 spin_lock_irqsave(&info->lock, flags); 1452 spin_lock_irqsave(&info->lock, flags);
1453 list_add(tmp, &info->rx_urbs_free); 1453 list_add(tmp, &info->rx_urbs_free);
1454 continue; 1454 continue;
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index 521f0297aef9..3fcde9f0fa5f 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -228,12 +228,12 @@ static int queuecommand(struct scsi_cmnd *srb,
228{ 228{
229 struct us_data *us = host_to_us(srb->device->host); 229 struct us_data *us = host_to_us(srb->device->host);
230 230
231 US_DEBUGP("%s called\n", __FUNCTION__); 231 US_DEBUGP("%s called\n", __func__);
232 232
233 /* check for state-transition errors */ 233 /* check for state-transition errors */
234 if (us->srb != NULL) { 234 if (us->srb != NULL) {
235 printk(KERN_ERR USB_STORAGE "Error in %s: us->srb = %p\n", 235 printk(KERN_ERR USB_STORAGE "Error in %s: us->srb = %p\n",
236 __FUNCTION__, us->srb); 236 __func__, us->srb);
237 return SCSI_MLQUEUE_HOST_BUSY; 237 return SCSI_MLQUEUE_HOST_BUSY;
238 } 238 }
239 239
@@ -262,7 +262,7 @@ static int command_abort(struct scsi_cmnd *srb)
262{ 262{
263 struct us_data *us = host_to_us(srb->device->host); 263 struct us_data *us = host_to_us(srb->device->host);
264 264
265 US_DEBUGP("%s called\n", __FUNCTION__); 265 US_DEBUGP("%s called\n", __func__);
266 266
267 /* us->srb together with the TIMED_OUT, RESETTING, and ABORTING 267 /* us->srb together with the TIMED_OUT, RESETTING, and ABORTING
268 * bits are protected by the host lock. */ 268 * bits are protected by the host lock. */
@@ -299,7 +299,7 @@ static int device_reset(struct scsi_cmnd *srb)
299 struct us_data *us = host_to_us(srb->device->host); 299 struct us_data *us = host_to_us(srb->device->host);
300 int result; 300 int result;
301 301
302 US_DEBUGP("%s called\n", __FUNCTION__); 302 US_DEBUGP("%s called\n", __func__);
303 303
304 /* lock the device pointers and do the reset */ 304 /* lock the device pointers and do the reset */
305 mutex_lock(&(us->dev_mutex)); 305 mutex_lock(&(us->dev_mutex));
@@ -315,7 +315,7 @@ static int bus_reset(struct scsi_cmnd *srb)
315 struct us_data *us = host_to_us(srb->device->host); 315 struct us_data *us = host_to_us(srb->device->host);
316 int result; 316 int result;
317 317
318 US_DEBUGP("%s called\n", __FUNCTION__); 318 US_DEBUGP("%s called\n", __func__);
319 result = usb_stor_port_reset(us); 319 result = usb_stor_port_reset(us);
320 return result < 0 ? FAILED : SUCCESS; 320 return result < 0 ? FAILED : SUCCESS;
321} 321}
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
index 4628f03b13bf..db55ec39bb83 100644
--- a/drivers/usb/storage/transport.c
+++ b/drivers/usb/storage/transport.c
@@ -198,7 +198,7 @@ int usb_stor_control_msg(struct us_data *us, unsigned int pipe,
198 int status; 198 int status;
199 199
200 US_DEBUGP("%s: rq=%02x rqtype=%02x value=%04x index=%02x len=%u\n", 200 US_DEBUGP("%s: rq=%02x rqtype=%02x value=%04x index=%02x len=%u\n",
201 __FUNCTION__, request, requesttype, 201 __func__, request, requesttype,
202 value, index, size); 202 value, index, size);
203 203
204 /* fill in the devrequest structure */ 204 /* fill in the devrequest structure */
@@ -250,7 +250,7 @@ int usb_stor_clear_halt(struct us_data *us, unsigned int pipe)
250 usb_settoggle(us->pusb_dev, usb_pipeendpoint(pipe), 250 usb_settoggle(us->pusb_dev, usb_pipeendpoint(pipe),
251 usb_pipeout(pipe), 0); 251 usb_pipeout(pipe), 0);
252 252
253 US_DEBUGP("%s: result = %d\n", __FUNCTION__, result); 253 US_DEBUGP("%s: result = %d\n", __func__, result);
254 return result; 254 return result;
255} 255}
256 256
@@ -332,7 +332,7 @@ int usb_stor_ctrl_transfer(struct us_data *us, unsigned int pipe,
332 int result; 332 int result;
333 333
334 US_DEBUGP("%s: rq=%02x rqtype=%02x value=%04x index=%02x len=%u\n", 334 US_DEBUGP("%s: rq=%02x rqtype=%02x value=%04x index=%02x len=%u\n",
335 __FUNCTION__, request, requesttype, 335 __func__, request, requesttype,
336 value, index, size); 336 value, index, size);
337 337
338 /* fill in the devrequest structure */ 338 /* fill in the devrequest structure */
@@ -366,7 +366,7 @@ static int usb_stor_intr_transfer(struct us_data *us, void *buf,
366 unsigned int pipe = us->recv_intr_pipe; 366 unsigned int pipe = us->recv_intr_pipe;
367 unsigned int maxp; 367 unsigned int maxp;
368 368
369 US_DEBUGP("%s: xfer %u bytes\n", __FUNCTION__, length); 369 US_DEBUGP("%s: xfer %u bytes\n", __func__, length);
370 370
371 /* calculate the max packet size */ 371 /* calculate the max packet size */
372 maxp = usb_maxpacket(us->pusb_dev, pipe, usb_pipeout(pipe)); 372 maxp = usb_maxpacket(us->pusb_dev, pipe, usb_pipeout(pipe));
@@ -393,7 +393,7 @@ int usb_stor_bulk_transfer_buf(struct us_data *us, unsigned int pipe,
393{ 393{
394 int result; 394 int result;
395 395
396 US_DEBUGP("%s: xfer %u bytes\n", __FUNCTION__, length); 396 US_DEBUGP("%s: xfer %u bytes\n", __func__, length);
397 397
398 /* fill and submit the URB */ 398 /* fill and submit the URB */
399 usb_fill_bulk_urb(us->current_urb, us->pusb_dev, pipe, buf, length, 399 usb_fill_bulk_urb(us->current_urb, us->pusb_dev, pipe, buf, length,
@@ -424,7 +424,7 @@ static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
424 return USB_STOR_XFER_ERROR; 424 return USB_STOR_XFER_ERROR;
425 425
426 /* initialize the scatter-gather request block */ 426 /* initialize the scatter-gather request block */
427 US_DEBUGP("%s: xfer %u bytes, %d entries\n", __FUNCTION__, 427 US_DEBUGP("%s: xfer %u bytes, %d entries\n", __func__,
428 length, num_sg); 428 length, num_sg);
429 result = usb_sg_init(&us->current_sg, us->pusb_dev, pipe, 0, 429 result = usb_sg_init(&us->current_sg, us->pusb_dev, pipe, 0,
430 sg, num_sg, length, GFP_NOIO); 430 sg, num_sg, length, GFP_NOIO);
@@ -701,7 +701,7 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
701/* Stop the current URB transfer */ 701/* Stop the current URB transfer */
702void usb_stor_stop_transport(struct us_data *us) 702void usb_stor_stop_transport(struct us_data *us)
703{ 703{
704 US_DEBUGP("%s called\n", __FUNCTION__); 704 US_DEBUGP("%s called\n", __func__);
705 705
706 /* If the state machine is blocked waiting for an URB, 706 /* If the state machine is blocked waiting for an URB,
707 * let's wake it up. The test_and_clear_bit() call 707 * let's wake it up. The test_and_clear_bit() call
@@ -1135,7 +1135,7 @@ static int usb_stor_reset_common(struct us_data *us,
1135 1135
1136int usb_stor_CB_reset(struct us_data *us) 1136int usb_stor_CB_reset(struct us_data *us)
1137{ 1137{
1138 US_DEBUGP("%s called\n", __FUNCTION__); 1138 US_DEBUGP("%s called\n", __func__);
1139 1139
1140 memset(us->iobuf, 0xFF, CB_RESET_CMD_SIZE); 1140 memset(us->iobuf, 0xFF, CB_RESET_CMD_SIZE);
1141 us->iobuf[0] = SEND_DIAGNOSTIC; 1141 us->iobuf[0] = SEND_DIAGNOSTIC;
@@ -1150,7 +1150,7 @@ int usb_stor_CB_reset(struct us_data *us)
1150 */ 1150 */
1151int usb_stor_Bulk_reset(struct us_data *us) 1151int usb_stor_Bulk_reset(struct us_data *us)
1152{ 1152{
1153 US_DEBUGP("%s called\n", __FUNCTION__); 1153 US_DEBUGP("%s called\n", __func__);
1154 1154
1155 return usb_stor_reset_common(us, US_BULK_RESET_REQUEST, 1155 return usb_stor_reset_common(us, US_BULK_RESET_REQUEST,
1156 USB_TYPE_CLASS | USB_RECIP_INTERFACE, 1156 USB_TYPE_CLASS | USB_RECIP_INTERFACE,
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index f59593de3b8f..a856effad3bd 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -190,7 +190,7 @@ static int storage_suspend(struct usb_interface *iface, pm_message_t message)
190 /* Wait until no command is running */ 190 /* Wait until no command is running */
191 mutex_lock(&us->dev_mutex); 191 mutex_lock(&us->dev_mutex);
192 192
193 US_DEBUGP("%s\n", __FUNCTION__); 193 US_DEBUGP("%s\n", __func__);
194 if (us->suspend_resume_hook) 194 if (us->suspend_resume_hook)
195 (us->suspend_resume_hook)(us, US_SUSPEND); 195 (us->suspend_resume_hook)(us, US_SUSPEND);
196 196
@@ -207,7 +207,7 @@ static int storage_resume(struct usb_interface *iface)
207 207
208 mutex_lock(&us->dev_mutex); 208 mutex_lock(&us->dev_mutex);
209 209
210 US_DEBUGP("%s\n", __FUNCTION__); 210 US_DEBUGP("%s\n", __func__);
211 if (us->suspend_resume_hook) 211 if (us->suspend_resume_hook)
212 (us->suspend_resume_hook)(us, US_RESUME); 212 (us->suspend_resume_hook)(us, US_RESUME);
213 213
@@ -219,7 +219,7 @@ static int storage_reset_resume(struct usb_interface *iface)
219{ 219{
220 struct us_data *us = usb_get_intfdata(iface); 220 struct us_data *us = usb_get_intfdata(iface);
221 221
222 US_DEBUGP("%s\n", __FUNCTION__); 222 US_DEBUGP("%s\n", __func__);
223 223
224 /* Report the reset to the SCSI core */ 224 /* Report the reset to the SCSI core */
225 usb_stor_report_bus_reset(us); 225 usb_stor_report_bus_reset(us);
@@ -240,7 +240,7 @@ static int storage_pre_reset(struct usb_interface *iface)
240{ 240{
241 struct us_data *us = usb_get_intfdata(iface); 241 struct us_data *us = usb_get_intfdata(iface);
242 242
243 US_DEBUGP("%s\n", __FUNCTION__); 243 US_DEBUGP("%s\n", __func__);
244 244
245 /* Make sure no command runs during the reset */ 245 /* Make sure no command runs during the reset */
246 mutex_lock(&us->dev_mutex); 246 mutex_lock(&us->dev_mutex);
@@ -251,7 +251,7 @@ static int storage_post_reset(struct usb_interface *iface)
251{ 251{
252 struct us_data *us = usb_get_intfdata(iface); 252 struct us_data *us = usb_get_intfdata(iface);
253 253
254 US_DEBUGP("%s\n", __FUNCTION__); 254 US_DEBUGP("%s\n", __func__);
255 255
256 /* Report the reset to the SCSI core */ 256 /* Report the reset to the SCSI core */
257 usb_stor_report_bus_reset(us); 257 usb_stor_report_bus_reset(us);
@@ -437,7 +437,7 @@ SkipForAbort:
437/* Associate our private data with the USB device */ 437/* Associate our private data with the USB device */
438static int associate_dev(struct us_data *us, struct usb_interface *intf) 438static int associate_dev(struct us_data *us, struct usb_interface *intf)
439{ 439{
440 US_DEBUGP("-- %s\n", __FUNCTION__); 440 US_DEBUGP("-- %s\n", __func__);
441 441
442 /* Fill in the device-related fields */ 442 /* Fill in the device-related fields */
443 us->pusb_dev = interface_to_usbdev(intf); 443 us->pusb_dev = interface_to_usbdev(intf);
@@ -816,7 +816,7 @@ static int usb_stor_acquire_resources(struct us_data *us)
816/* Release all our dynamic resources */ 816/* Release all our dynamic resources */
817static void usb_stor_release_resources(struct us_data *us) 817static void usb_stor_release_resources(struct us_data *us)
818{ 818{
819 US_DEBUGP("-- %s\n", __FUNCTION__); 819 US_DEBUGP("-- %s\n", __func__);
820 820
821 /* Tell the control thread to exit. The SCSI host must 821 /* Tell the control thread to exit. The SCSI host must
822 * already have been removed so it won't try to queue 822 * already have been removed so it won't try to queue
@@ -842,7 +842,7 @@ static void usb_stor_release_resources(struct us_data *us)
842/* Dissociate from the USB device */ 842/* Dissociate from the USB device */
843static void dissociate_dev(struct us_data *us) 843static void dissociate_dev(struct us_data *us)
844{ 844{
845 US_DEBUGP("-- %s\n", __FUNCTION__); 845 US_DEBUGP("-- %s\n", __func__);
846 846
847 kfree(us->sensebuf); 847 kfree(us->sensebuf);
848 848
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c
index c815a40e167f..73e6a66d95a7 100644
--- a/drivers/usb/usb-skeleton.c
+++ b/drivers/usb/usb-skeleton.c
@@ -88,7 +88,7 @@ static int skel_open(struct inode *inode, struct file *file)
88 interface = usb_find_interface(&skel_driver, subminor); 88 interface = usb_find_interface(&skel_driver, subminor);
89 if (!interface) { 89 if (!interface) {
90 err ("%s - error, can't find device for minor %d", 90 err ("%s - error, can't find device for minor %d",
91 __FUNCTION__, subminor); 91 __func__, subminor);
92 retval = -ENODEV; 92 retval = -ENODEV;
93 goto exit; 93 goto exit;
94 } 94 }
@@ -220,7 +220,7 @@ static void skel_write_bulk_callback(struct urb *urb)
220 urb->status == -ECONNRESET || 220 urb->status == -ECONNRESET ||
221 urb->status == -ESHUTDOWN)) 221 urb->status == -ESHUTDOWN))
222 err("%s - nonzero write bulk status received: %d", 222 err("%s - nonzero write bulk status received: %d",
223 __FUNCTION__, urb->status); 223 __func__, urb->status);
224 224
225 spin_lock(&dev->err_lock); 225 spin_lock(&dev->err_lock);
226 dev->errors = urb->status; 226 dev->errors = urb->status;
@@ -301,7 +301,7 @@ static ssize_t skel_write(struct file *file, const char *user_buffer, size_t cou
301 retval = usb_submit_urb(urb, GFP_KERNEL); 301 retval = usb_submit_urb(urb, GFP_KERNEL);
302 mutex_unlock(&dev->io_mutex); 302 mutex_unlock(&dev->io_mutex);
303 if (retval) { 303 if (retval) {
304 err("%s - failed submitting write urb, error %d", __FUNCTION__, retval); 304 err("%s - failed submitting write urb, error %d", __func__, retval);
305 goto error_unanchor; 305 goto error_unanchor;
306 } 306 }
307 307