瀏覽代碼

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>
Harvey Harrison 17 年之前
父節點
當前提交
441b62c1ed
共有 83 個文件被更改,包括 2050 次插入2050 次删除
  1. 3 3
      drivers/usb/atm/ueagle-atm.c
  2. 3 3
      drivers/usb/class/cdc-acm.c
  3. 21 21
      drivers/usb/core/devio.c
  4. 15 15
      drivers/usb/core/driver.c
  5. 4 4
      drivers/usb/core/hub.c
  6. 2 2
      drivers/usb/core/inode.c
  7. 4 4
      drivers/usb/core/message.c
  8. 1 1
      drivers/usb/core/urb.c
  9. 2 2
      drivers/usb/gadget/at91_udc.c
  10. 6 6
      drivers/usb/gadget/dummy_hcd.c
  11. 6 6
      drivers/usb/gadget/ether.c
  12. 4 4
      drivers/usb/gadget/file_storage.c
  13. 2 2
      drivers/usb/gadget/fsl_usb2_udc.c
  14. 1 1
      drivers/usb/gadget/fsl_usb2_udc.h
  15. 10 10
      drivers/usb/gadget/goku_udc.c
  16. 9 9
      drivers/usb/gadget/inode.c
  17. 66 66
      drivers/usb/gadget/lh7a40x_udc.c
  18. 1 1
      drivers/usb/gadget/net2280.h
  19. 8 8
      drivers/usb/gadget/omap_udc.c
  20. 3 3
      drivers/usb/gadget/printer.c
  21. 13 13
      drivers/usb/gadget/pxa2xx_udc.c
  22. 73 73
      drivers/usb/gadget/rndis.c
  23. 2 2
      drivers/usb/host/ehci-q.c
  24. 1 1
      drivers/usb/host/ehci-sched.c
  25. 3 3
      drivers/usb/host/pci-quirks.c
  26. 2 2
      drivers/usb/host/sl811-hcd.c
  27. 3 3
      drivers/usb/host/uhci-hcd.c
  28. 1 1
      drivers/usb/host/uhci-q.c
  29. 60 60
      drivers/usb/misc/adutux.c
  30. 3 3
      drivers/usb/misc/appledisplay.c
  31. 4 4
      drivers/usb/misc/auerswald.c
  32. 15 15
      drivers/usb/misc/emi26.c
  33. 16 16
      drivers/usb/misc/emi62.c
  34. 3 3
      drivers/usb/misc/iowarrior.c
  35. 5 5
      drivers/usb/misc/ldusb.c
  36. 44 44
      drivers/usb/misc/legousbtower.c
  37. 3 3
      drivers/usb/misc/phidgetkit.c
  38. 1 1
      drivers/usb/misc/phidgetmotorcontrol.c
  39. 3 3
      drivers/usb/misc/phidgetservo.c
  40. 3 3
      drivers/usb/misc/usblcd.c
  41. 2 2
      drivers/usb/misc/usbtest.c
  42. 26 26
      drivers/usb/serial/aircable.c
  43. 17 17
      drivers/usb/serial/airprime.c
  44. 3 3
      drivers/usb/serial/ark3116.c
  45. 9 9
      drivers/usb/serial/belkin_sa.c
  46. 5 5
      drivers/usb/serial/console.c
  47. 54 54
      drivers/usb/serial/cp2101.c
  48. 36 36
      drivers/usb/serial/cyberjack.c
  49. 64 64
      drivers/usb/serial/cypress_m8.c
  50. 18 18
      drivers/usb/serial/digi_acceleport.c
  51. 27 27
      drivers/usb/serial/empeg.c
  52. 4 4
      drivers/usb/serial/ezusb.c
  53. 78 78
      drivers/usb/serial/ftdi_sio.c
  54. 53 53
      drivers/usb/serial/garmin_gps.c
  55. 22 22
      drivers/usb/serial/generic.c
  56. 129 129
      drivers/usb/serial/io_edgeport.c
  57. 132 132
      drivers/usb/serial/io_ti.c
  58. 22 22
      drivers/usb/serial/ipaq.c
  59. 24 24
      drivers/usb/serial/ipw.c
  60. 23 23
      drivers/usb/serial/ir-usb.c
  61. 64 64
      drivers/usb/serial/iuu_phoenix.c
  62. 117 117
      drivers/usb/serial/keyspan.c
  63. 10 10
      drivers/usb/serial/keyspan_pda.c
  64. 39 39
      drivers/usb/serial/kl5kusb105.c
  65. 28 28
      drivers/usb/serial/kobil_sct.c
  66. 18 18
      drivers/usb/serial/mct_u232.c
  67. 59 59
      drivers/usb/serial/mos7720.c
  68. 75 75
      drivers/usb/serial/mos7840.c
  69. 9 9
      drivers/usb/serial/navman.c
  70. 16 16
      drivers/usb/serial/omninet.c
  71. 32 32
      drivers/usb/serial/option.c
  72. 54 54
      drivers/usb/serial/oti6858.c
  73. 53 53
      drivers/usb/serial/pl2303.c
  74. 14 14
      drivers/usb/serial/safe_serial.c
  75. 31 31
      drivers/usb/serial/sierra.c
  76. 95 95
      drivers/usb/serial/ti_usb_3410_5052.c
  77. 39 39
      drivers/usb/serial/usb-serial.c
  78. 43 43
      drivers/usb/serial/visor.c
  79. 52 52
      drivers/usb/serial/whiteheat.c
  80. 5 5
      drivers/usb/storage/scsiglue.c
  81. 9 9
      drivers/usb/storage/transport.c
  82. 8 8
      drivers/usb/storage/usb.c
  83. 3 3
      drivers/usb/usb-skeleton.c

+ 3 - 3
drivers/usb/atm/ueagle-atm.c

@@ -83,7 +83,7 @@
 		if (debug >= 1) \
 		if (debug >= 1) \
 			dev_dbg(&(usb_dev)->dev, \
 			dev_dbg(&(usb_dev)->dev, \
 				"[ueagle-atm dbg] %s: " format, \
 				"[ueagle-atm dbg] %s: " format, \
-					__FUNCTION__, ##args); \
+					__func__, ##args); \
 	} while (0)
 	} while (0)
 
 
 #define uea_vdbg(usb_dev, format, args...)	\
 #define uea_vdbg(usb_dev, format, args...)	\
@@ -94,10 +94,10 @@
 	} while (0)
 	} while (0)
 
 
 #define uea_enters(usb_dev) \
 #define uea_enters(usb_dev) \
-	uea_vdbg(usb_dev, "entering %s\n", __FUNCTION__)
+	uea_vdbg(usb_dev, "entering %s\n", __func__)
 
 
 #define uea_leaves(usb_dev) \
 #define uea_leaves(usb_dev) \
-	uea_vdbg(usb_dev, "leaving  %s\n", __FUNCTION__)
+	uea_vdbg(usb_dev, "leaving  %s\n", __func__)
 
 
 #define uea_err(usb_dev, format,args...) \
 #define uea_err(usb_dev, format,args...) \
 	dev_err(&(usb_dev)->dev ,"[UEAGLE-ATM] " format , ##args)
 	dev_err(&(usb_dev)->dev ,"[UEAGLE-ATM] " format , ##args)

+ 3 - 3
drivers/usb/class/cdc-acm.c

@@ -260,10 +260,10 @@ static void acm_ctrl_irq(struct urb *urb)
 	case -ENOENT:
 	case -ENOENT:
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
 		/* this urb is terminated, clean up */
 		/* this urb is terminated, clean up */
-		dbg("%s - urb shutting down with status: %d", __FUNCTION__, status);
+		dbg("%s - urb shutting down with status: %d", __func__, status);
 		return;
 		return;
 	default:
 	default:
-		dbg("%s - nonzero urb status received: %d", __FUNCTION__, status);
+		dbg("%s - nonzero urb status received: %d", __func__, status);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -307,7 +307,7 @@ exit:
 	retval = usb_submit_urb (urb, GFP_ATOMIC);
 	retval = usb_submit_urb (urb, GFP_ATOMIC);
 	if (retval)
 	if (retval)
 		err ("%s - usb_submit_urb failed with result %d",
 		err ("%s - usb_submit_urb failed with result %d",
-		     __FUNCTION__, retval);
+		     __func__, retval);
 }
 }
 
 
 /* data interface returns incoming bytes, or we got unthrottled */
 /* data interface returns incoming bytes, or we got unthrottled */

+ 21 - 21
drivers/usb/core/devio.c

@@ -1530,60 +1530,60 @@ static int usbdev_ioctl(struct inode *inode, struct file *file,
 
 
 	switch (cmd) {
 	switch (cmd) {
 	case USBDEVFS_CONTROL:
 	case USBDEVFS_CONTROL:
-		snoop(&dev->dev, "%s: CONTROL\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: CONTROL\n", __func__);
 		ret = proc_control(ps, p);
 		ret = proc_control(ps, p);
 		if (ret >= 0)
 		if (ret >= 0)
 			inode->i_mtime = CURRENT_TIME;
 			inode->i_mtime = CURRENT_TIME;
 		break;
 		break;
 
 
 	case USBDEVFS_BULK:
 	case USBDEVFS_BULK:
-		snoop(&dev->dev, "%s: BULK\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: BULK\n", __func__);
 		ret = proc_bulk(ps, p);
 		ret = proc_bulk(ps, p);
 		if (ret >= 0)
 		if (ret >= 0)
 			inode->i_mtime = CURRENT_TIME;
 			inode->i_mtime = CURRENT_TIME;
 		break;
 		break;
 
 
 	case USBDEVFS_RESETEP:
 	case USBDEVFS_RESETEP:
-		snoop(&dev->dev, "%s: RESETEP\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: RESETEP\n", __func__);
 		ret = proc_resetep(ps, p);
 		ret = proc_resetep(ps, p);
 		if (ret >= 0)
 		if (ret >= 0)
 			inode->i_mtime = CURRENT_TIME;
 			inode->i_mtime = CURRENT_TIME;
 		break;
 		break;
 
 
 	case USBDEVFS_RESET:
 	case USBDEVFS_RESET:
-		snoop(&dev->dev, "%s: RESET\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: RESET\n", __func__);
 		ret = proc_resetdevice(ps);
 		ret = proc_resetdevice(ps);
 		break;
 		break;
 
 
 	case USBDEVFS_CLEAR_HALT:
 	case USBDEVFS_CLEAR_HALT:
-		snoop(&dev->dev, "%s: CLEAR_HALT\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: CLEAR_HALT\n", __func__);
 		ret = proc_clearhalt(ps, p);
 		ret = proc_clearhalt(ps, p);
 		if (ret >= 0)
 		if (ret >= 0)
 			inode->i_mtime = CURRENT_TIME;
 			inode->i_mtime = CURRENT_TIME;
 		break;
 		break;
 
 
 	case USBDEVFS_GETDRIVER:
 	case USBDEVFS_GETDRIVER:
-		snoop(&dev->dev, "%s: GETDRIVER\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: GETDRIVER\n", __func__);
 		ret = proc_getdriver(ps, p);
 		ret = proc_getdriver(ps, p);
 		break;
 		break;
 
 
 	case USBDEVFS_CONNECTINFO:
 	case USBDEVFS_CONNECTINFO:
-		snoop(&dev->dev, "%s: CONNECTINFO\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: CONNECTINFO\n", __func__);
 		ret = proc_connectinfo(ps, p);
 		ret = proc_connectinfo(ps, p);
 		break;
 		break;
 
 
 	case USBDEVFS_SETINTERFACE:
 	case USBDEVFS_SETINTERFACE:
-		snoop(&dev->dev, "%s: SETINTERFACE\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: SETINTERFACE\n", __func__);
 		ret = proc_setintf(ps, p);
 		ret = proc_setintf(ps, p);
 		break;
 		break;
 
 
 	case USBDEVFS_SETCONFIGURATION:
 	case USBDEVFS_SETCONFIGURATION:
-		snoop(&dev->dev, "%s: SETCONFIGURATION\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: SETCONFIGURATION\n", __func__);
 		ret = proc_setconfig(ps, p);
 		ret = proc_setconfig(ps, p);
 		break;
 		break;
 
 
 	case USBDEVFS_SUBMITURB:
 	case USBDEVFS_SUBMITURB:
-		snoop(&dev->dev, "%s: SUBMITURB\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: SUBMITURB\n", __func__);
 		ret = proc_submiturb(ps, p);
 		ret = proc_submiturb(ps, p);
 		if (ret >= 0)
 		if (ret >= 0)
 			inode->i_mtime = CURRENT_TIME;
 			inode->i_mtime = CURRENT_TIME;
@@ -1592,60 +1592,60 @@ static int usbdev_ioctl(struct inode *inode, struct file *file,
 #ifdef CONFIG_COMPAT
 #ifdef CONFIG_COMPAT
 
 
 	case USBDEVFS_SUBMITURB32:
 	case USBDEVFS_SUBMITURB32:
-		snoop(&dev->dev, "%s: SUBMITURB32\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: SUBMITURB32\n", __func__);
 		ret = proc_submiturb_compat(ps, p);
 		ret = proc_submiturb_compat(ps, p);
 		if (ret >= 0)
 		if (ret >= 0)
 			inode->i_mtime = CURRENT_TIME;
 			inode->i_mtime = CURRENT_TIME;
 		break;
 		break;
 
 
 	case USBDEVFS_REAPURB32:
 	case USBDEVFS_REAPURB32:
-		snoop(&dev->dev, "%s: REAPURB32\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: REAPURB32\n", __func__);
 		ret = proc_reapurb_compat(ps, p);
 		ret = proc_reapurb_compat(ps, p);
 		break;
 		break;
 
 
 	case USBDEVFS_REAPURBNDELAY32:
 	case USBDEVFS_REAPURBNDELAY32:
-		snoop(&dev->dev, "%s: REAPURBDELAY32\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: REAPURBDELAY32\n", __func__);
 		ret = proc_reapurbnonblock_compat(ps, p);
 		ret = proc_reapurbnonblock_compat(ps, p);
 		break;
 		break;
 
 
 	case USBDEVFS_IOCTL32:
 	case USBDEVFS_IOCTL32:
-		snoop(&dev->dev, "%s: IOCTL\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: IOCTL\n", __func__);
 		ret = proc_ioctl_compat(ps, ptr_to_compat(p));
 		ret = proc_ioctl_compat(ps, ptr_to_compat(p));
 		break;
 		break;
 #endif
 #endif
 
 
 	case USBDEVFS_DISCARDURB:
 	case USBDEVFS_DISCARDURB:
-		snoop(&dev->dev, "%s: DISCARDURB\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: DISCARDURB\n", __func__);
 		ret = proc_unlinkurb(ps, p);
 		ret = proc_unlinkurb(ps, p);
 		break;
 		break;
 
 
 	case USBDEVFS_REAPURB:
 	case USBDEVFS_REAPURB:
-		snoop(&dev->dev, "%s: REAPURB\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: REAPURB\n", __func__);
 		ret = proc_reapurb(ps, p);
 		ret = proc_reapurb(ps, p);
 		break;
 		break;
 
 
 	case USBDEVFS_REAPURBNDELAY:
 	case USBDEVFS_REAPURBNDELAY:
-		snoop(&dev->dev, "%s: REAPURBDELAY\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: REAPURBDELAY\n", __func__);
 		ret = proc_reapurbnonblock(ps, p);
 		ret = proc_reapurbnonblock(ps, p);
 		break;
 		break;
 
 
 	case USBDEVFS_DISCSIGNAL:
 	case USBDEVFS_DISCSIGNAL:
-		snoop(&dev->dev, "%s: DISCSIGNAL\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: DISCSIGNAL\n", __func__);
 		ret = proc_disconnectsignal(ps, p);
 		ret = proc_disconnectsignal(ps, p);
 		break;
 		break;
 
 
 	case USBDEVFS_CLAIMINTERFACE:
 	case USBDEVFS_CLAIMINTERFACE:
-		snoop(&dev->dev, "%s: CLAIMINTERFACE\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: CLAIMINTERFACE\n", __func__);
 		ret = proc_claiminterface(ps, p);
 		ret = proc_claiminterface(ps, p);
 		break;
 		break;
 
 
 	case USBDEVFS_RELEASEINTERFACE:
 	case USBDEVFS_RELEASEINTERFACE:
-		snoop(&dev->dev, "%s: RELEASEINTERFACE\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: RELEASEINTERFACE\n", __func__);
 		ret = proc_releaseinterface(ps, p);
 		ret = proc_releaseinterface(ps, p);
 		break;
 		break;
 
 
 	case USBDEVFS_IOCTL:
 	case USBDEVFS_IOCTL:
-		snoop(&dev->dev, "%s: IOCTL\n", __FUNCTION__);
+		snoop(&dev->dev, "%s: IOCTL\n", __func__);
 		ret = proc_ioctl_default(ps, p);
 		ret = proc_ioctl_default(ps, p);
 		break;
 		break;
 	}
 	}

+ 15 - 15
drivers/usb/core/driver.c

@@ -157,7 +157,7 @@ static int usb_probe_device(struct device *dev)
 	struct usb_device *udev;
 	struct usb_device *udev;
 	int error = -ENODEV;
 	int error = -ENODEV;
 
 
-	dev_dbg(dev, "%s\n", __FUNCTION__);
+	dev_dbg(dev, "%s\n", __func__);
 
 
 	if (!is_usb_device(dev))	/* Sanity check */
 	if (!is_usb_device(dev))	/* Sanity check */
 		return error;
 		return error;
@@ -194,7 +194,7 @@ static int usb_probe_interface(struct device *dev)
 	const struct usb_device_id *id;
 	const struct usb_device_id *id;
 	int error = -ENODEV;
 	int error = -ENODEV;
 
 
-	dev_dbg(dev, "%s\n", __FUNCTION__);
+	dev_dbg(dev, "%s\n", __func__);
 
 
 	if (is_usb_device(dev))		/* Sanity check */
 	if (is_usb_device(dev))		/* Sanity check */
 		return error;
 		return error;
@@ -211,7 +211,7 @@ static int usb_probe_interface(struct device *dev)
 	if (!id)
 	if (!id)
 		id = usb_match_dynamic_id(intf, driver);
 		id = usb_match_dynamic_id(intf, driver);
 	if (id) {
 	if (id) {
-		dev_dbg(dev, "%s - got id\n", __FUNCTION__);
+		dev_dbg(dev, "%s - got id\n", __func__);
 
 
 		error = usb_autoresume_device(udev);
 		error = usb_autoresume_device(udev);
 		if (error)
 		if (error)
@@ -793,7 +793,7 @@ static int usb_suspend_device(struct usb_device *udev, pm_message_t msg)
 	status = udriver->suspend(udev, msg);
 	status = udriver->suspend(udev, msg);
 
 
  done:
  done:
-	dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status);
+	dev_vdbg(&udev->dev, "%s: status %d\n", __func__, status);
 	return status;
 	return status;
 }
 }
 
 
@@ -821,7 +821,7 @@ static int usb_resume_device(struct usb_device *udev)
 	status = udriver->resume(udev);
 	status = udriver->resume(udev);
 
 
  done:
  done:
-	dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status);
+	dev_vdbg(&udev->dev, "%s: status %d\n", __func__, status);
 	if (status == 0)
 	if (status == 0)
 		udev->autoresume_disabled = 0;
 		udev->autoresume_disabled = 0;
 	return status;
 	return status;
@@ -860,7 +860,7 @@ static int usb_suspend_interface(struct usb_interface *intf, pm_message_t msg)
 	}
 	}
 
 
  done:
  done:
-	dev_vdbg(&intf->dev, "%s: status %d\n", __FUNCTION__, status);
+	dev_vdbg(&intf->dev, "%s: status %d\n", __func__, status);
 	return status;
 	return status;
 }
 }
 
 
@@ -910,7 +910,7 @@ static int usb_resume_interface(struct usb_interface *intf, int reset_resume)
 	}
 	}
 
 
 done:
 done:
-	dev_vdbg(&intf->dev, "%s: status %d\n", __FUNCTION__, status);
+	dev_vdbg(&intf->dev, "%s: status %d\n", __func__, status);
 	if (status == 0)
 	if (status == 0)
 		mark_active(intf);
 		mark_active(intf);
 
 
@@ -1093,7 +1093,7 @@ static int usb_suspend_both(struct usb_device *udev, pm_message_t msg)
 	}
 	}
 
 
  done:
  done:
-	dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status);
+	dev_vdbg(&udev->dev, "%s: status %d\n", __func__, status);
 	return status;
 	return status;
 }
 }
 
 
@@ -1187,7 +1187,7 @@ static int usb_resume_both(struct usb_device *udev)
 	}
 	}
 
 
  done:
  done:
-	dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status);
+	dev_vdbg(&udev->dev, "%s: status %d\n", __func__, status);
 	if (!status)
 	if (!status)
 		udev->reset_resume = 0;
 		udev->reset_resume = 0;
 	return status;
 	return status;
@@ -1257,7 +1257,7 @@ void usb_autosuspend_device(struct usb_device *udev)
 
 
 	status = usb_autopm_do_device(udev, -1);
 	status = usb_autopm_do_device(udev, -1);
 	dev_vdbg(&udev->dev, "%s: cnt %d\n",
 	dev_vdbg(&udev->dev, "%s: cnt %d\n",
-			__FUNCTION__, udev->pm_usage_cnt);
+			__func__, udev->pm_usage_cnt);
 }
 }
 
 
 /**
 /**
@@ -1277,7 +1277,7 @@ void usb_try_autosuspend_device(struct usb_device *udev)
 {
 {
 	usb_autopm_do_device(udev, 0);
 	usb_autopm_do_device(udev, 0);
 	dev_vdbg(&udev->dev, "%s: cnt %d\n",
 	dev_vdbg(&udev->dev, "%s: cnt %d\n",
-			__FUNCTION__, udev->pm_usage_cnt);
+			__func__, udev->pm_usage_cnt);
 }
 }
 
 
 /**
 /**
@@ -1305,7 +1305,7 @@ int usb_autoresume_device(struct usb_device *udev)
 
 
 	status = usb_autopm_do_device(udev, 1);
 	status = usb_autopm_do_device(udev, 1);
 	dev_vdbg(&udev->dev, "%s: status %d cnt %d\n",
 	dev_vdbg(&udev->dev, "%s: status %d cnt %d\n",
-			__FUNCTION__, status, udev->pm_usage_cnt);
+			__func__, status, udev->pm_usage_cnt);
 	return status;
 	return status;
 }
 }
 
 
@@ -1377,7 +1377,7 @@ void usb_autopm_put_interface(struct usb_interface *intf)
 
 
 	status = usb_autopm_do_interface(intf, -1);
 	status = usb_autopm_do_interface(intf, -1);
 	dev_vdbg(&intf->dev, "%s: status %d cnt %d\n",
 	dev_vdbg(&intf->dev, "%s: status %d cnt %d\n",
-			__FUNCTION__, status, intf->pm_usage_cnt);
+			__func__, status, intf->pm_usage_cnt);
 }
 }
 EXPORT_SYMBOL_GPL(usb_autopm_put_interface);
 EXPORT_SYMBOL_GPL(usb_autopm_put_interface);
 
 
@@ -1421,7 +1421,7 @@ int usb_autopm_get_interface(struct usb_interface *intf)
 
 
 	status = usb_autopm_do_interface(intf, 1);
 	status = usb_autopm_do_interface(intf, 1);
 	dev_vdbg(&intf->dev, "%s: status %d cnt %d\n",
 	dev_vdbg(&intf->dev, "%s: status %d cnt %d\n",
-			__FUNCTION__, status, intf->pm_usage_cnt);
+			__func__, status, intf->pm_usage_cnt);
 	return status;
 	return status;
 }
 }
 EXPORT_SYMBOL_GPL(usb_autopm_get_interface);
 EXPORT_SYMBOL_GPL(usb_autopm_get_interface);
@@ -1443,7 +1443,7 @@ int usb_autopm_set_interface(struct usb_interface *intf)
 
 
 	status = usb_autopm_do_interface(intf, 0);
 	status = usb_autopm_do_interface(intf, 0);
 	dev_vdbg(&intf->dev, "%s: status %d cnt %d\n",
 	dev_vdbg(&intf->dev, "%s: status %d cnt %d\n",
-			__FUNCTION__, status, intf->pm_usage_cnt);
+			__func__, status, intf->pm_usage_cnt);
 	return status;
 	return status;
 }
 }
 EXPORT_SYMBOL_GPL(usb_autopm_set_interface);
 EXPORT_SYMBOL_GPL(usb_autopm_set_interface);

+ 4 - 4
drivers/usb/core/hub.c

@@ -575,7 +575,7 @@ static int hub_hub_status(struct usb_hub *hub,
 	ret = get_hub_status(hub->hdev, &hub->status->hub);
 	ret = get_hub_status(hub->hdev, &hub->status->hub);
 	if (ret < 0)
 	if (ret < 0)
 		dev_err (hub->intfdev,
 		dev_err (hub->intfdev,
-			"%s failed (err = %d)\n", __FUNCTION__, ret);
+			"%s failed (err = %d)\n", __func__, ret);
 	else {
 	else {
 		*status = le16_to_cpu(hub->status->hub.wHubStatus);
 		*status = le16_to_cpu(hub->status->hub.wHubStatus);
 		*change = le16_to_cpu(hub->status->hub.wHubChange); 
 		*change = le16_to_cpu(hub->status->hub.wHubChange); 
@@ -1270,7 +1270,7 @@ void usb_disconnect(struct usb_device **pdev)
 	int			i;
 	int			i;
 
 
 	if (!udev) {
 	if (!udev) {
-		pr_debug ("%s nodev\n", __FUNCTION__);
+		pr_debug ("%s nodev\n", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -2072,7 +2072,7 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
 		}
 		}
 	}
 	}
 
 
-	dev_dbg(&intf->dev, "%s\n", __FUNCTION__);
+	dev_dbg(&intf->dev, "%s\n", __func__);
 
 
 	/* stop khubd and related activity */
 	/* stop khubd and related activity */
 	hub_quiesce(hub);
 	hub_quiesce(hub);
@@ -3125,7 +3125,7 @@ int usb_reset_device(struct usb_device *udev)
 
 
 	if (!parent_hdev) {
 	if (!parent_hdev) {
 		/* this requires hcd-specific logic; see OHCI hc_restart() */
 		/* this requires hcd-specific logic; see OHCI hc_restart() */
-		dev_dbg(&udev->dev, "%s for root hub!\n", __FUNCTION__);
+		dev_dbg(&udev->dev, "%s for root hub!\n", __func__);
 		return -EISDIR;
 		return -EISDIR;
 	}
 	}
 	parent_hub = hdev_to_hub(parent_hdev);
 	parent_hub = hdev_to_hub(parent_hdev);

+ 2 - 2
drivers/usb/core/inode.c

@@ -463,13 +463,13 @@ static int usbfs_fill_super(struct super_block *sb, void *data, int silent)
 	inode = usbfs_get_inode(sb, S_IFDIR | 0755, 0);
 	inode = usbfs_get_inode(sb, S_IFDIR | 0755, 0);
 
 
 	if (!inode) {
 	if (!inode) {
-		dbg("%s: could not get inode!",__FUNCTION__);
+		dbg("%s: could not get inode!",__func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 
 
 	root = d_alloc_root(inode);
 	root = d_alloc_root(inode);
 	if (!root) {
 	if (!root) {
-		dbg("%s: could not get root dentry!",__FUNCTION__);
+		dbg("%s: could not get root dentry!",__func__);
 		iput(inode);
 		iput(inode);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}

+ 4 - 4
drivers/usb/core/message.c

@@ -312,7 +312,7 @@ static void sg_complete(struct urb *urb)
 				    retval != -EBUSY)
 				    retval != -EBUSY)
 					dev_err(&io->dev->dev,
 					dev_err(&io->dev->dev,
 						"%s, unlink --> %d\n",
 						"%s, unlink --> %d\n",
-						__FUNCTION__, retval);
+						__func__, retval);
 			} else if (urb == io->urbs [i])
 			} else if (urb == io->urbs [i])
 				found = 1;
 				found = 1;
 		}
 		}
@@ -550,7 +550,7 @@ void usb_sg_wait(struct usb_sg_request *io)
 			io->urbs[i]->dev = NULL;
 			io->urbs[i]->dev = NULL;
 			io->urbs[i]->status = retval;
 			io->urbs[i]->status = retval;
 			dev_dbg(&io->dev->dev, "%s, submit --> %d\n",
 			dev_dbg(&io->dev->dev, "%s, submit --> %d\n",
-				__FUNCTION__, retval);
+				__func__, retval);
 			usb_sg_cancel(io);
 			usb_sg_cancel(io);
 		}
 		}
 		spin_lock_irq(&io->lock);
 		spin_lock_irq(&io->lock);
@@ -600,7 +600,7 @@ void usb_sg_cancel(struct usb_sg_request *io)
 			retval = usb_unlink_urb(io->urbs [i]);
 			retval = usb_unlink_urb(io->urbs [i]);
 			if (retval != -EINPROGRESS && retval != -EBUSY)
 			if (retval != -EINPROGRESS && retval != -EBUSY)
 				dev_warn(&io->dev->dev, "%s, unlink --> %d\n",
 				dev_warn(&io->dev->dev, "%s, unlink --> %d\n",
-					__FUNCTION__, retval);
+					__func__, retval);
 		}
 		}
 		spin_lock(&io->lock);
 		spin_lock(&io->lock);
 	}
 	}
@@ -1068,7 +1068,7 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0)
 {
 {
 	int i;
 	int i;
 
 
-	dev_dbg(&dev->dev, "%s nuking %s URBs\n", __FUNCTION__,
+	dev_dbg(&dev->dev, "%s nuking %s URBs\n", __func__,
 		skip_ep0 ? "non-ep0" : "all");
 		skip_ep0 ? "non-ep0" : "all");
 	for (i = skip_ep0; i < 16; ++i) {
 	for (i = skip_ep0; i < 16; ++i) {
 		usb_disable_endpoint(dev, i);
 		usb_disable_endpoint(dev, i);

+ 1 - 1
drivers/usb/core/urb.c

@@ -334,7 +334,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
 		dev_dbg(&dev->dev,
 		dev_dbg(&dev->dev,
 			"bogus endpoint ep%d%s in %s (bad maxpacket %d)\n",
 			"bogus endpoint ep%d%s in %s (bad maxpacket %d)\n",
 			usb_endpoint_num(&ep->desc), is_out ? "out" : "in",
 			usb_endpoint_num(&ep->desc), is_out ? "out" : "in",
-			__FUNCTION__, max);
+			__func__, max);
 		return -EMSGSIZE;
 		return -EMSGSIZE;
 	}
 	}
 
 

+ 2 - 2
drivers/usb/gadget/at91_udc.c

@@ -460,7 +460,7 @@ static void nuke(struct at91_ep *ep, int status)
 	if (list_empty(&ep->queue))
 	if (list_empty(&ep->queue))
 		return;
 		return;
 
 
-	VDBG("%s %s\n", __FUNCTION__, ep->ep.name);
+	VDBG("%s %s\n", __func__, ep->ep.name);
 	while (!list_empty(&ep->queue)) {
 	while (!list_empty(&ep->queue)) {
 		req = list_entry(ep->queue.next, struct at91_request, queue);
 		req = list_entry(ep->queue.next, struct at91_request, queue);
 		done(ep, req, status);
 		done(ep, req, status);
@@ -795,7 +795,7 @@ static int at91_wakeup(struct usb_gadget *gadget)
 	int		status = -EINVAL;
 	int		status = -EINVAL;
 	unsigned long	flags;
 	unsigned long	flags;
 
 
-	DBG("%s\n", __FUNCTION__ );
+	DBG("%s\n", __func__ );
 	local_irq_save(flags);
 	local_irq_save(flags);
 
 
 	if (!udc->clocked || !udc->suspended)
 	if (!udc->clocked || !udc->suspended)

+ 6 - 6
drivers/usb/gadget/dummy_hcd.c

@@ -892,7 +892,7 @@ static int dummy_udc_suspend (struct platform_device *pdev, pm_message_t state)
 {
 {
 	struct dummy	*dum = platform_get_drvdata(pdev);
 	struct dummy	*dum = platform_get_drvdata(pdev);
 
 
-	dev_dbg (&pdev->dev, "%s\n", __FUNCTION__);
+	dev_dbg (&pdev->dev, "%s\n", __func__);
 	spin_lock_irq (&dum->lock);
 	spin_lock_irq (&dum->lock);
 	dum->udc_suspended = 1;
 	dum->udc_suspended = 1;
 	set_link_state (dum);
 	set_link_state (dum);
@@ -906,7 +906,7 @@ static int dummy_udc_resume (struct platform_device *pdev)
 {
 {
 	struct dummy	*dum = platform_get_drvdata(pdev);
 	struct dummy	*dum = platform_get_drvdata(pdev);
 
 
-	dev_dbg (&pdev->dev, "%s\n", __FUNCTION__);
+	dev_dbg (&pdev->dev, "%s\n", __func__);
 	spin_lock_irq (&dum->lock);
 	spin_lock_irq (&dum->lock);
 	dum->udc_suspended = 0;
 	dum->udc_suspended = 0;
 	set_link_state (dum);
 	set_link_state (dum);
@@ -1707,7 +1707,7 @@ static int dummy_bus_suspend (struct usb_hcd *hcd)
 {
 {
 	struct dummy *dum = hcd_to_dummy (hcd);
 	struct dummy *dum = hcd_to_dummy (hcd);
 
 
-	dev_dbg (&hcd->self.root_hub->dev, "%s\n", __FUNCTION__);
+	dev_dbg (&hcd->self.root_hub->dev, "%s\n", __func__);
 
 
 	spin_lock_irq (&dum->lock);
 	spin_lock_irq (&dum->lock);
 	dum->rh_state = DUMMY_RH_SUSPENDED;
 	dum->rh_state = DUMMY_RH_SUSPENDED;
@@ -1722,7 +1722,7 @@ static int dummy_bus_resume (struct usb_hcd *hcd)
 	struct dummy *dum = hcd_to_dummy (hcd);
 	struct dummy *dum = hcd_to_dummy (hcd);
 	int rc = 0;
 	int rc = 0;
 
 
-	dev_dbg (&hcd->self.root_hub->dev, "%s\n", __FUNCTION__);
+	dev_dbg (&hcd->self.root_hub->dev, "%s\n", __func__);
 
 
 	spin_lock_irq (&dum->lock);
 	spin_lock_irq (&dum->lock);
 	if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) {
 	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)
 	struct dummy		*dum;
 	struct dummy		*dum;
 	int			rc = 0;
 	int			rc = 0;
 
 
-	dev_dbg (&pdev->dev, "%s\n", __FUNCTION__);
+	dev_dbg (&pdev->dev, "%s\n", __func__);
 
 
 	hcd = platform_get_drvdata (pdev);
 	hcd = platform_get_drvdata (pdev);
 	dum = hcd_to_dummy (hcd);
 	dum = hcd_to_dummy (hcd);
@@ -1912,7 +1912,7 @@ static int dummy_hcd_resume (struct platform_device *pdev)
 {
 {
 	struct usb_hcd		*hcd;
 	struct usb_hcd		*hcd;
 
 
-	dev_dbg (&pdev->dev, "%s\n", __FUNCTION__);
+	dev_dbg (&pdev->dev, "%s\n", __func__);
 
 
 	hcd = platform_get_drvdata (pdev);
 	hcd = platform_get_drvdata (pdev);
 	set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
 	set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);

+ 6 - 6
drivers/usb/gadget/ether.c

@@ -1102,7 +1102,7 @@ static void eth_reset_config (struct eth_dev *dev)
 	if (dev->config == 0)
 	if (dev->config == 0)
 		return;
 		return;
 
 
-	DEBUG (dev, "%s\n", __FUNCTION__);
+	DEBUG (dev, "%s\n", __func__);
 
 
 	netif_stop_queue (dev->net);
 	netif_stop_queue (dev->net);
 	netif_carrier_off (dev->net);
 	netif_carrier_off (dev->net);
@@ -1263,7 +1263,7 @@ static void issue_start_status (struct eth_dev *dev)
 	struct usb_cdc_notification	*event;
 	struct usb_cdc_notification	*event;
 	int				value;
 	int				value;
 
 
-	DEBUG (dev, "%s, flush old status first\n", __FUNCTION__);
+	DEBUG (dev, "%s, flush old status first\n", __func__);
 
 
 	/* flush old status
 	/* flush old status
 	 *
 	 *
@@ -1329,7 +1329,7 @@ static void rndis_command_complete (struct usb_ep *ep, struct usb_request *req)
 	spin_lock(&dev->lock);
 	spin_lock(&dev->lock);
 	status = rndis_msg_parser (dev->rndis_config, (u8 *) req->buf);
 	status = rndis_msg_parser (dev->rndis_config, (u8 *) req->buf);
 	if (status < 0)
 	if (status < 0)
-		ERROR(dev, "%s: rndis parse error %d\n", __FUNCTION__, status);
+		ERROR(dev, "%s: rndis parse error %d\n", __func__, status);
 	spin_unlock(&dev->lock);
 	spin_unlock(&dev->lock);
 }
 }
 
 
@@ -2113,7 +2113,7 @@ static int rndis_control_ack (struct net_device *net)
 
 
 static void eth_start (struct eth_dev *dev, gfp_t gfp_flags)
 static void eth_start (struct eth_dev *dev, gfp_t gfp_flags)
 {
 {
-	DEBUG (dev, "%s\n", __FUNCTION__);
+	DEBUG (dev, "%s\n", __func__);
 
 
 	/* fill the rx queue */
 	/* fill the rx queue */
 	rx_fill (dev, gfp_flags);
 	rx_fill (dev, gfp_flags);
@@ -2133,7 +2133,7 @@ static int eth_open (struct net_device *net)
 {
 {
 	struct eth_dev		*dev = netdev_priv(net);
 	struct eth_dev		*dev = netdev_priv(net);
 
 
-	DEBUG (dev, "%s\n", __FUNCTION__);
+	DEBUG (dev, "%s\n", __func__);
 	if (netif_carrier_ok (dev->net))
 	if (netif_carrier_ok (dev->net))
 		eth_start (dev, GFP_KERNEL);
 		eth_start (dev, GFP_KERNEL);
 	return 0;
 	return 0;
@@ -2143,7 +2143,7 @@ static int eth_stop (struct net_device *net)
 {
 {
 	struct eth_dev		*dev = netdev_priv(net);
 	struct eth_dev		*dev = netdev_priv(net);
 
 
-	VDEBUG (dev, "%s\n", __FUNCTION__);
+	VDEBUG (dev, "%s\n", __func__);
 	netif_stop_queue (net);
 	netif_stop_queue (net);
 
 
 	DEBUG (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld\n",
 	DEBUG (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld\n",

+ 4 - 4
drivers/usb/gadget/file_storage.c

@@ -1104,7 +1104,7 @@ static void ep0_complete(struct usb_ep *ep, struct usb_request *req)
 	if (req->actual > 0)
 	if (req->actual > 0)
 		dump_msg(fsg, fsg->ep0req_name, req->buf, req->actual);
 		dump_msg(fsg, fsg->ep0req_name, req->buf, req->actual);
 	if (req->status || req->actual != req->length)
 	if (req->status || req->actual != req->length)
-		DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__,
+		DBG(fsg, "%s --> %d, %u/%u\n", __func__,
 				req->status, req->actual, req->length);
 				req->status, req->actual, req->length);
 	if (req->status == -ECONNRESET)		// Request was cancelled
 	if (req->status == -ECONNRESET)		// Request was cancelled
 		usb_ep_fifo_flush(ep);
 		usb_ep_fifo_flush(ep);
@@ -1125,7 +1125,7 @@ static void bulk_in_complete(struct usb_ep *ep, struct usb_request *req)
 	struct fsg_buffhd	*bh = req->context;
 	struct fsg_buffhd	*bh = req->context;
 
 
 	if (req->status || req->actual != req->length)
 	if (req->status || req->actual != req->length)
-		DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__,
+		DBG(fsg, "%s --> %d, %u/%u\n", __func__,
 				req->status, req->actual, req->length);
 				req->status, req->actual, req->length);
 	if (req->status == -ECONNRESET)		// Request was cancelled
 	if (req->status == -ECONNRESET)		// Request was cancelled
 		usb_ep_fifo_flush(ep);
 		usb_ep_fifo_flush(ep);
@@ -1146,7 +1146,7 @@ static void bulk_out_complete(struct usb_ep *ep, struct usb_request *req)
 
 
 	dump_msg(fsg, "bulk-out", req->buf, req->actual);
 	dump_msg(fsg, "bulk-out", req->buf, req->actual);
 	if (req->status || req->actual != bh->bulk_out_intended_length)
 	if (req->status || req->actual != bh->bulk_out_intended_length)
-		DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__,
+		DBG(fsg, "%s --> %d, %u/%u\n", __func__,
 				req->status, req->actual,
 				req->status, req->actual,
 				bh->bulk_out_intended_length);
 				bh->bulk_out_intended_length);
 	if (req->status == -ECONNRESET)		// Request was cancelled
 	if (req->status == -ECONNRESET)		// Request was cancelled
@@ -1169,7 +1169,7 @@ static void intr_in_complete(struct usb_ep *ep, struct usb_request *req)
 	struct fsg_buffhd	*bh = req->context;
 	struct fsg_buffhd	*bh = req->context;
 
 
 	if (req->status || req->actual != req->length)
 	if (req->status || req->actual != req->length)
-		DBG(fsg, "%s --> %d, %u/%u\n", __FUNCTION__,
+		DBG(fsg, "%s --> %d, %u/%u\n", __func__,
 				req->status, req->actual, req->length);
 				req->status, req->actual, req->length);
 	if (req->status == -ECONNRESET)		// Request was cancelled
 	if (req->status == -ECONNRESET)		// Request was cancelled
 		usb_ep_fifo_flush(ep);
 		usb_ep_fifo_flush(ep);

+ 2 - 2
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)
 	/* catch various bogus parameters */
 	/* catch various bogus parameters */
 	if (!_req || !req->req.complete || !req->req.buf
 	if (!_req || !req->req.complete || !req->req.buf
 			|| !list_empty(&req->queue)) {
 			|| !list_empty(&req->queue)) {
-		VDBG("%s, bad params\n", __FUNCTION__);
+		VDBG("%s, bad params\n", __func__);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 	if (unlikely(!_ep || !ep->desc)) {
 	if (unlikely(!_ep || !ep->desc)) {
-		VDBG("%s, bad ep\n", __FUNCTION__);
+		VDBG("%s, bad ep\n", __func__);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 	if (ep->desc->bmAttributes == USB_ENDPOINT_XFER_ISOC) {
 	if (ep->desc->bmAttributes == USB_ENDPOINT_XFER_ISOC) {

+ 1 - 1
drivers/usb/gadget/fsl_usb2_udc.h

@@ -512,7 +512,7 @@ struct fsl_udc {
 
 
 #ifdef DEBUG
 #ifdef DEBUG
 #define DBG(fmt, args...) 	printk(KERN_DEBUG "[%s]  " fmt "\n", \
 #define DBG(fmt, args...) 	printk(KERN_DEBUG "[%s]  " fmt "\n", \
-				__FUNCTION__, ## args)
+				__func__, ## args)
 #else
 #else
 #define DBG(fmt, args...)	do{}while(0)
 #define DBG(fmt, args...)	do{}while(0)
 #endif
 #endif

+ 10 - 10
drivers/usb/gadget/goku_udc.c

@@ -692,7 +692,7 @@ static void abort_dma(struct goku_ep *ep, int status)
 	req->req.actual = (curr - req->req.dma) + 1;
 	req->req.actual = (curr - req->req.dma) + 1;
 	req->req.status = status;
 	req->req.status = status;
 
 
-	VDBG(ep->dev, "%s %s %s %d/%d\n", __FUNCTION__, ep->ep.name,
+	VDBG(ep->dev, "%s %s %s %d/%d\n", __func__, ep->ep.name,
 		ep->is_in ? "IN" : "OUT",
 		ep->is_in ? "IN" : "OUT",
 		req->req.actual, req->req.length);
 		req->req.actual, req->req.length);
 
 
@@ -826,7 +826,7 @@ static int goku_dequeue(struct usb_ep *_ep, struct usb_request *_req)
 	if (dev->ep0state == EP0_SUSPEND)
 	if (dev->ep0state == EP0_SUSPEND)
 		return -EBUSY;
 		return -EBUSY;
 
 
-	VDBG(dev, "%s %s %s %s %p\n", __FUNCTION__, _ep->name,
+	VDBG(dev, "%s %s %s %s %p\n", __func__, _ep->name,
 		ep->is_in ? "IN" : "OUT",
 		ep->is_in ? "IN" : "OUT",
 		ep->dma ? "dma" : "pio",
 		ep->dma ? "dma" : "pio",
 		_req);
 		_req);
@@ -898,7 +898,7 @@ static int goku_set_halt(struct usb_ep *_ep, int value)
 
 
 	/* don't change EPxSTATUS_EP_INVALID to READY */
 	/* don't change EPxSTATUS_EP_INVALID to READY */
 	} else if (!ep->desc) {
 	} else if (!ep->desc) {
-		DBG(ep->dev, "%s %s inactive?\n", __FUNCTION__, ep->ep.name);
+		DBG(ep->dev, "%s %s inactive?\n", __func__, ep->ep.name);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
@@ -940,7 +940,7 @@ static int goku_fifo_status(struct usb_ep *_ep)
 	regs = ep->dev->regs;
 	regs = ep->dev->regs;
 	size = readl(&regs->EPxSizeLA[ep->num]) & DATASIZE;
 	size = readl(&regs->EPxSizeLA[ep->num]) & DATASIZE;
 	size += readl(&regs->EPxSizeLB[ep->num]) & DATASIZE;
 	size += readl(&regs->EPxSizeLB[ep->num]) & DATASIZE;
-	VDBG(ep->dev, "%s %s %u\n", __FUNCTION__, ep->ep.name, size);
+	VDBG(ep->dev, "%s %s %u\n", __func__, ep->ep.name, size);
 	return size;
 	return size;
 }
 }
 
 
@@ -953,11 +953,11 @@ static void goku_fifo_flush(struct usb_ep *_ep)
 	if (!_ep)
 	if (!_ep)
 		return;
 		return;
 	ep = container_of(_ep, struct goku_ep, ep);
 	ep = container_of(_ep, struct goku_ep, ep);
-	VDBG(ep->dev, "%s %s\n", __FUNCTION__, ep->ep.name);
+	VDBG(ep->dev, "%s %s\n", __func__, ep->ep.name);
 
 
 	/* don't change EPxSTATUS_EP_INVALID to READY */
 	/* don't change EPxSTATUS_EP_INVALID to READY */
 	if (!ep->desc && ep->num != 0) {
 	if (!ep->desc && ep->num != 0) {
-		DBG(ep->dev, "%s %s inactive?\n", __FUNCTION__, ep->ep.name);
+		DBG(ep->dev, "%s %s inactive?\n", __func__, ep->ep.name);
 		return;
 		return;
 	}
 	}
 
 
@@ -1286,7 +1286,7 @@ static void ep0_start(struct goku_udc *dev)
 	struct goku_udc_regs __iomem	*regs = dev->regs;
 	struct goku_udc_regs __iomem	*regs = dev->regs;
 	unsigned			i;
 	unsigned			i;
 
 
-	VDBG(dev, "%s\n", __FUNCTION__);
+	VDBG(dev, "%s\n", __func__);
 
 
 	udc_reset(dev);
 	udc_reset(dev);
 	udc_reinit (dev);
 	udc_reinit (dev);
@@ -1322,7 +1322,7 @@ static void udc_enable(struct goku_udc *dev)
 	if (readl(&dev->regs->power_detect) & PW_DETECT)
 	if (readl(&dev->regs->power_detect) & PW_DETECT)
 		ep0_start(dev);
 		ep0_start(dev);
 	else {
 	else {
-		DBG(dev, "%s\n", __FUNCTION__);
+		DBG(dev, "%s\n", __func__);
 		dev->int_enable = INT_PWRDETECT;
 		dev->int_enable = INT_PWRDETECT;
 		writel(dev->int_enable, &dev->regs->int_enable);
 		writel(dev->int_enable, &dev->regs->int_enable);
 	}
 	}
@@ -1387,7 +1387,7 @@ stop_activity(struct goku_udc *dev, struct usb_gadget_driver *driver)
 {
 {
 	unsigned	i;
 	unsigned	i;
 
 
-	DBG (dev, "%s\n", __FUNCTION__);
+	DBG (dev, "%s\n", __func__);
 
 
 	if (dev->gadget.speed == USB_SPEED_UNKNOWN)
 	if (dev->gadget.speed == USB_SPEED_UNKNOWN)
 		driver = NULL;
 		driver = NULL;
@@ -1726,7 +1726,7 @@ static void goku_remove(struct pci_dev *pdev)
 {
 {
 	struct goku_udc		*dev = pci_get_drvdata(pdev);
 	struct goku_udc		*dev = pci_get_drvdata(pdev);
 
 
-	DBG(dev, "%s\n", __FUNCTION__);
+	DBG(dev, "%s\n", __func__);
 
 
 	BUG_ON(dev->driver);
 	BUG_ON(dev->driver);
 
 

+ 9 - 9
drivers/usb/gadget/inode.c

@@ -1107,13 +1107,13 @@ scan:
 
 
 	switch (state) {
 	switch (state) {
 	default:
 	default:
-		DBG (dev, "fail %s, state %d\n", __FUNCTION__, state);
+		DBG (dev, "fail %s, state %d\n", __func__, state);
 		retval = -ESRCH;
 		retval = -ESRCH;
 		break;
 		break;
 	case STATE_DEV_UNCONNECTED:
 	case STATE_DEV_UNCONNECTED:
 	case STATE_DEV_CONNECTED:
 	case STATE_DEV_CONNECTED:
 		spin_unlock_irq (&dev->lock);
 		spin_unlock_irq (&dev->lock);
-		DBG (dev, "%s wait\n", __FUNCTION__);
+		DBG (dev, "%s wait\n", __func__);
 
 
 		/* wait for events */
 		/* wait for events */
 		retval = wait_event_interruptible (dev->wait,
 		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)
 			DBG(dev, "bogus ep0out stall!\n");
 			DBG(dev, "bogus ep0out stall!\n");
 		}
 		}
 	} else
 	} else
-		DBG (dev, "fail %s, state %d\n", __FUNCTION__, dev->state);
+		DBG (dev, "fail %s, state %d\n", __func__, dev->state);
 
 
 	spin_unlock_irq (&dev->lock);
 	spin_unlock_irq (&dev->lock);
 	return retval;
 	return retval;
@@ -1233,7 +1233,7 @@ ep0_fasync (int f, struct file *fd, int on)
 {
 {
 	struct dev_data		*dev = fd->private_data;
 	struct dev_data		*dev = fd->private_data;
 	// caller must F_SETOWN before signal delivery happens
 	// caller must F_SETOWN before signal delivery happens
-	VDEBUG (dev, "%s %s\n", __FUNCTION__, on ? "on" : "off");
+	VDEBUG (dev, "%s %s\n", __func__, on ? "on" : "off");
 	return fasync_helper (f, fd, on, &dev->fasync);
 	return fasync_helper (f, fd, on, &dev->fasync);
 }
 }
 
 
@@ -1575,7 +1575,7 @@ static void destroy_ep_files (struct dev_data *dev)
 {
 {
 	struct list_head	*entry, *tmp;
 	struct list_head	*entry, *tmp;
 
 
-	DBG (dev, "%s %d\n", __FUNCTION__, dev->state);
+	DBG (dev, "%s %d\n", __func__, dev->state);
 
 
 	/* dev->state must prevent interference */
 	/* dev->state must prevent interference */
 restart:
 restart:
@@ -1662,7 +1662,7 @@ enomem1:
 	put_dev (dev);
 	put_dev (dev);
 	kfree (data);
 	kfree (data);
 enomem0:
 enomem0:
-	DBG (dev, "%s enomem\n", __FUNCTION__);
+	DBG (dev, "%s enomem\n", __func__);
 	destroy_ep_files (dev);
 	destroy_ep_files (dev);
 	return -ENOMEM;
 	return -ENOMEM;
 }
 }
@@ -1672,7 +1672,7 @@ gadgetfs_unbind (struct usb_gadget *gadget)
 {
 {
 	struct dev_data		*dev = get_gadget_data (gadget);
 	struct dev_data		*dev = get_gadget_data (gadget);
 
 
-	DBG (dev, "%s\n", __FUNCTION__);
+	DBG (dev, "%s\n", __func__);
 
 
 	spin_lock_irq (&dev->lock);
 	spin_lock_irq (&dev->lock);
 	dev->state = STATE_DEV_UNBOUND;
 	dev->state = STATE_DEV_UNBOUND;
@@ -1685,7 +1685,7 @@ gadgetfs_unbind (struct usb_gadget *gadget)
 	/* we've already been disconnected ... no i/o is active */
 	/* we've already been disconnected ... no i/o is active */
 	if (dev->req)
 	if (dev->req)
 		usb_ep_free_request (gadget->ep0, dev->req);
 		usb_ep_free_request (gadget->ep0, dev->req);
-	DBG (dev, "%s done\n", __FUNCTION__);
+	DBG (dev, "%s done\n", __func__);
 	put_dev (dev);
 	put_dev (dev);
 }
 }
 
 
@@ -1933,7 +1933,7 @@ dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
 
 
 fail:
 fail:
 	spin_unlock_irq (&dev->lock);
 	spin_unlock_irq (&dev->lock);
-	pr_debug ("%s: %s fail %Zd, %p\n", shortname, __FUNCTION__, value, dev);
+	pr_debug ("%s: %s fail %Zd, %p\n", shortname, __func__, value, dev);
 	kfree (dev->buf);
 	kfree (dev->buf);
 	dev->buf = NULL;
 	dev->buf = NULL;
 	return value;
 	return value;

+ 66 - 66
drivers/usb/gadget/lh7a40x_udc.c

@@ -253,7 +253,7 @@ udc_proc_read(char *page, char **start, off_t off, int count,
  */
  */
 static void udc_disable(struct lh7a40x_udc *dev)
 static void udc_disable(struct lh7a40x_udc *dev)
 {
 {
-	DEBUG("%s, %p\n", __FUNCTION__, dev);
+	DEBUG("%s, %p\n", __func__, dev);
 
 
 	udc_set_address(dev, 0);
 	udc_set_address(dev, 0);
 
 
@@ -285,7 +285,7 @@ static void udc_reinit(struct lh7a40x_udc *dev)
 {
 {
 	u32 i;
 	u32 i;
 
 
-	DEBUG("%s, %p\n", __FUNCTION__, dev);
+	DEBUG("%s, %p\n", __func__, dev);
 
 
 	/* device/ep0 records init */
 	/* device/ep0 records init */
 	INIT_LIST_HEAD(&dev->gadget.ep_list);
 	INIT_LIST_HEAD(&dev->gadget.ep_list);
@@ -318,7 +318,7 @@ static void udc_enable(struct lh7a40x_udc *dev)
 {
 {
 	int ep;
 	int ep;
 
 
-	DEBUG("%s, %p\n", __FUNCTION__, dev);
+	DEBUG("%s, %p\n", __func__, dev);
 
 
 	dev->gadget.speed = USB_SPEED_UNKNOWN;
 	dev->gadget.speed = USB_SPEED_UNKNOWN;
 
 
@@ -412,7 +412,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
 	struct lh7a40x_udc *dev = the_controller;
 	struct lh7a40x_udc *dev = the_controller;
 	int retval;
 	int retval;
 
 
-	DEBUG("%s: %s\n", __FUNCTION__, driver->driver.name);
+	DEBUG("%s: %s\n", __func__, driver->driver.name);
 
 
 	if (!driver
 	if (!driver
 			|| driver->speed != USB_SPEED_FULL
 			|| driver->speed != USB_SPEED_FULL
@@ -521,7 +521,7 @@ static int write_fifo(struct lh7a40x_ep *ep, struct lh7a40x_request *req)
 			is_short = unlikely(max < ep_maxpacket(ep));
 			is_short = unlikely(max < ep_maxpacket(ep));
 		}
 		}
 
 
-		DEBUG("%s: wrote %s %d bytes%s%s %d left %p\n", __FUNCTION__,
+		DEBUG("%s: wrote %s %d bytes%s%s %d left %p\n", __func__,
 		      ep->ep.name, count,
 		      ep->ep.name, count,
 		      is_last ? "/L" : "", is_short ? "/S" : "",
 		      is_last ? "/L" : "", is_short ? "/S" : "",
 		      req->req.length - req->req.actual, req);
 		      req->req.length - req->req.actual, req);
@@ -555,7 +555,7 @@ static int read_fifo(struct lh7a40x_ep *ep, struct lh7a40x_request *req)
 	/* make sure there's a packet in the FIFO. */
 	/* make sure there's a packet in the FIFO. */
 	csr = usb_read(ep->csr1);
 	csr = usb_read(ep->csr1);
 	if (!(csr & USB_OUT_CSR1_OUT_PKT_RDY)) {
 	if (!(csr & USB_OUT_CSR1_OUT_PKT_RDY)) {
-		DEBUG("%s: Packet NOT ready!\n", __FUNCTION__);
+		DEBUG("%s: Packet NOT ready!\n", __func__);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
@@ -614,7 +614,7 @@ static void done(struct lh7a40x_ep *ep, struct lh7a40x_request *req, int status)
 	unsigned int stopped = ep->stopped;
 	unsigned int stopped = ep->stopped;
 	u32 index;
 	u32 index;
 
 
-	DEBUG("%s, %p\n", __FUNCTION__, ep);
+	DEBUG("%s, %p\n", __func__, ep);
 	list_del_init(&req->queue);
 	list_del_init(&req->queue);
 
 
 	if (likely(req->req.status == -EINPROGRESS))
 	if (likely(req->req.status == -EINPROGRESS))
@@ -644,7 +644,7 @@ static void done(struct lh7a40x_ep *ep, struct lh7a40x_request *req, int status)
 /** Enable EP interrupt */
 /** Enable EP interrupt */
 static void pio_irq_enable(int ep)
 static void pio_irq_enable(int ep)
 {
 {
-	DEBUG("%s: %d\n", __FUNCTION__, ep);
+	DEBUG("%s: %d\n", __func__, ep);
 
 
 	switch (ep) {
 	switch (ep) {
 	case 1:
 	case 1:
@@ -665,7 +665,7 @@ static void pio_irq_enable(int ep)
 /** Disable EP interrupt */
 /** Disable EP interrupt */
 static void pio_irq_disable(int ep)
 static void pio_irq_disable(int ep)
 {
 {
-	DEBUG("%s: %d\n", __FUNCTION__, ep);
+	DEBUG("%s: %d\n", __func__, ep);
 
 
 	switch (ep) {
 	switch (ep) {
 	case 1:
 	case 1:
@@ -690,7 +690,7 @@ void nuke(struct lh7a40x_ep *ep, int status)
 {
 {
 	struct lh7a40x_request *req;
 	struct lh7a40x_request *req;
 
 
-	DEBUG("%s, %p\n", __FUNCTION__, ep);
+	DEBUG("%s, %p\n", __func__, ep);
 
 
 	/* Flush FIFO */
 	/* Flush FIFO */
 	flush(ep);
 	flush(ep);
@@ -734,7 +734,7 @@ static void flush_all(struct lh7a40x_udc *dev)
  */
  */
 static void flush(struct lh7a40x_ep *ep)
 static void flush(struct lh7a40x_ep *ep)
 {
 {
-	DEBUG("%s, %p\n", __FUNCTION__, ep);
+	DEBUG("%s, %p\n", __func__, ep);
 
 
 	switch (ep->ep_type) {
 	switch (ep->ep_type) {
 	case ep_control:
 	case ep_control:
@@ -766,7 +766,7 @@ static void lh7a40x_in_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr)
 	usb_set_index(ep_idx);
 	usb_set_index(ep_idx);
 
 
 	csr = usb_read(ep->csr1);
 	csr = usb_read(ep->csr1);
-	DEBUG("%s: %d, csr %x\n", __FUNCTION__, ep_idx, csr);
+	DEBUG("%s: %d, csr %x\n", __func__, ep_idx, csr);
 
 
 	if (csr & USB_IN_CSR1_SENT_STALL) {
 	if (csr & USB_IN_CSR1_SENT_STALL) {
 		DEBUG("USB_IN_CSR1_SENT_STALL\n");
 		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)
 	}
 	}
 
 
 	if (!ep->desc) {
 	if (!ep->desc) {
-		DEBUG("%s: NO EP DESC\n", __FUNCTION__);
+		DEBUG("%s: NO EP DESC\n", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -802,7 +802,7 @@ static void lh7a40x_out_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr)
 	struct lh7a40x_ep *ep = &dev->ep[ep_idx];
 	struct lh7a40x_ep *ep = &dev->ep[ep_idx];
 	struct lh7a40x_request *req;
 	struct lh7a40x_request *req;
 
 
-	DEBUG("%s: %d\n", __FUNCTION__, ep_idx);
+	DEBUG("%s: %d\n", __func__, ep_idx);
 
 
 	usb_set_index(ep_idx);
 	usb_set_index(ep_idx);
 
 
@@ -814,11 +814,11 @@ static void lh7a40x_out_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr)
 			usb_read(ep->
 			usb_read(ep->
 				 csr1)) & (USB_OUT_CSR1_OUT_PKT_RDY |
 				 csr1)) & (USB_OUT_CSR1_OUT_PKT_RDY |
 					   USB_OUT_CSR1_SENT_STALL)) {
 					   USB_OUT_CSR1_SENT_STALL)) {
-			DEBUG("%s: %x\n", __FUNCTION__, csr);
+			DEBUG("%s: %x\n", __func__, csr);
 
 
 			if (csr & USB_OUT_CSR1_SENT_STALL) {
 			if (csr & USB_OUT_CSR1_SENT_STALL) {
 				DEBUG("%s: stall sent, flush fifo\n",
 				DEBUG("%s: stall sent, flush fifo\n",
-				      __FUNCTION__);
+				      __func__);
 				/* usb_set(USB_OUT_CSR1_FIFO_FLUSH, ep->csr1); */
 				/* usb_set(USB_OUT_CSR1_FIFO_FLUSH, ep->csr1); */
 				flush(ep);
 				flush(ep);
 			} else if (csr & USB_OUT_CSR1_OUT_PKT_RDY) {
 			} 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)
 
 
 				if (!req) {
 				if (!req) {
 					printk("%s: NULL REQ %d\n",
 					printk("%s: NULL REQ %d\n",
-					       __FUNCTION__, ep_idx);
+					       __func__, ep_idx);
 					flush(ep);
 					flush(ep);
 					break;
 					break;
 				} else {
 				} else {
@@ -844,7 +844,7 @@ static void lh7a40x_out_epn(struct lh7a40x_udc *dev, u32 ep_idx, u32 intr)
 
 
 	} else {
 	} else {
 		/* Throw packet away.. */
 		/* Throw packet away.. */
-		printk("%s: No descriptor?!?\n", __FUNCTION__);
+		printk("%s: No descriptor?!?\n", __func__);
 		flush(ep);
 		flush(ep);
 	}
 	}
 }
 }
@@ -886,7 +886,7 @@ static void lh7a40x_reset_intr(struct lh7a40x_udc *dev)
 #if 0				/* def CONFIG_ARCH_LH7A404 */
 #if 0				/* def CONFIG_ARCH_LH7A404 */
 	/* Does not work always... */
 	/* Does not work always... */
 
 
-	DEBUG("%s: %d\n", __FUNCTION__, dev->usb_address);
+	DEBUG("%s: %d\n", __func__, dev->usb_address);
 
 
 	if (!dev->usb_address) {
 	if (!dev->usb_address) {
 		/*usb_set(USB_RESET_IO, USB_RESET);
 		/*usb_set(USB_RESET_IO, USB_RESET);
@@ -936,7 +936,7 @@ static irqreturn_t lh7a40x_udc_irq(int irq, void *_dev)
 		if (!intr_out && !intr_in && !intr_int)
 		if (!intr_out && !intr_in && !intr_int)
 			break;
 			break;
 
 
-		DEBUG("%s (on state %s)\n", __FUNCTION__,
+		DEBUG("%s (on state %s)\n", __func__,
 		      state_names[dev->ep0state]);
 		      state_names[dev->ep0state]);
 		DEBUG("intr_out = %x\n", intr_out);
 		DEBUG("intr_out = %x\n", intr_out);
 		DEBUG("intr_in  = %x\n", intr_in);
 		DEBUG("intr_in  = %x\n", intr_in);
@@ -1016,14 +1016,14 @@ static int lh7a40x_ep_enable(struct usb_ep *_ep,
 	struct lh7a40x_udc *dev;
 	struct lh7a40x_udc *dev;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	DEBUG("%s, %p\n", __FUNCTION__, _ep);
+	DEBUG("%s, %p\n", __func__, _ep);
 
 
 	ep = container_of(_ep, struct lh7a40x_ep, ep);
 	ep = container_of(_ep, struct lh7a40x_ep, ep);
 	if (!_ep || !desc || ep->desc || _ep->name == ep0name
 	if (!_ep || !desc || ep->desc || _ep->name == ep0name
 	    || desc->bDescriptorType != USB_DT_ENDPOINT
 	    || desc->bDescriptorType != USB_DT_ENDPOINT
 	    || ep->bEndpointAddress != desc->bEndpointAddress
 	    || ep->bEndpointAddress != desc->bEndpointAddress
 	    || ep_maxpacket(ep) < le16_to_cpu(desc->wMaxPacketSize)) {
 	    || ep_maxpacket(ep) < le16_to_cpu(desc->wMaxPacketSize)) {
-		DEBUG("%s, bad ep or descriptor\n", __FUNCTION__);
+		DEBUG("%s, bad ep or descriptor\n", __func__);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
@@ -1031,7 +1031,7 @@ static int lh7a40x_ep_enable(struct usb_ep *_ep,
 	if (ep->bmAttributes != desc->bmAttributes
 	if (ep->bmAttributes != desc->bmAttributes
 	    && ep->bmAttributes != USB_ENDPOINT_XFER_BULK
 	    && ep->bmAttributes != USB_ENDPOINT_XFER_BULK
 	    && desc->bmAttributes != USB_ENDPOINT_XFER_INT) {
 	    && desc->bmAttributes != USB_ENDPOINT_XFER_INT) {
-		DEBUG("%s, %s type mismatch\n", __FUNCTION__, _ep->name);
+		DEBUG("%s, %s type mismatch\n", __func__, _ep->name);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
@@ -1039,13 +1039,13 @@ static int lh7a40x_ep_enable(struct usb_ep *_ep,
 	if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK
 	if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK
 	     && le16_to_cpu(desc->wMaxPacketSize) != ep_maxpacket(ep))
 	     && le16_to_cpu(desc->wMaxPacketSize) != ep_maxpacket(ep))
 	    || !desc->wMaxPacketSize) {
 	    || !desc->wMaxPacketSize) {
-		DEBUG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name);
+		DEBUG("%s, bad %s maxpacket\n", __func__, _ep->name);
 		return -ERANGE;
 		return -ERANGE;
 	}
 	}
 
 
 	dev = ep->dev;
 	dev = ep->dev;
 	if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) {
 	if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) {
-		DEBUG("%s, bogus device state\n", __FUNCTION__);
+		DEBUG("%s, bogus device state\n", __func__);
 		return -ESHUTDOWN;
 		return -ESHUTDOWN;
 	}
 	}
 
 
@@ -1061,7 +1061,7 @@ static int lh7a40x_ep_enable(struct usb_ep *_ep,
 	/* Reset halt state (does flush) */
 	/* Reset halt state (does flush) */
 	lh7a40x_set_halt(_ep, 0);
 	lh7a40x_set_halt(_ep, 0);
 
 
-	DEBUG("%s: enabled %s\n", __FUNCTION__, _ep->name);
+	DEBUG("%s: enabled %s\n", __func__, _ep->name);
 	return 0;
 	return 0;
 }
 }
 
 
@@ -1073,11 +1073,11 @@ static int lh7a40x_ep_disable(struct usb_ep *_ep)
 	struct lh7a40x_ep *ep;
 	struct lh7a40x_ep *ep;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	DEBUG("%s, %p\n", __FUNCTION__, _ep);
+	DEBUG("%s, %p\n", __func__, _ep);
 
 
 	ep = container_of(_ep, struct lh7a40x_ep, ep);
 	ep = container_of(_ep, struct lh7a40x_ep, ep);
 	if (!_ep || !ep->desc) {
 	if (!_ep || !ep->desc) {
-		DEBUG("%s, %s not enabled\n", __FUNCTION__,
+		DEBUG("%s, %s not enabled\n", __func__,
 		      _ep ? ep->ep.name : NULL);
 		      _ep ? ep->ep.name : NULL);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
@@ -1097,7 +1097,7 @@ static int lh7a40x_ep_disable(struct usb_ep *_ep)
 
 
 	spin_unlock_irqrestore(&ep->dev->lock, flags);
 	spin_unlock_irqrestore(&ep->dev->lock, flags);
 
 
-	DEBUG("%s: disabled %s\n", __FUNCTION__, _ep->name);
+	DEBUG("%s: disabled %s\n", __func__, _ep->name);
 	return 0;
 	return 0;
 }
 }
 
 
@@ -1106,7 +1106,7 @@ static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep,
 {
 {
 	struct lh7a40x_request *req;
 	struct lh7a40x_request *req;
 
 
-	DEBUG("%s, %p\n", __FUNCTION__, ep);
+	DEBUG("%s, %p\n", __func__, ep);
 
 
 	req = kzalloc(sizeof(*req), gfp_flags);
 	req = kzalloc(sizeof(*req), gfp_flags);
 	if (!req)
 	if (!req)
@@ -1121,7 +1121,7 @@ static void lh7a40x_free_request(struct usb_ep *ep, struct usb_request *_req)
 {
 {
 	struct lh7a40x_request *req;
 	struct lh7a40x_request *req;
 
 
-	DEBUG("%s, %p\n", __FUNCTION__, ep);
+	DEBUG("%s, %p\n", __func__, ep);
 
 
 	req = container_of(_req, struct lh7a40x_request, req);
 	req = container_of(_req, struct lh7a40x_request, req);
 	WARN_ON(!list_empty(&req->queue));
 	WARN_ON(!list_empty(&req->queue));
@@ -1140,25 +1140,25 @@ static int lh7a40x_queue(struct usb_ep *_ep, struct usb_request *_req,
 	struct lh7a40x_udc *dev;
 	struct lh7a40x_udc *dev;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	DEBUG("\n\n\n%s, %p\n", __FUNCTION__, _ep);
+	DEBUG("\n\n\n%s, %p\n", __func__, _ep);
 
 
 	req = container_of(_req, struct lh7a40x_request, req);
 	req = container_of(_req, struct lh7a40x_request, req);
 	if (unlikely
 	if (unlikely
 	    (!_req || !_req->complete || !_req->buf
 	    (!_req || !_req->complete || !_req->buf
 	     || !list_empty(&req->queue))) {
 	     || !list_empty(&req->queue))) {
-		DEBUG("%s, bad params\n", __FUNCTION__);
+		DEBUG("%s, bad params\n", __func__);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
 	ep = container_of(_ep, struct lh7a40x_ep, ep);
 	ep = container_of(_ep, struct lh7a40x_ep, ep);
 	if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) {
 	if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) {
-		DEBUG("%s, bad ep\n", __FUNCTION__);
+		DEBUG("%s, bad ep\n", __func__);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
 	dev = ep->dev;
 	dev = ep->dev;
 	if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)) {
 	if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)) {
-		DEBUG("%s, bogus device state %p\n", __FUNCTION__, dev->driver);
+		DEBUG("%s, bogus device state %p\n", __func__, dev->driver);
 		return -ESHUTDOWN;
 		return -ESHUTDOWN;
 	}
 	}
 
 
@@ -1218,7 +1218,7 @@ static int lh7a40x_dequeue(struct usb_ep *_ep, struct usb_request *_req)
 	struct lh7a40x_request *req;
 	struct lh7a40x_request *req;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	DEBUG("%s, %p\n", __FUNCTION__, _ep);
+	DEBUG("%s, %p\n", __func__, _ep);
 
 
 	ep = container_of(_ep, struct lh7a40x_ep, ep);
 	ep = container_of(_ep, struct lh7a40x_ep, ep);
 	if (!_ep || ep->ep.name == ep0name)
 	if (!_ep || ep->ep.name == ep0name)
@@ -1253,13 +1253,13 @@ static int lh7a40x_set_halt(struct usb_ep *_ep, int value)
 
 
 	ep = container_of(_ep, struct lh7a40x_ep, ep);
 	ep = container_of(_ep, struct lh7a40x_ep, ep);
 	if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) {
 	if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) {
-		DEBUG("%s, bad ep\n", __FUNCTION__);
+		DEBUG("%s, bad ep\n", __func__);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
 	usb_set_index(ep_index(ep));
 	usb_set_index(ep_index(ep));
 
 
-	DEBUG("%s, ep %d, val %d\n", __FUNCTION__, ep_index(ep), value);
+	DEBUG("%s, ep %d, val %d\n", __func__, ep_index(ep), value);
 
 
 	spin_lock_irqsave(&ep->dev->lock, flags);
 	spin_lock_irqsave(&ep->dev->lock, flags);
 
 
@@ -1325,11 +1325,11 @@ static int lh7a40x_fifo_status(struct usb_ep *_ep)
 
 
 	ep = container_of(_ep, struct lh7a40x_ep, ep);
 	ep = container_of(_ep, struct lh7a40x_ep, ep);
 	if (!_ep) {
 	if (!_ep) {
-		DEBUG("%s, bad ep\n", __FUNCTION__);
+		DEBUG("%s, bad ep\n", __func__);
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}
 
 
-	DEBUG("%s, %d\n", __FUNCTION__, ep_index(ep));
+	DEBUG("%s, %d\n", __func__, ep_index(ep));
 
 
 	/* LPD can't report unclaimed bytes from IN fifos */
 	/* LPD can't report unclaimed bytes from IN fifos */
 	if (ep_is_in(ep))
 	if (ep_is_in(ep))
@@ -1355,7 +1355,7 @@ static void lh7a40x_fifo_flush(struct usb_ep *_ep)
 
 
 	ep = container_of(_ep, struct lh7a40x_ep, ep);
 	ep = container_of(_ep, struct lh7a40x_ep, ep);
 	if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) {
 	if (unlikely(!_ep || (!ep->desc && ep->ep.name != ep0name))) {
-		DEBUG("%s, bad ep\n", __FUNCTION__);
+		DEBUG("%s, bad ep\n", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -1376,7 +1376,7 @@ static int write_fifo_ep0(struct lh7a40x_ep *ep, struct lh7a40x_request *req)
 
 
 	max = ep_maxpacket(ep);
 	max = ep_maxpacket(ep);
 
 
-	DEBUG_EP0("%s\n", __FUNCTION__);
+	DEBUG_EP0("%s\n", __func__);
 
 
 	count = write_packet(ep, req, max);
 	count = write_packet(ep, req, max);
 
 
@@ -1390,7 +1390,7 @@ static int write_fifo_ep0(struct lh7a40x_ep *ep, struct lh7a40x_request *req)
 			is_last = 1;
 			is_last = 1;
 	}
 	}
 
 
-	DEBUG_EP0("%s: wrote %s %d bytes%s %d left %p\n", __FUNCTION__,
+	DEBUG_EP0("%s: wrote %s %d bytes%s %d left %p\n", __func__,
 		  ep->ep.name, count,
 		  ep->ep.name, count,
 		  is_last ? "/L" : "", req->req.length - req->req.actual, req);
 		  is_last ? "/L" : "", req->req.length - req->req.actual, req);
 
 
@@ -1434,7 +1434,7 @@ static int read_fifo_ep0(struct lh7a40x_ep *ep, struct lh7a40x_request *req)
 	unsigned bufferspace, count, is_short;
 	unsigned bufferspace, count, is_short;
 	volatile u32 *fifo = (volatile u32 *)ep->fifo;
 	volatile u32 *fifo = (volatile u32 *)ep->fifo;
 
 
-	DEBUG_EP0("%s\n", __FUNCTION__);
+	DEBUG_EP0("%s\n", __func__);
 
 
 	csr = usb_read(USB_EP0_CSR);
 	csr = usb_read(USB_EP0_CSR);
 	if (!(csr & USB_OUT_CSR1_OUT_PKT_RDY))
 	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)
  */
  */
 static void udc_set_address(struct lh7a40x_udc *dev, unsigned char address)
 static void udc_set_address(struct lh7a40x_udc *dev, unsigned char address)
 {
 {
-	DEBUG_EP0("%s: %d\n", __FUNCTION__, address);
+	DEBUG_EP0("%s: %d\n", __func__, address);
 	/* c.f. 15.1.2.2 Table 15-4 address will be used after DATA_END is set */
 	/* c.f. 15.1.2.2 Table 15-4 address will be used after DATA_END is set */
 	dev->usb_address = address;
 	dev->usb_address = address;
 	usb_set((address & USB_FA_FUNCTION_ADDR), USB_FA);
 	usb_set((address & USB_FA_FUNCTION_ADDR), USB_FA);
@@ -1514,7 +1514,7 @@ static void lh7a40x_ep0_out(struct lh7a40x_udc *dev, u32 csr)
 	struct lh7a40x_ep *ep = &dev->ep[0];
 	struct lh7a40x_ep *ep = &dev->ep[0];
 	int ret;
 	int ret;
 
 
-	DEBUG_EP0("%s: %x\n", __FUNCTION__, csr);
+	DEBUG_EP0("%s: %x\n", __func__, csr);
 
 
 	if (list_empty(&ep->queue))
 	if (list_empty(&ep->queue))
 		req = 0;
 		req = 0;
@@ -1533,13 +1533,13 @@ static void lh7a40x_ep0_out(struct lh7a40x_udc *dev, u32 csr)
 		if (ret) {
 		if (ret) {
 			/* Done! */
 			/* Done! */
 			DEBUG_EP0("%s: finished, waiting for status\n",
 			DEBUG_EP0("%s: finished, waiting for status\n",
-				  __FUNCTION__);
+				  __func__);
 
 
 			usb_set((EP0_CLR_OUT | EP0_DATA_END), USB_EP0_CSR);
 			usb_set((EP0_CLR_OUT | EP0_DATA_END), USB_EP0_CSR);
 			dev->ep0state = WAIT_FOR_SETUP;
 			dev->ep0state = WAIT_FOR_SETUP;
 		} else {
 		} else {
 			/* Not done yet.. */
 			/* Not done yet.. */
-			DEBUG_EP0("%s: not finished\n", __FUNCTION__);
+			DEBUG_EP0("%s: not finished\n", __func__);
 			usb_set(EP0_CLR_OUT, USB_EP0_CSR);
 			usb_set(EP0_CLR_OUT, USB_EP0_CSR);
 		}
 		}
 	} else {
 	} else {
@@ -1556,7 +1556,7 @@ static int lh7a40x_ep0_in(struct lh7a40x_udc *dev, u32 csr)
 	struct lh7a40x_ep *ep = &dev->ep[0];
 	struct lh7a40x_ep *ep = &dev->ep[0];
 	int ret, need_zlp = 0;
 	int ret, need_zlp = 0;
 
 
-	DEBUG_EP0("%s: %x\n", __FUNCTION__, csr);
+	DEBUG_EP0("%s: %x\n", __func__, csr);
 
 
 	if (list_empty(&ep->queue))
 	if (list_empty(&ep->queue))
 		req = 0;
 		req = 0;
@@ -1564,7 +1564,7 @@ static int lh7a40x_ep0_in(struct lh7a40x_udc *dev, u32 csr)
 		req = list_entry(ep->queue.next, struct lh7a40x_request, queue);
 		req = list_entry(ep->queue.next, struct lh7a40x_request, queue);
 
 
 	if (!req) {
 	if (!req) {
-		DEBUG_EP0("%s: NULL REQ\n", __FUNCTION__);
+		DEBUG_EP0("%s: NULL REQ\n", __func__);
 		return 0;
 		return 0;
 	}
 	}
 
 
@@ -1585,17 +1585,17 @@ static int lh7a40x_ep0_in(struct lh7a40x_udc *dev, u32 csr)
 
 
 	if (ret == 1 && !need_zlp) {
 	if (ret == 1 && !need_zlp) {
 		/* Last packet */
 		/* Last packet */
-		DEBUG_EP0("%s: finished, waiting for status\n", __FUNCTION__);
+		DEBUG_EP0("%s: finished, waiting for status\n", __func__);
 
 
 		usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR);
 		usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR);
 		dev->ep0state = WAIT_FOR_SETUP;
 		dev->ep0state = WAIT_FOR_SETUP;
 	} else {
 	} else {
-		DEBUG_EP0("%s: not finished\n", __FUNCTION__);
+		DEBUG_EP0("%s: not finished\n", __func__);
 		usb_set(EP0_IN_PKT_RDY, USB_EP0_CSR);
 		usb_set(EP0_IN_PKT_RDY, USB_EP0_CSR);
 	}
 	}
 
 
 	if (need_zlp) {
 	if (need_zlp) {
-		DEBUG_EP0("%s: Need ZLP!\n", __FUNCTION__);
+		DEBUG_EP0("%s: Need ZLP!\n", __func__);
 		usb_set(EP0_IN_PKT_RDY, USB_EP0_CSR);
 		usb_set(EP0_IN_PKT_RDY, USB_EP0_CSR);
 		dev->ep0state = DATA_STATE_NEED_ZLP;
 		dev->ep0state = DATA_STATE_NEED_ZLP;
 	}
 	}
@@ -1694,7 +1694,7 @@ static void lh7a40x_ep0_setup(struct lh7a40x_udc *dev, u32 csr)
 	struct usb_ctrlrequest ctrl;
 	struct usb_ctrlrequest ctrl;
 	int i, bytes, is_in;
 	int i, bytes, is_in;
 
 
-	DEBUG_SETUP("%s: %x\n", __FUNCTION__, csr);
+	DEBUG_SETUP("%s: %x\n", __func__, csr);
 
 
 	/* Nuke all previous transfers */
 	/* Nuke all previous transfers */
 	nuke(ep, -EPROTO);
 	nuke(ep, -EPROTO);
@@ -1799,7 +1799,7 @@ static void lh7a40x_ep0_setup(struct lh7a40x_udc *dev, u32 csr)
  */
  */
 static void lh7a40x_ep0_in_zlp(struct lh7a40x_udc *dev, u32 csr)
 static void lh7a40x_ep0_in_zlp(struct lh7a40x_udc *dev, u32 csr)
 {
 {
-	DEBUG_EP0("%s: %x\n", __FUNCTION__, csr);
+	DEBUG_EP0("%s: %x\n", __func__, csr);
 
 
 	/* c.f. Table 15-14 */
 	/* c.f. Table 15-14 */
 	usb_set((EP0_IN_PKT_RDY | EP0_DATA_END), USB_EP0_CSR);
 	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)
 	usb_set_index(0);
 	usb_set_index(0);
  	csr = usb_read(USB_EP0_CSR);
  	csr = usb_read(USB_EP0_CSR);
 
 
-	DEBUG_EP0("%s: csr = %x\n", __FUNCTION__, csr);
+	DEBUG_EP0("%s: csr = %x\n", __func__, csr);
 
 
 	/*
 	/*
 	 * For overview of what we should be doing see c.f. Chapter 18.1.2.4
 	 * 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)
 	 *      - clear the SENT_STALL bit
 	 *      - clear the SENT_STALL bit
 	 */
 	 */
 	if (csr & EP0_SENT_STALL) {
 	if (csr & EP0_SENT_STALL) {
-		DEBUG_EP0("%s: EP0_SENT_STALL is set: %x\n", __FUNCTION__, csr);
+		DEBUG_EP0("%s: EP0_SENT_STALL is set: %x\n", __func__, csr);
 		usb_clear((EP0_SENT_STALL | EP0_SEND_STALL), USB_EP0_CSR);
 		usb_clear((EP0_SENT_STALL | EP0_SEND_STALL), USB_EP0_CSR);
 		nuke(ep, -ECONNABORTED);
 		nuke(ep, -ECONNABORTED);
 		dev->ep0state = WAIT_FOR_SETUP;
 		dev->ep0state = WAIT_FOR_SETUP;
@@ -1849,7 +1849,7 @@ static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr)
 	 */
 	 */
 	if (!(csr & (EP0_IN_PKT_RDY | EP0_OUT_PKT_RDY))) {
 	if (!(csr & (EP0_IN_PKT_RDY | EP0_OUT_PKT_RDY))) {
 		DEBUG_EP0("%s: IN_PKT_RDY and OUT_PKT_RDY are clear\n",
 		DEBUG_EP0("%s: IN_PKT_RDY and OUT_PKT_RDY are clear\n",
-			  __FUNCTION__);
+			  __func__);
 
 
 		switch (dev->ep0state) {
 		switch (dev->ep0state) {
 		case DATA_STATE_XMIT:
 		case DATA_STATE_XMIT:
@@ -1877,7 +1877,7 @@ static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr)
 	 *      - set SERVICED_SETUP_END_BIT
 	 *      - set SERVICED_SETUP_END_BIT
 	 */
 	 */
 	if (csr & EP0_SETUP_END) {
 	if (csr & EP0_SETUP_END) {
-		DEBUG_EP0("%s: EP0_SETUP_END is set: %x\n", __FUNCTION__, csr);
+		DEBUG_EP0("%s: EP0_SETUP_END is set: %x\n", __func__, csr);
 
 
 		usb_set(EP0_CLR_SETUP_END, USB_EP0_CSR);
 		usb_set(EP0_CLR_SETUP_END, USB_EP0_CSR);
 
 
@@ -1896,7 +1896,7 @@ static void lh7a40x_handle_ep0(struct lh7a40x_udc *dev, u32 intr)
 	 */
 	 */
 	if (csr & EP0_OUT_PKT_RDY) {
 	if (csr & EP0_OUT_PKT_RDY) {
 
 
-		DEBUG_EP0("%s: EP0_OUT_PKT_RDY is set: %x\n", __FUNCTION__,
+		DEBUG_EP0("%s: EP0_OUT_PKT_RDY is set: %x\n", __func__,
 			  csr);
 			  csr);
 
 
 		switch (dev->ep0state) {
 		switch (dev->ep0state) {
@@ -1926,7 +1926,7 @@ static void lh7a40x_ep0_kick(struct lh7a40x_udc *dev, struct lh7a40x_ep *ep)
 	usb_set_index(0);
 	usb_set_index(0);
 	csr = usb_read(USB_EP0_CSR);
 	csr = usb_read(USB_EP0_CSR);
 
 
-	DEBUG_EP0("%s: %x\n", __FUNCTION__, csr);
+	DEBUG_EP0("%s: %x\n", __func__, csr);
 
 
 	/* Clear "out packet ready" */
 	/* Clear "out packet ready" */
 	usb_set(EP0_CLR_OUT, USB_EP0_CSR);
 	usb_set(EP0_CLR_OUT, USB_EP0_CSR);
@@ -1949,7 +1949,7 @@ static int lh7a40x_udc_get_frame(struct usb_gadget *_gadget)
 {
 {
 	u32 frame1 = usb_read(USB_FRM_NUM1);	/* Least significant 8 bits */
 	u32 frame1 = usb_read(USB_FRM_NUM1);	/* Least significant 8 bits */
 	u32 frame2 = usb_read(USB_FRM_NUM2);	/* Most significant 3 bits */
 	u32 frame2 = usb_read(USB_FRM_NUM2);	/* Most significant 3 bits */
-	DEBUG("%s, %p\n", __FUNCTION__, _gadget);
+	DEBUG("%s, %p\n", __func__, _gadget);
 	return ((frame2 & 0x07) << 8) | (frame1 & 0xff);
 	return ((frame2 & 0x07) << 8) | (frame1 & 0xff);
 }
 }
 
 
@@ -1970,7 +1970,7 @@ static const struct usb_gadget_ops lh7a40x_udc_ops = {
 
 
 static void nop_release(struct device *dev)
 static void nop_release(struct device *dev)
 {
 {
-	DEBUG("%s %s\n", __FUNCTION__, dev->bus_id);
+	DEBUG("%s %s\n", __func__, dev->bus_id);
 }
 }
 
 
 static struct lh7a40x_udc memory = {
 static struct lh7a40x_udc memory = {
@@ -2065,7 +2065,7 @@ static int lh7a40x_udc_probe(struct platform_device *pdev)
 	struct lh7a40x_udc *dev = &memory;
 	struct lh7a40x_udc *dev = &memory;
 	int retval;
 	int retval;
 
 
-	DEBUG("%s: %p\n", __FUNCTION__, pdev);
+	DEBUG("%s: %p\n", __func__, pdev);
 
 
 	spin_lock_init(&dev->lock);
 	spin_lock_init(&dev->lock);
 	dev->dev = &pdev->dev;
 	dev->dev = &pdev->dev;
@@ -2098,7 +2098,7 @@ static int lh7a40x_udc_remove(struct platform_device *pdev)
 {
 {
 	struct lh7a40x_udc *dev = platform_get_drvdata(pdev);
 	struct lh7a40x_udc *dev = platform_get_drvdata(pdev);
 
 
-	DEBUG("%s: %p\n", __FUNCTION__, pdev);
+	DEBUG("%s: %p\n", __func__, pdev);
 
 
 	if (dev->driver)
 	if (dev->driver)
 		return -EBUSY;
 		return -EBUSY;
@@ -2131,7 +2131,7 @@ static struct platform_driver udc_driver = {
 
 
 static int __init udc_init(void)
 static int __init udc_init(void)
 {
 {
-	DEBUG("%s: %s version %s\n", __FUNCTION__, driver_name, DRIVER_VERSION);
+	DEBUG("%s: %s version %s\n", __func__, driver_name, DRIVER_VERSION);
 	return platform_driver_register(&udc_driver);
 	return platform_driver_register(&udc_driver);
 }
 }
 
 

+ 1 - 1
drivers/usb/gadget/net2280.h

@@ -299,7 +299,7 @@ static inline void assert_out_naking (struct net2280_ep *ep, const char *where)
 			&ep->regs->ep_rsp);
 			&ep->regs->ep_rsp);
 	}
 	}
 }
 }
-#define ASSERT_OUT_NAKING(ep) assert_out_naking(ep,__FUNCTION__)
+#define ASSERT_OUT_NAKING(ep) assert_out_naking(ep,__func__)
 #else
 #else
 #define ASSERT_OUT_NAKING(ep) do {} while (0)
 #define ASSERT_OUT_NAKING(ep) do {} while (0)
 #endif
 #endif

+ 8 - 8
drivers/usb/gadget/omap_udc.c

@@ -163,7 +163,7 @@ static int omap_ep_enable(struct usb_ep *_ep,
 			|| ep->bEndpointAddress != desc->bEndpointAddress
 			|| ep->bEndpointAddress != desc->bEndpointAddress
 			|| ep->maxpacket < le16_to_cpu
 			|| ep->maxpacket < le16_to_cpu
 						(desc->wMaxPacketSize)) {
 						(desc->wMaxPacketSize)) {
-		DBG("%s, bad ep or descriptor\n", __FUNCTION__);
+		DBG("%s, bad ep or descriptor\n", __func__);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 	maxp = le16_to_cpu (desc->wMaxPacketSize);
 	maxp = le16_to_cpu (desc->wMaxPacketSize);
@@ -171,7 +171,7 @@ static int omap_ep_enable(struct usb_ep *_ep,
 				&& maxp != ep->maxpacket)
 				&& maxp != ep->maxpacket)
 			|| le16_to_cpu(desc->wMaxPacketSize) > ep->maxpacket
 			|| le16_to_cpu(desc->wMaxPacketSize) > ep->maxpacket
 			|| !desc->wMaxPacketSize) {
 			|| !desc->wMaxPacketSize) {
-		DBG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name);
+		DBG("%s, bad %s maxpacket\n", __func__, _ep->name);
 		return -ERANGE;
 		return -ERANGE;
 	}
 	}
 
 
@@ -194,13 +194,13 @@ static int omap_ep_enable(struct usb_ep *_ep,
 	if (ep->bmAttributes != desc->bmAttributes
 	if (ep->bmAttributes != desc->bmAttributes
 			&& ep->bmAttributes != USB_ENDPOINT_XFER_BULK
 			&& ep->bmAttributes != USB_ENDPOINT_XFER_BULK
 			&& desc->bmAttributes != USB_ENDPOINT_XFER_INT) {
 			&& desc->bmAttributes != USB_ENDPOINT_XFER_INT) {
-		DBG("%s, %s type mismatch\n", __FUNCTION__, _ep->name);
+		DBG("%s, %s type mismatch\n", __func__, _ep->name);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
 	udc = ep->udc;
 	udc = ep->udc;
 	if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) {
 	if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) {
-		DBG("%s, bogus device state\n", __FUNCTION__);
+		DBG("%s, bogus device state\n", __func__);
 		return -ESHUTDOWN;
 		return -ESHUTDOWN;
 	}
 	}
 
 
@@ -249,7 +249,7 @@ static int omap_ep_disable(struct usb_ep *_ep)
 	unsigned long	flags;
 	unsigned long	flags;
 
 
 	if (!_ep || !ep->desc) {
 	if (!_ep || !ep->desc) {
-		DBG("%s, %s not enabled\n", __FUNCTION__,
+		DBG("%s, %s not enabled\n", __func__,
 			_ep ? ep->ep.name : NULL);
 			_ep ? ep->ep.name : NULL);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
@@ -936,11 +936,11 @@ omap_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
 	/* catch various bogus parameters */
 	/* catch various bogus parameters */
 	if (!_req || !req->req.complete || !req->req.buf
 	if (!_req || !req->req.complete || !req->req.buf
 			|| !list_empty(&req->queue)) {
 			|| !list_empty(&req->queue)) {
-		DBG("%s, bad params\n", __FUNCTION__);
+		DBG("%s, bad params\n", __func__);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 	if (!_ep || (!ep->desc && ep->bEndpointAddress)) {
 	if (!_ep || (!ep->desc && ep->bEndpointAddress)) {
-		DBG("%s, bad ep\n", __FUNCTION__);
+		DBG("%s, bad ep\n", __func__);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 	if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) {
 	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)
 			&& (ep->bEndpointAddress & USB_DIR_IN) == 0
 			&& (ep->bEndpointAddress & USB_DIR_IN) == 0
 			&& !cpu_class_is_omap2()
 			&& !cpu_class_is_omap2()
 			&& (req->req.length % ep->ep.maxpacket) != 0) {
 			&& (req->req.length % ep->ep.maxpacket) != 0) {
-		DBG("%s, no partial packet OUT reads\n", __FUNCTION__);
+		DBG("%s, no partial packet OUT reads\n", __func__);
 		return -EMSGSIZE;
 		return -EMSGSIZE;
 	}
 	}
 
 

+ 3 - 3
drivers/usb/gadget/printer.c

@@ -915,7 +915,7 @@ static void printer_reset_interface(struct printer_dev *dev)
 	if (dev->interface < 0)
 	if (dev->interface < 0)
 		return;
 		return;
 
 
-	DBG(dev, "%s\n", __FUNCTION__);
+	DBG(dev, "%s\n", __func__);
 
 
 	if (dev->in)
 	if (dev->in)
 		usb_ep_disable(dev->in_ep);
 		usb_ep_disable(dev->in_ep);
@@ -1284,7 +1284,7 @@ printer_disconnect(struct usb_gadget *gadget)
 	struct printer_dev	*dev = get_gadget_data(gadget);
 	struct printer_dev	*dev = get_gadget_data(gadget);
 	unsigned long		flags;
 	unsigned long		flags;
 
 
-	DBG(dev, "%s\n", __FUNCTION__);
+	DBG(dev, "%s\n", __func__);
 
 
 	spin_lock_irqsave(&dev->lock, flags);
 	spin_lock_irqsave(&dev->lock, flags);
 
 
@@ -1300,7 +1300,7 @@ printer_unbind(struct usb_gadget *gadget)
 	struct usb_request	*req;
 	struct usb_request	*req;
 
 
 
 
-	DBG(dev, "%s\n", __FUNCTION__);
+	DBG(dev, "%s\n", __func__);
 
 
 	/* Remove sysfs files */
 	/* Remove sysfs files */
 	device_destroy(usb_gadget_class, g_printer_devno);
 	device_destroy(usb_gadget_class, g_printer_devno);

+ 13 - 13
drivers/usb/gadget/pxa2xx_udc.c

@@ -235,7 +235,7 @@ static int pxa2xx_ep_enable (struct usb_ep *_ep,
 			|| ep->bEndpointAddress != desc->bEndpointAddress
 			|| ep->bEndpointAddress != desc->bEndpointAddress
 			|| ep->fifo_size < le16_to_cpu
 			|| ep->fifo_size < le16_to_cpu
 						(desc->wMaxPacketSize)) {
 						(desc->wMaxPacketSize)) {
-		DMSG("%s, bad ep or descriptor\n", __FUNCTION__);
+		DMSG("%s, bad ep or descriptor\n", __func__);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
@@ -243,7 +243,7 @@ static int pxa2xx_ep_enable (struct usb_ep *_ep,
 	if (ep->bmAttributes != desc->bmAttributes
 	if (ep->bmAttributes != desc->bmAttributes
 			&& ep->bmAttributes != USB_ENDPOINT_XFER_BULK
 			&& ep->bmAttributes != USB_ENDPOINT_XFER_BULK
 			&& desc->bmAttributes != USB_ENDPOINT_XFER_INT) {
 			&& desc->bmAttributes != USB_ENDPOINT_XFER_INT) {
-		DMSG("%s, %s type mismatch\n", __FUNCTION__, _ep->name);
+		DMSG("%s, %s type mismatch\n", __func__, _ep->name);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
@@ -252,13 +252,13 @@ static int pxa2xx_ep_enable (struct usb_ep *_ep,
 				&& le16_to_cpu (desc->wMaxPacketSize)
 				&& le16_to_cpu (desc->wMaxPacketSize)
 						!= BULK_FIFO_SIZE)
 						!= BULK_FIFO_SIZE)
 			|| !desc->wMaxPacketSize) {
 			|| !desc->wMaxPacketSize) {
-		DMSG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name);
+		DMSG("%s, bad %s maxpacket\n", __func__, _ep->name);
 		return -ERANGE;
 		return -ERANGE;
 	}
 	}
 
 
 	dev = ep->dev;
 	dev = ep->dev;
 	if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) {
 	if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) {
-		DMSG("%s, bogus device state\n", __FUNCTION__);
+		DMSG("%s, bogus device state\n", __func__);
 		return -ESHUTDOWN;
 		return -ESHUTDOWN;
 	}
 	}
 
 
@@ -283,7 +283,7 @@ static int pxa2xx_ep_disable (struct usb_ep *_ep)
 
 
 	ep = container_of (_ep, struct pxa2xx_ep, ep);
 	ep = container_of (_ep, struct pxa2xx_ep, ep);
 	if (!_ep || !ep->desc) {
 	if (!_ep || !ep->desc) {
-		DMSG("%s, %s not enabled\n", __FUNCTION__,
+		DMSG("%s, %s not enabled\n", __func__,
 			_ep ? ep->ep.name : NULL);
 			_ep ? ep->ep.name : NULL);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
@@ -461,7 +461,7 @@ void ep0start(struct pxa2xx_udc *dev, u32 flags, const char *tag)
 	USIR0 = USIR0_IR0;
 	USIR0 = USIR0_IR0;
 	dev->req_pending = 0;
 	dev->req_pending = 0;
 	DBG(DBG_VERY_NOISY, "%s %s, %02x/%02x\n",
 	DBG(DBG_VERY_NOISY, "%s %s, %02x/%02x\n",
-		__FUNCTION__, tag, UDCCS0, flags);
+		__func__, tag, UDCCS0, flags);
 }
 }
 
 
 static int
 static int
@@ -651,20 +651,20 @@ pxa2xx_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
 	req = container_of(_req, struct pxa2xx_request, req);
 	req = container_of(_req, struct pxa2xx_request, req);
 	if (unlikely (!_req || !_req->complete || !_req->buf
 	if (unlikely (!_req || !_req->complete || !_req->buf
 			|| !list_empty(&req->queue))) {
 			|| !list_empty(&req->queue))) {
-		DMSG("%s, bad params\n", __FUNCTION__);
+		DMSG("%s, bad params\n", __func__);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
 	ep = container_of(_ep, struct pxa2xx_ep, ep);
 	ep = container_of(_ep, struct pxa2xx_ep, ep);
 	if (unlikely (!_ep || (!ep->desc && ep->ep.name != ep0name))) {
 	if (unlikely (!_ep || (!ep->desc && ep->ep.name != ep0name))) {
-		DMSG("%s, bad ep\n", __FUNCTION__);
+		DMSG("%s, bad ep\n", __func__);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 
 	dev = ep->dev;
 	dev = ep->dev;
 	if (unlikely (!dev->driver
 	if (unlikely (!dev->driver
 			|| dev->gadget.speed == USB_SPEED_UNKNOWN)) {
 			|| dev->gadget.speed == USB_SPEED_UNKNOWN)) {
-		DMSG("%s, bogus device state\n", __FUNCTION__);
+		DMSG("%s, bogus device state\n", __func__);
 		return -ESHUTDOWN;
 		return -ESHUTDOWN;
 	}
 	}
 
 
@@ -807,7 +807,7 @@ static int pxa2xx_ep_set_halt(struct usb_ep *_ep, int value)
 	if (unlikely (!_ep
 	if (unlikely (!_ep
 			|| (!ep->desc && ep->ep.name != ep0name))
 			|| (!ep->desc && ep->ep.name != ep0name))
 			|| ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) {
 			|| ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) {
-		DMSG("%s, bad ep\n", __FUNCTION__);
+		DMSG("%s, bad ep\n", __func__);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 	if (value == 0) {
 	if (value == 0) {
@@ -859,7 +859,7 @@ static int pxa2xx_ep_fifo_status(struct usb_ep *_ep)
 
 
 	ep = container_of(_ep, struct pxa2xx_ep, ep);
 	ep = container_of(_ep, struct pxa2xx_ep, ep);
 	if (!_ep) {
 	if (!_ep) {
-		DMSG("%s, bad ep\n", __FUNCTION__);
+		DMSG("%s, bad ep\n", __func__);
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}
 	/* pxa can't report unclaimed bytes from IN fifos */
 	/* pxa can't report unclaimed bytes from IN fifos */
@@ -878,7 +878,7 @@ static void pxa2xx_ep_fifo_flush(struct usb_ep *_ep)
 
 
 	ep = container_of(_ep, struct pxa2xx_ep, ep);
 	ep = container_of(_ep, struct pxa2xx_ep, ep);
 	if (!_ep || ep->ep.name == ep0name || !list_empty(&ep->queue)) {
 	if (!_ep || ep->ep.name == ep0name || !list_empty(&ep->queue)) {
-		DMSG("%s, bad ep\n", __FUNCTION__);
+		DMSG("%s, bad ep\n", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -1813,7 +1813,7 @@ pxa2xx_udc_irq(int irq, void *_dev)
 
 
 static void nop_release (struct device *dev)
 static void nop_release (struct device *dev)
 {
 {
-	DMSG("%s %s\n", __FUNCTION__, dev->bus_id);
+	DMSG("%s %s\n", __func__, dev->bus_id);
 }
 }
 
 
 /* this uses load-time allocation and initialization (instead of
 /* this uses load-time allocation and initialization (instead of

+ 73 - 73
drivers/usb/gadget/rndis.c

@@ -204,7 +204,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_SUPPORTED_LIST:
 	case OID_GEN_SUPPORTED_LIST:
-		DBG("%s: OID_GEN_SUPPORTED_LIST\n", __FUNCTION__);
+		DBG("%s: OID_GEN_SUPPORTED_LIST\n", __func__);
 		length = sizeof (oid_supported_list);
 		length = sizeof (oid_supported_list);
 		count  = length / sizeof (u32);
 		count  = length / sizeof (u32);
 		for (i = 0; i < count; i++)
 		for (i = 0; i < count; i++)
@@ -214,7 +214,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_HARDWARE_STATUS:
 	case OID_GEN_HARDWARE_STATUS:
-		DBG("%s: OID_GEN_HARDWARE_STATUS\n", __FUNCTION__);
+		DBG("%s: OID_GEN_HARDWARE_STATUS\n", __func__);
 		/* Bogus question!
 		/* Bogus question!
 		 * Hardware must be ready to receive high level protocols.
 		 * Hardware must be ready to receive high level protocols.
 		 * BTW:
 		 * BTW:
@@ -227,14 +227,14 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_MEDIA_SUPPORTED:
 	case OID_GEN_MEDIA_SUPPORTED:
-		DBG("%s: OID_GEN_MEDIA_SUPPORTED\n", __FUNCTION__);
+		DBG("%s: OID_GEN_MEDIA_SUPPORTED\n", __func__);
 		*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium);
 		*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium);
 		retval = 0;
 		retval = 0;
 		break;
 		break;
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_MEDIA_IN_USE:
 	case OID_GEN_MEDIA_IN_USE:
-		DBG("%s: OID_GEN_MEDIA_IN_USE\n", __FUNCTION__);
+		DBG("%s: OID_GEN_MEDIA_IN_USE\n", __func__);
 		/* one medium, one transport... (maybe you do it better) */
 		/* one medium, one transport... (maybe you do it better) */
 		*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium);
 		*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium);
 		retval = 0;
 		retval = 0;
@@ -242,7 +242,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_MAXIMUM_FRAME_SIZE:
 	case OID_GEN_MAXIMUM_FRAME_SIZE:
-		DBG("%s: OID_GEN_MAXIMUM_FRAME_SIZE\n", __FUNCTION__);
+		DBG("%s: OID_GEN_MAXIMUM_FRAME_SIZE\n", __func__);
 		if (rndis_per_dev_params [configNr].dev) {
 		if (rndis_per_dev_params [configNr].dev) {
 			*outbuf = cpu_to_le32 (
 			*outbuf = cpu_to_le32 (
 				rndis_per_dev_params [configNr].dev->mtu);
 				rndis_per_dev_params [configNr].dev->mtu);
@@ -253,7 +253,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_LINK_SPEED:
 	case OID_GEN_LINK_SPEED:
 		if (rndis_debug > 1)
 		if (rndis_debug > 1)
-			DBG("%s: OID_GEN_LINK_SPEED\n", __FUNCTION__);
+			DBG("%s: OID_GEN_LINK_SPEED\n", __func__);
 		if (rndis_per_dev_params [configNr].media_state
 		if (rndis_per_dev_params [configNr].media_state
 				== NDIS_MEDIA_STATE_DISCONNECTED)
 				== NDIS_MEDIA_STATE_DISCONNECTED)
 			*outbuf = __constant_cpu_to_le32 (0);
 			*outbuf = __constant_cpu_to_le32 (0);
@@ -265,7 +265,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_TRANSMIT_BLOCK_SIZE:
 	case OID_GEN_TRANSMIT_BLOCK_SIZE:
-		DBG("%s: OID_GEN_TRANSMIT_BLOCK_SIZE\n", __FUNCTION__);
+		DBG("%s: OID_GEN_TRANSMIT_BLOCK_SIZE\n", __func__);
 		if (rndis_per_dev_params [configNr].dev) {
 		if (rndis_per_dev_params [configNr].dev) {
 			*outbuf = cpu_to_le32 (
 			*outbuf = cpu_to_le32 (
 				rndis_per_dev_params [configNr].dev->mtu);
 				rndis_per_dev_params [configNr].dev->mtu);
@@ -275,7 +275,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_RECEIVE_BLOCK_SIZE:
 	case OID_GEN_RECEIVE_BLOCK_SIZE:
-		DBG("%s: OID_GEN_RECEIVE_BLOCK_SIZE\n", __FUNCTION__);
+		DBG("%s: OID_GEN_RECEIVE_BLOCK_SIZE\n", __func__);
 		if (rndis_per_dev_params [configNr].dev) {
 		if (rndis_per_dev_params [configNr].dev) {
 			*outbuf = cpu_to_le32 (
 			*outbuf = cpu_to_le32 (
 				rndis_per_dev_params [configNr].dev->mtu);
 				rndis_per_dev_params [configNr].dev->mtu);
@@ -285,7 +285,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_VENDOR_ID:
 	case OID_GEN_VENDOR_ID:
-		DBG("%s: OID_GEN_VENDOR_ID\n", __FUNCTION__);
+		DBG("%s: OID_GEN_VENDOR_ID\n", __func__);
 		*outbuf = cpu_to_le32 (
 		*outbuf = cpu_to_le32 (
 			rndis_per_dev_params [configNr].vendorID);
 			rndis_per_dev_params [configNr].vendorID);
 		retval = 0;
 		retval = 0;
@@ -293,7 +293,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_VENDOR_DESCRIPTION:
 	case OID_GEN_VENDOR_DESCRIPTION:
-		DBG("%s: OID_GEN_VENDOR_DESCRIPTION\n", __FUNCTION__);
+		DBG("%s: OID_GEN_VENDOR_DESCRIPTION\n", __func__);
 		length = strlen (rndis_per_dev_params [configNr].vendorDescr);
 		length = strlen (rndis_per_dev_params [configNr].vendorDescr);
 		memcpy (outbuf,
 		memcpy (outbuf,
 			rndis_per_dev_params [configNr].vendorDescr, length);
 			rndis_per_dev_params [configNr].vendorDescr, length);
@@ -301,7 +301,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 		break;
 		break;
 
 
 	case OID_GEN_VENDOR_DRIVER_VERSION:
 	case OID_GEN_VENDOR_DRIVER_VERSION:
-		DBG("%s: OID_GEN_VENDOR_DRIVER_VERSION\n", __FUNCTION__);
+		DBG("%s: OID_GEN_VENDOR_DRIVER_VERSION\n", __func__);
 		/* Created as LE */
 		/* Created as LE */
 		*outbuf = rndis_driver_version;
 		*outbuf = rndis_driver_version;
 		retval = 0;
 		retval = 0;
@@ -309,14 +309,14 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_CURRENT_PACKET_FILTER:
 	case OID_GEN_CURRENT_PACKET_FILTER:
-		DBG("%s: OID_GEN_CURRENT_PACKET_FILTER\n", __FUNCTION__);
+		DBG("%s: OID_GEN_CURRENT_PACKET_FILTER\n", __func__);
 		*outbuf = cpu_to_le32 (*rndis_per_dev_params[configNr].filter);
 		*outbuf = cpu_to_le32 (*rndis_per_dev_params[configNr].filter);
 		retval = 0;
 		retval = 0;
 		break;
 		break;
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_MAXIMUM_TOTAL_SIZE:
 	case OID_GEN_MAXIMUM_TOTAL_SIZE:
-		DBG("%s: OID_GEN_MAXIMUM_TOTAL_SIZE\n", __FUNCTION__);
+		DBG("%s: OID_GEN_MAXIMUM_TOTAL_SIZE\n", __func__);
 		*outbuf = __constant_cpu_to_le32(RNDIS_MAX_TOTAL_SIZE);
 		*outbuf = __constant_cpu_to_le32(RNDIS_MAX_TOTAL_SIZE);
 		retval = 0;
 		retval = 0;
 		break;
 		break;
@@ -324,14 +324,14 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_MEDIA_CONNECT_STATUS:
 	case OID_GEN_MEDIA_CONNECT_STATUS:
 		if (rndis_debug > 1)
 		if (rndis_debug > 1)
-			DBG("%s: OID_GEN_MEDIA_CONNECT_STATUS\n", __FUNCTION__);
+			DBG("%s: OID_GEN_MEDIA_CONNECT_STATUS\n", __func__);
 		*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 		*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 						.media_state);
 						.media_state);
 		retval = 0;
 		retval = 0;
 		break;
 		break;
 
 
 	case OID_GEN_PHYSICAL_MEDIUM:
 	case OID_GEN_PHYSICAL_MEDIUM:
-		DBG("%s: OID_GEN_PHYSICAL_MEDIUM\n", __FUNCTION__);
+		DBG("%s: OID_GEN_PHYSICAL_MEDIUM\n", __func__);
 		*outbuf = __constant_cpu_to_le32 (0);
 		*outbuf = __constant_cpu_to_le32 (0);
 		retval = 0;
 		retval = 0;
 		break;
 		break;
@@ -341,7 +341,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 	 * versions emit undefined RNDIS messages. DOCUMENT ALL THESE!
 	 * versions emit undefined RNDIS messages. DOCUMENT ALL THESE!
 	 */
 	 */
 	case OID_GEN_MAC_OPTIONS:		/* from WinME */
 	case OID_GEN_MAC_OPTIONS:		/* from WinME */
-		DBG("%s: OID_GEN_MAC_OPTIONS\n", __FUNCTION__);
+		DBG("%s: OID_GEN_MAC_OPTIONS\n", __func__);
 		*outbuf = __constant_cpu_to_le32(
 		*outbuf = __constant_cpu_to_le32(
 			  NDIS_MAC_OPTION_RECEIVE_SERIALIZED
 			  NDIS_MAC_OPTION_RECEIVE_SERIALIZED
 			| NDIS_MAC_OPTION_FULL_DUPLEX);
 			| NDIS_MAC_OPTION_FULL_DUPLEX);
@@ -353,7 +353,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_XMIT_OK:
 	case OID_GEN_XMIT_OK:
 		if (rndis_debug > 1)
 		if (rndis_debug > 1)
-			DBG("%s: OID_GEN_XMIT_OK\n", __FUNCTION__);
+			DBG("%s: OID_GEN_XMIT_OK\n", __func__);
 		if (rndis_per_dev_params [configNr].stats) {
 		if (rndis_per_dev_params [configNr].stats) {
 			*outbuf = cpu_to_le32 (
 			*outbuf = cpu_to_le32 (
 			    rndis_per_dev_params [configNr].stats->tx_packets -
 			    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,
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_RCV_OK:
 	case OID_GEN_RCV_OK:
 		if (rndis_debug > 1)
 		if (rndis_debug > 1)
-			DBG("%s: OID_GEN_RCV_OK\n", __FUNCTION__);
+			DBG("%s: OID_GEN_RCV_OK\n", __func__);
 		if (rndis_per_dev_params [configNr].stats) {
 		if (rndis_per_dev_params [configNr].stats) {
 			*outbuf = cpu_to_le32 (
 			*outbuf = cpu_to_le32 (
 			    rndis_per_dev_params [configNr].stats->rx_packets -
 			    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,
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_XMIT_ERROR:
 	case OID_GEN_XMIT_ERROR:
 		if (rndis_debug > 1)
 		if (rndis_debug > 1)
-			DBG("%s: OID_GEN_XMIT_ERROR\n", __FUNCTION__);
+			DBG("%s: OID_GEN_XMIT_ERROR\n", __func__);
 		if (rndis_per_dev_params [configNr].stats) {
 		if (rndis_per_dev_params [configNr].stats) {
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 					.stats->tx_errors);
 					.stats->tx_errors);
@@ -390,7 +390,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_RCV_ERROR:
 	case OID_GEN_RCV_ERROR:
 		if (rndis_debug > 1)
 		if (rndis_debug > 1)
-			DBG("%s: OID_GEN_RCV_ERROR\n", __FUNCTION__);
+			DBG("%s: OID_GEN_RCV_ERROR\n", __func__);
 		if (rndis_per_dev_params [configNr].stats) {
 		if (rndis_per_dev_params [configNr].stats) {
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 					.stats->rx_errors);
 					.stats->rx_errors);
@@ -400,7 +400,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_GEN_RCV_NO_BUFFER:
 	case OID_GEN_RCV_NO_BUFFER:
-		DBG("%s: OID_GEN_RCV_NO_BUFFER\n", __FUNCTION__);
+		DBG("%s: OID_GEN_RCV_NO_BUFFER\n", __func__);
 		if (rndis_per_dev_params [configNr].stats) {
 		if (rndis_per_dev_params [configNr].stats) {
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 					.stats->rx_dropped);
 					.stats->rx_dropped);
@@ -410,7 +410,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 
 
 #ifdef	RNDIS_OPTIONAL_STATS
 #ifdef	RNDIS_OPTIONAL_STATS
 	case OID_GEN_DIRECTED_BYTES_XMIT:
 	case OID_GEN_DIRECTED_BYTES_XMIT:
-		DBG("%s: OID_GEN_DIRECTED_BYTES_XMIT\n", __FUNCTION__);
+		DBG("%s: OID_GEN_DIRECTED_BYTES_XMIT\n", __func__);
 		/*
 		/*
 		 * Aunt Tilly's size of shoes
 		 * Aunt Tilly's size of shoes
 		 * minus antarctica count of penguins
 		 * minus antarctica count of penguins
@@ -430,7 +430,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 		break;
 		break;
 
 
 	case OID_GEN_DIRECTED_FRAMES_XMIT:
 	case OID_GEN_DIRECTED_FRAMES_XMIT:
-		DBG("%s: OID_GEN_DIRECTED_FRAMES_XMIT\n", __FUNCTION__);
+		DBG("%s: OID_GEN_DIRECTED_FRAMES_XMIT\n", __func__);
 		/* dito */
 		/* dito */
 		if (rndis_per_dev_params [configNr].stats) {
 		if (rndis_per_dev_params [configNr].stats) {
 			*outbuf = cpu_to_le32 (
 			*outbuf = cpu_to_le32 (
@@ -446,7 +446,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 		break;
 		break;
 
 
 	case OID_GEN_MULTICAST_BYTES_XMIT:
 	case OID_GEN_MULTICAST_BYTES_XMIT:
-		DBG("%s: OID_GEN_MULTICAST_BYTES_XMIT\n", __FUNCTION__);
+		DBG("%s: OID_GEN_MULTICAST_BYTES_XMIT\n", __func__);
 		if (rndis_per_dev_params [configNr].stats) {
 		if (rndis_per_dev_params [configNr].stats) {
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 					.stats->multicast*1234);
 					.stats->multicast*1234);
@@ -455,7 +455,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 		break;
 		break;
 
 
 	case OID_GEN_MULTICAST_FRAMES_XMIT:
 	case OID_GEN_MULTICAST_FRAMES_XMIT:
-		DBG("%s: OID_GEN_MULTICAST_FRAMES_XMIT\n", __FUNCTION__);
+		DBG("%s: OID_GEN_MULTICAST_FRAMES_XMIT\n", __func__);
 		if (rndis_per_dev_params [configNr].stats) {
 		if (rndis_per_dev_params [configNr].stats) {
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 					.stats->multicast);
 					.stats->multicast);
@@ -464,7 +464,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 		break;
 		break;
 
 
 	case OID_GEN_BROADCAST_BYTES_XMIT:
 	case OID_GEN_BROADCAST_BYTES_XMIT:
-		DBG("%s: OID_GEN_BROADCAST_BYTES_XMIT\n", __FUNCTION__);
+		DBG("%s: OID_GEN_BROADCAST_BYTES_XMIT\n", __func__);
 		if (rndis_per_dev_params [configNr].stats) {
 		if (rndis_per_dev_params [configNr].stats) {
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 					.stats->tx_packets/42*255);
 					.stats->tx_packets/42*255);
@@ -473,7 +473,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 		break;
 		break;
 
 
 	case OID_GEN_BROADCAST_FRAMES_XMIT:
 	case OID_GEN_BROADCAST_FRAMES_XMIT:
-		DBG("%s: OID_GEN_BROADCAST_FRAMES_XMIT\n", __FUNCTION__);
+		DBG("%s: OID_GEN_BROADCAST_FRAMES_XMIT\n", __func__);
 		if (rndis_per_dev_params [configNr].stats) {
 		if (rndis_per_dev_params [configNr].stats) {
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 					.stats->tx_packets/42);
 					.stats->tx_packets/42);
@@ -482,19 +482,19 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 		break;
 		break;
 
 
 	case OID_GEN_DIRECTED_BYTES_RCV:
 	case OID_GEN_DIRECTED_BYTES_RCV:
-		DBG("%s: OID_GEN_DIRECTED_BYTES_RCV\n", __FUNCTION__);
+		DBG("%s: OID_GEN_DIRECTED_BYTES_RCV\n", __func__);
 		*outbuf = __constant_cpu_to_le32 (0);
 		*outbuf = __constant_cpu_to_le32 (0);
 		retval = 0;
 		retval = 0;
 		break;
 		break;
 
 
 	case OID_GEN_DIRECTED_FRAMES_RCV:
 	case OID_GEN_DIRECTED_FRAMES_RCV:
-		DBG("%s: OID_GEN_DIRECTED_FRAMES_RCV\n", __FUNCTION__);
+		DBG("%s: OID_GEN_DIRECTED_FRAMES_RCV\n", __func__);
 		*outbuf = __constant_cpu_to_le32 (0);
 		*outbuf = __constant_cpu_to_le32 (0);
 		retval = 0;
 		retval = 0;
 		break;
 		break;
 
 
 	case OID_GEN_MULTICAST_BYTES_RCV:
 	case OID_GEN_MULTICAST_BYTES_RCV:
-		DBG("%s: OID_GEN_MULTICAST_BYTES_RCV\n", __FUNCTION__);
+		DBG("%s: OID_GEN_MULTICAST_BYTES_RCV\n", __func__);
 		if (rndis_per_dev_params [configNr].stats) {
 		if (rndis_per_dev_params [configNr].stats) {
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 					.stats->multicast * 1111);
 					.stats->multicast * 1111);
@@ -503,7 +503,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 		break;
 		break;
 
 
 	case OID_GEN_MULTICAST_FRAMES_RCV:
 	case OID_GEN_MULTICAST_FRAMES_RCV:
-		DBG("%s: OID_GEN_MULTICAST_FRAMES_RCV\n", __FUNCTION__);
+		DBG("%s: OID_GEN_MULTICAST_FRAMES_RCV\n", __func__);
 		if (rndis_per_dev_params [configNr].stats) {
 		if (rndis_per_dev_params [configNr].stats) {
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 					.stats->multicast);
 					.stats->multicast);
@@ -512,7 +512,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 		break;
 		break;
 
 
 	case OID_GEN_BROADCAST_BYTES_RCV:
 	case OID_GEN_BROADCAST_BYTES_RCV:
-		DBG("%s: OID_GEN_BROADCAST_BYTES_RCV\n", __FUNCTION__);
+		DBG("%s: OID_GEN_BROADCAST_BYTES_RCV\n", __func__);
 		if (rndis_per_dev_params [configNr].stats) {
 		if (rndis_per_dev_params [configNr].stats) {
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 					.stats->rx_packets/42*255);
 					.stats->rx_packets/42*255);
@@ -521,7 +521,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 		break;
 		break;
 
 
 	case OID_GEN_BROADCAST_FRAMES_RCV:
 	case OID_GEN_BROADCAST_FRAMES_RCV:
-		DBG("%s: OID_GEN_BROADCAST_FRAMES_RCV\n", __FUNCTION__);
+		DBG("%s: OID_GEN_BROADCAST_FRAMES_RCV\n", __func__);
 		if (rndis_per_dev_params [configNr].stats) {
 		if (rndis_per_dev_params [configNr].stats) {
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 					.stats->rx_packets/42);
 					.stats->rx_packets/42);
@@ -530,7 +530,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 		break;
 		break;
 
 
 	case OID_GEN_RCV_CRC_ERROR:
 	case OID_GEN_RCV_CRC_ERROR:
-		DBG("%s: OID_GEN_RCV_CRC_ERROR\n", __FUNCTION__);
+		DBG("%s: OID_GEN_RCV_CRC_ERROR\n", __func__);
 		if (rndis_per_dev_params [configNr].stats) {
 		if (rndis_per_dev_params [configNr].stats) {
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 					.stats->rx_crc_errors);
 					.stats->rx_crc_errors);
@@ -539,7 +539,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 		break;
 		break;
 
 
 	case OID_GEN_TRANSMIT_QUEUE_LENGTH:
 	case OID_GEN_TRANSMIT_QUEUE_LENGTH:
-		DBG("%s: OID_GEN_TRANSMIT_QUEUE_LENGTH\n", __FUNCTION__);
+		DBG("%s: OID_GEN_TRANSMIT_QUEUE_LENGTH\n", __func__);
 		*outbuf = __constant_cpu_to_le32 (0);
 		*outbuf = __constant_cpu_to_le32 (0);
 		retval = 0;
 		retval = 0;
 		break;
 		break;
@@ -549,7 +549,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_802_3_PERMANENT_ADDRESS:
 	case OID_802_3_PERMANENT_ADDRESS:
-		DBG("%s: OID_802_3_PERMANENT_ADDRESS\n", __FUNCTION__);
+		DBG("%s: OID_802_3_PERMANENT_ADDRESS\n", __func__);
 		if (rndis_per_dev_params [configNr].dev) {
 		if (rndis_per_dev_params [configNr].dev) {
 			length = ETH_ALEN;
 			length = ETH_ALEN;
 			memcpy (outbuf,
 			memcpy (outbuf,
@@ -561,7 +561,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_802_3_CURRENT_ADDRESS:
 	case OID_802_3_CURRENT_ADDRESS:
-		DBG("%s: OID_802_3_CURRENT_ADDRESS\n", __FUNCTION__);
+		DBG("%s: OID_802_3_CURRENT_ADDRESS\n", __func__);
 		if (rndis_per_dev_params [configNr].dev) {
 		if (rndis_per_dev_params [configNr].dev) {
 			length = ETH_ALEN;
 			length = ETH_ALEN;
 			memcpy (outbuf,
 			memcpy (outbuf,
@@ -573,7 +573,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_802_3_MULTICAST_LIST:
 	case OID_802_3_MULTICAST_LIST:
-		DBG("%s: OID_802_3_MULTICAST_LIST\n", __FUNCTION__);
+		DBG("%s: OID_802_3_MULTICAST_LIST\n", __func__);
 		/* Multicast base address only */
 		/* Multicast base address only */
 		*outbuf = __constant_cpu_to_le32 (0xE0000000);
 		*outbuf = __constant_cpu_to_le32 (0xE0000000);
 		retval = 0;
 		retval = 0;
@@ -581,21 +581,21 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_802_3_MAXIMUM_LIST_SIZE:
 	case OID_802_3_MAXIMUM_LIST_SIZE:
-		DBG("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __FUNCTION__);
+		DBG("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __func__);
 		/* Multicast base address only */
 		/* Multicast base address only */
 		*outbuf = __constant_cpu_to_le32 (1);
 		*outbuf = __constant_cpu_to_le32 (1);
 		retval = 0;
 		retval = 0;
 		break;
 		break;
 
 
 	case OID_802_3_MAC_OPTIONS:
 	case OID_802_3_MAC_OPTIONS:
-		DBG("%s: OID_802_3_MAC_OPTIONS\n", __FUNCTION__);
+		DBG("%s: OID_802_3_MAC_OPTIONS\n", __func__);
 		break;
 		break;
 
 
 	/* ieee802.3 statistics OIDs (table 4-4) */
 	/* ieee802.3 statistics OIDs (table 4-4) */
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_802_3_RCV_ERROR_ALIGNMENT:
 	case OID_802_3_RCV_ERROR_ALIGNMENT:
-		DBG("%s: OID_802_3_RCV_ERROR_ALIGNMENT\n", __FUNCTION__);
+		DBG("%s: OID_802_3_RCV_ERROR_ALIGNMENT\n", __func__);
 		if (rndis_per_dev_params [configNr].stats) {
 		if (rndis_per_dev_params [configNr].stats) {
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 			*outbuf = cpu_to_le32 (rndis_per_dev_params [configNr]
 					.stats->rx_frame_errors);
 					.stats->rx_frame_errors);
@@ -605,51 +605,51 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_802_3_XMIT_ONE_COLLISION:
 	case OID_802_3_XMIT_ONE_COLLISION:
-		DBG("%s: OID_802_3_XMIT_ONE_COLLISION\n", __FUNCTION__);
+		DBG("%s: OID_802_3_XMIT_ONE_COLLISION\n", __func__);
 		*outbuf = __constant_cpu_to_le32 (0);
 		*outbuf = __constant_cpu_to_le32 (0);
 		retval = 0;
 		retval = 0;
 		break;
 		break;
 
 
 	/* mandatory */
 	/* mandatory */
 	case OID_802_3_XMIT_MORE_COLLISIONS:
 	case OID_802_3_XMIT_MORE_COLLISIONS:
-		DBG("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __FUNCTION__);
+		DBG("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __func__);
 		*outbuf = __constant_cpu_to_le32 (0);
 		*outbuf = __constant_cpu_to_le32 (0);
 		retval = 0;
 		retval = 0;
 		break;
 		break;
 
 
 #ifdef	RNDIS_OPTIONAL_STATS
 #ifdef	RNDIS_OPTIONAL_STATS
 	case OID_802_3_XMIT_DEFERRED:
 	case OID_802_3_XMIT_DEFERRED:
-		DBG("%s: OID_802_3_XMIT_DEFERRED\n", __FUNCTION__);
+		DBG("%s: OID_802_3_XMIT_DEFERRED\n", __func__);
 		/* TODO */
 		/* TODO */
 		break;
 		break;
 
 
 	case OID_802_3_XMIT_MAX_COLLISIONS:
 	case OID_802_3_XMIT_MAX_COLLISIONS:
-		DBG("%s: OID_802_3_XMIT_MAX_COLLISIONS\n", __FUNCTION__);
+		DBG("%s: OID_802_3_XMIT_MAX_COLLISIONS\n", __func__);
 		/* TODO */
 		/* TODO */
 		break;
 		break;
 
 
 	case OID_802_3_RCV_OVERRUN:
 	case OID_802_3_RCV_OVERRUN:
-		DBG("%s: OID_802_3_RCV_OVERRUN\n", __FUNCTION__);
+		DBG("%s: OID_802_3_RCV_OVERRUN\n", __func__);
 		/* TODO */
 		/* TODO */
 		break;
 		break;
 
 
 	case OID_802_3_XMIT_UNDERRUN:
 	case OID_802_3_XMIT_UNDERRUN:
-		DBG("%s: OID_802_3_XMIT_UNDERRUN\n", __FUNCTION__);
+		DBG("%s: OID_802_3_XMIT_UNDERRUN\n", __func__);
 		/* TODO */
 		/* TODO */
 		break;
 		break;
 
 
 	case OID_802_3_XMIT_HEARTBEAT_FAILURE:
 	case OID_802_3_XMIT_HEARTBEAT_FAILURE:
-		DBG("%s: OID_802_3_XMIT_HEARTBEAT_FAILURE\n", __FUNCTION__);
+		DBG("%s: OID_802_3_XMIT_HEARTBEAT_FAILURE\n", __func__);
 		/* TODO */
 		/* TODO */
 		break;
 		break;
 
 
 	case OID_802_3_XMIT_TIMES_CRS_LOST:
 	case OID_802_3_XMIT_TIMES_CRS_LOST:
-		DBG("%s: OID_802_3_XMIT_TIMES_CRS_LOST\n", __FUNCTION__);
+		DBG("%s: OID_802_3_XMIT_TIMES_CRS_LOST\n", __func__);
 		/* TODO */
 		/* TODO */
 		break;
 		break;
 
 
 	case OID_802_3_XMIT_LATE_COLLISIONS:
 	case OID_802_3_XMIT_LATE_COLLISIONS:
-		DBG("%s: OID_802_3_XMIT_LATE_COLLISIONS\n", __FUNCTION__);
+		DBG("%s: OID_802_3_XMIT_LATE_COLLISIONS\n", __func__);
 		/* TODO */
 		/* TODO */
 		break;
 		break;
 #endif	/* RNDIS_OPTIONAL_STATS */
 #endif	/* RNDIS_OPTIONAL_STATS */
@@ -657,7 +657,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 #ifdef	RNDIS_PM
 #ifdef	RNDIS_PM
 	/* power management OIDs (table 4-5) */
 	/* power management OIDs (table 4-5) */
 	case OID_PNP_CAPABILITIES:
 	case OID_PNP_CAPABILITIES:
-		DBG("%s: OID_PNP_CAPABILITIES\n", __FUNCTION__);
+		DBG("%s: OID_PNP_CAPABILITIES\n", __func__);
 
 
 		/* for now, no wakeup capabilities */
 		/* for now, no wakeup capabilities */
 		length = sizeof (struct NDIS_PNP_CAPABILITIES);
 		length = sizeof (struct NDIS_PNP_CAPABILITIES);
@@ -665,7 +665,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
 		retval = 0;
 		retval = 0;
 		break;
 		break;
 	case OID_PNP_QUERY_POWER:
 	case OID_PNP_QUERY_POWER:
-		DBG("%s: OID_PNP_QUERY_POWER D%d\n", __FUNCTION__,
+		DBG("%s: OID_PNP_QUERY_POWER D%d\n", __func__,
 				le32_to_cpu(get_unaligned((__le32 *)buf)) - 1);
 				le32_to_cpu(get_unaligned((__le32 *)buf)) - 1);
 		/* only suspend is a real power state, and
 		/* only suspend is a real power state, and
 		 * it can't be entered by OID_PNP_SET_POWER...
 		 * 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,
 
 
 	default:
 	default:
 		pr_warning("%s: query unknown OID 0x%08X\n",
 		pr_warning("%s: query unknown OID 0x%08X\n",
-			 __FUNCTION__, OID);
+			 __func__, OID);
 	}
 	}
 	if (retval < 0)
 	if (retval < 0)
 		length = 0;
 		length = 0;
@@ -729,7 +729,7 @@ static int gen_ndis_set_resp (u8 configNr, u32 OID, u8 *buf, u32 buf_len,
 		*params->filter = (u16) le32_to_cpu(get_unaligned(
 		*params->filter = (u16) le32_to_cpu(get_unaligned(
 				(__le32 *)buf));
 				(__le32 *)buf));
 		DBG("%s: OID_GEN_CURRENT_PACKET_FILTER %08x\n",
 		DBG("%s: OID_GEN_CURRENT_PACKET_FILTER %08x\n",
-			__FUNCTION__, *params->filter);
+			__func__, *params->filter);
 
 
 		/* this call has a significant side effect:  it's
 		/* this call has a significant side effect:  it's
 		 * what makes the packet flow start and stop, like
 		 * what makes the packet flow start and stop, like
@@ -753,7 +753,7 @@ update_linkstate:
 
 
 	case OID_802_3_MULTICAST_LIST:
 	case OID_802_3_MULTICAST_LIST:
 		/* I think we can ignore this */
 		/* I think we can ignore this */
-		DBG("%s: OID_802_3_MULTICAST_LIST\n", __FUNCTION__);
+		DBG("%s: OID_802_3_MULTICAST_LIST\n", __func__);
 		retval = 0;
 		retval = 0;
 		break;
 		break;
 #if 0
 #if 0
@@ -762,7 +762,7 @@ update_linkstate:
 		struct rndis_config_parameter	*param;
 		struct rndis_config_parameter	*param;
 		param = (struct rndis_config_parameter *) buf;
 		param = (struct rndis_config_parameter *) buf;
 		DBG("%s: OID_GEN_RNDIS_CONFIG_PARAMETER '%*s'\n",
 		DBG("%s: OID_GEN_RNDIS_CONFIG_PARAMETER '%*s'\n",
-			__FUNCTION__,
+			__func__,
 			min(cpu_to_le32(param->ParameterNameLength),80),
 			min(cpu_to_le32(param->ParameterNameLength),80),
 			buf + param->ParameterNameOffset);
 			buf + param->ParameterNameOffset);
 		retval = 0;
 		retval = 0;
@@ -778,7 +778,7 @@ update_linkstate:
 		 * FIXME ... then things go batty; Windows wedges itself.
 		 * FIXME ... then things go batty; Windows wedges itself.
 		 */
 		 */
 		i = le32_to_cpu(get_unaligned((__le32 *)buf));
 		i = le32_to_cpu(get_unaligned((__le32 *)buf));
-		DBG("%s: OID_PNP_SET_POWER D%d\n", __FUNCTION__, i - 1);
+		DBG("%s: OID_PNP_SET_POWER D%d\n", __func__, i - 1);
 		switch (i) {
 		switch (i) {
 		case NdisDeviceStateD0:
 		case NdisDeviceStateD0:
 			*params->filter = params->saved_filter;
 			*params->filter = params->saved_filter;
@@ -802,7 +802,7 @@ update_linkstate:
 
 
 	default:
 	default:
 		pr_warning("%s: set unknown OID 0x%08X, size %d\n",
 		pr_warning("%s: set unknown OID 0x%08X, size %d\n",
-			 __FUNCTION__, OID, buf_len);
+			 __func__, OID, buf_len);
 	}
 	}
 
 
 	return retval;
 	return retval;
@@ -855,7 +855,7 @@ static int rndis_query_response (int configNr, rndis_query_msg_type *buf)
 	rndis_query_cmplt_type *resp;
 	rndis_query_cmplt_type *resp;
 	rndis_resp_t            *r;
 	rndis_resp_t            *r;
 
 
-	// DBG("%s: OID = %08X\n", __FUNCTION__, cpu_to_le32(buf->OID));
+	// DBG("%s: OID = %08X\n", __func__, cpu_to_le32(buf->OID));
 	if (!rndis_per_dev_params [configNr].dev) return -ENOTSUPP;
 	if (!rndis_per_dev_params [configNr].dev) return -ENOTSUPP;
 
 
 	/*
 	/*
@@ -908,9 +908,9 @@ static int rndis_set_response (int configNr, rndis_set_msg_type *buf)
 	BufOffset = le32_to_cpu (buf->InformationBufferOffset);
 	BufOffset = le32_to_cpu (buf->InformationBufferOffset);
 
 
 #ifdef	VERBOSE
 #ifdef	VERBOSE
-	DBG("%s: Length: %d\n", __FUNCTION__, BufLength);
-	DBG("%s: Offset: %d\n", __FUNCTION__, BufOffset);
-	DBG("%s: InfoBuffer: ", __FUNCTION__);
+	DBG("%s: Length: %d\n", __func__, BufLength);
+	DBG("%s: Offset: %d\n", __func__, BufOffset);
+	DBG("%s: InfoBuffer: ", __func__);
 
 
 	for (i = 0; i < BufLength; i++) {
 	for (i = 0; i < BufLength; i++) {
 		DBG("%02x ", *(((u8 *) buf) + i + 8 + BufOffset));
 		DBG("%02x ", *(((u8 *) buf) + i + 8 + BufOffset));
@@ -1080,14 +1080,14 @@ int rndis_msg_parser (u8 configNr, u8 *buf)
 	switch (MsgType) {
 	switch (MsgType) {
 	case REMOTE_NDIS_INITIALIZE_MSG:
 	case REMOTE_NDIS_INITIALIZE_MSG:
 		DBG("%s: REMOTE_NDIS_INITIALIZE_MSG\n",
 		DBG("%s: REMOTE_NDIS_INITIALIZE_MSG\n",
-			__FUNCTION__ );
+			__func__ );
 		params->state = RNDIS_INITIALIZED;
 		params->state = RNDIS_INITIALIZED;
 		return  rndis_init_response (configNr,
 		return  rndis_init_response (configNr,
 					(rndis_init_msg_type *) buf);
 					(rndis_init_msg_type *) buf);
 
 
 	case REMOTE_NDIS_HALT_MSG:
 	case REMOTE_NDIS_HALT_MSG:
 		DBG("%s: REMOTE_NDIS_HALT_MSG\n",
 		DBG("%s: REMOTE_NDIS_HALT_MSG\n",
-			__FUNCTION__ );
+			__func__ );
 		params->state = RNDIS_UNINITIALIZED;
 		params->state = RNDIS_UNINITIALIZED;
 		if (params->dev) {
 		if (params->dev) {
 			netif_carrier_off (params->dev);
 			netif_carrier_off (params->dev);
@@ -1105,7 +1105,7 @@ int rndis_msg_parser (u8 configNr, u8 *buf)
 
 
 	case REMOTE_NDIS_RESET_MSG:
 	case REMOTE_NDIS_RESET_MSG:
 		DBG("%s: REMOTE_NDIS_RESET_MSG\n",
 		DBG("%s: REMOTE_NDIS_RESET_MSG\n",
-			__FUNCTION__ );
+			__func__ );
 		return rndis_reset_response (configNr,
 		return rndis_reset_response (configNr,
 					(rndis_reset_msg_type *) buf);
 					(rndis_reset_msg_type *) buf);
 
 
@@ -1113,7 +1113,7 @@ int rndis_msg_parser (u8 configNr, u8 *buf)
 		/* For USB: host does this every 5 seconds */
 		/* For USB: host does this every 5 seconds */
 		if (rndis_debug > 1)
 		if (rndis_debug > 1)
 			DBG("%s: REMOTE_NDIS_KEEPALIVE_MSG\n",
 			DBG("%s: REMOTE_NDIS_KEEPALIVE_MSG\n",
-				__FUNCTION__ );
+				__func__ );
 		return rndis_keepalive_response (configNr,
 		return rndis_keepalive_response (configNr,
 						 (rndis_keepalive_msg_type *)
 						 (rndis_keepalive_msg_type *)
 						 buf);
 						 buf);
@@ -1124,7 +1124,7 @@ int rndis_msg_parser (u8 configNr, u8 *buf)
 		 * suspending itself.
 		 * suspending itself.
 		 */
 		 */
 		pr_warning("%s: unknown RNDIS message 0x%08X len %d\n",
 		pr_warning("%s: unknown RNDIS message 0x%08X len %d\n",
-			__FUNCTION__ , MsgType, MsgLength);
+			__func__ , MsgType, MsgLength);
 		{
 		{
 			unsigned i;
 			unsigned i;
 			for (i = 0; i < MsgLength; i += 16) {
 			for (i = 0; i < MsgLength; i += 16) {
@@ -1159,7 +1159,7 @@ int rndis_register (int (* rndis_control_ack) (struct net_device *))
 		if (!rndis_per_dev_params [i].used) {
 		if (!rndis_per_dev_params [i].used) {
 			rndis_per_dev_params [i].used = 1;
 			rndis_per_dev_params [i].used = 1;
 			rndis_per_dev_params [i].ack = rndis_control_ack;
 			rndis_per_dev_params [i].ack = rndis_control_ack;
-			DBG("%s: configNr = %d\n", __FUNCTION__, i);
+			DBG("%s: configNr = %d\n", __func__, i);
 			return i;
 			return i;
 		}
 		}
 	}
 	}
@@ -1170,7 +1170,7 @@ int rndis_register (int (* rndis_control_ack) (struct net_device *))
 
 
 void rndis_deregister (int configNr)
 void rndis_deregister (int configNr)
 {
 {
-	DBG("%s: \n", __FUNCTION__ );
+	DBG("%s: \n", __func__ );
 
 
 	if (configNr >= RNDIS_MAX_CONFIGS) return;
 	if (configNr >= RNDIS_MAX_CONFIGS) return;
 	rndis_per_dev_params [configNr].used = 0;
 	rndis_per_dev_params [configNr].used = 0;
@@ -1182,7 +1182,7 @@ int rndis_set_param_dev (u8 configNr, struct net_device *dev,
 			 struct net_device_stats *stats,
 			 struct net_device_stats *stats,
 			 u16 *cdc_filter)
 			 u16 *cdc_filter)
 {
 {
-	DBG("%s:\n", __FUNCTION__ );
+	DBG("%s:\n", __func__ );
 	if (!dev || !stats) return -1;
 	if (!dev || !stats) return -1;
 	if (configNr >= RNDIS_MAX_CONFIGS) return -1;
 	if (configNr >= RNDIS_MAX_CONFIGS) return -1;
 
 
@@ -1195,7 +1195,7 @@ int rndis_set_param_dev (u8 configNr, struct net_device *dev,
 
 
 int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr)
 int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr)
 {
 {
-	DBG("%s:\n", __FUNCTION__ );
+	DBG("%s:\n", __func__ );
 	if (!vendorDescr) return -1;
 	if (!vendorDescr) return -1;
 	if (configNr >= RNDIS_MAX_CONFIGS) return -1;
 	if (configNr >= RNDIS_MAX_CONFIGS) return -1;
 
 
@@ -1207,7 +1207,7 @@ int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr)
 
 
 int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed)
 int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed)
 {
 {
-	DBG("%s: %u %u\n", __FUNCTION__, medium, speed);
+	DBG("%s: %u %u\n", __func__, medium, speed);
 	if (configNr >= RNDIS_MAX_CONFIGS) return -1;
 	if (configNr >= RNDIS_MAX_CONFIGS) return -1;
 
 
 	rndis_per_dev_params [configNr].medium = medium;
 	rndis_per_dev_params [configNr].medium = medium;
@@ -1415,7 +1415,7 @@ int __init rndis_init (void)
 		if (!(rndis_connect_state [i]
 		if (!(rndis_connect_state [i]
 				= create_proc_entry (name, 0660, NULL)))
 				= create_proc_entry (name, 0660, NULL)))
 		{
 		{
-			DBG("%s :remove entries", __FUNCTION__);
+			DBG("%s :remove entries", __func__);
 			while (i) {
 			while (i) {
 				sprintf (name, NAME_TEMPLATE, --i);
 				sprintf (name, NAME_TEMPLATE, --i);
 				remove_proc_entry (name, NULL);
 				remove_proc_entry (name, NULL);

+ 2 - 2
drivers/usb/host/ehci-q.c

@@ -251,7 +251,7 @@ __acquires(ehci->lock)
 #ifdef EHCI_URB_TRACE
 #ifdef EHCI_URB_TRACE
 	ehci_dbg (ehci,
 	ehci_dbg (ehci,
 		"%s %s urb %p ep%d%s status %d len %d/%d\n",
 		"%s %s urb %p ep%d%s status %d len %d/%d\n",
-		__FUNCTION__, urb->dev->devpath, urb,
+		__func__, urb->dev->devpath, urb,
 		usb_pipeendpoint (urb->pipe),
 		usb_pipeendpoint (urb->pipe),
 		usb_pipein (urb->pipe) ? "in" : "out",
 		usb_pipein (urb->pipe) ? "in" : "out",
 		status,
 		status,
@@ -974,7 +974,7 @@ submit_async (
 #ifdef EHCI_URB_TRACE
 #ifdef EHCI_URB_TRACE
 	ehci_dbg (ehci,
 	ehci_dbg (ehci,
 		"%s %s urb %p ep%d%s len %d, qtd %p [qh %p]\n",
 		"%s %s urb %p ep%d%s len %d, qtd %p [qh %p]\n",
-		__FUNCTION__, urb->dev->devpath, urb,
+		__func__, urb->dev->devpath, urb,
 		epnum & 0x0f, (epnum & USB_DIR_IN) ? "in" : "out",
 		epnum & 0x0f, (epnum & USB_DIR_IN) ? "in" : "out",
 		urb->transfer_buffer_length,
 		urb->transfer_buffer_length,
 		qtd, urb->ep->hcpriv);
 		qtd, urb->ep->hcpriv);

+ 1 - 1
drivers/usb/host/ehci-sched.c

@@ -1677,7 +1677,7 @@ static int itd_submit (struct ehci_hcd *ehci, struct urb *urb,
 #ifdef EHCI_URB_TRACE
 #ifdef EHCI_URB_TRACE
 	ehci_dbg (ehci,
 	ehci_dbg (ehci,
 		"%s %s urb %p ep%d%s len %d, %d pkts %d uframes [%p]\n",
 		"%s %s urb %p ep%d%s len %d, %d pkts %d uframes [%p]\n",
-		__FUNCTION__, urb->dev->devpath, urb,
+		__func__, urb->dev->devpath, urb,
 		usb_pipeendpoint (urb->pipe),
 		usb_pipeendpoint (urb->pipe),
 		usb_pipein (urb->pipe) ? "in" : "out",
 		usb_pipein (urb->pipe) ? "in" : "out",
 		urb->transfer_buffer_length,
 		urb->transfer_buffer_length,

+ 3 - 3
drivers/usb/host/pci-quirks.c

@@ -106,7 +106,7 @@ int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base)
 	pci_read_config_word(pdev, UHCI_USBLEGSUP, &legsup);
 	pci_read_config_word(pdev, UHCI_USBLEGSUP, &legsup);
 	if (legsup & ~(UHCI_USBLEGSUP_RO | UHCI_USBLEGSUP_RWC)) {
 	if (legsup & ~(UHCI_USBLEGSUP_RO | UHCI_USBLEGSUP_RWC)) {
 		dev_dbg(&pdev->dev, "%s: legsup = 0x%04x\n",
 		dev_dbg(&pdev->dev, "%s: legsup = 0x%04x\n",
-				__FUNCTION__, legsup);
+				__func__, legsup);
 		goto reset_needed;
 		goto reset_needed;
 	}
 	}
 
 
@@ -114,14 +114,14 @@ int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base)
 	if ((cmd & UHCI_USBCMD_RUN) || !(cmd & UHCI_USBCMD_CONFIGURE) ||
 	if ((cmd & UHCI_USBCMD_RUN) || !(cmd & UHCI_USBCMD_CONFIGURE) ||
 			!(cmd & UHCI_USBCMD_EGSM)) {
 			!(cmd & UHCI_USBCMD_EGSM)) {
 		dev_dbg(&pdev->dev, "%s: cmd = 0x%04x\n",
 		dev_dbg(&pdev->dev, "%s: cmd = 0x%04x\n",
-				__FUNCTION__, cmd);
+				__func__, cmd);
 		goto reset_needed;
 		goto reset_needed;
 	}
 	}
 
 
 	intr = inw(base + UHCI_USBINTR);
 	intr = inw(base + UHCI_USBINTR);
 	if (intr & (~UHCI_USBINTR_RESUME)) {
 	if (intr & (~UHCI_USBINTR_RESUME)) {
 		dev_dbg(&pdev->dev, "%s: intr = 0x%04x\n",
 		dev_dbg(&pdev->dev, "%s: intr = 0x%04x\n",
-				__FUNCTION__, intr);
+				__func__, intr);
 		goto reset_needed;
 		goto reset_needed;
 	}
 	}
 	return 0;
 	return 0;

+ 2 - 2
drivers/usb/host/sl811-hcd.c

@@ -1335,7 +1335,7 @@ static int
 sl811h_bus_suspend(struct usb_hcd *hcd)
 sl811h_bus_suspend(struct usb_hcd *hcd)
 {
 {
 	// SOFs off
 	// SOFs off
-	DBG("%s\n", __FUNCTION__);
+	DBG("%s\n", __func__);
 	return 0;
 	return 0;
 }
 }
 
 
@@ -1343,7 +1343,7 @@ static int
 sl811h_bus_resume(struct usb_hcd *hcd)
 sl811h_bus_resume(struct usb_hcd *hcd)
 {
 {
 	// SOFs on
 	// SOFs on
-	DBG("%s\n", __FUNCTION__);
+	DBG("%s\n", __func__);
 	return 0;
 	return 0;
 }
 }
 
 

+ 3 - 3
drivers/usb/host/uhci-hcd.c

@@ -335,7 +335,7 @@ __releases(uhci->lock)
 __acquires(uhci->lock)
 __acquires(uhci->lock)
 {
 {
 	dev_dbg(&uhci_to_hcd(uhci)->self.root_hub->dev,
 	dev_dbg(&uhci_to_hcd(uhci)->self.root_hub->dev,
-			"%s%s\n", __FUNCTION__,
+			"%s%s\n", __func__,
 			uhci->rh_state == UHCI_RH_AUTO_STOPPED ?
 			uhci->rh_state == UHCI_RH_AUTO_STOPPED ?
 				" (auto-start)" : "");
 				" (auto-start)" : "");
 
 
@@ -735,7 +735,7 @@ static int uhci_pci_suspend(struct usb_hcd *hcd, pm_message_t message)
 	struct uhci_hcd *uhci = hcd_to_uhci(hcd);
 	struct uhci_hcd *uhci = hcd_to_uhci(hcd);
 	int rc = 0;
 	int rc = 0;
 
 
-	dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__);
+	dev_dbg(uhci_dev(uhci), "%s\n", __func__);
 
 
 	spin_lock_irq(&uhci->lock);
 	spin_lock_irq(&uhci->lock);
 	if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) || uhci->dead)
 	if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) || uhci->dead)
@@ -771,7 +771,7 @@ static int uhci_pci_resume(struct usb_hcd *hcd)
 {
 {
 	struct uhci_hcd *uhci = hcd_to_uhci(hcd);
 	struct uhci_hcd *uhci = hcd_to_uhci(hcd);
 
 
-	dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__);
+	dev_dbg(uhci_dev(uhci), "%s\n", __func__);
 
 
 	/* Since we aren't in D3 any more, it's safe to set this flag
 	/* Since we aren't in D3 any more, it's safe to set this flag
 	 * even if the controller was dead.
 	 * even if the controller was dead.

+ 1 - 1
drivers/usb/host/uhci-q.c

@@ -1171,7 +1171,7 @@ static int uhci_result_common(struct uhci_hcd *uhci, struct urb *urb)
 				/* Some debugging code */
 				/* Some debugging code */
 				dev_dbg(&urb->dev->dev,
 				dev_dbg(&urb->dev->dev,
 						"%s: failed with status %x\n",
 						"%s: failed with status %x\n",
-						__FUNCTION__, status);
+						__func__, status);
 
 
 				if (debug > 1 && errbuf) {
 				if (debug > 1 && errbuf) {
 					/* Print the chain for debugging */
 					/* Print the chain for debugging */

+ 60 - 60
drivers/usb/misc/adutux.c

@@ -147,10 +147,10 @@ static void adu_abort_transfers(struct adu_device *dev)
 {
 {
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg(2," %s : enter", __FUNCTION__);
+	dbg(2," %s : enter", __func__);
 
 
 	if (dev->udev == NULL) {
 	if (dev->udev == NULL) {
-		dbg(1," %s : udev is null", __FUNCTION__);
+		dbg(1," %s : udev is null", __func__);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -172,12 +172,12 @@ static void adu_abort_transfers(struct adu_device *dev)
 		spin_unlock_irqrestore(&dev->buflock, flags);
 		spin_unlock_irqrestore(&dev->buflock, flags);
 
 
 exit:
 exit:
-	dbg(2," %s : leave", __FUNCTION__);
+	dbg(2," %s : leave", __func__);
 }
 }
 
 
 static void adu_delete(struct adu_device *dev)
 static void adu_delete(struct adu_device *dev)
 {
 {
-	dbg(2, "%s enter", __FUNCTION__);
+	dbg(2, "%s enter", __func__);
 
 
 	/* free data structures */
 	/* free data structures */
 	usb_free_urb(dev->interrupt_in_urb);
 	usb_free_urb(dev->interrupt_in_urb);
@@ -188,7 +188,7 @@ static void adu_delete(struct adu_device *dev)
 	kfree(dev->interrupt_out_buffer);
 	kfree(dev->interrupt_out_buffer);
 	kfree(dev);
 	kfree(dev);
 
 
-	dbg(2, "%s : leave", __FUNCTION__);
+	dbg(2, "%s : leave", __func__);
 }
 }
 
 
 static void adu_interrupt_in_callback(struct urb *urb)
 static void adu_interrupt_in_callback(struct urb *urb)
@@ -196,8 +196,8 @@ static void adu_interrupt_in_callback(struct urb *urb)
 	struct adu_device *dev = urb->context;
 	struct adu_device *dev = urb->context;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg(4," %s : enter, status %d", __FUNCTION__, status);
-	adu_debug_data(5, __FUNCTION__, urb->actual_length,
+	dbg(4," %s : enter, status %d", __func__, status);
+	adu_debug_data(5, __func__, urb->actual_length,
 		       urb->transfer_buffer);
 		       urb->transfer_buffer);
 
 
 	spin_lock(&dev->buflock);
 	spin_lock(&dev->buflock);
@@ -206,7 +206,7 @@ static void adu_interrupt_in_callback(struct urb *urb)
 		if ((status != -ENOENT) && (status != -ECONNRESET) &&
 		if ((status != -ENOENT) && (status != -ECONNRESET) &&
 			(status != -ESHUTDOWN)) {
 			(status != -ESHUTDOWN)) {
 			dbg(1," %s : nonzero status received: %d",
 			dbg(1," %s : nonzero status received: %d",
-			    __FUNCTION__, status);
+			    __func__, status);
 		}
 		}
 		goto exit;
 		goto exit;
 	}
 	}
@@ -220,10 +220,10 @@ static void adu_interrupt_in_callback(struct urb *urb)
 				dev->interrupt_in_buffer, urb->actual_length);
 				dev->interrupt_in_buffer, urb->actual_length);
 
 
 			dev->read_buffer_length += urb->actual_length;
 			dev->read_buffer_length += urb->actual_length;
-			dbg(2," %s reading  %d ", __FUNCTION__,
+			dbg(2," %s reading  %d ", __func__,
 			    urb->actual_length);
 			    urb->actual_length);
 		} else {
 		} else {
-			dbg(1," %s : read_buffer overflow", __FUNCTION__);
+			dbg(1," %s : read_buffer overflow", __func__);
 		}
 		}
 	}
 	}
 
 
@@ -232,9 +232,9 @@ exit:
 	spin_unlock(&dev->buflock);
 	spin_unlock(&dev->buflock);
 	/* always wake up so we recover from errors */
 	/* always wake up so we recover from errors */
 	wake_up_interruptible(&dev->read_wait);
 	wake_up_interruptible(&dev->read_wait);
-	adu_debug_data(5, __FUNCTION__, urb->actual_length,
+	adu_debug_data(5, __func__, urb->actual_length,
 		       urb->transfer_buffer);
 		       urb->transfer_buffer);
-	dbg(4," %s : leave, status %d", __FUNCTION__, status);
+	dbg(4," %s : leave, status %d", __func__, status);
 }
 }
 
 
 static void adu_interrupt_out_callback(struct urb *urb)
 static void adu_interrupt_out_callback(struct urb *urb)
@@ -242,14 +242,14 @@ static void adu_interrupt_out_callback(struct urb *urb)
 	struct adu_device *dev = urb->context;
 	struct adu_device *dev = urb->context;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg(4," %s : enter, status %d", __FUNCTION__, status);
-	adu_debug_data(5,__FUNCTION__, urb->actual_length, urb->transfer_buffer);
+	dbg(4," %s : enter, status %d", __func__, status);
+	adu_debug_data(5,__func__, urb->actual_length, urb->transfer_buffer);
 
 
 	if (status != 0) {
 	if (status != 0) {
 		if ((status != -ENOENT) &&
 		if ((status != -ENOENT) &&
 		    (status != -ECONNRESET)) {
 		    (status != -ECONNRESET)) {
 			dbg(1, " %s :nonzero status received: %d",
 			dbg(1, " %s :nonzero status received: %d",
-			    __FUNCTION__, status);
+			    __func__, status);
 		}
 		}
 		goto exit;
 		goto exit;
 	}
 	}
@@ -260,9 +260,9 @@ static void adu_interrupt_out_callback(struct urb *urb)
 	spin_unlock(&dev->buflock);
 	spin_unlock(&dev->buflock);
 exit:
 exit:
 
 
-	adu_debug_data(5, __FUNCTION__, urb->actual_length,
+	adu_debug_data(5, __func__, urb->actual_length,
 		       urb->transfer_buffer);
 		       urb->transfer_buffer);
-	dbg(4," %s : leave, status %d", __FUNCTION__, status);
+	dbg(4," %s : leave, status %d", __func__, status);
 }
 }
 
 
 static int adu_open(struct inode *inode, struct file *file)
 static int adu_open(struct inode *inode, struct file *file)
@@ -272,19 +272,19 @@ static int adu_open(struct inode *inode, struct file *file)
 	int subminor;
 	int subminor;
 	int retval;
 	int retval;
 
 
-	dbg(2,"%s : enter", __FUNCTION__);
+	dbg(2,"%s : enter", __func__);
 
 
 	subminor = iminor(inode);
 	subminor = iminor(inode);
 
 
 	if ((retval = mutex_lock_interruptible(&adutux_mutex))) {
 	if ((retval = mutex_lock_interruptible(&adutux_mutex))) {
-		dbg(2, "%s : mutex lock failed", __FUNCTION__);
+		dbg(2, "%s : mutex lock failed", __func__);
 		goto exit_no_lock;
 		goto exit_no_lock;
 	}
 	}
 
 
 	interface = usb_find_interface(&adu_driver, subminor);
 	interface = usb_find_interface(&adu_driver, subminor);
 	if (!interface) {
 	if (!interface) {
 		err("%s - error, can't find device for minor %d",
 		err("%s - error, can't find device for minor %d",
-		    __FUNCTION__, subminor);
+		    __func__, subminor);
 		retval = -ENODEV;
 		retval = -ENODEV;
 		goto exit_no_device;
 		goto exit_no_device;
 	}
 	}
@@ -302,7 +302,7 @@ static int adu_open(struct inode *inode, struct file *file)
 	}
 	}
 
 
 	++dev->open_count;
 	++dev->open_count;
-	dbg(2,"%s : open count %d", __FUNCTION__, dev->open_count);
+	dbg(2,"%s : open count %d", __func__, dev->open_count);
 
 
 	/* save device in the file's private structure */
 	/* save device in the file's private structure */
 	file->private_data = dev;
 	file->private_data = dev;
@@ -332,23 +332,23 @@ static int adu_open(struct inode *inode, struct file *file)
 exit_no_device:
 exit_no_device:
 	mutex_unlock(&adutux_mutex);
 	mutex_unlock(&adutux_mutex);
 exit_no_lock:
 exit_no_lock:
-	dbg(2,"%s : leave, return value %d ", __FUNCTION__, retval);
+	dbg(2,"%s : leave, return value %d ", __func__, retval);
 	return retval;
 	return retval;
 }
 }
 
 
 static void adu_release_internal(struct adu_device *dev)
 static void adu_release_internal(struct adu_device *dev)
 {
 {
-	dbg(2," %s : enter", __FUNCTION__);
+	dbg(2," %s : enter", __func__);
 
 
 	/* decrement our usage count for the device */
 	/* decrement our usage count for the device */
 	--dev->open_count;
 	--dev->open_count;
-	dbg(2," %s : open count %d", __FUNCTION__, dev->open_count);
+	dbg(2," %s : open count %d", __func__, dev->open_count);
 	if (dev->open_count <= 0) {
 	if (dev->open_count <= 0) {
 		adu_abort_transfers(dev);
 		adu_abort_transfers(dev);
 		dev->open_count = 0;
 		dev->open_count = 0;
 	}
 	}
 
 
-	dbg(2," %s : leave", __FUNCTION__);
+	dbg(2," %s : leave", __func__);
 }
 }
 
 
 static int adu_release(struct inode *inode, struct file *file)
 static int adu_release(struct inode *inode, struct file *file)
@@ -356,17 +356,17 @@ static int adu_release(struct inode *inode, struct file *file)
 	struct adu_device *dev;
 	struct adu_device *dev;
 	int retval = 0;
 	int retval = 0;
 
 
-	dbg(2," %s : enter", __FUNCTION__);
+	dbg(2," %s : enter", __func__);
 
 
 	if (file == NULL) {
 	if (file == NULL) {
- 		dbg(1," %s : file is NULL", __FUNCTION__);
+ 		dbg(1," %s : file is NULL", __func__);
 		retval = -ENODEV;
 		retval = -ENODEV;
 		goto exit;
 		goto exit;
 	}
 	}
 
 
 	dev = file->private_data;
 	dev = file->private_data;
 	if (dev == NULL) {
 	if (dev == NULL) {
- 		dbg(1," %s : object is NULL", __FUNCTION__);
+ 		dbg(1," %s : object is NULL", __func__);
 		retval = -ENODEV;
 		retval = -ENODEV;
 		goto exit;
 		goto exit;
 	}
 	}
@@ -374,7 +374,7 @@ static int adu_release(struct inode *inode, struct file *file)
 	mutex_lock(&adutux_mutex); /* not interruptible */
 	mutex_lock(&adutux_mutex); /* not interruptible */
 
 
 	if (dev->open_count <= 0) {
 	if (dev->open_count <= 0) {
-		dbg(1," %s : device not opened", __FUNCTION__);
+		dbg(1," %s : device not opened", __func__);
 		retval = -ENODEV;
 		retval = -ENODEV;
 		goto exit;
 		goto exit;
 	}
 	}
@@ -388,7 +388,7 @@ static int adu_release(struct inode *inode, struct file *file)
 
 
 exit:
 exit:
 	mutex_unlock(&adutux_mutex);
 	mutex_unlock(&adutux_mutex);
-	dbg(2," %s : leave, return value %d", __FUNCTION__, retval);
+	dbg(2," %s : leave, return value %d", __func__, retval);
 	return retval;
 	return retval;
 }
 }
 
 
@@ -405,10 +405,10 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count,
 	unsigned long flags;
 	unsigned long flags;
 	DECLARE_WAITQUEUE(wait, current);
 	DECLARE_WAITQUEUE(wait, current);
 
 
-	dbg(2," %s : enter, count = %Zd, file=%p", __FUNCTION__, count, file);
+	dbg(2," %s : enter, count = %Zd, file=%p", __func__, count, file);
 
 
 	dev = file->private_data;
 	dev = file->private_data;
-	dbg(2," %s : dev=%p", __FUNCTION__, dev);
+	dbg(2," %s : dev=%p", __func__, dev);
 
 
 	if (mutex_lock_interruptible(&dev->mtx))
 	if (mutex_lock_interruptible(&dev->mtx))
 		return -ERESTARTSYS;
 		return -ERESTARTSYS;
@@ -422,16 +422,16 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count,
 
 
 	/* verify that some data was requested */
 	/* verify that some data was requested */
 	if (count == 0) {
 	if (count == 0) {
-		dbg(1," %s : read request of 0 bytes", __FUNCTION__);
+		dbg(1," %s : read request of 0 bytes", __func__);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
 	timeout = COMMAND_TIMEOUT;
 	timeout = COMMAND_TIMEOUT;
-	dbg(2," %s : about to start looping", __FUNCTION__);
+	dbg(2," %s : about to start looping", __func__);
 	while (bytes_to_read) {
 	while (bytes_to_read) {
 		int data_in_secondary = dev->secondary_tail - dev->secondary_head;
 		int data_in_secondary = dev->secondary_tail - dev->secondary_head;
 		dbg(2," %s : while, data_in_secondary=%d, status=%d",
 		dbg(2," %s : while, data_in_secondary=%d, status=%d",
-		    __FUNCTION__, data_in_secondary,
+		    __func__, data_in_secondary,
 		    dev->interrupt_in_urb->status);
 		    dev->interrupt_in_urb->status);
 
 
 		if (data_in_secondary) {
 		if (data_in_secondary) {
@@ -456,7 +456,7 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count,
 				/* we secure access to the primary */
 				/* we secure access to the primary */
 				char *tmp;
 				char *tmp;
 				dbg(2," %s : swap, read_buffer_length = %d",
 				dbg(2," %s : swap, read_buffer_length = %d",
-				    __FUNCTION__, dev->read_buffer_length);
+				    __func__, dev->read_buffer_length);
 				tmp = dev->read_buffer_secondary;
 				tmp = dev->read_buffer_secondary;
 				dev->read_buffer_secondary = dev->read_buffer_primary;
 				dev->read_buffer_secondary = dev->read_buffer_primary;
 				dev->read_buffer_primary = tmp;
 				dev->read_buffer_primary = tmp;
@@ -471,10 +471,10 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count,
 				if (!dev->read_urb_finished) {
 				if (!dev->read_urb_finished) {
 					/* somebody is doing IO */
 					/* somebody is doing IO */
 					spin_unlock_irqrestore(&dev->buflock, flags);
 					spin_unlock_irqrestore(&dev->buflock, flags);
-					dbg(2," %s : submitted already", __FUNCTION__);
+					dbg(2," %s : submitted already", __func__);
 				} else {
 				} else {
 					/* we must initiate input */
 					/* we must initiate input */
-					dbg(2," %s : initiate input", __FUNCTION__);
+					dbg(2," %s : initiate input", __func__);
 					dev->read_urb_finished = 0;
 					dev->read_urb_finished = 0;
 					spin_unlock_irqrestore(&dev->buflock, flags);
 					spin_unlock_irqrestore(&dev->buflock, flags);
 
 
@@ -492,7 +492,7 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count,
 						if (retval == -ENOMEM) {
 						if (retval == -ENOMEM) {
 							retval = bytes_read ? bytes_read : -ENOMEM;
 							retval = bytes_read ? bytes_read : -ENOMEM;
 						}
 						}
-						dbg(2," %s : submit failed", __FUNCTION__);
+						dbg(2," %s : submit failed", __func__);
 						goto exit;
 						goto exit;
 					}
 					}
 				}
 				}
@@ -511,13 +511,13 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count,
 				remove_wait_queue(&dev->read_wait, &wait);
 				remove_wait_queue(&dev->read_wait, &wait);
 
 
 				if (timeout <= 0) {
 				if (timeout <= 0) {
-					dbg(2," %s : timeout", __FUNCTION__);
+					dbg(2," %s : timeout", __func__);
 					retval = bytes_read ? bytes_read : -ETIMEDOUT;
 					retval = bytes_read ? bytes_read : -ETIMEDOUT;
 					goto exit;
 					goto exit;
 				}
 				}
 
 
 				if (signal_pending(current)) {
 				if (signal_pending(current)) {
-					dbg(2," %s : signal pending", __FUNCTION__);
+					dbg(2," %s : signal pending", __func__);
 					retval = bytes_read ? bytes_read : -EINTR;
 					retval = bytes_read ? bytes_read : -EINTR;
 					goto exit;
 					goto exit;
 				}
 				}
@@ -550,7 +550,7 @@ exit:
 	/* unlock the device */
 	/* unlock the device */
 	mutex_unlock(&dev->mtx);
 	mutex_unlock(&dev->mtx);
 
 
-	dbg(2," %s : leave, return value %d", __FUNCTION__, retval);
+	dbg(2," %s : leave, return value %d", __func__, retval);
 	return retval;
 	return retval;
 }
 }
 
 
@@ -565,7 +565,7 @@ static ssize_t adu_write(struct file *file, const __user char *buffer,
 	unsigned long flags;
 	unsigned long flags;
 	int retval;
 	int retval;
 
 
-	dbg(2," %s : enter, count = %Zd", __FUNCTION__, count);
+	dbg(2," %s : enter, count = %Zd", __func__, count);
 
 
 	dev = file->private_data;
 	dev = file->private_data;
 
 
@@ -582,7 +582,7 @@ static ssize_t adu_write(struct file *file, const __user char *buffer,
 
 
 	/* verify that we actually have some data to write */
 	/* verify that we actually have some data to write */
 	if (count == 0) {
 	if (count == 0) {
-		dbg(1," %s : write request of 0 bytes", __FUNCTION__);
+		dbg(1," %s : write request of 0 bytes", __func__);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -595,13 +595,13 @@ static ssize_t adu_write(struct file *file, const __user char *buffer,
 
 
 			mutex_unlock(&dev->mtx);
 			mutex_unlock(&dev->mtx);
 			if (signal_pending(current)) {
 			if (signal_pending(current)) {
-				dbg(1," %s : interrupted", __FUNCTION__);
+				dbg(1," %s : interrupted", __func__);
 				set_current_state(TASK_RUNNING);
 				set_current_state(TASK_RUNNING);
 				retval = -EINTR;
 				retval = -EINTR;
 				goto exit_onqueue;
 				goto exit_onqueue;
 			}
 			}
 			if (schedule_timeout(COMMAND_TIMEOUT) == 0) {
 			if (schedule_timeout(COMMAND_TIMEOUT) == 0) {
-				dbg(1, "%s - command timed out.", __FUNCTION__);
+				dbg(1, "%s - command timed out.", __func__);
 				retval = -ETIMEDOUT;
 				retval = -ETIMEDOUT;
 				goto exit_onqueue;
 				goto exit_onqueue;
 			}
 			}
@@ -612,18 +612,18 @@ static ssize_t adu_write(struct file *file, const __user char *buffer,
 				goto exit_nolock;
 				goto exit_nolock;
 			}
 			}
 
 
-			dbg(4," %s : in progress, count = %Zd", __FUNCTION__, count);
+			dbg(4," %s : in progress, count = %Zd", __func__, count);
 		} else {
 		} else {
 			spin_unlock_irqrestore(&dev->buflock, flags);
 			spin_unlock_irqrestore(&dev->buflock, flags);
 			set_current_state(TASK_RUNNING);
 			set_current_state(TASK_RUNNING);
 			remove_wait_queue(&dev->write_wait, &waita);
 			remove_wait_queue(&dev->write_wait, &waita);
-			dbg(4," %s : sending, count = %Zd", __FUNCTION__, count);
+			dbg(4," %s : sending, count = %Zd", __func__, count);
 
 
 			/* write the data into interrupt_out_buffer from userspace */
 			/* write the data into interrupt_out_buffer from userspace */
 			buffer_size = le16_to_cpu(dev->interrupt_out_endpoint->wMaxPacketSize);
 			buffer_size = le16_to_cpu(dev->interrupt_out_endpoint->wMaxPacketSize);
 			bytes_to_write = count > buffer_size ? buffer_size : count;
 			bytes_to_write = count > buffer_size ? buffer_size : count;
 			dbg(4," %s : buffer_size = %Zd, count = %Zd, bytes_to_write = %Zd",
 			dbg(4," %s : buffer_size = %Zd, count = %Zd, bytes_to_write = %Zd",
-			    __FUNCTION__, buffer_size, count, bytes_to_write);
+			    __func__, buffer_size, count, bytes_to_write);
 
 
 			if (copy_from_user(dev->interrupt_out_buffer, buffer, bytes_to_write) != 0) {
 			if (copy_from_user(dev->interrupt_out_buffer, buffer, bytes_to_write) != 0) {
 				retval = -EFAULT;
 				retval = -EFAULT;
@@ -661,7 +661,7 @@ static ssize_t adu_write(struct file *file, const __user char *buffer,
 exit:
 exit:
 	mutex_unlock(&dev->mtx);
 	mutex_unlock(&dev->mtx);
 exit_nolock:
 exit_nolock:
-	dbg(2," %s : leave, return value %d", __FUNCTION__, retval);
+	dbg(2," %s : leave, return value %d", __func__, retval);
 	return retval;
 	return retval;
 
 
 exit_onqueue:
 exit_onqueue:
@@ -706,7 +706,7 @@ static int adu_probe(struct usb_interface *interface,
 	int out_end_size;
 	int out_end_size;
 	int i;
 	int i;
 
 
-	dbg(2," %s : enter", __FUNCTION__);
+	dbg(2," %s : enter", __func__);
 
 
 	if (udev == NULL) {
 	if (udev == NULL) {
 		dev_err(&interface->dev, "udev is NULL.\n");
 		dev_err(&interface->dev, "udev is NULL.\n");
@@ -807,7 +807,7 @@ static int adu_probe(struct usb_interface *interface,
 		dev_err(&interface->dev, "Could not retrieve serial number\n");
 		dev_err(&interface->dev, "Could not retrieve serial number\n");
 		goto error;
 		goto error;
 	}
 	}
-	dbg(2," %s : serial_number=%s", __FUNCTION__, dev->serial_number);
+	dbg(2," %s : serial_number=%s", __func__, dev->serial_number);
 
 
 	/* we can register the device now, as it is ready */
 	/* we can register the device now, as it is ready */
 	usb_set_intfdata(interface, dev);
 	usb_set_intfdata(interface, dev);
@@ -828,7 +828,7 @@ static int adu_probe(struct usb_interface *interface,
 		 udev->descriptor.idProduct, dev->serial_number,
 		 udev->descriptor.idProduct, dev->serial_number,
 		 (dev->minor - ADU_MINOR_BASE));
 		 (dev->minor - ADU_MINOR_BASE));
 exit:
 exit:
-	dbg(2," %s : leave, return value %p (dev)", __FUNCTION__, dev);
+	dbg(2," %s : leave, return value %p (dev)", __func__, dev);
 
 
 	return retval;
 	return retval;
 
 
@@ -847,7 +847,7 @@ static void adu_disconnect(struct usb_interface *interface)
 	struct adu_device *dev;
 	struct adu_device *dev;
 	int minor;
 	int minor;
 
 
-	dbg(2," %s : enter", __FUNCTION__);
+	dbg(2," %s : enter", __func__);
 
 
 	dev = usb_get_intfdata(interface);
 	dev = usb_get_intfdata(interface);
 
 
@@ -861,7 +861,7 @@ static void adu_disconnect(struct usb_interface *interface)
 	usb_set_intfdata(interface, NULL);
 	usb_set_intfdata(interface, NULL);
 
 
 	/* if the device is not opened, then we clean up right now */
 	/* if the device is not opened, then we clean up right now */
-	dbg(2," %s : open count %d", __FUNCTION__, dev->open_count);
+	dbg(2," %s : open count %d", __func__, dev->open_count);
 	if (!dev->open_count)
 	if (!dev->open_count)
 		adu_delete(dev);
 		adu_delete(dev);
 
 
@@ -870,7 +870,7 @@ static void adu_disconnect(struct usb_interface *interface)
 	dev_info(&interface->dev, "ADU device adutux%d now disconnected\n",
 	dev_info(&interface->dev, "ADU device adutux%d now disconnected\n",
 		 (minor - ADU_MINOR_BASE));
 		 (minor - ADU_MINOR_BASE));
 
 
-	dbg(2," %s : leave", __FUNCTION__);
+	dbg(2," %s : leave", __func__);
 }
 }
 
 
 /* usb specific object needed to register this driver with the usb subsystem */
 /* usb specific object needed to register this driver with the usb subsystem */
@@ -885,7 +885,7 @@ static int __init adu_init(void)
 {
 {
 	int result;
 	int result;
 
 
-	dbg(2," %s : enter", __FUNCTION__);
+	dbg(2," %s : enter", __func__);
 
 
 	/* register this driver with the USB subsystem */
 	/* register this driver with the USB subsystem */
 	result = usb_register(&adu_driver);
 	result = usb_register(&adu_driver);
@@ -899,17 +899,17 @@ static int __init adu_init(void)
 	info("adutux is an experimental driver. Use at your own risk");
 	info("adutux is an experimental driver. Use at your own risk");
 
 
 exit:
 exit:
-	dbg(2," %s : leave, return value %d", __FUNCTION__, result);
+	dbg(2," %s : leave, return value %d", __func__, result);
 
 
 	return result;
 	return result;
 }
 }
 
 
 static void __exit adu_exit(void)
 static void __exit adu_exit(void)
 {
 {
-	dbg(2," %s : enter", __FUNCTION__);
+	dbg(2," %s : enter", __func__);
 	/* deregister this driver with the USB subsystem */
 	/* deregister this driver with the USB subsystem */
 	usb_deregister(&adu_driver);
 	usb_deregister(&adu_driver);
-	dbg(2," %s : leave", __FUNCTION__);
+	dbg(2," %s : leave", __func__);
 }
 }
 
 
 module_init(adu_init);
 module_init(adu_init);

+ 3 - 3
drivers/usb/misc/appledisplay.c

@@ -103,11 +103,11 @@ static void appledisplay_complete(struct urb *urb)
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
 		/* This urb is terminated, clean up */
 		/* This urb is terminated, clean up */
 		dbg("%s - urb shuttingdown with status: %d",
 		dbg("%s - urb shuttingdown with status: %d",
-			__FUNCTION__, status);
+			__func__, status);
 		return;
 		return;
 	default:
 	default:
 		dbg("%s - nonzero urb status received: %d",
 		dbg("%s - nonzero urb status received: %d",
-			__FUNCTION__, status);
+			__func__, status);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -131,7 +131,7 @@ exit:
 	retval = usb_submit_urb(pdata->urb, GFP_ATOMIC);
 	retval = usb_submit_urb(pdata->urb, GFP_ATOMIC);
 	if (retval) {
 	if (retval) {
 		err("%s - usb_submit_urb failed with result %d",
 		err("%s - usb_submit_urb failed with result %d",
-			__FUNCTION__, retval);
+			__func__, retval);
 	}
 	}
 }
 }
 
 

+ 4 - 4
drivers/usb/misc/auerswald.c

@@ -983,7 +983,7 @@ static void auerswald_int_complete (struct urb * urb)
         pauerbuf_t   bp = NULL;
         pauerbuf_t   bp = NULL;
         pauerswald_t cp = (pauerswald_t) urb->context;
         pauerswald_t cp = (pauerswald_t) urb->context;
 
 
-        dbg ("%s called", __FUNCTION__);
+        dbg ("%s called", __func__);
 
 
 	switch (status) {
 	switch (status) {
 	case 0:
 	case 0:
@@ -993,10 +993,10 @@ static void auerswald_int_complete (struct urb * urb)
 	case -ENOENT:
 	case -ENOENT:
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
 		/* this urb is terminated, clean up */
 		/* this urb is terminated, clean up */
-		dbg("%s - urb shutting down with status: %d", __FUNCTION__, status);
+		dbg("%s - urb shutting down with status: %d", __func__, status);
 		return;
 		return;
 	default:
 	default:
-		dbg("%s - nonzero urb status received: %d", __FUNCTION__, status);
+		dbg("%s - nonzero urb status received: %d", __func__, status);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -1081,7 +1081,7 @@ exit:
 	ret = usb_submit_urb (urb, GFP_ATOMIC);
 	ret = usb_submit_urb (urb, GFP_ATOMIC);
 	if (ret)
 	if (ret)
 		err ("%s - usb_submit_urb failed with result %d",
 		err ("%s - usb_submit_urb failed with result %d",
-		     __FUNCTION__, ret);
+		     __func__, ret);
 }
 }
 
 
 /* int memory deallocation
 /* int memory deallocation

+ 15 - 15
drivers/usb/misc/emi26.c

@@ -70,8 +70,8 @@ static int emi26_writememory (struct usb_device *dev, int address, unsigned char
 static int emi26_set_reset (struct usb_device *dev, unsigned char reset_bit)
 static int emi26_set_reset (struct usb_device *dev, unsigned char reset_bit)
 {
 {
 	int response;
 	int response;
-	info("%s - %d", __FUNCTION__, reset_bit);
-	/* printk(KERN_DEBUG "%s - %d", __FUNCTION__, reset_bit); */
+	info("%s - %d", __func__, reset_bit);
+	/* printk(KERN_DEBUG "%s - %d", __func__, reset_bit); */
 	response = emi26_writememory (dev, CPUCS_REG, &reset_bit, 1, 0xa0);
 	response = emi26_writememory (dev, CPUCS_REG, &reset_bit, 1, 0xa0);
 	if (response < 0) {
 	if (response < 0) {
 		err("emi26: set_reset (%d) failed", reset_bit);
 		err("emi26: set_reset (%d) failed", reset_bit);
@@ -91,7 +91,7 @@ static int emi26_load_firmware (struct usb_device *dev)
 
 
 	buf = kmalloc(FW_LOAD_SIZE, GFP_KERNEL);
 	buf = kmalloc(FW_LOAD_SIZE, GFP_KERNEL);
 	if (!buf) {
 	if (!buf) {
-		err( "%s - error loading firmware: error = %d", __FUNCTION__, -ENOMEM);
+		err( "%s - error loading firmware: error = %d", __func__, -ENOMEM);
 		err = -ENOMEM;
 		err = -ENOMEM;
 		goto wraperr;
 		goto wraperr;
 	}
 	}
@@ -99,7 +99,7 @@ static int emi26_load_firmware (struct usb_device *dev)
 	/* Assert reset (stop the CPU in the EMI) */
 	/* Assert reset (stop the CPU in the EMI) */
 	err = emi26_set_reset(dev,1);
 	err = emi26_set_reset(dev,1);
 	if (err < 0) {
 	if (err < 0) {
-		err( "%s - error loading firmware: error = %d", __FUNCTION__, err);
+		err( "%s - error loading firmware: error = %d", __func__, err);
 		goto wraperr;
 		goto wraperr;
 	}
 	}
 
 
@@ -107,7 +107,7 @@ static int emi26_load_firmware (struct usb_device *dev)
 	for (i=0; g_Loader[i].type == 0; i++) {
 	for (i=0; g_Loader[i].type == 0; i++) {
 		err = emi26_writememory(dev, g_Loader[i].address, g_Loader[i].data, g_Loader[i].length, ANCHOR_LOAD_INTERNAL);
 		err = emi26_writememory(dev, g_Loader[i].address, g_Loader[i].data, g_Loader[i].length, ANCHOR_LOAD_INTERNAL);
 		if (err < 0) {
 		if (err < 0) {
-			err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+			err("%s - error loading firmware: error = %d", __func__, err);
 			goto wraperr;
 			goto wraperr;
 		}
 		}
 	}
 	}
@@ -115,7 +115,7 @@ static int emi26_load_firmware (struct usb_device *dev)
 	/* De-assert reset (let the CPU run) */
 	/* De-assert reset (let the CPU run) */
 	err = emi26_set_reset(dev,0);
 	err = emi26_set_reset(dev,0);
 	if (err < 0) {
 	if (err < 0) {
-		err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+		err("%s - error loading firmware: error = %d", __func__, err);
 		goto wraperr;
 		goto wraperr;
 	}
 	}
 	msleep(250);	/* let device settle */
 	msleep(250);	/* let device settle */
@@ -135,7 +135,7 @@ static int emi26_load_firmware (struct usb_device *dev)
 		}
 		}
 		err = emi26_writememory(dev, addr, buf, i, ANCHOR_LOAD_FPGA);
 		err = emi26_writememory(dev, addr, buf, i, ANCHOR_LOAD_FPGA);
 		if (err < 0) {
 		if (err < 0) {
-			err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+			err("%s - error loading firmware: error = %d", __func__, err);
 			goto wraperr;
 			goto wraperr;
 		}
 		}
 	} while (i > 0);
 	} while (i > 0);
@@ -143,7 +143,7 @@ static int emi26_load_firmware (struct usb_device *dev)
 	/* Assert reset (stop the CPU in the EMI) */
 	/* Assert reset (stop the CPU in the EMI) */
 	err = emi26_set_reset(dev,1);
 	err = emi26_set_reset(dev,1);
 	if (err < 0) {
 	if (err < 0) {
-		err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+		err("%s - error loading firmware: error = %d", __func__, err);
 		goto wraperr;
 		goto wraperr;
 	}
 	}
 
 
@@ -151,7 +151,7 @@ static int emi26_load_firmware (struct usb_device *dev)
 	for (i=0; g_Loader[i].type == 0; i++) {
 	for (i=0; g_Loader[i].type == 0; i++) {
 		err = emi26_writememory(dev, g_Loader[i].address, g_Loader[i].data, g_Loader[i].length, ANCHOR_LOAD_INTERNAL);
 		err = emi26_writememory(dev, g_Loader[i].address, g_Loader[i].data, g_Loader[i].length, ANCHOR_LOAD_INTERNAL);
 		if (err < 0) {
 		if (err < 0) {
-			err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+			err("%s - error loading firmware: error = %d", __func__, err);
 			goto wraperr;
 			goto wraperr;
 		}
 		}
 	}
 	}
@@ -160,7 +160,7 @@ static int emi26_load_firmware (struct usb_device *dev)
 	/* De-assert reset (let the CPU run) */
 	/* De-assert reset (let the CPU run) */
 	err = emi26_set_reset(dev,0);
 	err = emi26_set_reset(dev,0);
 	if (err < 0) {
 	if (err < 0) {
-		err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+		err("%s - error loading firmware: error = %d", __func__, err);
 		goto wraperr;
 		goto wraperr;
 	}
 	}
 
 
@@ -169,7 +169,7 @@ static int emi26_load_firmware (struct usb_device *dev)
 		if (!INTERNAL_RAM(g_Firmware[i].address)) {
 		if (!INTERNAL_RAM(g_Firmware[i].address)) {
 			err = emi26_writememory(dev, g_Firmware[i].address, g_Firmware[i].data, g_Firmware[i].length, ANCHOR_LOAD_EXTERNAL);
 			err = emi26_writememory(dev, g_Firmware[i].address, g_Firmware[i].data, g_Firmware[i].length, ANCHOR_LOAD_EXTERNAL);
 			if (err < 0) {
 			if (err < 0) {
-				err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+				err("%s - error loading firmware: error = %d", __func__, err);
 				goto wraperr;
 				goto wraperr;
 			}
 			}
 		}
 		}
@@ -178,7 +178,7 @@ static int emi26_load_firmware (struct usb_device *dev)
 	/* Assert reset (stop the CPU in the EMI) */
 	/* Assert reset (stop the CPU in the EMI) */
 	err = emi26_set_reset(dev,1);
 	err = emi26_set_reset(dev,1);
 	if (err < 0) {
 	if (err < 0) {
-		err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+		err("%s - error loading firmware: error = %d", __func__, err);
 		goto wraperr;
 		goto wraperr;
 	}
 	}
 
 
@@ -186,7 +186,7 @@ static int emi26_load_firmware (struct usb_device *dev)
 		if (INTERNAL_RAM(g_Firmware[i].address)) {
 		if (INTERNAL_RAM(g_Firmware[i].address)) {
 			err = emi26_writememory(dev, g_Firmware[i].address, g_Firmware[i].data, g_Firmware[i].length, ANCHOR_LOAD_INTERNAL);
 			err = emi26_writememory(dev, g_Firmware[i].address, g_Firmware[i].data, g_Firmware[i].length, ANCHOR_LOAD_INTERNAL);
 			if (err < 0) {
 			if (err < 0) {
-				err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+				err("%s - error loading firmware: error = %d", __func__, err);
 				goto wraperr;
 				goto wraperr;
 			}
 			}
 		}
 		}
@@ -195,7 +195,7 @@ static int emi26_load_firmware (struct usb_device *dev)
 	/* De-assert reset (let the CPU run) */
 	/* De-assert reset (let the CPU run) */
 	err = emi26_set_reset(dev,0);
 	err = emi26_set_reset(dev,0);
 	if (err < 0) {
 	if (err < 0) {
-		err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+		err("%s - error loading firmware: error = %d", __func__, err);
 		goto wraperr;
 		goto wraperr;
 	}
 	}
 	msleep(250);	/* let device settle */
 	msleep(250);	/* let device settle */
@@ -221,7 +221,7 @@ static int emi26_probe(struct usb_interface *intf, const struct usb_device_id *i
 {
 {
 	struct usb_device *dev = interface_to_usbdev(intf);
 	struct usb_device *dev = interface_to_usbdev(intf);
 
 
-	info("%s start", __FUNCTION__); 
+	info("%s start", __func__);
 
 
 	emi26_load_firmware(dev);
 	emi26_load_firmware(dev);
 
 

+ 16 - 16
drivers/usb/misc/emi62.c

@@ -78,7 +78,7 @@ static int emi62_writememory (struct usb_device *dev, int address, unsigned char
 static int emi62_set_reset (struct usb_device *dev, unsigned char reset_bit)
 static int emi62_set_reset (struct usb_device *dev, unsigned char reset_bit)
 {
 {
 	int response;
 	int response;
-	info("%s - %d", __FUNCTION__, reset_bit);
+	info("%s - %d", __func__, reset_bit);
 	
 	
 	response = emi62_writememory (dev, CPUCS_REG, &reset_bit, 1, 0xa0);
 	response = emi62_writememory (dev, CPUCS_REG, &reset_bit, 1, 0xa0);
 	if (response < 0) {
 	if (response < 0) {
@@ -100,7 +100,7 @@ static int emi62_load_firmware (struct usb_device *dev)
 	dev_dbg(&dev->dev, "load_firmware\n");
 	dev_dbg(&dev->dev, "load_firmware\n");
 	buf = kmalloc(FW_LOAD_SIZE, GFP_KERNEL);
 	buf = kmalloc(FW_LOAD_SIZE, GFP_KERNEL);
 	if (!buf) {
 	if (!buf) {
-		err( "%s - error loading firmware: error = %d", __FUNCTION__, -ENOMEM);
+		err( "%s - error loading firmware: error = %d", __func__, -ENOMEM);
 		err = -ENOMEM;
 		err = -ENOMEM;
 		goto wraperr;
 		goto wraperr;
 	}
 	}
@@ -108,7 +108,7 @@ static int emi62_load_firmware (struct usb_device *dev)
 	/* Assert reset (stop the CPU in the EMI) */
 	/* Assert reset (stop the CPU in the EMI) */
 	err = emi62_set_reset(dev,1);
 	err = emi62_set_reset(dev,1);
 	if (err < 0) {
 	if (err < 0) {
-		err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+		err("%s - error loading firmware: error = %d", __func__, err);
 		goto wraperr;
 		goto wraperr;
 	}
 	}
 
 
@@ -116,7 +116,7 @@ static int emi62_load_firmware (struct usb_device *dev)
 	for (i=0; g_emi62_loader[i].type == 0; i++) {
 	for (i=0; g_emi62_loader[i].type == 0; i++) {
 		err = emi62_writememory(dev, g_emi62_loader[i].address, g_emi62_loader[i].data, g_emi62_loader[i].length, ANCHOR_LOAD_INTERNAL);
 		err = emi62_writememory(dev, g_emi62_loader[i].address, g_emi62_loader[i].data, g_emi62_loader[i].length, ANCHOR_LOAD_INTERNAL);
 		if (err < 0) {
 		if (err < 0) {
-			err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+			err("%s - error loading firmware: error = %d", __func__, err);
 			goto wraperr;
 			goto wraperr;
 		}
 		}
 	}
 	}
@@ -124,7 +124,7 @@ static int emi62_load_firmware (struct usb_device *dev)
 	/* De-assert reset (let the CPU run) */
 	/* De-assert reset (let the CPU run) */
 	err = emi62_set_reset(dev,0);
 	err = emi62_set_reset(dev,0);
 	if (err < 0) {
 	if (err < 0) {
-		err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+		err("%s - error loading firmware: error = %d", __func__, err);
 		goto wraperr;
 		goto wraperr;
 	}
 	}
 	msleep(250);	/* let device settle */
 	msleep(250);	/* let device settle */
@@ -144,7 +144,7 @@ static int emi62_load_firmware (struct usb_device *dev)
 		}
 		}
 		err = emi62_writememory(dev, addr, buf, i, ANCHOR_LOAD_FPGA);
 		err = emi62_writememory(dev, addr, buf, i, ANCHOR_LOAD_FPGA);
 		if (err < 0) {
 		if (err < 0) {
-			err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+			err("%s - error loading firmware: error = %d", __func__, err);
 			goto wraperr;
 			goto wraperr;
 		}
 		}
 	} while (i > 0);
 	} while (i > 0);
@@ -152,7 +152,7 @@ static int emi62_load_firmware (struct usb_device *dev)
 	/* Assert reset (stop the CPU in the EMI) */
 	/* Assert reset (stop the CPU in the EMI) */
 	err = emi62_set_reset(dev,1);
 	err = emi62_set_reset(dev,1);
 	if (err < 0) {
 	if (err < 0) {
-		err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+		err("%s - error loading firmware: error = %d", __func__, err);
 		goto wraperr;
 		goto wraperr;
 	}
 	}
 
 
@@ -160,7 +160,7 @@ static int emi62_load_firmware (struct usb_device *dev)
 	for (i=0; g_emi62_loader[i].type == 0; i++) {
 	for (i=0; g_emi62_loader[i].type == 0; i++) {
 		err = emi62_writememory(dev, g_emi62_loader[i].address, g_emi62_loader[i].data, g_emi62_loader[i].length, ANCHOR_LOAD_INTERNAL);
 		err = emi62_writememory(dev, g_emi62_loader[i].address, g_emi62_loader[i].data, g_emi62_loader[i].length, ANCHOR_LOAD_INTERNAL);
 		if (err < 0) {
 		if (err < 0) {
-			err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+			err("%s - error loading firmware: error = %d", __func__, err);
 			goto wraperr;
 			goto wraperr;
 		}
 		}
 	}
 	}
@@ -168,7 +168,7 @@ static int emi62_load_firmware (struct usb_device *dev)
 	/* De-assert reset (let the CPU run) */
 	/* De-assert reset (let the CPU run) */
 	err = emi62_set_reset(dev,0);
 	err = emi62_set_reset(dev,0);
 	if (err < 0) {
 	if (err < 0) {
-		err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+		err("%s - error loading firmware: error = %d", __func__, err);
 		goto wraperr;
 		goto wraperr;
 	}
 	}
 	msleep(250);	/* let device settle */
 	msleep(250);	/* let device settle */
@@ -181,7 +181,7 @@ static int emi62_load_firmware (struct usb_device *dev)
 		if (!INTERNAL_RAM(g_HexSpdifFw62[i].address)) {
 		if (!INTERNAL_RAM(g_HexSpdifFw62[i].address)) {
 			err = emi62_writememory(dev, g_HexSpdifFw62[i].address, g_HexSpdifFw62[i].data, g_HexSpdifFw62[i].length, ANCHOR_LOAD_EXTERNAL);
 			err = emi62_writememory(dev, g_HexSpdifFw62[i].address, g_HexSpdifFw62[i].data, g_HexSpdifFw62[i].length, ANCHOR_LOAD_EXTERNAL);
 			if (err < 0) {
 			if (err < 0) {
-				err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+				err("%s - error loading firmware: error = %d", __func__, err);
 				goto wraperr;
 				goto wraperr;
 			}
 			}
 		}
 		}
@@ -191,7 +191,7 @@ static int emi62_load_firmware (struct usb_device *dev)
 		if (!INTERNAL_RAM(g_HexMidiFw62[i].address)) {
 		if (!INTERNAL_RAM(g_HexMidiFw62[i].address)) {
 			err = emi62_writememory(dev, g_HexMidiFw62[i].address, g_HexMidiFw62[i].data, g_HexMidiFw62[i].length, ANCHOR_LOAD_EXTERNAL);
 			err = emi62_writememory(dev, g_HexMidiFw62[i].address, g_HexMidiFw62[i].data, g_HexMidiFw62[i].length, ANCHOR_LOAD_EXTERNAL);
 			if (err < 0) {
 			if (err < 0) {
-				err("%s - error loading firmware: error = %d\n", __FUNCTION__, err);
+				err("%s - error loading firmware: error = %d\n", __func__, err);
 				goto wraperr;
 				goto wraperr;
 				return err;
 				return err;
 			}
 			}
@@ -201,7 +201,7 @@ static int emi62_load_firmware (struct usb_device *dev)
 	/* Assert reset (stop the CPU in the EMI) */
 	/* Assert reset (stop the CPU in the EMI) */
 	err = emi62_set_reset(dev,1);
 	err = emi62_set_reset(dev,1);
 	if (err < 0) {
 	if (err < 0) {
-		err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+		err("%s - error loading firmware: error = %d", __func__, err);
 		goto wraperr;
 		goto wraperr;
 	}
 	}
 
 
@@ -211,7 +211,7 @@ static int emi62_load_firmware (struct usb_device *dev)
 		if (INTERNAL_RAM(g_HexSpdifFw62[i].address)) {
 		if (INTERNAL_RAM(g_HexSpdifFw62[i].address)) {
 			err = emi62_writememory(dev, g_HexSpdifFw62[i].address, g_HexSpdifFw62[i].data, g_HexSpdifFw62[i].length, ANCHOR_LOAD_INTERNAL);
 			err = emi62_writememory(dev, g_HexSpdifFw62[i].address, g_HexSpdifFw62[i].data, g_HexSpdifFw62[i].length, ANCHOR_LOAD_INTERNAL);
 			if (err < 0) {
 			if (err < 0) {
-				err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+				err("%s - error loading firmware: error = %d", __func__, err);
 				goto wraperr;
 				goto wraperr;
 			}
 			}
 		}
 		}
@@ -221,7 +221,7 @@ static int emi62_load_firmware (struct usb_device *dev)
 		if (INTERNAL_RAM(g_HexMidiFw62[i].address)) {
 		if (INTERNAL_RAM(g_HexMidiFw62[i].address)) {
 			err = emi62_writememory(dev, g_HexMidiFw62[i].address, g_HexMidiFw62[i].data, g_HexMidiFw62[i].length, ANCHOR_LOAD_INTERNAL);
 			err = emi62_writememory(dev, g_HexMidiFw62[i].address, g_HexMidiFw62[i].data, g_HexMidiFw62[i].length, ANCHOR_LOAD_INTERNAL);
 			if (err < 0) {
 			if (err < 0) {
-				err("%s - error loading firmware: error = %d\n", __FUNCTION__, err);
+				err("%s - error loading firmware: error = %d\n", __func__, err);
 				goto wraperr;
 				goto wraperr;
 			}
 			}
 		}
 		}
@@ -231,7 +231,7 @@ static int emi62_load_firmware (struct usb_device *dev)
 	/* De-assert reset (let the CPU run) */
 	/* De-assert reset (let the CPU run) */
 	err = emi62_set_reset(dev,0);
 	err = emi62_set_reset(dev,0);
 	if (err < 0) {
 	if (err < 0) {
-		err("%s - error loading firmware: error = %d", __FUNCTION__, err);
+		err("%s - error loading firmware: error = %d", __func__, err);
 		goto wraperr;
 		goto wraperr;
 	}
 	}
 	msleep(250);	/* let device settle */
 	msleep(250);	/* let device settle */
@@ -260,7 +260,7 @@ static int emi62_probe(struct usb_interface *intf, const struct usb_device_id *i
 	struct usb_device *dev = interface_to_usbdev(intf);
 	struct usb_device *dev = interface_to_usbdev(intf);
 	dev_dbg(&intf->dev, "emi62_probe\n");
 	dev_dbg(&intf->dev, "emi62_probe\n");
 
 
-	info("%s start", __FUNCTION__); 
+	info("%s start", __func__);
 
 
 	emi62_load_firmware(dev);
 	emi62_load_firmware(dev);
 
 

+ 3 - 3
drivers/usb/misc/iowarrior.c

@@ -218,7 +218,7 @@ exit:
 	retval = usb_submit_urb(urb, GFP_ATOMIC);
 	retval = usb_submit_urb(urb, GFP_ATOMIC);
 	if (retval)
 	if (retval)
 		dev_err(&dev->interface->dev, "%s - usb_submit_urb failed with result %d\n",
 		dev_err(&dev->interface->dev, "%s - usb_submit_urb failed with result %d\n",
-			__FUNCTION__, retval);
+			__func__, retval);
 
 
 }
 }
 
 
@@ -453,7 +453,7 @@ static ssize_t iowarrior_write(struct file *file,
 	default:
 	default:
 		/* what do we have here ? An unsupported Product-ID ? */
 		/* what do we have here ? An unsupported Product-ID ? */
 		dev_err(&dev->interface->dev, "%s - not supported for product=0x%x\n",
 		dev_err(&dev->interface->dev, "%s - not supported for product=0x%x\n",
-			__FUNCTION__, dev->product_id);
+			__func__, dev->product_id);
 		retval = -EFAULT;
 		retval = -EFAULT;
 		goto exit;
 		goto exit;
 		break;
 		break;
@@ -604,7 +604,7 @@ static int iowarrior_open(struct inode *inode, struct file *file)
 
 
 	interface = usb_find_interface(&iowarrior_driver, subminor);
 	interface = usb_find_interface(&iowarrior_driver, subminor);
 	if (!interface) {
 	if (!interface) {
-		err("%s - error, can't find device for minor %d", __FUNCTION__,
+		err("%s - error, can't find device for minor %d", __func__,
 		    subminor);
 		    subminor);
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}

+ 5 - 5
drivers/usb/misc/ldusb.c

@@ -231,7 +231,7 @@ static void ld_usb_interrupt_in_callback(struct urb *urb)
 			goto exit;
 			goto exit;
 		} else {
 		} else {
 			dbg_info(&dev->intf->dev, "%s: nonzero status received: %d\n",
 			dbg_info(&dev->intf->dev, "%s: nonzero status received: %d\n",
-				 __FUNCTION__, status);
+				 __func__, status);
 			spin_lock(&dev->rbsl);
 			spin_lock(&dev->rbsl);
 			goto resubmit; /* maybe we can recover */
 			goto resubmit; /* maybe we can recover */
 		}
 		}
@@ -247,7 +247,7 @@ static void ld_usb_interrupt_in_callback(struct urb *urb)
 			memcpy(actual_buffer+1, dev->interrupt_in_buffer, urb->actual_length);
 			memcpy(actual_buffer+1, dev->interrupt_in_buffer, urb->actual_length);
 			dev->ring_head = next_ring_head;
 			dev->ring_head = next_ring_head;
 			dbg_info(&dev->intf->dev, "%s: received %d bytes\n",
 			dbg_info(&dev->intf->dev, "%s: received %d bytes\n",
-				 __FUNCTION__, urb->actual_length);
+				 __func__, urb->actual_length);
 		} else {
 		} else {
 			dev_warn(&dev->intf->dev,
 			dev_warn(&dev->intf->dev,
 				 "Ring buffer overflow, %d bytes dropped\n",
 				 "Ring buffer overflow, %d bytes dropped\n",
@@ -286,7 +286,7 @@ static void ld_usb_interrupt_out_callback(struct urb *urb)
 			status == -ESHUTDOWN))
 			status == -ESHUTDOWN))
 		dbg_info(&dev->intf->dev,
 		dbg_info(&dev->intf->dev,
 			 "%s - nonzero write interrupt status received: %d\n",
 			 "%s - nonzero write interrupt status received: %d\n",
-			 __FUNCTION__, status);
+			 __func__, status);
 
 
 	dev->interrupt_out_busy = 0;
 	dev->interrupt_out_busy = 0;
 	wake_up_interruptible(&dev->write_wait);
 	wake_up_interruptible(&dev->write_wait);
@@ -309,7 +309,7 @@ static int ld_usb_open(struct inode *inode, struct file *file)
 
 
 	if (!interface) {
 	if (!interface) {
 		err("%s - error, can't find device for minor %d\n",
 		err("%s - error, can't find device for minor %d\n",
-		     __FUNCTION__, subminor);
+		     __func__, subminor);
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}
 
 
@@ -556,7 +556,7 @@ static ssize_t ld_usb_write(struct file *file, const char __user *buffer,
 	bytes_to_write = min(count, write_buffer_size*dev->interrupt_out_endpoint_size);
 	bytes_to_write = min(count, write_buffer_size*dev->interrupt_out_endpoint_size);
 	if (bytes_to_write < count)
 	if (bytes_to_write < count)
 		dev_warn(&dev->intf->dev, "Write buffer overflow, %zd bytes dropped\n",count-bytes_to_write);
 		dev_warn(&dev->intf->dev, "Write buffer overflow, %zd bytes dropped\n",count-bytes_to_write);
-	dbg_info(&dev->intf->dev, "%s: count = %zd, bytes_to_write = %zd\n", __FUNCTION__, count, bytes_to_write);
+	dbg_info(&dev->intf->dev, "%s: count = %zd, bytes_to_write = %zd\n", __func__, count, bytes_to_write);
 
 
 	if (copy_from_user(dev->interrupt_out_buffer, buffer, bytes_to_write)) {
 	if (copy_from_user(dev->interrupt_out_buffer, buffer, bytes_to_write)) {
 		retval = -EFAULT;
 		retval = -EFAULT;

+ 44 - 44
drivers/usb/misc/legousbtower.c

@@ -31,7 +31,7 @@
  *   - imported into lejos project
  *   - imported into lejos project
  *   - changed wake_up to wake_up_interruptible
  *   - changed wake_up to wake_up_interruptible
  *   - changed to use lego0 rather than tower0
  *   - changed to use lego0 rather than tower0
- *   - changed dbg() to use __func__ rather than deprecated __FUNCTION__
+ *   - changed dbg() to use __func__ rather than deprecated __func__
  * 2003-01-12 - 0.53 david (david@csse.uwa.edu.au)
  * 2003-01-12 - 0.53 david (david@csse.uwa.edu.au)
  *   - changed read and write to write everything or
  *   - changed read and write to write everything or
  *     timeout (from a patch by Chris Riesen and Brett Thaeler driver)
  *     timeout (from a patch by Chris Riesen and Brett Thaeler driver)
@@ -49,7 +49,7 @@
  *   - added poll
  *   - added poll
  *   - forbid seeking
  *   - forbid seeking
  *   - added nonblocking I/O
  *   - added nonblocking I/O
- *   - changed back __func__ to __FUNCTION__
+ *   - changed back __func__ to __func__
  *   - read and log tower firmware version
  *   - read and log tower firmware version
  *   - reset tower on probe, avoids failure of first write
  *   - reset tower on probe, avoids failure of first write
  * 2004-03-09 - 0.7 Juergen Stuber <starblue@users.sourceforge.net>
  * 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
  */
  */
 static inline void tower_delete (struct lego_usb_tower *dev)
 static inline void tower_delete (struct lego_usb_tower *dev)
 {
 {
-	dbg(2, "%s: enter", __FUNCTION__);
+	dbg(2, "%s: enter", __func__);
 
 
 	tower_abort_transfers (dev);
 	tower_abort_transfers (dev);
 
 
@@ -321,7 +321,7 @@ static inline void tower_delete (struct lego_usb_tower *dev)
 	kfree (dev->interrupt_out_buffer);
 	kfree (dev->interrupt_out_buffer);
 	kfree (dev);
 	kfree (dev);
 
 
-	dbg(2, "%s: leave", __FUNCTION__);
+	dbg(2, "%s: leave", __func__);
 }
 }
 
 
 
 
@@ -337,7 +337,7 @@ static int tower_open (struct inode *inode, struct file *file)
 	struct tower_reset_reply reset_reply;
 	struct tower_reset_reply reset_reply;
 	int result;
 	int result;
 
 
-	dbg(2, "%s: enter", __FUNCTION__);
+	dbg(2, "%s: enter", __func__);
 
 
 	nonseekable_open(inode, file);
 	nonseekable_open(inode, file);
 	subminor = iminor(inode);
 	subminor = iminor(inode);
@@ -346,7 +346,7 @@ static int tower_open (struct inode *inode, struct file *file)
 
 
 	if (!interface) {
 	if (!interface) {
 		err ("%s - error, can't find device for minor %d",
 		err ("%s - error, can't find device for minor %d",
-		     __FUNCTION__, subminor);
+		     __func__, subminor);
 		retval = -ENODEV;
 		retval = -ENODEV;
 		goto exit;
 		goto exit;
 	}
 	}
@@ -424,7 +424,7 @@ unlock_exit:
 	mutex_unlock(&dev->lock);
 	mutex_unlock(&dev->lock);
 
 
 exit:
 exit:
-	dbg(2, "%s: leave, return value %d ", __FUNCTION__, retval);
+	dbg(2, "%s: leave, return value %d ", __func__, retval);
 
 
 	return retval;
 	return retval;
 }
 }
@@ -437,12 +437,12 @@ static int tower_release (struct inode *inode, struct file *file)
 	struct lego_usb_tower *dev;
 	struct lego_usb_tower *dev;
 	int retval = 0;
 	int retval = 0;
 
 
-	dbg(2, "%s: enter", __FUNCTION__);
+	dbg(2, "%s: enter", __func__);
 
 
 	dev = (struct lego_usb_tower *)file->private_data;
 	dev = (struct lego_usb_tower *)file->private_data;
 
 
 	if (dev == NULL) {
 	if (dev == NULL) {
-		dbg(1, "%s: object is NULL", __FUNCTION__);
+		dbg(1, "%s: object is NULL", __func__);
 		retval = -ENODEV;
 		retval = -ENODEV;
 		goto exit_nolock;
 		goto exit_nolock;
 	}
 	}
@@ -454,7 +454,7 @@ static int tower_release (struct inode *inode, struct file *file)
 	}
 	}
 
 
 	if (dev->open_count != 1) {
 	if (dev->open_count != 1) {
-		dbg(1, "%s: device not opened exactly once", __FUNCTION__);
+		dbg(1, "%s: device not opened exactly once", __func__);
 		retval = -ENODEV;
 		retval = -ENODEV;
 		goto unlock_exit;
 		goto unlock_exit;
 	}
 	}
@@ -480,7 +480,7 @@ unlock_exit:
 exit:
 exit:
 	mutex_unlock(&open_disc_mutex);
 	mutex_unlock(&open_disc_mutex);
 exit_nolock:
 exit_nolock:
-	dbg(2, "%s: leave, return value %d", __FUNCTION__, retval);
+	dbg(2, "%s: leave, return value %d", __func__, retval);
 	return retval;
 	return retval;
 }
 }
 
 
@@ -491,10 +491,10 @@ exit_nolock:
  */
  */
 static void tower_abort_transfers (struct lego_usb_tower *dev)
 static void tower_abort_transfers (struct lego_usb_tower *dev)
 {
 {
-	dbg(2, "%s: enter", __FUNCTION__);
+	dbg(2, "%s: enter", __func__);
 
 
 	if (dev == NULL) {
 	if (dev == NULL) {
-		dbg(1, "%s: dev is null", __FUNCTION__);
+		dbg(1, "%s: dev is null", __func__);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -509,7 +509,7 @@ static void tower_abort_transfers (struct lego_usb_tower *dev)
 		usb_kill_urb(dev->interrupt_out_urb);
 		usb_kill_urb(dev->interrupt_out_urb);
 
 
 exit:
 exit:
-	dbg(2, "%s: leave", __FUNCTION__);
+	dbg(2, "%s: leave", __func__);
 }
 }
 
 
 
 
@@ -542,7 +542,7 @@ static unsigned int tower_poll (struct file *file, poll_table *wait)
 	struct lego_usb_tower *dev;
 	struct lego_usb_tower *dev;
 	unsigned int mask = 0;
 	unsigned int mask = 0;
 
 
-	dbg(2, "%s: enter", __FUNCTION__);
+	dbg(2, "%s: enter", __func__);
 
 
 	dev = file->private_data;
 	dev = file->private_data;
 
 
@@ -557,7 +557,7 @@ static unsigned int tower_poll (struct file *file, poll_table *wait)
 		mask |= POLLOUT | POLLWRNORM;
 		mask |= POLLOUT | POLLWRNORM;
 	}
 	}
 
 
-	dbg(2, "%s: leave, mask = %d", __FUNCTION__, mask);
+	dbg(2, "%s: leave, mask = %d", __func__, mask);
 
 
 	return mask;
 	return mask;
 }
 }
@@ -583,7 +583,7 @@ static ssize_t tower_read (struct file *file, char __user *buffer, size_t count,
 	int retval = 0;
 	int retval = 0;
 	unsigned long timeout = 0;
 	unsigned long timeout = 0;
 
 
-	dbg(2, "%s: enter, count = %Zd", __FUNCTION__, count);
+	dbg(2, "%s: enter, count = %Zd", __func__, count);
 
 
 	dev = (struct lego_usb_tower *)file->private_data;
 	dev = (struct lego_usb_tower *)file->private_data;
 
 
@@ -602,7 +602,7 @@ static ssize_t tower_read (struct file *file, char __user *buffer, size_t count,
 
 
 	/* verify that we actually have some data to read */
 	/* verify that we actually have some data to read */
 	if (count == 0) {
 	if (count == 0) {
-		dbg(1, "%s: read request of 0 bytes", __FUNCTION__);
+		dbg(1, "%s: read request of 0 bytes", __func__);
 		goto unlock_exit;
 		goto unlock_exit;
 	}
 	}
 
 
@@ -658,7 +658,7 @@ unlock_exit:
 	mutex_unlock(&dev->lock);
 	mutex_unlock(&dev->lock);
 
 
 exit:
 exit:
-	dbg(2, "%s: leave, return value %d", __FUNCTION__, retval);
+	dbg(2, "%s: leave, return value %d", __func__, retval);
 	return retval;
 	return retval;
 }
 }
 
 
@@ -672,7 +672,7 @@ static ssize_t tower_write (struct file *file, const char __user *buffer, size_t
 	size_t bytes_to_write;
 	size_t bytes_to_write;
 	int retval = 0;
 	int retval = 0;
 
 
-	dbg(2, "%s: enter, count = %Zd", __FUNCTION__, count);
+	dbg(2, "%s: enter, count = %Zd", __func__, count);
 
 
 	dev = (struct lego_usb_tower *)file->private_data;
 	dev = (struct lego_usb_tower *)file->private_data;
 
 
@@ -691,7 +691,7 @@ static ssize_t tower_write (struct file *file, const char __user *buffer, size_t
 
 
 	/* verify that we actually have some data to write */
 	/* verify that we actually have some data to write */
 	if (count == 0) {
 	if (count == 0) {
-		dbg(1, "%s: write request of 0 bytes", __FUNCTION__);
+		dbg(1, "%s: write request of 0 bytes", __func__);
 		goto unlock_exit;
 		goto unlock_exit;
 	}
 	}
 
 
@@ -709,7 +709,7 @@ static ssize_t tower_write (struct file *file, const char __user *buffer, size_t
 
 
 	/* write the data into interrupt_out_buffer from userspace */
 	/* write the data into interrupt_out_buffer from userspace */
 	bytes_to_write = min_t(int, count, write_buffer_size);
 	bytes_to_write = min_t(int, count, write_buffer_size);
-	dbg(4, "%s: count = %Zd, bytes_to_write = %Zd", __FUNCTION__, count, bytes_to_write);
+	dbg(4, "%s: count = %Zd, bytes_to_write = %Zd", __func__, count, bytes_to_write);
 
 
 	if (copy_from_user (dev->interrupt_out_buffer, buffer, bytes_to_write)) {
 	if (copy_from_user (dev->interrupt_out_buffer, buffer, bytes_to_write)) {
 		retval = -EFAULT;
 		retval = -EFAULT;
@@ -742,7 +742,7 @@ unlock_exit:
 	mutex_unlock(&dev->lock);
 	mutex_unlock(&dev->lock);
 
 
 exit:
 exit:
-	dbg(2, "%s: leave, return value %d", __FUNCTION__, retval);
+	dbg(2, "%s: leave, return value %d", __func__, retval);
 
 
 	return retval;
 	return retval;
 }
 }
@@ -757,9 +757,9 @@ static void tower_interrupt_in_callback (struct urb *urb)
 	int status = urb->status;
 	int status = urb->status;
 	int retval;
 	int retval;
 
 
-	dbg(4, "%s: enter, status %d", __FUNCTION__, status);
+	dbg(4, "%s: enter, status %d", __func__, status);
 
 
-	lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
+	lego_usb_tower_debug_data(5, __func__, urb->actual_length, urb->transfer_buffer);
 
 
 	if (status) {
 	if (status) {
 		if (status == -ENOENT ||
 		if (status == -ENOENT ||
@@ -767,7 +767,7 @@ static void tower_interrupt_in_callback (struct urb *urb)
 		    status == -ESHUTDOWN) {
 		    status == -ESHUTDOWN) {
 			goto exit;
 			goto exit;
 		} else {
 		} else {
-			dbg(1, "%s: nonzero status received: %d", __FUNCTION__, status);
+			dbg(1, "%s: nonzero status received: %d", __func__, status);
 			goto resubmit; /* maybe we can recover */
 			goto resubmit; /* maybe we can recover */
 		}
 		}
 	}
 	}
@@ -780,9 +780,9 @@ static void tower_interrupt_in_callback (struct urb *urb)
 				urb->actual_length);
 				urb->actual_length);
 			dev->read_buffer_length += urb->actual_length;
 			dev->read_buffer_length += urb->actual_length;
 			dev->read_last_arrival = jiffies;
 			dev->read_last_arrival = jiffies;
-			dbg(3, "%s: received %d bytes", __FUNCTION__, urb->actual_length);
+			dbg(3, "%s: received %d bytes", __func__, urb->actual_length);
 		} else {
 		} else {
-			printk(KERN_WARNING "%s: read_buffer overflow, %d bytes dropped", __FUNCTION__, urb->actual_length);
+			printk(KERN_WARNING "%s: read_buffer overflow, %d bytes dropped", __func__, urb->actual_length);
 		}
 		}
 		spin_unlock (&dev->read_buffer_lock);
 		spin_unlock (&dev->read_buffer_lock);
 	}
 	}
@@ -792,7 +792,7 @@ resubmit:
 	if (dev->interrupt_in_running && dev->udev) {
 	if (dev->interrupt_in_running && dev->udev) {
 		retval = usb_submit_urb (dev->interrupt_in_urb, GFP_ATOMIC);
 		retval = usb_submit_urb (dev->interrupt_in_urb, GFP_ATOMIC);
 		if (retval) {
 		if (retval) {
-			err("%s: usb_submit_urb failed (%d)", __FUNCTION__, retval);
+			err("%s: usb_submit_urb failed (%d)", __func__, retval);
 		}
 		}
 	}
 	}
 
 
@@ -800,8 +800,8 @@ exit:
 	dev->interrupt_in_done = 1;
 	dev->interrupt_in_done = 1;
 	wake_up_interruptible (&dev->read_wait);
 	wake_up_interruptible (&dev->read_wait);
 
 
-	lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
-	dbg(4, "%s: leave, status %d", __FUNCTION__, status);
+	lego_usb_tower_debug_data(5, __func__, urb->actual_length, urb->transfer_buffer);
+	dbg(4, "%s: leave, status %d", __func__, status);
 }
 }
 
 
 
 
@@ -813,22 +813,22 @@ static void tower_interrupt_out_callback (struct urb *urb)
 	struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context;
 	struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg(4, "%s: enter, status %d", __FUNCTION__, status);
-	lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
+	dbg(4, "%s: enter, status %d", __func__, status);
+	lego_usb_tower_debug_data(5, __func__, urb->actual_length, urb->transfer_buffer);
 
 
 	/* sync/async unlink faults aren't errors */
 	/* sync/async unlink faults aren't errors */
 	if (status && !(status == -ENOENT ||
 	if (status && !(status == -ENOENT ||
 			status == -ECONNRESET ||
 			status == -ECONNRESET ||
 			status == -ESHUTDOWN)) {
 			status == -ESHUTDOWN)) {
 		dbg(1, "%s - nonzero write bulk status received: %d",
 		dbg(1, "%s - nonzero write bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 	}
 	}
 
 
 	dev->interrupt_out_busy = 0;
 	dev->interrupt_out_busy = 0;
 	wake_up_interruptible(&dev->write_wait);
 	wake_up_interruptible(&dev->write_wait);
 
 
-	lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
-	dbg(4, "%s: leave, status %d", __FUNCTION__, status);
+	lego_usb_tower_debug_data(5, __func__, urb->actual_length, urb->transfer_buffer);
+	dbg(4, "%s: leave, status %d", __func__, status);
 }
 }
 
 
 
 
@@ -849,7 +849,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
 	int retval = -ENOMEM;
 	int retval = -ENOMEM;
 	int result;
 	int result;
 
 
-	dbg(2, "%s: enter", __FUNCTION__);
+	dbg(2, "%s: enter", __func__);
 
 
 	if (udev == NULL) {
 	if (udev == NULL) {
 		info ("udev is NULL.");
 		info ("udev is NULL.");
@@ -978,7 +978,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
 
 
 
 
 exit:
 exit:
-	dbg(2, "%s: leave, return value 0x%.8lx (dev)", __FUNCTION__, (long) dev);
+	dbg(2, "%s: leave, return value 0x%.8lx (dev)", __func__, (long) dev);
 
 
 	return retval;
 	return retval;
 
 
@@ -998,7 +998,7 @@ static void tower_disconnect (struct usb_interface *interface)
 	struct lego_usb_tower *dev;
 	struct lego_usb_tower *dev;
 	int minor;
 	int minor;
 
 
-	dbg(2, "%s: enter", __FUNCTION__);
+	dbg(2, "%s: enter", __func__);
 
 
 	dev = usb_get_intfdata (interface);
 	dev = usb_get_intfdata (interface);
 	mutex_lock(&open_disc_mutex);
 	mutex_lock(&open_disc_mutex);
@@ -1023,7 +1023,7 @@ static void tower_disconnect (struct usb_interface *interface)
 
 
 	info("LEGO USB Tower #%d now disconnected", (minor - LEGO_USB_TOWER_MINOR_BASE));
 	info("LEGO USB Tower #%d now disconnected", (minor - LEGO_USB_TOWER_MINOR_BASE));
 
 
-	dbg(2, "%s: leave", __FUNCTION__);
+	dbg(2, "%s: leave", __func__);
 }
 }
 
 
 
 
@@ -1036,7 +1036,7 @@ static int __init lego_usb_tower_init(void)
 	int result;
 	int result;
 	int retval = 0;
 	int retval = 0;
 
 
-	dbg(2, "%s: enter", __FUNCTION__);
+	dbg(2, "%s: enter", __func__);
 
 
 	/* register this driver with the USB subsystem */
 	/* register this driver with the USB subsystem */
 	result = usb_register(&tower_driver);
 	result = usb_register(&tower_driver);
@@ -1049,7 +1049,7 @@ static int __init lego_usb_tower_init(void)
 	info(DRIVER_DESC " " DRIVER_VERSION);
 	info(DRIVER_DESC " " DRIVER_VERSION);
 
 
 exit:
 exit:
-	dbg(2, "%s: leave, return value %d", __FUNCTION__, retval);
+	dbg(2, "%s: leave, return value %d", __func__, retval);
 
 
 	return retval;
 	return retval;
 }
 }
@@ -1060,12 +1060,12 @@ exit:
  */
  */
 static void __exit lego_usb_tower_exit(void)
 static void __exit lego_usb_tower_exit(void)
 {
 {
-	dbg(2, "%s: enter", __FUNCTION__);
+	dbg(2, "%s: enter", __func__);
 
 
 	/* deregister this driver with the USB subsystem */
 	/* deregister this driver with the USB subsystem */
 	usb_deregister (&tower_driver);
 	usb_deregister (&tower_driver);
 
 
-	dbg(2, "%s: leave", __FUNCTION__);
+	dbg(2, "%s: leave", __func__);
 }
 }
 
 
 module_init (lego_usb_tower_init);
 module_init (lego_usb_tower_init);

+ 3 - 3
drivers/usb/misc/phidgetkit.c

@@ -113,7 +113,7 @@ static int set_outputs(struct interfacekit *kit)
 
 
 	buffer = kzalloc(4, GFP_KERNEL);
 	buffer = kzalloc(4, GFP_KERNEL);
 	if (!buffer) {
 	if (!buffer) {
-		dev_err(&kit->udev->dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err(&kit->udev->dev, "%s - out of memory\n", __func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 	buffer[0] = (u8)kit->outputs;
 	buffer[0] = (u8)kit->outputs;
@@ -146,7 +146,7 @@ static int change_string(struct interfacekit *kit, const char *display, unsigned
 	buffer = kmalloc(8, GFP_KERNEL);
 	buffer = kmalloc(8, GFP_KERNEL);
 	form_buffer = kmalloc(30, GFP_KERNEL);
 	form_buffer = kmalloc(30, GFP_KERNEL);
 	if ((!buffer) || (!form_buffer)) {
 	if ((!buffer) || (!form_buffer)) {
-		dev_err(&kit->udev->dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err(&kit->udev->dev, "%s - out of memory\n", __func__);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -216,7 +216,7 @@ static ssize_t set_backlight(struct device *dev, struct device_attribute *attr,
 	
 	
 	buffer = kzalloc(8, GFP_KERNEL);
 	buffer = kzalloc(8, GFP_KERNEL);
 	if (!buffer) {
 	if (!buffer) {
-		dev_err(&kit->udev->dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err(&kit->udev->dev, "%s - out of memory\n", __func__);
 		goto exit;
 		goto exit;
 	}
 	}
 
 

+ 1 - 1
drivers/usb/misc/phidgetmotorcontrol.c

@@ -61,7 +61,7 @@ static int set_motor(struct motorcontrol *mc, int motor)
 
 
 	buffer = kzalloc(8, GFP_KERNEL);
 	buffer = kzalloc(8, GFP_KERNEL);
 	if (!buffer) {
 	if (!buffer) {
-		dev_err(&mc->intf->dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err(&mc->intf->dev, "%s - out of memory\n", __func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 
 

+ 3 - 3
drivers/usb/misc/phidgetservo.c

@@ -89,7 +89,7 @@ change_position_v30(struct phidget_servo *servo, int servo_no, int degrees,
 	buffer = kmalloc(6, GFP_KERNEL);
 	buffer = kmalloc(6, GFP_KERNEL);
 	if (!buffer) {
 	if (!buffer) {
 		dev_err(&servo->udev->dev, "%s - out of memory\n",
 		dev_err(&servo->udev->dev, "%s - out of memory\n",
-			__FUNCTION__);
+			__func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 
 
@@ -162,7 +162,7 @@ change_position_v20(struct phidget_servo *servo, int servo_no, int degrees,
 	buffer = kmalloc(2, GFP_KERNEL);
 	buffer = kmalloc(2, GFP_KERNEL);
 	if (!buffer) {
 	if (!buffer) {
 		dev_err(&servo->udev->dev, "%s - out of memory\n",
 		dev_err(&servo->udev->dev, "%s - out of memory\n",
-			__FUNCTION__);
+			__func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 
 
@@ -259,7 +259,7 @@ servo_probe(struct usb_interface *interface, const struct usb_device_id *id)
 
 
 	dev = kzalloc(sizeof (struct phidget_servo), GFP_KERNEL);
 	dev = kzalloc(sizeof (struct phidget_servo), GFP_KERNEL);
 	if (dev == NULL) {
 	if (dev == NULL) {
-		dev_err(&interface->dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err(&interface->dev, "%s - out of memory\n", __func__);
 		rc = -ENOMEM;
 		rc = -ENOMEM;
 		goto out;
 		goto out;
 	}
 	}

+ 3 - 3
drivers/usb/misc/usblcd.c

@@ -78,7 +78,7 @@ static int lcd_open(struct inode *inode, struct file *file)
 	interface = usb_find_interface(&lcd_driver, subminor);
 	interface = usb_find_interface(&lcd_driver, subminor);
 	if (!interface) {
 	if (!interface) {
 		err ("USBLCD: %s - error, can't find device for minor %d",
 		err ("USBLCD: %s - error, can't find device for minor %d",
-		     __FUNCTION__, subminor);
+		     __func__, subminor);
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}
 
 
@@ -193,7 +193,7 @@ static void lcd_write_bulk_callback(struct urb *urb)
 	      status == -ECONNRESET ||
 	      status == -ECONNRESET ||
               status == -ESHUTDOWN)) {
               status == -ESHUTDOWN)) {
 		dbg("USBLCD: %s - nonzero write bulk status received: %d",
 		dbg("USBLCD: %s - nonzero write bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 	}
 	}
 
 
 	/* free up our allocated buffer */
 	/* free up our allocated buffer */
@@ -248,7 +248,7 @@ static ssize_t lcd_write(struct file *file, const char __user * user_buffer, siz
 	/* send the data out the bulk port */
 	/* send the data out the bulk port */
 	retval = usb_submit_urb(urb, GFP_KERNEL);
 	retval = usb_submit_urb(urb, GFP_KERNEL);
 	if (retval) {
 	if (retval) {
-		err("USBLCD: %s - failed submitting write urb, error %d", __FUNCTION__, retval);
+		err("USBLCD: %s - failed submitting write urb, error %d", __func__, retval);
 		goto error_unanchor;
 		goto error_unanchor;
 	}
 	}
 	
 	

+ 2 - 2
drivers/usb/misc/usbtest.c

@@ -1136,7 +1136,7 @@ static int verify_not_halted (int ep, struct urb *urb)
 		dbg ("ep %02x bogus status: %04x != 0", ep, status);
 		dbg ("ep %02x bogus status: %04x != 0", ep, status);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
-	retval = simple_io (urb, 1, 0, 0, __FUNCTION__);
+	retval = simple_io (urb, 1, 0, 0, __func__);
 	if (retval != 0)
 	if (retval != 0)
 		return -EINVAL;
 		return -EINVAL;
 	return 0;
 	return 0;
@@ -1158,7 +1158,7 @@ static int verify_halted (int ep, struct urb *urb)
 		dbg ("ep %02x bogus status: %04x != 1", ep, status);
 		dbg ("ep %02x bogus status: %04x != 1", ep, status);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
-	retval = simple_io (urb, 1, 0, -EPIPE, __FUNCTION__);
+	retval = simple_io (urb, 1, 0, -EPIPE, __func__);
 	if (retval != -EPIPE)
 	if (retval != -EPIPE)
 		return -EINVAL;
 		return -EINVAL;
 	retval = simple_io (urb, 1, 0, -EPIPE, "verify_still_halted");
 	retval = simple_io (urb, 1, 0, -EPIPE, "verify_still_halted");

+ 26 - 26
drivers/usb/serial/aircable.c

@@ -210,7 +210,7 @@ static void aircable_send(struct usb_serial_port *port)
 	struct aircable_private *priv = usb_get_serial_port_data(port);
 	struct aircable_private *priv = usb_get_serial_port_data(port);
 	unsigned char* buf;
 	unsigned char* buf;
 	u16 *dbuf;
 	u16 *dbuf;
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 	if (port->write_urb_busy)
 	if (port->write_urb_busy)
 		return;
 		return;
 
 
@@ -220,7 +220,7 @@ static void aircable_send(struct usb_serial_port *port)
 
 
 	buf = kzalloc(count + HCI_HEADER_LENGTH, GFP_ATOMIC);
 	buf = kzalloc(count + HCI_HEADER_LENGTH, GFP_ATOMIC);
 	if (!buf) {
 	if (!buf) {
-		err("%s- kzalloc(%d) failed.", __FUNCTION__,
+		err("%s- kzalloc(%d) failed.", __func__,
 		    count + HCI_HEADER_LENGTH);
 		    count + HCI_HEADER_LENGTH);
 		return;
 		return;
 	}
 	}
@@ -236,7 +236,7 @@ static void aircable_send(struct usb_serial_port *port)
 
 
 	kfree(buf);
 	kfree(buf);
 	port->write_urb_busy = 1;
 	port->write_urb_busy = 1;
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__,
+	usb_serial_debug_data(debug, &port->dev, __func__,
 			      count + HCI_HEADER_LENGTH,
 			      count + HCI_HEADER_LENGTH,
 			      port->write_urb->transfer_buffer);
 			      port->write_urb->transfer_buffer);
 	port->write_urb->transfer_buffer_length = count + HCI_HEADER_LENGTH;
 	port->write_urb->transfer_buffer_length = count + HCI_HEADER_LENGTH;
@@ -246,7 +246,7 @@ static void aircable_send(struct usb_serial_port *port)
 	if (result) {
 	if (result) {
 		dev_err(&port->dev,
 		dev_err(&port->dev,
 			"%s - failed submitting write urb, error %d\n",
 			"%s - failed submitting write urb, error %d\n",
-			__FUNCTION__, result);
+			__func__, result);
 		port->write_urb_busy = 0;
 		port->write_urb_busy = 0;
 	}
 	}
 
 
@@ -275,7 +275,7 @@ static void aircable_read(struct work_struct *work)
 
 
 	if (!tty) {
 	if (!tty) {
 		schedule_work(&priv->rx_work);
 		schedule_work(&priv->rx_work);
-		err("%s - No tty available", __FUNCTION__);
+		err("%s - No tty available", __func__);
 		return ;
 		return ;
 	}
 	}
 
 
@@ -286,7 +286,7 @@ static void aircable_read(struct work_struct *work)
 
 
 	tty_prepare_flip_string(tty, &data, count);
 	tty_prepare_flip_string(tty, &data, count);
 	if (!data){
 	if (!data){
-		err("%s- kzalloc(%d) failed.", __FUNCTION__, count);
+		err("%s- kzalloc(%d) failed.", __func__, count);
 		return;
 		return;
 	}
 	}
 
 
@@ -332,7 +332,7 @@ static int aircable_attach (struct usb_serial *serial)
 
 
 	priv = kzalloc(sizeof(struct aircable_private), GFP_KERNEL);
 	priv = kzalloc(sizeof(struct aircable_private), GFP_KERNEL);
 	if (!priv){
 	if (!priv){
-		err("%s- kmalloc(%Zd) failed.", __FUNCTION__,
+		err("%s- kmalloc(%Zd) failed.", __func__,
 			sizeof(struct aircable_private));
 			sizeof(struct aircable_private));
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
@@ -366,7 +366,7 @@ static void aircable_shutdown(struct usb_serial *serial)
 	struct usb_serial_port *port = serial->port[0];
 	struct usb_serial_port *port = serial->port[0];
 	struct aircable_private *priv = usb_get_serial_port_data(port);
 	struct aircable_private *priv = usb_get_serial_port_data(port);
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	if (priv) {
 	if (priv) {
 		serial_buf_free(priv->tx_buf);
 		serial_buf_free(priv->tx_buf);
@@ -388,12 +388,12 @@ static int aircable_write(struct usb_serial_port *port,
 	struct aircable_private *priv = usb_get_serial_port_data(port);
 	struct aircable_private *priv = usb_get_serial_port_data(port);
 	int temp;
 	int temp;
 
 
-	dbg("%s - port %d, %d bytes", __FUNCTION__, port->number, count);
+	dbg("%s - port %d, %d bytes", __func__, port->number, count);
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, source);
+	usb_serial_debug_data(debug, &port->dev, __func__, count, source);
 
 
 	if (!count){
 	if (!count){
-		dbg("%s - write request of 0 bytes", __FUNCTION__);
+		dbg("%s - write request of 0 bytes", __func__);
 		return count;
 		return count;
 	}
 	}
 
 
@@ -414,7 +414,7 @@ static void aircable_write_bulk_callback(struct urb *urb)
 	int status = urb->status;
 	int status = urb->status;
 	int result;
 	int result;
 
 
-	dbg("%s - urb status: %d", __FUNCTION__ , status);
+	dbg("%s - urb status: %d", __func__ , status);
 
 
 	/* This has been taken from cypress_m8.c cypress_write_int_callback */
 	/* This has been taken from cypress_m8.c cypress_write_int_callback */
 	switch (status) {
 	switch (status) {
@@ -426,21 +426,21 @@ static void aircable_write_bulk_callback(struct urb *urb)
 		case -ESHUTDOWN:
 		case -ESHUTDOWN:
 			/* this urb is terminated, clean up */
 			/* this urb is terminated, clean up */
 			dbg("%s - urb shutting down with status: %d",
 			dbg("%s - urb shutting down with status: %d",
-			    __FUNCTION__, status);
+			    __func__, status);
 			port->write_urb_busy = 0;
 			port->write_urb_busy = 0;
 			return;
 			return;
 		default:
 		default:
 			/* error in the urb, so we have to resubmit it */
 			/* error in the urb, so we have to resubmit it */
-			dbg("%s - Overflow in write", __FUNCTION__);
+			dbg("%s - Overflow in write", __func__);
 			dbg("%s - nonzero write bulk status received: %d",
 			dbg("%s - nonzero write bulk status received: %d",
-			    __FUNCTION__, status);
+			    __func__, status);
 			port->write_urb->transfer_buffer_length = 1;
 			port->write_urb->transfer_buffer_length = 1;
 			port->write_urb->dev = port->serial->dev;
 			port->write_urb->dev = port->serial->dev;
 			result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 			result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 			if (result)
 			if (result)
 				dev_err(&urb->dev->dev,
 				dev_err(&urb->dev->dev,
 					"%s - failed resubmitting write urb, error %d\n",
 					"%s - failed resubmitting write urb, error %d\n",
-					__FUNCTION__, result);
+					__func__, result);
 			else
 			else
 				return;
 				return;
 	}
 	}
@@ -460,17 +460,17 @@ static void aircable_read_bulk_callback(struct urb *urb)
 	unsigned char *temp;
 	unsigned char *temp;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (status) {
 	if (status) {
-		dbg("%s - urb status = %d", __FUNCTION__, status);
+		dbg("%s - urb status = %d", __func__, status);
 		if (!port->open_count) {
 		if (!port->open_count) {
-			dbg("%s - port is closed, exiting.", __FUNCTION__);
+			dbg("%s - port is closed, exiting.", __func__);
 			return;
 			return;
 		}
 		}
 		if (status == -EPROTO) {
 		if (status == -EPROTO) {
 			dbg("%s - caught -EPROTO, resubmitting the urb",
 			dbg("%s - caught -EPROTO, resubmitting the urb",
-			    __FUNCTION__);
+			    __func__);
 			usb_fill_bulk_urb(port->read_urb, port->serial->dev,
 			usb_fill_bulk_urb(port->read_urb, port->serial->dev,
 					  usb_rcvbulkpipe(port->serial->dev,
 					  usb_rcvbulkpipe(port->serial->dev,
 					  		  port->bulk_in_endpointAddress),
 					  		  port->bulk_in_endpointAddress),
@@ -482,14 +482,14 @@ static void aircable_read_bulk_callback(struct urb *urb)
 			if (result)
 			if (result)
 				dev_err(&urb->dev->dev,
 				dev_err(&urb->dev->dev,
 					"%s - failed resubmitting read urb, error %d\n",
 					"%s - failed resubmitting read urb, error %d\n",
-					__FUNCTION__, result);
+					__func__, result);
 			return;
 			return;
 		}
 		}
-		dbg("%s - unable to handle the error, exiting.", __FUNCTION__);
+		dbg("%s - unable to handle the error, exiting.", __func__);
 		return;
 		return;
 	}
 	}
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__,
+	usb_serial_debug_data(debug, &port->dev, __func__,
 				urb->actual_length,urb->transfer_buffer);
 				urb->actual_length,urb->transfer_buffer);
 
 
 	tty = port->tty;
 	tty = port->tty;
@@ -538,7 +538,7 @@ static void aircable_read_bulk_callback(struct urb *urb)
 		if (result)
 		if (result)
 			dev_err(&urb->dev->dev,
 			dev_err(&urb->dev->dev,
 				"%s - failed resubmitting read urb, error %d\n",
 				"%s - failed resubmitting read urb, error %d\n",
-				__FUNCTION__, result);
+				__func__, result);
 	}
 	}
 
 
 	return;
 	return;
@@ -550,7 +550,7 @@ static void aircable_throttle(struct usb_serial_port *port)
 	struct aircable_private *priv = usb_get_serial_port_data(port);
 	struct aircable_private *priv = usb_get_serial_port_data(port);
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->rx_lock, flags);
 	spin_lock_irqsave(&priv->rx_lock, flags);
 	priv->rx_flags |= THROTTLED;
 	priv->rx_flags |= THROTTLED;
@@ -564,7 +564,7 @@ static void aircable_unthrottle(struct usb_serial_port *port)
 	int actually_throttled;
 	int actually_throttled;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->rx_lock, flags);
 	spin_lock_irqsave(&priv->rx_lock, flags);
 	actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED;
 	actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED;

+ 17 - 17
drivers/usb/serial/airprime.c

@@ -53,7 +53,7 @@ static int airprime_send_setup(struct usb_serial_port *port)
 	struct usb_serial *serial = port->serial;
 	struct usb_serial *serial = port->serial;
 	struct airprime_private *priv;
 	struct airprime_private *priv;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	if (port->number != 0)
 	if (port->number != 0)
 		return 0;
 		return 0;
@@ -83,14 +83,14 @@ static void airprime_read_bulk_callback(struct urb *urb)
 	int result;
 	int result;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero read bulk status received: %d",
 		dbg("%s - nonzero read bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+	usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
 
 
 	tty = port->tty;
 	tty = port->tty;
 	if (tty && urb->actual_length) {
 	if (tty && urb->actual_length) {
@@ -101,7 +101,7 @@ static void airprime_read_bulk_callback(struct urb *urb)
 	result = usb_submit_urb (urb, GFP_ATOMIC);
 	result = usb_submit_urb (urb, GFP_ATOMIC);
 	if (result)
 	if (result)
 		dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n",
 		dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n",
-			__FUNCTION__, result);
+			__func__, result);
 	return;
 	return;
 }
 }
 
 
@@ -112,14 +112,14 @@ static void airprime_write_bulk_callback(struct urb *urb)
 	int status = urb->status;
 	int status = urb->status;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* free up the transfer buffer, as usb_free_urb() does not do this */
 	/* free up the transfer buffer, as usb_free_urb() does not do this */
 	kfree (urb->transfer_buffer);
 	kfree (urb->transfer_buffer);
 
 
 	if (status)
 	if (status)
 		dbg("%s - nonzero write bulk status received: %d",
 		dbg("%s - nonzero write bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	--priv->outstanding_urbs;
 	--priv->outstanding_urbs;
 	spin_unlock_irqrestore(&priv->lock, flags);
 	spin_unlock_irqrestore(&priv->lock, flags);
@@ -136,7 +136,7 @@ static int airprime_open(struct usb_serial_port *port, struct file *filp)
 	int i;
 	int i;
 	int result = 0;
 	int result = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* initialize our private data structure if it isn't already created */
 	/* initialize our private data structure if it isn't already created */
 	if (!priv) {
 	if (!priv) {
@@ -157,7 +157,7 @@ static int airprime_open(struct usb_serial_port *port, struct file *filp)
 		buffer = kmalloc(buffer_size, GFP_KERNEL);
 		buffer = kmalloc(buffer_size, GFP_KERNEL);
 		if (!buffer) {
 		if (!buffer) {
 			dev_err(&port->dev, "%s - out of memory.\n",
 			dev_err(&port->dev, "%s - out of memory.\n",
-				__FUNCTION__);
+				__func__);
 			result = -ENOMEM;
 			result = -ENOMEM;
 			goto errout;
 			goto errout;
 		}
 		}
@@ -165,7 +165,7 @@ static int airprime_open(struct usb_serial_port *port, struct file *filp)
 		if (!urb) {
 		if (!urb) {
 			kfree(buffer);
 			kfree(buffer);
 			dev_err(&port->dev, "%s - no more urbs?\n",
 			dev_err(&port->dev, "%s - no more urbs?\n",
-				__FUNCTION__);
+				__func__);
 			result = -ENOMEM;
 			result = -ENOMEM;
 			goto errout;
 			goto errout;
 		}
 		}
@@ -180,7 +180,7 @@ static int airprime_open(struct usb_serial_port *port, struct file *filp)
 			kfree(buffer);
 			kfree(buffer);
 			dev_err(&port->dev,
 			dev_err(&port->dev,
 				"%s - failed submitting read urb %d for port %d, error %d\n",
 				"%s - failed submitting read urb %d for port %d, error %d\n",
-				__FUNCTION__, i, port->number, result);
+				__func__, i, port->number, result);
 			goto errout;
 			goto errout;
 		}
 		}
 		/* remember this urb so we can kill it when the port is closed */
 		/* 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)
 	struct airprime_private *priv = usb_get_serial_port_data(port);
 	struct airprime_private *priv = usb_get_serial_port_data(port);
 	int i;
 	int i;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	priv->rts_state = 0;
 	priv->rts_state = 0;
 	priv->dtr_state = 0;
 	priv->dtr_state = 0;
@@ -242,12 +242,12 @@ static int airprime_write(struct usb_serial_port *port,
 	unsigned char *buffer;
 	unsigned char *buffer;
 	unsigned long flags;
 	unsigned long flags;
 	int status;
 	int status;
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	if (priv->outstanding_urbs > NUM_WRITE_URBS) {
 	if (priv->outstanding_urbs > NUM_WRITE_URBS) {
 		spin_unlock_irqrestore(&priv->lock, flags);
 		spin_unlock_irqrestore(&priv->lock, flags);
-		dbg("%s - write limit hit\n", __FUNCTION__);
+		dbg("%s - write limit hit\n", __func__);
 		return 0;
 		return 0;
 	}
 	}
 	spin_unlock_irqrestore(&priv->lock, flags);
 	spin_unlock_irqrestore(&priv->lock, flags);
@@ -264,7 +264,7 @@ static int airprime_write(struct usb_serial_port *port,
 	}
 	}
 	memcpy (buffer, buf, count);
 	memcpy (buffer, buf, count);
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buffer);
+	usb_serial_debug_data(debug, &port->dev, __func__, count, buffer);
 
 
 	usb_fill_bulk_urb(urb, serial->dev,
 	usb_fill_bulk_urb(urb, serial->dev,
 			  usb_sndbulkpipe(serial->dev,
 			  usb_sndbulkpipe(serial->dev,
@@ -277,7 +277,7 @@ static int airprime_write(struct usb_serial_port *port,
 	if (status) {
 	if (status) {
 		dev_err(&port->dev,
 		dev_err(&port->dev,
 			"%s - usb_submit_urb(write bulk) failed with status = %d\n",
 			"%s - usb_submit_urb(write bulk) failed with status = %d\n",
-			__FUNCTION__, status);
+			__func__, status);
 		count = status;
 		count = status;
 		kfree (buffer);
 		kfree (buffer);
 	} else {
 	} else {
@@ -328,7 +328,7 @@ static int __init airprime_init(void)
 
 
 static void __exit airprime_exit(void)
 static void __exit airprime_exit(void)
 {
 {
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	usb_deregister(&airprime_driver);
 	usb_deregister(&airprime_driver);
 	usb_serial_deregister(&airprime_device);
 	usb_serial_deregister(&airprime_device);

+ 3 - 3
drivers/usb/serial/ark3116.c

@@ -173,7 +173,7 @@ static void ark3116_set_termios(struct usb_serial_port *port,
 
 
 	config = 0;
 	config = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	if (!priv->termios_initialized) {
 	if (!priv->termios_initialized) {
@@ -323,7 +323,7 @@ static int ark3116_open(struct usb_serial_port *port, struct file *filp)
 	char *buf;
 	char *buf;
 	int result = 0;
 	int result = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	buf = kmalloc(1, GFP_KERNEL);
 	buf = kmalloc(1, GFP_KERNEL);
 	if (!buf) {
 	if (!buf) {
@@ -395,7 +395,7 @@ static int ark3116_ioctl(struct usb_serial_port *port, struct file *file,
 			return -EFAULT;
 			return -EFAULT;
 		return 0;
 		return 0;
 	default:
 	default:
-		dbg("%s cmd 0x%04x not supported", __FUNCTION__, cmd);
+		dbg("%s cmd 0x%04x not supported", __func__, cmd);
 		break;
 		break;
 	}
 	}
 
 

+ 9 - 9
drivers/usb/serial/belkin_sa.c

@@ -195,7 +195,7 @@ static void belkin_sa_shutdown (struct usb_serial *serial)
 	struct belkin_sa_private *priv;
 	struct belkin_sa_private *priv;
 	int i;
 	int i;
 	
 	
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	/* stop reads and writes on all ports */
 	/* stop reads and writes on all ports */
 	for (i=0; i < serial->num_ports; ++i) {
 	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)
 {
 {
 	int retval = 0;
 	int retval = 0;
 
 
-	dbg("%s port %d", __FUNCTION__, port->number);
+	dbg("%s port %d", __func__, port->number);
 
 
 	/*Start reading from the device*/
 	/*Start reading from the device*/
 	/* TODO: Look at possibility of submitting multiple URBs to device to
 	/* TODO: Look at possibility of submitting multiple URBs to device to
@@ -237,7 +237,7 @@ exit:
 
 
 static void belkin_sa_close (struct usb_serial_port *port, struct file *filp)
 static void belkin_sa_close (struct usb_serial_port *port, struct file *filp)
 {
 {
-	dbg("%s port %d", __FUNCTION__, port->number);
+	dbg("%s port %d", __func__, port->number);
 
 
 	/* shutdown our bulk reads and writes */
 	/* shutdown our bulk reads and writes */
 	usb_kill_urb(port->write_urb);
 	usb_kill_urb(port->write_urb);
@@ -264,15 +264,15 @@ static void belkin_sa_read_int_callback (struct urb *urb)
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
 		/* this urb is terminated, clean up */
 		/* this urb is terminated, clean up */
 		dbg("%s - urb shutting down with status: %d",
 		dbg("%s - urb shutting down with status: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	default:
 	default:
 		dbg("%s - nonzero urb status received: %d",
 		dbg("%s - nonzero urb status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+	usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
 
 
 	/* Handle known interrupt data */
 	/* Handle known interrupt data */
 	/* ignore data[0] and data[1] */
 	/* ignore data[0] and data[1] */
@@ -331,7 +331,7 @@ exit:
 	retval = usb_submit_urb (urb, GFP_ATOMIC);
 	retval = usb_submit_urb (urb, GFP_ATOMIC);
 	if (retval)
 	if (retval)
 		err ("%s - usb_submit_urb failed with result %d",
 		err ("%s - usb_submit_urb failed with result %d",
-		     __FUNCTION__, retval);
+		     __func__, retval);
 }
 }
 
 
 static void belkin_sa_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
 static 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)
 	unsigned long control_state;
 	unsigned long control_state;
 	unsigned long flags;
 	unsigned long flags;
 	
 	
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	control_state = priv->control_state;
 	control_state = priv->control_state;
@@ -499,7 +499,7 @@ static int belkin_sa_tiocmset (struct usb_serial_port *port, struct file *file,
 	int rts = 0;
 	int rts = 0;
 	int dtr = 0;
 	int dtr = 0;
 	
 	
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	control_state = priv->control_state;
 	control_state = priv->control_state;

+ 5 - 5
drivers/usb/serial/console.c

@@ -67,7 +67,7 @@ static int usb_console_setup(struct console *co, char *options)
 	struct tty_struct *tty = NULL;
 	struct tty_struct *tty = NULL;
 	struct ktermios *termios = NULL, dummy;
 	struct ktermios *termios = NULL, dummy;
 
 
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	if (options) {
 	if (options) {
 		baud = simple_strtoul(options, NULL, 10);
 		baud = simple_strtoul(options, NULL, 10);
@@ -225,10 +225,10 @@ static void usb_console_write(struct console *co, const char *buf, unsigned coun
 	if (count == 0)
 	if (count == 0)
 		return;
 		return;
 
 
-	dbg("%s - port %d, %d byte(s)", __FUNCTION__, port->number, count);
+	dbg("%s - port %d, %d byte(s)", __func__, port->number, count);
 
 
 	if (!port->open_count) {
 	if (!port->open_count) {
-		dbg ("%s - port not opened", __FUNCTION__);
+		dbg ("%s - port not opened", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -248,7 +248,7 @@ static void usb_console_write(struct console *co, const char *buf, unsigned coun
 			retval = serial->type->write(port, buf, i);
 			retval = serial->type->write(port, buf, i);
 		else
 		else
 			retval = usb_serial_generic_write(port, buf, i);
 			retval = usb_serial_generic_write(port, buf, i);
-		dbg("%s - return value : %d", __FUNCTION__, retval);
+		dbg("%s - return value : %d", __func__, retval);
 		if (lf) {
 		if (lf) {
 			/* append CR after LF */
 			/* append CR after LF */
 			unsigned char cr = 13;
 			unsigned char cr = 13;
@@ -256,7 +256,7 @@ static void usb_console_write(struct console *co, const char *buf, unsigned coun
 				retval = serial->type->write(port, &cr, 1);
 				retval = serial->type->write(port, &cr, 1);
 			else
 			else
 				retval = usb_serial_generic_write(port, &cr, 1);
 				retval = usb_serial_generic_write(port, &cr, 1);
-			dbg("%s - return value : %d", __FUNCTION__, retval);
+			dbg("%s - return value : %d", __func__, retval);
 		}
 		}
 		buf += i;
 		buf += i;
 		count -= i;
 		count -= i;

+ 54 - 54
drivers/usb/serial/cp2101.c

@@ -193,7 +193,7 @@ static int cp2101_get_config(struct usb_serial_port* port, u8 request,
 
 
 	buf = kcalloc(length, sizeof(__le32), GFP_KERNEL);
 	buf = kcalloc(length, sizeof(__le32), GFP_KERNEL);
 	if (!buf) {
 	if (!buf) {
-		dev_err(&port->dev, "%s - out of memory.\n", __FUNCTION__);
+		dev_err(&port->dev, "%s - out of memory.\n", __func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 
 
@@ -214,7 +214,7 @@ static int cp2101_get_config(struct usb_serial_port* port, u8 request,
 	if (result != size) {
 	if (result != size) {
 		dev_err(&port->dev, "%s - Unable to send config request, "
 		dev_err(&port->dev, "%s - Unable to send config request, "
 				"request=0x%x size=%d result=%d\n",
 				"request=0x%x size=%d result=%d\n",
-				__FUNCTION__, request, size, result);
+				__func__, request, size, result);
 		return -EPROTO;
 		return -EPROTO;
 	}
 	}
 
 
@@ -240,7 +240,7 @@ static int cp2101_set_config(struct usb_serial_port* port, u8 request,
 	buf = kmalloc(length * sizeof(__le32), GFP_KERNEL);
 	buf = kmalloc(length * sizeof(__le32), GFP_KERNEL);
 	if (!buf) {
 	if (!buf) {
 		dev_err(&port->dev, "%s - out of memory.\n",
 		dev_err(&port->dev, "%s - out of memory.\n",
-				__FUNCTION__);
+				__func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 
 
@@ -265,7 +265,7 @@ static int cp2101_set_config(struct usb_serial_port* port, u8 request,
 	if ((size > 2 && result != size) || result < 0) {
 	if ((size > 2 && result != size) || result < 0) {
 		dev_err(&port->dev, "%s - Unable to send request, "
 		dev_err(&port->dev, "%s - Unable to send request, "
 				"request=0x%x size=%d result=%d\n",
 				"request=0x%x size=%d result=%d\n",
-				__FUNCTION__, request, size, result);
+				__func__, request, size, result);
 		return -EPROTO;
 		return -EPROTO;
 	}
 	}
 
 
@@ -293,11 +293,11 @@ static int cp2101_open (struct usb_serial_port *port, struct file *filp)
 	struct usb_serial *serial = port->serial;
 	struct usb_serial *serial = port->serial;
 	int result;
 	int result;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (cp2101_set_config_single(port, CP2101_UART, UART_ENABLE)) {
 	if (cp2101_set_config_single(port, CP2101_UART, UART_ENABLE)) {
 		dev_err(&port->dev, "%s - Unable to enable UART\n",
 		dev_err(&port->dev, "%s - Unable to enable UART\n",
-				__FUNCTION__);
+				__func__);
 		return -EPROTO;
 		return -EPROTO;
 	}
 	}
 
 
@@ -312,7 +312,7 @@ static int cp2101_open (struct usb_serial_port *port, struct file *filp)
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	if (result) {
 	if (result) {
 		dev_err(&port->dev, "%s - failed resubmitting read urb, "
 		dev_err(&port->dev, "%s - failed resubmitting read urb, "
-				"error %d\n", __FUNCTION__, result);
+				"error %d\n", __func__, result);
 		return result;
 		return result;
 	}
 	}
 
 
@@ -329,7 +329,7 @@ static void cp2101_cleanup (struct usb_serial_port *port)
 {
 {
 	struct usb_serial *serial = port->serial;
 	struct usb_serial *serial = port->serial;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (serial->dev) {
 	if (serial->dev) {
 		/* shutdown any bulk reads that might be going on */
 		/* shutdown any bulk reads that might be going on */
@@ -342,10 +342,10 @@ static void cp2101_cleanup (struct usb_serial_port *port)
 
 
 static void cp2101_close (struct usb_serial_port *port, struct file * filp)
 static void cp2101_close (struct usb_serial_port *port, struct file * filp)
 {
 {
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* shutdown our urbs */
 	/* shutdown our urbs */
-	dbg("%s - shutting down urbs", __FUNCTION__);
+	dbg("%s - shutting down urbs", __func__);
 	usb_kill_urb(port->write_urb);
 	usb_kill_urb(port->write_urb);
 	usb_kill_urb(port->read_urb);
 	usb_kill_urb(port->read_urb);
 
 
@@ -367,10 +367,10 @@ static void cp2101_get_termios (struct usb_serial_port *port)
 	int baud;
 	int baud;
 	int bits;
 	int bits;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (!port->tty || !port->tty->termios) {
 	if (!port->tty || !port->tty->termios) {
-		dbg("%s - no tty structures", __FUNCTION__);
+		dbg("%s - no tty structures", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -379,7 +379,7 @@ static void cp2101_get_termios (struct usb_serial_port *port)
 	if (baud)
 	if (baud)
 		baud = BAUD_RATE_GEN_FREQ / baud;
 		baud = BAUD_RATE_GEN_FREQ / baud;
 
 
-	dbg("%s - baud rate = %d", __FUNCTION__, baud);
+	dbg("%s - baud rate = %d", __func__, baud);
 
 
 	tty_encode_baud_rate(port->tty, baud, baud);
 	tty_encode_baud_rate(port->tty, baud, baud);
 	cflag = port->tty->termios->c_cflag;
 	cflag = port->tty->termios->c_cflag;
@@ -388,24 +388,24 @@ static void cp2101_get_termios (struct usb_serial_port *port)
 	cflag &= ~CSIZE;
 	cflag &= ~CSIZE;
 	switch(bits & BITS_DATA_MASK) {
 	switch(bits & BITS_DATA_MASK) {
 		case BITS_DATA_5:
 		case BITS_DATA_5:
-			dbg("%s - data bits = 5", __FUNCTION__);
+			dbg("%s - data bits = 5", __func__);
 			cflag |= CS5;
 			cflag |= CS5;
 			break;
 			break;
 		case BITS_DATA_6:
 		case BITS_DATA_6:
-			dbg("%s - data bits = 6", __FUNCTION__);
+			dbg("%s - data bits = 6", __func__);
 			cflag |= CS6;
 			cflag |= CS6;
 			break;
 			break;
 		case BITS_DATA_7:
 		case BITS_DATA_7:
-			dbg("%s - data bits = 7", __FUNCTION__);
+			dbg("%s - data bits = 7", __func__);
 			cflag |= CS7;
 			cflag |= CS7;
 			break;
 			break;
 		case BITS_DATA_8:
 		case BITS_DATA_8:
-			dbg("%s - data bits = 8", __FUNCTION__);
+			dbg("%s - data bits = 8", __func__);
 			cflag |= CS8;
 			cflag |= CS8;
 			break;
 			break;
 		case BITS_DATA_9:
 		case BITS_DATA_9:
 			dbg("%s - data bits = 9 (not supported, "
 			dbg("%s - data bits = 9 (not supported, "
-					"using 8 data bits)", __FUNCTION__);
+					"using 8 data bits)", __func__);
 			cflag |= CS8;
 			cflag |= CS8;
 			bits &= ~BITS_DATA_MASK;
 			bits &= ~BITS_DATA_MASK;
 			bits |= BITS_DATA_8;
 			bits |= BITS_DATA_8;
@@ -413,7 +413,7 @@ static void cp2101_get_termios (struct usb_serial_port *port)
 			break;
 			break;
 		default:
 		default:
 			dbg("%s - Unknown number of data bits, "
 			dbg("%s - Unknown number of data bits, "
-					"using 8", __FUNCTION__);
+					"using 8", __func__);
 			cflag |= CS8;
 			cflag |= CS8;
 			bits &= ~BITS_DATA_MASK;
 			bits &= ~BITS_DATA_MASK;
 			bits |= BITS_DATA_8;
 			bits |= BITS_DATA_8;
@@ -423,35 +423,35 @@ static void cp2101_get_termios (struct usb_serial_port *port)
 
 
 	switch(bits & BITS_PARITY_MASK) {
 	switch(bits & BITS_PARITY_MASK) {
 		case BITS_PARITY_NONE:
 		case BITS_PARITY_NONE:
-			dbg("%s - parity = NONE", __FUNCTION__);
+			dbg("%s - parity = NONE", __func__);
 			cflag &= ~PARENB;
 			cflag &= ~PARENB;
 			break;
 			break;
 		case BITS_PARITY_ODD:
 		case BITS_PARITY_ODD:
-			dbg("%s - parity = ODD", __FUNCTION__);
+			dbg("%s - parity = ODD", __func__);
 			cflag |= (PARENB|PARODD);
 			cflag |= (PARENB|PARODD);
 			break;
 			break;
 		case BITS_PARITY_EVEN:
 		case BITS_PARITY_EVEN:
-			dbg("%s - parity = EVEN", __FUNCTION__);
+			dbg("%s - parity = EVEN", __func__);
 			cflag &= ~PARODD;
 			cflag &= ~PARODD;
 			cflag |= PARENB;
 			cflag |= PARENB;
 			break;
 			break;
 		case BITS_PARITY_MARK:
 		case BITS_PARITY_MARK:
 			dbg("%s - parity = MARK (not supported, "
 			dbg("%s - parity = MARK (not supported, "
-					"disabling parity)", __FUNCTION__);
+					"disabling parity)", __func__);
 			cflag &= ~PARENB;
 			cflag &= ~PARENB;
 			bits &= ~BITS_PARITY_MASK;
 			bits &= ~BITS_PARITY_MASK;
 			cp2101_set_config(port, CP2101_BITS, &bits, 2);
 			cp2101_set_config(port, CP2101_BITS, &bits, 2);
 			break;
 			break;
 		case BITS_PARITY_SPACE:
 		case BITS_PARITY_SPACE:
 			dbg("%s - parity = SPACE (not supported, "
 			dbg("%s - parity = SPACE (not supported, "
-					"disabling parity)", __FUNCTION__);
+					"disabling parity)", __func__);
 			cflag &= ~PARENB;
 			cflag &= ~PARENB;
 			bits &= ~BITS_PARITY_MASK;
 			bits &= ~BITS_PARITY_MASK;
 			cp2101_set_config(port, CP2101_BITS, &bits, 2);
 			cp2101_set_config(port, CP2101_BITS, &bits, 2);
 			break;
 			break;
 		default:
 		default:
 			dbg("%s - Unknown parity mode, "
 			dbg("%s - Unknown parity mode, "
-					"disabling parity", __FUNCTION__);
+					"disabling parity", __func__);
 			cflag &= ~PARENB;
 			cflag &= ~PARENB;
 			bits &= ~BITS_PARITY_MASK;
 			bits &= ~BITS_PARITY_MASK;
 			cp2101_set_config(port, CP2101_BITS, &bits, 2);
 			cp2101_set_config(port, CP2101_BITS, &bits, 2);
@@ -461,21 +461,21 @@ static void cp2101_get_termios (struct usb_serial_port *port)
 	cflag &= ~CSTOPB;
 	cflag &= ~CSTOPB;
 	switch(bits & BITS_STOP_MASK) {
 	switch(bits & BITS_STOP_MASK) {
 		case BITS_STOP_1:
 		case BITS_STOP_1:
-			dbg("%s - stop bits = 1", __FUNCTION__);
+			dbg("%s - stop bits = 1", __func__);
 			break;
 			break;
 		case BITS_STOP_1_5:
 		case BITS_STOP_1_5:
 			dbg("%s - stop bits = 1.5 (not supported, "
 			dbg("%s - stop bits = 1.5 (not supported, "
-					"using 1 stop bit)", __FUNCTION__);
+					"using 1 stop bit)", __func__);
 			bits &= ~BITS_STOP_MASK;
 			bits &= ~BITS_STOP_MASK;
 			cp2101_set_config(port, CP2101_BITS, &bits, 2);
 			cp2101_set_config(port, CP2101_BITS, &bits, 2);
 			break;
 			break;
 		case BITS_STOP_2:
 		case BITS_STOP_2:
-			dbg("%s - stop bits = 2", __FUNCTION__);
+			dbg("%s - stop bits = 2", __func__);
 			cflag |= CSTOPB;
 			cflag |= CSTOPB;
 			break;
 			break;
 		default:
 		default:
 			dbg("%s - Unknown number of stop bits, "
 			dbg("%s - Unknown number of stop bits, "
-					"using 1 stop bit", __FUNCTION__);
+					"using 1 stop bit", __func__);
 			bits &= ~BITS_STOP_MASK;
 			bits &= ~BITS_STOP_MASK;
 			cp2101_set_config(port, CP2101_BITS, &bits, 2);
 			cp2101_set_config(port, CP2101_BITS, &bits, 2);
 			break;
 			break;
@@ -483,10 +483,10 @@ static void cp2101_get_termios (struct usb_serial_port *port)
 
 
 	cp2101_get_config(port, CP2101_MODEMCTL, modem_ctl, 16);
 	cp2101_get_config(port, CP2101_MODEMCTL, modem_ctl, 16);
 	if (modem_ctl[0] & 0x0008) {
 	if (modem_ctl[0] & 0x0008) {
-		dbg("%s - flow control = CRTSCTS", __FUNCTION__);
+		dbg("%s - flow control = CRTSCTS", __func__);
 		cflag |= CRTSCTS;
 		cflag |= CRTSCTS;
 	} else {
 	} else {
-		dbg("%s - flow control = NONE", __FUNCTION__);
+		dbg("%s - flow control = NONE", __func__);
 		cflag &= ~CRTSCTS;
 		cflag &= ~CRTSCTS;
 	}
 	}
 
 
@@ -500,10 +500,10 @@ static void cp2101_set_termios (struct usb_serial_port *port,
 	int baud=0, bits;
 	int baud=0, bits;
 	unsigned int modem_ctl[4];
 	unsigned int modem_ctl[4];
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (!port->tty || !port->tty->termios) {
 	if (!port->tty || !port->tty->termios) {
-		dbg("%s - no tty structures", __FUNCTION__);
+		dbg("%s - no tty structures", __func__);
 		return;
 		return;
 	}
 	}
 	port->tty->termios->c_cflag &= ~CMSPAR;
 	port->tty->termios->c_cflag &= ~CMSPAR;
@@ -542,7 +542,7 @@ static void cp2101_set_termios (struct usb_serial_port *port,
 		}
 		}
 
 
 		if (baud) {
 		if (baud) {
-			dbg("%s - Setting baud rate to %d baud", __FUNCTION__,
+			dbg("%s - Setting baud rate to %d baud", __func__,
 					baud);
 					baud);
 			if (cp2101_set_config_single(port, CP2101_BAUDRATE,
 			if (cp2101_set_config_single(port, CP2101_BAUDRATE,
 						(BAUD_RATE_GEN_FREQ / baud))) {
 						(BAUD_RATE_GEN_FREQ / baud))) {
@@ -562,23 +562,23 @@ static void cp2101_set_termios (struct usb_serial_port *port,
 		switch (cflag & CSIZE) {
 		switch (cflag & CSIZE) {
 			case CS5:
 			case CS5:
 				bits |= BITS_DATA_5;
 				bits |= BITS_DATA_5;
-				dbg("%s - data bits = 5", __FUNCTION__);
+				dbg("%s - data bits = 5", __func__);
 				break;
 				break;
 			case CS6:
 			case CS6:
 				bits |= BITS_DATA_6;
 				bits |= BITS_DATA_6;
-				dbg("%s - data bits = 6", __FUNCTION__);
+				dbg("%s - data bits = 6", __func__);
 				break;
 				break;
 			case CS7:
 			case CS7:
 				bits |= BITS_DATA_7;
 				bits |= BITS_DATA_7;
-				dbg("%s - data bits = 7", __FUNCTION__);
+				dbg("%s - data bits = 7", __func__);
 				break;
 				break;
 			case CS8:
 			case CS8:
 				bits |= BITS_DATA_8;
 				bits |= BITS_DATA_8;
-				dbg("%s - data bits = 8", __FUNCTION__);
+				dbg("%s - data bits = 8", __func__);
 				break;
 				break;
 			/*case CS9:
 			/*case CS9:
 			 	bits |= BITS_DATA_9;
 			 	bits |= BITS_DATA_9;
-				dbg("%s - data bits = 9", __FUNCTION__);
+				dbg("%s - data bits = 9", __func__);
 				break;*/
 				break;*/
 			default:
 			default:
 				dev_err(&port->dev, "cp2101 driver does not "
 				dev_err(&port->dev, "cp2101 driver does not "
@@ -598,10 +598,10 @@ static void cp2101_set_termios (struct usb_serial_port *port,
 		if (cflag & PARENB) {
 		if (cflag & PARENB) {
 			if (cflag & PARODD) {
 			if (cflag & PARODD) {
 				bits |= BITS_PARITY_ODD;
 				bits |= BITS_PARITY_ODD;
-				dbg("%s - parity = ODD", __FUNCTION__);
+				dbg("%s - parity = ODD", __func__);
 			} else {
 			} else {
 				bits |= BITS_PARITY_EVEN;
 				bits |= BITS_PARITY_EVEN;
-				dbg("%s - parity = EVEN", __FUNCTION__);
+				dbg("%s - parity = EVEN", __func__);
 			}
 			}
 		}
 		}
 		if (cp2101_set_config(port, CP2101_BITS, &bits, 2))
 		if (cp2101_set_config(port, CP2101_BITS, &bits, 2))
@@ -614,10 +614,10 @@ static void cp2101_set_termios (struct usb_serial_port *port,
 		bits &= ~BITS_STOP_MASK;
 		bits &= ~BITS_STOP_MASK;
 		if (cflag & CSTOPB) {
 		if (cflag & CSTOPB) {
 			bits |= BITS_STOP_2;
 			bits |= BITS_STOP_2;
-			dbg("%s - stop bits = 2", __FUNCTION__);
+			dbg("%s - stop bits = 2", __func__);
 		} else {
 		} else {
 			bits |= BITS_STOP_1;
 			bits |= BITS_STOP_1;
-			dbg("%s - stop bits = 1", __FUNCTION__);
+			dbg("%s - stop bits = 1", __func__);
 		}
 		}
 		if (cp2101_set_config(port, CP2101_BITS, &bits, 2))
 		if (cp2101_set_config(port, CP2101_BITS, &bits, 2))
 			dev_err(&port->dev, "Number of stop bits requested "
 			dev_err(&port->dev, "Number of stop bits requested "
@@ -627,23 +627,23 @@ static void cp2101_set_termios (struct usb_serial_port *port,
 	if ((cflag & CRTSCTS) != (old_cflag & CRTSCTS)) {
 	if ((cflag & CRTSCTS) != (old_cflag & CRTSCTS)) {
 		cp2101_get_config(port, CP2101_MODEMCTL, modem_ctl, 16);
 		cp2101_get_config(port, CP2101_MODEMCTL, modem_ctl, 16);
 		dbg("%s - read modem controls = 0x%.4x 0x%.4x 0x%.4x 0x%.4x",
 		dbg("%s - read modem controls = 0x%.4x 0x%.4x 0x%.4x 0x%.4x",
-				__FUNCTION__, modem_ctl[0], modem_ctl[1],
+				__func__, modem_ctl[0], modem_ctl[1],
 				modem_ctl[2], modem_ctl[3]);
 				modem_ctl[2], modem_ctl[3]);
 
 
 		if (cflag & CRTSCTS) {
 		if (cflag & CRTSCTS) {
 			modem_ctl[0] &= ~0x7B;
 			modem_ctl[0] &= ~0x7B;
 			modem_ctl[0] |= 0x09;
 			modem_ctl[0] |= 0x09;
 			modem_ctl[1] = 0x80;
 			modem_ctl[1] = 0x80;
-			dbg("%s - flow control = CRTSCTS", __FUNCTION__);
+			dbg("%s - flow control = CRTSCTS", __func__);
 		} else {
 		} else {
 			modem_ctl[0] &= ~0x7B;
 			modem_ctl[0] &= ~0x7B;
 			modem_ctl[0] |= 0x01;
 			modem_ctl[0] |= 0x01;
 			modem_ctl[1] |= 0x40;
 			modem_ctl[1] |= 0x40;
-			dbg("%s - flow control = NONE", __FUNCTION__);
+			dbg("%s - flow control = NONE", __func__);
 		}
 		}
 
 
 		dbg("%s - write modem controls = 0x%.4x 0x%.4x 0x%.4x 0x%.4x",
 		dbg("%s - write modem controls = 0x%.4x 0x%.4x 0x%.4x 0x%.4x",
-				__FUNCTION__, modem_ctl[0], modem_ctl[1],
+				__func__, modem_ctl[0], modem_ctl[1],
 				modem_ctl[2], modem_ctl[3]);
 				modem_ctl[2], modem_ctl[3]);
 		cp2101_set_config(port, CP2101_MODEMCTL, modem_ctl, 16);
 		cp2101_set_config(port, CP2101_MODEMCTL, modem_ctl, 16);
 	}
 	}
@@ -655,7 +655,7 @@ static int cp2101_tiocmset (struct usb_serial_port *port, struct file *file,
 {
 {
 	int control = 0;
 	int control = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (set & TIOCM_RTS) {
 	if (set & TIOCM_RTS) {
 		control |= CONTROL_RTS;
 		control |= CONTROL_RTS;
@@ -674,7 +674,7 @@ static int cp2101_tiocmset (struct usb_serial_port *port, struct file *file,
 		control |= CONTROL_WRITE_DTR;
 		control |= CONTROL_WRITE_DTR;
 	}
 	}
 
 
-	dbg("%s - control = 0x%.4x", __FUNCTION__, control);
+	dbg("%s - control = 0x%.4x", __func__, control);
 
 
 	return cp2101_set_config(port, CP2101_CONTROL, &control, 2);
 	return cp2101_set_config(port, CP2101_CONTROL, &control, 2);
 
 
@@ -684,7 +684,7 @@ static int cp2101_tiocmget (struct usb_serial_port *port, struct file *file)
 {
 {
 	int control, result;
 	int control, result;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	cp2101_get_config(port, CP2101_CONTROL, &control, 1);
 	cp2101_get_config(port, CP2101_CONTROL, &control, 1);
 
 
@@ -695,7 +695,7 @@ static int cp2101_tiocmget (struct usb_serial_port *port, struct file *file)
 		|((control & CONTROL_RING)? TIOCM_RI  : 0)
 		|((control & CONTROL_RING)? TIOCM_RI  : 0)
 		|((control & CONTROL_DCD) ? TIOCM_CD  : 0);
 		|((control & CONTROL_DCD) ? TIOCM_CD  : 0);
 
 
-	dbg("%s - control = 0x%.2x", __FUNCTION__, control);
+	dbg("%s - control = 0x%.2x", __func__, control);
 
 
 	return result;
 	return result;
 }
 }
@@ -704,12 +704,12 @@ static void cp2101_break_ctl (struct usb_serial_port *port, int break_state)
 {
 {
 	int state;
 	int state;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 	if (break_state == 0)
 	if (break_state == 0)
 		state = BREAK_OFF;
 		state = BREAK_OFF;
 	else
 	else
 		state = BREAK_ON;
 		state = BREAK_ON;
-	dbg("%s - turning break %s", __FUNCTION__,
+	dbg("%s - turning break %s", __func__,
 			state==BREAK_OFF ? "off" : "on");
 			state==BREAK_OFF ? "off" : "on");
 	cp2101_set_config(port, CP2101_BREAK, &state, 2);
 	cp2101_set_config(port, CP2101_BREAK, &state, 2);
 }
 }
@@ -725,7 +725,7 @@ static void cp2101_shutdown (struct usb_serial *serial)
 {
 {
 	int i;
 	int i;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	/* Stop reads and writes on all ports */
 	/* Stop reads and writes on all ports */
 	for (i=0; i < serial->num_ports; ++i) {
 	for (i=0; i < serial->num_ports; ++i) {

+ 36 - 36
drivers/usb/serial/cyberjack.c

@@ -116,7 +116,7 @@ static int cyberjack_startup (struct usb_serial *serial)
 	struct cyberjack_private *priv;
 	struct cyberjack_private *priv;
 	int i;
 	int i;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	/* allocate the private data structure */
 	/* allocate the private data structure */
 	priv = kmalloc(sizeof(struct cyberjack_private), GFP_KERNEL);
 	priv = kmalloc(sizeof(struct cyberjack_private), GFP_KERNEL);
@@ -139,7 +139,7 @@ static int cyberjack_startup (struct usb_serial *serial)
 					GFP_KERNEL);
 					GFP_KERNEL);
 		if (result)
 		if (result)
 			err(" usb_submit_urb(read int) failed");
 			err(" usb_submit_urb(read int) failed");
-		dbg("%s - usb_submit_urb(int urb)", __FUNCTION__);
+		dbg("%s - usb_submit_urb(int urb)", __func__);
 	}
 	}
 
 
 	return( 0 );
 	return( 0 );
@@ -149,7 +149,7 @@ static void cyberjack_shutdown (struct usb_serial *serial)
 {
 {
 	int i;
 	int i;
 	
 	
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	for (i=0; i < serial->num_ports; ++i) {
 	for (i=0; i < serial->num_ports; ++i) {
 		usb_kill_urb(serial->port[i]->interrupt_in_urb);
 		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)
 	unsigned long flags;
 	unsigned long flags;
 	int result = 0;
 	int result = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
-	dbg("%s - usb_clear_halt", __FUNCTION__ );
+	dbg("%s - usb_clear_halt", __func__ );
 	usb_clear_halt(port->serial->dev, port->write_urb->pipe);
 	usb_clear_halt(port->serial->dev, port->write_urb->pipe);
 
 
 	/* force low_latency on so that our tty_push actually forces
 	/* 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)
 
 
 static void cyberjack_close (struct usb_serial_port *port, struct file *filp)
 static void cyberjack_close (struct usb_serial_port *port, struct file *filp)
 {
 {
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (port->serial->dev) {
 	if (port->serial->dev) {
 		/* shutdown any bulk reads that might be going on */
 		/* 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
 	int result;
 	int result;
 	int wrexpected;
 	int wrexpected;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (count == 0) {
 	if (count == 0) {
-		dbg("%s - write request of 0 bytes", __FUNCTION__);
+		dbg("%s - write request of 0 bytes", __func__);
 		return (0);
 		return (0);
 	}
 	}
 
 
 	spin_lock_bh(&port->lock);
 	spin_lock_bh(&port->lock);
 	if (port->write_urb_busy) {
 	if (port->write_urb_busy) {
 		spin_unlock_bh(&port->lock);
 		spin_unlock_bh(&port->lock);
-		dbg("%s - already writing", __FUNCTION__);
+		dbg("%s - already writing", __func__);
 		return 0;
 		return 0;
 	}
 	}
 	port->write_urb_busy = 1;
 	port->write_urb_busy = 1;
@@ -234,13 +234,13 @@ static int cyberjack_write (struct usb_serial_port *port, const unsigned char *b
 	/* Copy data */
 	/* Copy data */
 	memcpy (priv->wrbuf+priv->wrfilled, buf, count);
 	memcpy (priv->wrbuf+priv->wrfilled, buf, count);
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count,
+	usb_serial_debug_data(debug, &port->dev, __func__, count,
 		priv->wrbuf+priv->wrfilled);
 		priv->wrbuf+priv->wrfilled);
 	priv->wrfilled += count;
 	priv->wrfilled += count;
 
 
 	if( priv->wrfilled >= 3 ) {
 	if( priv->wrfilled >= 3 ) {
 		wrexpected = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3;
 		wrexpected = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3;
-		dbg("%s - expected data: %d", __FUNCTION__, wrexpected);
+		dbg("%s - expected data: %d", __func__, wrexpected);
 	} else {
 	} else {
 		wrexpected = sizeof(priv->wrbuf);
 		wrexpected = sizeof(priv->wrbuf);
 	}
 	}
@@ -249,7 +249,7 @@ static int cyberjack_write (struct usb_serial_port *port, const unsigned char *b
 		/* We have enough data to begin transmission */
 		/* We have enough data to begin transmission */
 		int length;
 		int length;
 
 
-		dbg("%s - transmitting data (frame 1)", __FUNCTION__);
+		dbg("%s - transmitting data (frame 1)", __func__);
 		length = (wrexpected > port->bulk_out_size) ? port->bulk_out_size : wrexpected;
 		length = (wrexpected > port->bulk_out_size) ? port->bulk_out_size : wrexpected;
 
 
 		memcpy (port->write_urb->transfer_buffer, priv->wrbuf, length );
 		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
 		/* send the data out the bulk port */
 		/* send the data out the bulk port */
 		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 		if (result) {
 		if (result) {
-			err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
+			err("%s - failed submitting write urb, error %d", __func__, result);
 			/* Throw away data. No better idea what to do with it. */
 			/* Throw away data. No better idea what to do with it. */
 			priv->wrfilled=0;
 			priv->wrfilled=0;
 			priv->wrsent=0;
 			priv->wrsent=0;
@@ -276,11 +276,11 @@ static int cyberjack_write (struct usb_serial_port *port, const unsigned char *b
 			return 0;
 			return 0;
 		}
 		}
 
 
-		dbg("%s - priv->wrsent=%d", __FUNCTION__,priv->wrsent);
-		dbg("%s - priv->wrfilled=%d", __FUNCTION__,priv->wrfilled);
+		dbg("%s - priv->wrsent=%d", __func__,priv->wrsent);
+		dbg("%s - priv->wrfilled=%d", __func__,priv->wrfilled);
 
 
 		if( priv->wrsent>=priv->wrfilled ) {
 		if( priv->wrsent>=priv->wrfilled ) {
-			dbg("%s - buffer cleaned", __FUNCTION__);
+			dbg("%s - buffer cleaned", __func__);
 			memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
 			memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
 			priv->wrfilled=0;
 			priv->wrfilled=0;
 			priv->wrsent=0;
 			priv->wrsent=0;
@@ -305,13 +305,13 @@ static void cyberjack_read_int_callback( struct urb *urb )
 	int status = urb->status;
 	int status = urb->status;
 	int result;
 	int result;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* the urb might have been killed. */
 	/* the urb might have been killed. */
 	if (status)
 	if (status)
 		return;
 		return;
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+	usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
 
 
 	/* React only to interrupts signaling a bulk_in transfer */
 	/* React only to interrupts signaling a bulk_in transfer */
 	if( (urb->actual_length==4) && (data[0]==0x01) ) {
 	if( (urb->actual_length==4) && (data[0]==0x01) ) {
@@ -333,7 +333,7 @@ static void cyberjack_read_int_callback( struct urb *urb )
 		/* "+=" is probably more fault tollerant than "=" */
 		/* "+=" is probably more fault tollerant than "=" */
 		priv->rdtodo += size;
 		priv->rdtodo += size;
 
 
-		dbg("%s - rdtodo: %d", __FUNCTION__, priv->rdtodo);
+		dbg("%s - rdtodo: %d", __func__, priv->rdtodo);
 
 
 		spin_unlock(&priv->lock);
 		spin_unlock(&priv->lock);
 
 
@@ -341,8 +341,8 @@ static void cyberjack_read_int_callback( struct urb *urb )
 			port->read_urb->dev = port->serial->dev;
 			port->read_urb->dev = port->serial->dev;
 			result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 			result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 			if( result )
 			if( result )
-				err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
-			dbg("%s - usb_submit_urb(read urb)", __FUNCTION__);
+				err("%s - failed resubmitting read urb, error %d", __func__, result);
+			dbg("%s - usb_submit_urb(read urb)", __func__);
 		}
 		}
 	}
 	}
 
 
@@ -351,7 +351,7 @@ resubmit:
 	result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 	result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 	if (result)
 	if (result)
 		err(" usb_submit_urb(read int) failed");
 		err(" usb_submit_urb(read int) failed");
-	dbg("%s - usb_submit_urb(int urb)", __FUNCTION__);
+	dbg("%s - usb_submit_urb(int urb)", __func__);
 }
 }
 
 
 static void cyberjack_read_bulk_callback (struct urb *urb)
 static void cyberjack_read_bulk_callback (struct urb *urb)
@@ -364,18 +364,18 @@ static void cyberjack_read_bulk_callback (struct urb *urb)
 	int result;
 	int result;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+	usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero read bulk status received: %d",
 		dbg("%s - nonzero read bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 
 
 	tty = port->tty;
 	tty = port->tty;
 	if (!tty) {
 	if (!tty) {
-		dbg("%s - ignoring since device not open\n", __FUNCTION__);
+		dbg("%s - ignoring since device not open\n", __func__);
 		return;
 		return;
 	}
 	}
 	if (urb->actual_length) {
 	if (urb->actual_length) {
@@ -394,15 +394,15 @@ static void cyberjack_read_bulk_callback (struct urb *urb)
 
 
 	spin_unlock(&priv->lock);
 	spin_unlock(&priv->lock);
 
 
-	dbg("%s - rdtodo: %d", __FUNCTION__, todo);
+	dbg("%s - rdtodo: %d", __func__, todo);
 
 
 	/* Continue to read if we have still urbs to do. */
 	/* Continue to read if we have still urbs to do. */
 	if( todo /* || (urb->actual_length==port->bulk_in_endpointAddress)*/ ) {
 	if( todo /* || (urb->actual_length==port->bulk_in_endpointAddress)*/ ) {
 		port->read_urb->dev = port->serial->dev;
 		port->read_urb->dev = port->serial->dev;
 		result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 		result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 		if (result)
 		if (result)
-			err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
-		dbg("%s - usb_submit_urb(read urb)", __FUNCTION__);
+			err("%s - failed resubmitting read urb, error %d", __func__, result);
+		dbg("%s - usb_submit_urb(read urb)", __func__);
 	}
 	}
 }
 }
 
 
@@ -412,12 +412,12 @@ static void cyberjack_write_bulk_callback (struct urb *urb)
 	struct cyberjack_private *priv = usb_get_serial_port_data(port);
 	struct cyberjack_private *priv = usb_get_serial_port_data(port);
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	port->write_urb_busy = 0;
 	port->write_urb_busy = 0;
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero write bulk status received: %d",
 		dbg("%s - nonzero write bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 
 
@@ -427,7 +427,7 @@ static void cyberjack_write_bulk_callback (struct urb *urb)
 	if( priv->wrfilled ) {
 	if( priv->wrfilled ) {
 		int length, blksize, result;
 		int length, blksize, result;
 
 
-		dbg("%s - transmitting data (frame n)", __FUNCTION__);
+		dbg("%s - transmitting data (frame n)", __func__);
 
 
 		length = ((priv->wrfilled - priv->wrsent) > port->bulk_out_size) ?
 		length = ((priv->wrfilled - priv->wrsent) > port->bulk_out_size) ?
 			port->bulk_out_size : (priv->wrfilled - priv->wrsent);
 			port->bulk_out_size : (priv->wrfilled - priv->wrsent);
@@ -448,20 +448,20 @@ static void cyberjack_write_bulk_callback (struct urb *urb)
 		/* send the data out the bulk port */
 		/* send the data out the bulk port */
 		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 		if (result) {
 		if (result) {
-			err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
+			err("%s - failed submitting write urb, error %d", __func__, result);
 			/* Throw away data. No better idea what to do with it. */
 			/* Throw away data. No better idea what to do with it. */
 			priv->wrfilled=0;
 			priv->wrfilled=0;
 			priv->wrsent=0;
 			priv->wrsent=0;
 			goto exit;
 			goto exit;
 		}
 		}
 
 
-		dbg("%s - priv->wrsent=%d", __FUNCTION__,priv->wrsent);
-		dbg("%s - priv->wrfilled=%d", __FUNCTION__,priv->wrfilled);
+		dbg("%s - priv->wrsent=%d", __func__,priv->wrsent);
+		dbg("%s - priv->wrfilled=%d", __func__,priv->wrfilled);
 
 
 		blksize = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3;
 		blksize = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3;
 
 
 		if( (priv->wrsent>=priv->wrfilled) || (priv->wrsent>=blksize) ) {
 		if( (priv->wrsent>=priv->wrfilled) || (priv->wrsent>=blksize) ) {
-			dbg("%s - buffer cleaned", __FUNCTION__);
+			dbg("%s - buffer cleaned", __func__);
 			memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
 			memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
 			priv->wrfilled=0;
 			priv->wrfilled=0;
 			priv->wrsent=0;
 			priv->wrsent=0;

+ 64 - 64
drivers/usb/serial/cypress_m8.c

@@ -330,7 +330,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra
 	__u8 feature_buffer[5];
 	__u8 feature_buffer[5];
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 	
 	
 	priv = usb_get_serial_port_data(port);
 	priv = usb_get_serial_port_data(port);
 
 
@@ -345,7 +345,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra
 				new_baudrate = priv->baud_rate;
 				new_baudrate = priv->baud_rate;
 			/* Change of speed ? */
 			/* Change of speed ? */
 			else if (baud_rate != priv->baud_rate) {
 			else if (baud_rate != priv->baud_rate) {
-				dbg("%s - baud rate is changing", __FUNCTION__);
+				dbg("%s - baud rate is changing", __func__);
 				retval = analyze_baud_rate(port, baud_rate);
 				retval = analyze_baud_rate(port, baud_rate);
 				if (retval >=  0) {
 				if (retval >=  0) {
 					new_baudrate = retval;
 					new_baudrate = retval;
@@ -353,7 +353,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra
 					    __func__, new_baudrate);
 					    __func__, new_baudrate);
 				}
 				}
 			}
 			}
-			dbg("%s - baud rate is being sent as %d", __FUNCTION__, new_baudrate);
+			dbg("%s - baud rate is being sent as %d", __func__, new_baudrate);
 			
 			
 			memset(feature_buffer, 0, sizeof(feature_buffer));
 			memset(feature_buffer, 0, sizeof(feature_buffer));
 			/* fill the feature_buffer with new configuration */
 			/* 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
 			/* 1 bit gap */
 			/* 1 bit gap */
 			feature_buffer[4] |= (reset << 7);   /* assign reset at end of byte, 1 bit space */
 			feature_buffer[4] |= (reset << 7);   /* assign reset at end of byte, 1 bit space */
 				
 				
-			dbg("%s - device is being sent this feature report:", __FUNCTION__);
-			dbg("%s - %02X - %02X - %02X - %02X - %02X", __FUNCTION__, feature_buffer[0], feature_buffer[1],
+			dbg("%s - device is being sent this feature report:", __func__);
+			dbg("%s - %02X - %02X - %02X - %02X - %02X", __func__, feature_buffer[0], feature_buffer[1],
 		            feature_buffer[2], feature_buffer[3], feature_buffer[4]);
 		            feature_buffer[2], feature_buffer[3], feature_buffer[4]);
 			
 			
 			do {
 			do {
@@ -386,7 +386,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra
 				 retval != -ENODEV);
 				 retval != -ENODEV);
 
 
 			if (retval != sizeof(feature_buffer)) {
 			if (retval != sizeof(feature_buffer)) {
-				err("%s - failed sending serial line settings - %d", __FUNCTION__, retval);
+				err("%s - failed sending serial line settings - %d", __func__, retval);
 				cypress_set_dead(port);
 				cypress_set_dead(port);
 			} else {
 			} else {
 				spin_lock_irqsave(&priv->lock, flags);
 				spin_lock_irqsave(&priv->lock, flags);
@@ -406,7 +406,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra
 				   to crash the hardware. */
 				   to crash the hardware. */
 				return -ENOTTY;
 				return -ENOTTY;
 			}
 			}
-			dbg("%s - retreiving serial line settings", __FUNCTION__);
+			dbg("%s - retreiving serial line settings", __func__);
 			/* set initial values in feature buffer */
 			/* set initial values in feature buffer */
 			memset(feature_buffer, 0, sizeof(feature_buffer));
 			memset(feature_buffer, 0, sizeof(feature_buffer));
 
 
@@ -425,7 +425,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra
 				 retval != -ENODEV);
 				 retval != -ENODEV);
 
 
 			if (retval != sizeof(feature_buffer)) {
 			if (retval != sizeof(feature_buffer)) {
-				err("%s - failed to retrieve serial line settings - %d", __FUNCTION__, retval);
+				err("%s - failed to retrieve serial line settings - %d", __func__, retval);
 				cypress_set_dead(port);
 				cypress_set_dead(port);
 				return retval;
 				return retval;
 			} else {
 			} else {
@@ -473,7 +473,7 @@ static int generic_startup (struct usb_serial *serial)
 	struct cypress_private *priv;
 	struct cypress_private *priv;
 	struct usb_serial_port *port = serial->port[0];
 	struct usb_serial_port *port = serial->port[0];
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	priv = kzalloc(sizeof (struct cypress_private), GFP_KERNEL);
 	priv = kzalloc(sizeof (struct cypress_private), GFP_KERNEL);
 	if (!priv)
 	if (!priv)
@@ -509,12 +509,12 @@ static int generic_startup (struct usb_serial *serial)
 		priv->write_urb_interval = interval;
 		priv->write_urb_interval = interval;
 		priv->read_urb_interval = interval;
 		priv->read_urb_interval = interval;
 		dbg("%s - port %d read & write intervals forced to %d",
 		dbg("%s - port %d read & write intervals forced to %d",
-		    __FUNCTION__,port->number,interval);
+		    __func__,port->number,interval);
 	} else {
 	} else {
 		priv->write_urb_interval = port->interrupt_out_urb->interval;
 		priv->write_urb_interval = port->interrupt_out_urb->interval;
 		priv->read_urb_interval = port->interrupt_in_urb->interval;
 		priv->read_urb_interval = port->interrupt_in_urb->interval;
 		dbg("%s - port %d intervals: read=%d write=%d",
 		dbg("%s - port %d intervals: read=%d write=%d",
-		    __FUNCTION__,port->number,
+		    __func__,port->number,
 		    priv->read_urb_interval,priv->write_urb_interval);
 		    priv->read_urb_interval,priv->write_urb_interval);
 	}
 	}
 	usb_set_serial_port_data(port, priv);
 	usb_set_serial_port_data(port, priv);
@@ -528,10 +528,10 @@ static int cypress_earthmate_startup (struct usb_serial *serial)
 	struct cypress_private *priv;
 	struct cypress_private *priv;
 	struct usb_serial_port *port = serial->port[0];
 	struct usb_serial_port *port = serial->port[0];
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	if (generic_startup(serial)) {
 	if (generic_startup(serial)) {
-		dbg("%s - Failed setting up port %d", __FUNCTION__,
+		dbg("%s - Failed setting up port %d", __func__,
 				port->number);
 				port->number);
 		return 1;
 		return 1;
 	}
 	}
@@ -559,10 +559,10 @@ static int cypress_hidcom_startup (struct usb_serial *serial)
 {
 {
 	struct cypress_private *priv;
 	struct cypress_private *priv;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	if (generic_startup(serial)) {
 	if (generic_startup(serial)) {
-		dbg("%s - Failed setting up port %d", __FUNCTION__,
+		dbg("%s - Failed setting up port %d", __func__,
 				serial->port[0]->number);
 				serial->port[0]->number);
 		return 1;
 		return 1;
 	}
 	}
@@ -578,10 +578,10 @@ static int cypress_ca42v2_startup (struct usb_serial *serial)
 {
 {
 	struct cypress_private *priv;
 	struct cypress_private *priv;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	if (generic_startup(serial)) {
 	if (generic_startup(serial)) {
-		dbg("%s - Failed setting up port %d", __FUNCTION__,
+		dbg("%s - Failed setting up port %d", __func__,
 				serial->port[0]->number);
 				serial->port[0]->number);
 		return 1;
 		return 1;
 	}
 	}
@@ -597,7 +597,7 @@ static void cypress_shutdown (struct usb_serial *serial)
 {
 {
 	struct cypress_private *priv;
 	struct cypress_private *priv;
 
 
-	dbg ("%s - port %d", __FUNCTION__, serial->port[0]->number);
+	dbg ("%s - port %d", __func__, serial->port[0]->number);
 
 
 	/* all open ports are closed at this point */
 	/* all open ports are closed at this point */
 
 
@@ -618,7 +618,7 @@ static int cypress_open (struct usb_serial_port *port, struct file *filp)
 	unsigned long flags;
 	unsigned long flags;
 	int result = 0;
 	int result = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (!priv->comm_is_ok)
 	if (!priv->comm_is_ok)
 		return -EIO;
 		return -EIO;
@@ -646,16 +646,16 @@ static int cypress_open (struct usb_serial_port *port, struct file *filp)
 	result = cypress_write(port, NULL, 0);
 	result = cypress_write(port, NULL, 0);
 
 
 	if (result) {
 	if (result) {
-		dev_err(&port->dev, "%s - failed setting the control lines - error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed setting the control lines - error %d\n", __func__, result);
 		return result;
 		return result;
 	} else
 	} else
-		dbg("%s - success setting the control lines", __FUNCTION__);	
+		dbg("%s - success setting the control lines", __func__);
 
 
 	cypress_set_termios(port, &priv->tmp_termios);
 	cypress_set_termios(port, &priv->tmp_termios);
 
 
 	/* setup the port and start reading from the device */
 	/* setup the port and start reading from the device */
 	if(!port->interrupt_in_urb){
 	if(!port->interrupt_in_urb){
-		err("%s - interrupt_in_urb is empty!", __FUNCTION__);
+		err("%s - interrupt_in_urb is empty!", __func__);
 		return(-1);
 		return(-1);
 	}
 	}
 
 
@@ -666,7 +666,7 @@ static int cypress_open (struct usb_serial_port *port, struct file *filp)
 	result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 	result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 
 
 	if (result){
 	if (result){
-		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __func__, result);
 		cypress_set_dead(port);
 		cypress_set_dead(port);
 	}
 	}
 
 
@@ -682,7 +682,7 @@ static void cypress_close(struct usb_serial_port *port, struct file * filp)
 	long timeout;
 	long timeout;
 	wait_queue_t wait;
 	wait_queue_t wait;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* wait for data to drain from buffer */
 	/* wait for data to drain from buffer */
 	spin_lock_irq(&priv->lock);
 	spin_lock_irq(&priv->lock);
@@ -720,7 +720,7 @@ static void cypress_close(struct usb_serial_port *port, struct file * filp)
 		timeout = 2*HZ;
 		timeout = 2*HZ;
 	schedule_timeout_interruptible(timeout);
 	schedule_timeout_interruptible(timeout);
 
 
-	dbg("%s - stopping urbs", __FUNCTION__);
+	dbg("%s - stopping urbs", __func__);
 	usb_kill_urb (port->interrupt_in_urb);
 	usb_kill_urb (port->interrupt_in_urb);
 	usb_kill_urb (port->interrupt_out_urb);
 	usb_kill_urb (port->interrupt_out_urb);
 
 
@@ -749,7 +749,7 @@ static int cypress_write(struct usb_serial_port *port, const unsigned char *buf,
 	struct cypress_private *priv = usb_get_serial_port_data(port);
 	struct cypress_private *priv = usb_get_serial_port_data(port);
 	unsigned long flags;
 	unsigned long flags;
 	
 	
-	dbg("%s - port %d, %d bytes", __FUNCTION__, port->number, count);
+	dbg("%s - port %d, %d bytes", __func__, port->number, count);
 
 
 	/* line control commands, which need to be executed immediately,
 	/* line control commands, which need to be executed immediately,
 	   are not put into the buffer for obvious reasons.
 	   are not put into the buffer for obvious reasons.
@@ -782,12 +782,12 @@ static void cypress_send(struct usb_serial_port *port)
 	if (!priv->comm_is_ok)
 	if (!priv->comm_is_ok)
 		return;
 		return;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
-	dbg("%s - interrupt out size is %d", __FUNCTION__, port->interrupt_out_size);
+	dbg("%s - port %d", __func__, port->number);
+	dbg("%s - interrupt out size is %d", __func__, port->interrupt_out_size);
 	
 	
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	if (priv->write_urb_in_use) {
 	if (priv->write_urb_in_use) {
-		dbg("%s - can't write, urb in use", __FUNCTION__);
+		dbg("%s - can't write, urb in use", __func__);
 		spin_unlock_irqrestore(&priv->lock, flags);
 		spin_unlock_irqrestore(&priv->lock, flags);
 		return;
 		return;
 	}
 	}
@@ -816,7 +816,7 @@ static void cypress_send(struct usb_serial_port *port)
 
 
 	if (priv->cmd_ctrl) {
 	if (priv->cmd_ctrl) {
 		priv->cmd_count++;
 		priv->cmd_count++;
-		dbg("%s - line control command being issued", __FUNCTION__);
+		dbg("%s - line control command being issued", __func__);
 		spin_unlock_irqrestore(&priv->lock, flags);
 		spin_unlock_irqrestore(&priv->lock, flags);
 		goto send;
 		goto send;
 	} else
 	} else
@@ -838,7 +838,7 @@ static void cypress_send(struct usb_serial_port *port)
 		port->interrupt_out_buffer[0] |= count;
 		port->interrupt_out_buffer[0] |= count;
 	}
 	}
 
 
-	dbg("%s - count is %d", __FUNCTION__, count);
+	dbg("%s - count is %d", __func__, count);
 
 
 send:
 send:
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
@@ -851,7 +851,7 @@ send:
 		actual_size = count +
 		actual_size = count +
 			      (priv->pkt_fmt == packet_format_1 ? 2 : 1);
 			      (priv->pkt_fmt == packet_format_1 ? 2 : 1);
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, port->interrupt_out_size,
+	usb_serial_debug_data(debug, &port->dev, __func__, port->interrupt_out_size,
 			      port->interrupt_out_urb->transfer_buffer);
 			      port->interrupt_out_urb->transfer_buffer);
 
 
 	usb_fill_int_urb(port->interrupt_out_urb, port->serial->dev,
 	usb_fill_int_urb(port->interrupt_out_urb, port->serial->dev,
@@ -860,7 +860,7 @@ send:
 		cypress_write_int_callback, port, priv->write_urb_interval);
 		cypress_write_int_callback, port, priv->write_urb_interval);
 	result = usb_submit_urb (port->interrupt_out_urb, GFP_ATOMIC);
 	result = usb_submit_urb (port->interrupt_out_urb, GFP_ATOMIC);
 	if (result) {
 	if (result) {
-		dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__,
+		dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __func__,
 			result);
 			result);
 		priv->write_urb_in_use = 0;
 		priv->write_urb_in_use = 0;
 		cypress_set_dead(port);
 		cypress_set_dead(port);
@@ -884,13 +884,13 @@ static int cypress_write_room(struct usb_serial_port *port)
 	int room = 0;
 	int room = 0;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	room = cypress_buf_space_avail(priv->buf);
 	room = cypress_buf_space_avail(priv->buf);
 	spin_unlock_irqrestore(&priv->lock, flags);
 	spin_unlock_irqrestore(&priv->lock, flags);
 
 
-	dbg("%s - returns %d", __FUNCTION__, room);
+	dbg("%s - returns %d", __func__, room);
 	return room;
 	return room;
 }
 }
 
 
@@ -902,7 +902,7 @@ static int cypress_tiocmget (struct usb_serial_port *port, struct file *file)
 	unsigned int result = 0;
 	unsigned int result = 0;
 	unsigned long flags;
 	unsigned long flags;
 	
 	
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	control = priv->line_control;
 	control = priv->line_control;
@@ -916,7 +916,7 @@ static int cypress_tiocmget (struct usb_serial_port *port, struct file *file)
 		| ((status & UART_RI)         ? TIOCM_RI  : 0)
 		| ((status & UART_RI)         ? TIOCM_RI  : 0)
 		| ((status & UART_CD)         ? TIOCM_CD  : 0);
 		| ((status & UART_CD)         ? TIOCM_CD  : 0);
 
 
-	dbg("%s - result = %x", __FUNCTION__, result);
+	dbg("%s - result = %x", __func__, result);
 
 
 	return result;
 	return result;
 }
 }
@@ -928,7 +928,7 @@ static int cypress_tiocmset (struct usb_serial_port *port, struct file *file,
 	struct cypress_private *priv = usb_get_serial_port_data(port);
 	struct cypress_private *priv = usb_get_serial_port_data(port);
 	unsigned long flags;
 	unsigned long flags;
 	
 	
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	if (set & TIOCM_RTS)
 	if (set & TIOCM_RTS)
@@ -950,7 +950,7 @@ static int cypress_ioctl (struct usb_serial_port *port, struct file * file, unsi
 {
 {
 	struct cypress_private *priv = usb_get_serial_port_data(port);
 	struct cypress_private *priv = usb_get_serial_port_data(port);
 
 
-	dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
+	dbg("%s - port %d, cmd 0x%.4x", __func__, port->number, cmd);
 
 
 	switch (cmd) {
 	switch (cmd) {
 		/* This code comes from drivers/char/serial.c and ftdi_sio.c */
 		/* 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
 			break;
 			break;
 	}
 	}
 
 
-	dbg("%s - arg not supported - it was 0x%04x - check include/asm/ioctls.h", __FUNCTION__, cmd);
+	dbg("%s - arg not supported - it was 0x%04x - check include/asm/ioctls.h", __func__, cmd);
 
 
 	return -ENOIOCTLCMD;
 	return -ENOIOCTLCMD;
 } /* cypress_ioctl */
 } /* cypress_ioctl */
@@ -1005,7 +1005,7 @@ static void cypress_set_termios (struct usb_serial_port *port,
 	__u8 oldlines;
 	__u8 oldlines;
 	int linechange = 0;
 	int linechange = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	tty = port->tty;
 	tty = port->tty;
 
 
@@ -1076,7 +1076,7 @@ static void cypress_set_termios (struct usb_serial_port *port,
 				break;
 				break;
 			default:
 			default:
 				err("%s - CSIZE was set, but not CS5-CS8",
 				err("%s - CSIZE was set, but not CS5-CS8",
-						__FUNCTION__);
+						__func__);
 				data_bits = 3;
 				data_bits = 3;
 		}
 		}
 	} else
 	} else
@@ -1086,14 +1086,14 @@ static void cypress_set_termios (struct usb_serial_port *port,
 	oldlines = priv->line_control;
 	oldlines = priv->line_control;
 	if ((cflag & CBAUD) == B0) {
 	if ((cflag & CBAUD) == B0) {
 		/* drop dtr and rts */
 		/* drop dtr and rts */
-		dbg("%s - dropping the lines, baud rate 0bps", __FUNCTION__);
+		dbg("%s - dropping the lines, baud rate 0bps", __func__);
 		priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS);
 		priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS);
 	} else
 	} else
 		priv->line_control = (CONTROL_DTR | CONTROL_RTS);
 		priv->line_control = (CONTROL_DTR | CONTROL_RTS);
 	spin_unlock_irqrestore(&priv->lock, flags);
 	spin_unlock_irqrestore(&priv->lock, flags);
 
 
 	dbg("%s - sending %d stop_bits, %d parity_enable, %d parity_type, "
 	dbg("%s - sending %d stop_bits, %d parity_enable, %d parity_type, "
-			"%d data_bits (+5)", __FUNCTION__, stop_bits,
+			"%d data_bits (+5)", __func__, stop_bits,
 			parity_enable, parity_type, data_bits);
 			parity_enable, parity_type, data_bits);
 
 
 	cypress_serial_control(port, tty_get_baud_rate(tty), data_bits, stop_bits,
 	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)
 	int chars = 0;
 	int chars = 0;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 	
 	
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	chars = cypress_buf_data_avail(priv->buf);
 	chars = cypress_buf_data_avail(priv->buf);
 	spin_unlock_irqrestore(&priv->lock, flags);
 	spin_unlock_irqrestore(&priv->lock, flags);
 
 
-	dbg("%s - returns %d", __FUNCTION__, chars);
+	dbg("%s - returns %d", __func__, chars);
 	return chars;
 	return chars;
 }
 }
 
 
@@ -1170,7 +1170,7 @@ static void cypress_throttle (struct usb_serial_port *port)
 	struct cypress_private *priv = usb_get_serial_port_data(port);
 	struct cypress_private *priv = usb_get_serial_port_data(port);
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	priv->rx_flags = THROTTLED;
 	priv->rx_flags = THROTTLED;
@@ -1184,7 +1184,7 @@ static void cypress_unthrottle (struct usb_serial_port *port)
 	int actually_throttled, result;
 	int actually_throttled, result;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED;
 	actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED;
@@ -1200,7 +1200,7 @@ static void cypress_unthrottle (struct usb_serial_port *port)
 		result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 		result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 		if (result) {
 		if (result) {
 			dev_err(&port->dev, "%s - failed submitting read urb, "
 			dev_err(&port->dev, "%s - failed submitting read urb, "
-					"error %d\n", __FUNCTION__, result);
+					"error %d\n", __func__, result);
 			cypress_set_dead(port);
 			cypress_set_dead(port);
 		}
 		}
 	}
 	}
@@ -1221,7 +1221,7 @@ static void cypress_read_int_callback(struct urb *urb)
 	int i = 0;
 	int i = 0;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	switch (status) {
 	switch (status) {
 	case 0: /* success */
 	case 0: /* success */
@@ -1237,14 +1237,14 @@ static void cypress_read_int_callback(struct urb *urb)
 	default:
 	default:
 		/* something ugly is going on... */
 		/* something ugly is going on... */
 		dev_err(&urb->dev->dev,"%s - unexpected nonzero read status received: %d\n",
 		dev_err(&urb->dev->dev,"%s - unexpected nonzero read status received: %d\n",
-			__FUNCTION__, status);
+			__func__, status);
 		cypress_set_dead(port);
 		cypress_set_dead(port);
 		return;
 		return;
 	}
 	}
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	if (priv->rx_flags & THROTTLED) {
 	if (priv->rx_flags & THROTTLED) {
-		dbg("%s - now throttling", __FUNCTION__);
+		dbg("%s - now throttling", __func__);
 		priv->rx_flags |= ACTUALLY_THROTTLED;
 		priv->rx_flags |= ACTUALLY_THROTTLED;
 		spin_unlock_irqrestore(&priv->lock, flags);
 		spin_unlock_irqrestore(&priv->lock, flags);
 		return;
 		return;
@@ -1253,7 +1253,7 @@ static void cypress_read_int_callback(struct urb *urb)
 
 
 	tty = port->tty;
 	tty = port->tty;
 	if (!tty) {
 	if (!tty) {
-		dbg("%s - bad tty pointer - exiting", __FUNCTION__);
+		dbg("%s - bad tty pointer - exiting", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -1285,7 +1285,7 @@ static void cypress_read_int_callback(struct urb *urb)
 		goto continue_read;
 		goto continue_read;
 	}
 	}
 
 
-	usb_serial_debug_data (debug, &port->dev, __FUNCTION__,
+	usb_serial_debug_data (debug, &port->dev, __func__,
 			urb->actual_length, data);
 			urb->actual_length, data);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
@@ -1302,7 +1302,7 @@ static void cypress_read_int_callback(struct urb *urb)
 	 * though */
 	 * though */
 	if (tty && !(tty->termios->c_cflag & CLOCAL) &&
 	if (tty && !(tty->termios->c_cflag & CLOCAL) &&
 			!(priv->current_status & UART_CD)) {
 			!(priv->current_status & UART_CD)) {
-		dbg("%s - calling hangup", __FUNCTION__);
+		dbg("%s - calling hangup", __func__);
 		tty_hangup(tty);
 		tty_hangup(tty);
 		goto continue_read;
 		goto continue_read;
 	}
 	}
@@ -1315,7 +1315,7 @@ static void cypress_read_int_callback(struct urb *urb)
 	if (priv->current_status & CYP_ERROR) {
 	if (priv->current_status & CYP_ERROR) {
 		spin_unlock_irqrestore(&priv->lock, flags);
 		spin_unlock_irqrestore(&priv->lock, flags);
 		tty_flag = TTY_PARITY;
 		tty_flag = TTY_PARITY;
-		dbg("%s - Parity Error detected", __FUNCTION__);
+		dbg("%s - Parity Error detected", __func__);
 	} else
 	} else
 		spin_unlock_irqrestore(&priv->lock, flags);
 		spin_unlock_irqrestore(&priv->lock, flags);
 
 
@@ -1349,7 +1349,7 @@ continue_read:
 		result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 		result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 		if (result) {
 		if (result) {
 			dev_err(&urb->dev->dev, "%s - failed resubmitting "
 			dev_err(&urb->dev->dev, "%s - failed resubmitting "
-					"read urb, error %d\n", __FUNCTION__,
+					"read urb, error %d\n", __func__,
 					result);
 					result);
 			cypress_set_dead(port);
 			cypress_set_dead(port);
 		}
 		}
@@ -1366,7 +1366,7 @@ static void cypress_write_int_callback(struct urb *urb)
 	int result;
 	int result;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	switch (status) {
 	switch (status) {
 		case 0:
 		case 0:
@@ -1377,7 +1377,7 @@ static void cypress_write_int_callback(struct urb *urb)
 		case -ESHUTDOWN:
 		case -ESHUTDOWN:
 			/* this urb is terminated, clean up */
 			/* this urb is terminated, clean up */
 			dbg("%s - urb shutting down with status: %d",
 			dbg("%s - urb shutting down with status: %d",
-			    __FUNCTION__, status);
+			    __func__, status);
 			priv->write_urb_in_use = 0;
 			priv->write_urb_in_use = 0;
 			return;
 			return;
 		case -EPIPE: /* no break needed; clear halt and resubmit */
 		case -EPIPE: /* no break needed; clear halt and resubmit */
@@ -1386,19 +1386,19 @@ static void cypress_write_int_callback(struct urb *urb)
 			usb_clear_halt(port->serial->dev, 0x02);
 			usb_clear_halt(port->serial->dev, 0x02);
 			/* error in the urb, so we have to resubmit it */
 			/* error in the urb, so we have to resubmit it */
 			dbg("%s - nonzero write bulk status received: %d",
 			dbg("%s - nonzero write bulk status received: %d",
-			    __FUNCTION__, status);
+			    __func__, status);
 			port->interrupt_out_urb->transfer_buffer_length = 1;
 			port->interrupt_out_urb->transfer_buffer_length = 1;
 			port->interrupt_out_urb->dev = port->serial->dev;
 			port->interrupt_out_urb->dev = port->serial->dev;
 			result = usb_submit_urb(port->interrupt_out_urb, GFP_ATOMIC);
 			result = usb_submit_urb(port->interrupt_out_urb, GFP_ATOMIC);
 			if (!result)
 			if (!result)
 				return;
 				return;
 			dev_err(&urb->dev->dev, "%s - failed resubmitting write urb, error %d\n",
 			dev_err(&urb->dev->dev, "%s - failed resubmitting write urb, error %d\n",
-				__FUNCTION__, result);
+				__func__, result);
 			cypress_set_dead(port);
 			cypress_set_dead(port);
 			break;
 			break;
 		default:
 		default:
 			dev_err(&urb->dev->dev,"%s - unexpected nonzero write status received: %d\n",
 			dev_err(&urb->dev->dev,"%s - unexpected nonzero write status received: %d\n",
-				__FUNCTION__, status);
+				__func__, status);
 			cypress_set_dead(port);
 			cypress_set_dead(port);
 			break;
 			break;
 	}
 	}
@@ -1603,7 +1603,7 @@ static int __init cypress_init(void)
 {
 {
 	int retval;
 	int retval;
 	
 	
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 	
 	
 	retval = usb_serial_register(&cypress_earthmate_device);
 	retval = usb_serial_register(&cypress_earthmate_device);
 	if (retval)
 	if (retval)
@@ -1634,7 +1634,7 @@ failed_em_register:
 
 
 static void __exit cypress_exit (void)
 static void __exit cypress_exit (void)
 {
 {
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	usb_deregister (&cypress_driver);
 	usb_deregister (&cypress_driver);
 	usb_serial_deregister (&cypress_earthmate_device);
 	usb_serial_deregister (&cypress_earthmate_device);

+ 18 - 18
drivers/usb/serial/digi_acceleport.c

@@ -659,7 +659,7 @@ static int digi_write_oob_command(struct usb_serial_port *port,
 	}
 	}
 	spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags);
 	spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags);
 	if (ret)
 	if (ret)
-		err("%s: usb_submit_urb failed, ret=%d", __FUNCTION__, ret);
+		err("%s: usb_submit_urb failed, ret=%d", __func__, ret);
 	return ret;
 	return ret;
 
 
 }
 }
@@ -740,7 +740,7 @@ static int digi_write_inb_command(struct usb_serial_port *port,
 
 
 	if (ret)
 	if (ret)
 		err("%s: usb_submit_urb failed, ret=%d, port=%d",
 		err("%s: usb_submit_urb failed, ret=%d, port=%d",
-			__FUNCTION__, ret, priv->dp_port_num);
+			__func__, ret, priv->dp_port_num);
 	return ret;
 	return ret;
 }
 }
 
 
@@ -804,7 +804,7 @@ static int digi_set_modem_signals(struct usb_serial_port *port,
 	spin_unlock(&port_priv->dp_port_lock);
 	spin_unlock(&port_priv->dp_port_lock);
 	spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags);
 	spin_unlock_irqrestore(&oob_priv->dp_port_lock, flags);
 	if (ret)
 	if (ret)
-		err("%s: usb_submit_urb failed, ret=%d", __FUNCTION__, ret);
+		err("%s: usb_submit_urb failed, ret=%d", __func__, ret);
 	return ret;
 	return ret;
 }
 }
 
 
@@ -897,7 +897,7 @@ static void digi_rx_unthrottle(struct usb_serial_port *port)
 
 
 	if (ret)
 	if (ret)
 		err("%s: usb_submit_urb failed, ret=%d, port=%d",
 		err("%s: usb_submit_urb failed, ret=%d, port=%d",
-			__FUNCTION__, ret, priv->dp_port_num);
+			__func__, ret, priv->dp_port_num);
 }
 }
 
 
 
 
@@ -1107,7 +1107,7 @@ static int digi_tiocmget(struct usb_serial_port *port, struct file *file)
 	unsigned int val;
 	unsigned int val;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s: TOP: port=%d", __FUNCTION__, priv->dp_port_num);
+	dbg("%s: TOP: port=%d", __func__, priv->dp_port_num);
 
 
 	spin_lock_irqsave(&priv->dp_port_lock, flags);
 	spin_lock_irqsave(&priv->dp_port_lock, flags);
 	val = priv->dp_modem_signals;
 	val = priv->dp_modem_signals;
@@ -1123,7 +1123,7 @@ static int digi_tiocmset(struct usb_serial_port *port, struct file *file,
 	unsigned int val;
 	unsigned int val;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s: TOP: port=%d", __FUNCTION__, priv->dp_port_num);
+	dbg("%s: TOP: port=%d", __func__, priv->dp_port_num);
 
 
 	spin_lock_irqsave(&priv->dp_port_lock, flags);
 	spin_lock_irqsave(&priv->dp_port_lock, flags);
 	val = (priv->dp_modem_signals & ~clear) | set;
 	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
 	spin_unlock_irqrestore(&priv->dp_port_lock, flags);
 	spin_unlock_irqrestore(&priv->dp_port_lock, flags);
 	if (ret < 0)
 	if (ret < 0)
 		err("%s: usb_submit_urb failed, ret=%d, port=%d",
 		err("%s: usb_submit_urb failed, ret=%d, port=%d",
-			__FUNCTION__, ret, priv->dp_port_num);
+			__func__, ret, priv->dp_port_num);
 	dbg("digi_write: returning %d", ret);
 	dbg("digi_write: returning %d", ret);
 	return ret;
 	return ret;
 
 
@@ -1239,13 +1239,13 @@ static void digi_write_bulk_callback(struct urb *urb)
 	/* port and serial sanity check */
 	/* port and serial sanity check */
 	if (port == NULL || (priv=usb_get_serial_port_data(port)) == NULL) {
 	if (port == NULL || (priv=usb_get_serial_port_data(port)) == NULL) {
 		err("%s: port or port->private is NULL, status=%d",
 		err("%s: port or port->private is NULL, status=%d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 	serial = port->serial;
 	serial = port->serial;
 	if (serial == NULL || (serial_priv=usb_get_serial_data(serial)) == NULL) {
 	if (serial == NULL || (serial_priv=usb_get_serial_data(serial)) == NULL) {
 		err("%s: serial or serial->private is NULL, status=%d",
 		err("%s: serial or serial->private is NULL, status=%d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 
 
@@ -1286,7 +1286,7 @@ static void digi_write_bulk_callback(struct urb *urb)
 	spin_unlock(&priv->dp_port_lock);
 	spin_unlock(&priv->dp_port_lock);
 	if (ret)
 	if (ret)
 		err("%s: usb_submit_urb failed, ret=%d, port=%d",
 		err("%s: usb_submit_urb failed, ret=%d, port=%d",
-			__FUNCTION__, ret, priv->dp_port_num);
+			__func__, ret, priv->dp_port_num);
 }
 }
 
 
 static int digi_write_room(struct usb_serial_port *port)
 static int digi_write_room(struct usb_serial_port *port)
@@ -1515,7 +1515,7 @@ static int digi_startup_device(struct usb_serial *serial)
 		port->write_urb->dev = port->serial->dev;
 		port->write_urb->dev = port->serial->dev;
 		if ((ret = usb_submit_urb(port->read_urb, GFP_KERNEL)) != 0) {
 		if ((ret = usb_submit_urb(port->read_urb, GFP_KERNEL)) != 0) {
 			err("%s: usb_submit_urb failed, ret=%d, port=%d",
 			err("%s: usb_submit_urb failed, ret=%d, port=%d",
-					__FUNCTION__, ret, i);
+					__func__, ret, i);
 			break;
 			break;
 		}
 		}
 	}
 	}
@@ -1616,20 +1616,20 @@ static void digi_read_bulk_callback(struct urb *urb)
 	/* port sanity check, do not resubmit if port is not valid */
 	/* port sanity check, do not resubmit if port is not valid */
 	if (port == NULL || (priv = usb_get_serial_port_data(port)) == NULL) {
 	if (port == NULL || (priv = usb_get_serial_port_data(port)) == NULL) {
 		err("%s: port or port->private is NULL, status=%d",
 		err("%s: port or port->private is NULL, status=%d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 	if (port->serial == NULL ||
 	if (port->serial == NULL ||
 		(serial_priv=usb_get_serial_data(port->serial)) == NULL) {
 		(serial_priv=usb_get_serial_data(port->serial)) == NULL) {
 		err("%s: serial is bad or serial->private is NULL, status=%d",
 		err("%s: serial is bad or serial->private is NULL, status=%d",
-			__FUNCTION__, status);
+			__func__, status);
 		return;
 		return;
 	}
 	}
 
 
 	/* do not resubmit urb if it has any status error */
 	/* do not resubmit urb if it has any status error */
 	if (status) {
 	if (status) {
 		err("%s: nonzero read bulk status: status=%d, port=%d",
 		err("%s: nonzero read bulk status: status=%d, port=%d",
-		    __FUNCTION__, status, priv->dp_port_num);
+		    __func__, status, priv->dp_port_num);
 		return;
 		return;
 	}
 	}
 
 
@@ -1646,7 +1646,7 @@ static void digi_read_bulk_callback(struct urb *urb)
 	urb->dev = port->serial->dev;
 	urb->dev = port->serial->dev;
 	if ((ret = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
 	if ((ret = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
 		err("%s: failed resubmitting urb, ret=%d, port=%d",
 		err("%s: failed resubmitting urb, ret=%d, port=%d",
-		    __FUNCTION__, ret, priv->dp_port_num);
+		    __func__, ret, priv->dp_port_num);
 	}
 	}
 
 
 }
 }
@@ -1684,7 +1684,7 @@ static int digi_read_inb_callback(struct urb *urb)
 	if (urb->actual_length != len + 2) {
 	if (urb->actual_length != len + 2) {
      		err("%s: INCOMPLETE OR MULTIPLE PACKET, urb->status=%d, "
      		err("%s: INCOMPLETE OR MULTIPLE PACKET, urb->status=%d, "
 		    "port=%d, opcode=%d, len=%d, actual_length=%d, "
 		    "port=%d, opcode=%d, len=%d, actual_length=%d, "
-		    "status=%d", __FUNCTION__, status, priv->dp_port_num,
+		    "status=%d", __func__, status, priv->dp_port_num,
 		    opcode, len, urb->actual_length, port_status);
 		    opcode, len, urb->actual_length, port_status);
 		return -1;
 		return -1;
 	}
 	}
@@ -1733,9 +1733,9 @@ static int digi_read_inb_callback(struct urb *urb)
 	spin_unlock(&priv->dp_port_lock);
 	spin_unlock(&priv->dp_port_lock);
 
 
 	if (opcode == DIGI_CMD_RECEIVE_DISABLE)
 	if (opcode == DIGI_CMD_RECEIVE_DISABLE)
-		dbg("%s: got RECEIVE_DISABLE", __FUNCTION__);
+		dbg("%s: got RECEIVE_DISABLE", __func__);
 	else if (opcode != DIGI_CMD_RECEIVE_DATA)
 	else if (opcode != DIGI_CMD_RECEIVE_DATA)
-		dbg("%s: unknown opcode: %d", __FUNCTION__, opcode);
+		dbg("%s: unknown opcode: %d", __func__, opcode);
 
 
 	return(throttled ? 1 : 0);
 	return(throttled ? 1 : 0);
 
 

+ 27 - 27
drivers/usb/serial/empeg.c

@@ -150,7 +150,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp)
 	struct usb_serial *serial = port->serial;
 	struct usb_serial *serial = port->serial;
 	int result = 0;
 	int result = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* Force default termio settings */
 	/* Force default termio settings */
 	empeg_set_termios (port, NULL) ;
 	empeg_set_termios (port, NULL) ;
@@ -172,7 +172,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp)
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 
 
 	if (result)
 	if (result)
-		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __func__, result);
 
 
 	return result;
 	return result;
 }
 }
@@ -180,7 +180,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp)
 
 
 static void empeg_close (struct usb_serial_port *port, struct file * filp)
 static void empeg_close (struct usb_serial_port *port, struct file * filp)
 {
 {
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* shutdown our bulk read */
 	/* shutdown our bulk read */
 	usb_kill_urb(port->read_urb);
 	usb_kill_urb(port->read_urb);
@@ -200,7 +200,7 @@ static int empeg_write (struct usb_serial_port *port, const unsigned char *buf,
 	int bytes_sent = 0;
 	int bytes_sent = 0;
 	int transfer_size;
 	int transfer_size;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	while (count > 0) {
 	while (count > 0) {
 
 
@@ -219,14 +219,14 @@ static int empeg_write (struct usb_serial_port *port, const unsigned char *buf,
 		spin_unlock_irqrestore (&write_urb_pool_lock, flags);
 		spin_unlock_irqrestore (&write_urb_pool_lock, flags);
 
 
 		if (urb == NULL) {
 		if (urb == NULL) {
-			dbg("%s - no more free urbs", __FUNCTION__);
+			dbg("%s - no more free urbs", __func__);
 			goto exit;
 			goto exit;
 		}
 		}
 
 
 		if (urb->transfer_buffer == NULL) {
 		if (urb->transfer_buffer == NULL) {
 			urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
 			urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
 			if (urb->transfer_buffer == NULL) {
 			if (urb->transfer_buffer == NULL) {
-				dev_err(&port->dev, "%s no more kernel memory...\n", __FUNCTION__);
+				dev_err(&port->dev, "%s no more kernel memory...\n", __func__);
 				goto exit;
 				goto exit;
 			}
 			}
 		}
 		}
@@ -235,7 +235,7 @@ static int empeg_write (struct usb_serial_port *port, const unsigned char *buf,
 
 
 		memcpy (urb->transfer_buffer, current_position, transfer_size);
 		memcpy (urb->transfer_buffer, current_position, transfer_size);
 
 
-		usb_serial_debug_data(debug, &port->dev, __FUNCTION__, transfer_size, urb->transfer_buffer);
+		usb_serial_debug_data(debug, &port->dev, __func__, transfer_size, urb->transfer_buffer);
 
 
 		/* build up our urb */
 		/* build up our urb */
 		usb_fill_bulk_urb (
 		usb_fill_bulk_urb (
@@ -251,7 +251,7 @@ static int empeg_write (struct usb_serial_port *port, const unsigned char *buf,
 		/* send it down the pipe */
 		/* send it down the pipe */
 		status = usb_submit_urb(urb, GFP_ATOMIC);
 		status = usb_submit_urb(urb, GFP_ATOMIC);
 		if (status) {
 		if (status) {
-			dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n", __FUNCTION__, status);
+			dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n", __func__, status);
 			bytes_sent = status;
 			bytes_sent = status;
 			break;
 			break;
 		}
 		}
@@ -275,7 +275,7 @@ static int empeg_write_room (struct usb_serial_port *port)
 	int i;
 	int i;
 	int room = 0;
 	int room = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave (&write_urb_pool_lock, flags);
 	spin_lock_irqsave (&write_urb_pool_lock, flags);
 
 
@@ -288,7 +288,7 @@ static int empeg_write_room (struct usb_serial_port *port)
 
 
 	spin_unlock_irqrestore (&write_urb_pool_lock, flags);
 	spin_unlock_irqrestore (&write_urb_pool_lock, flags);
 
 
-	dbg("%s - returns %d", __FUNCTION__, room);
+	dbg("%s - returns %d", __func__, room);
 
 
 	return (room);
 	return (room);
 
 
@@ -301,7 +301,7 @@ static int empeg_chars_in_buffer (struct usb_serial_port *port)
 	int i;
 	int i;
 	int chars = 0;
 	int chars = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave (&write_urb_pool_lock, flags);
 	spin_lock_irqsave (&write_urb_pool_lock, flags);
 
 
@@ -314,7 +314,7 @@ static int empeg_chars_in_buffer (struct usb_serial_port *port)
 
 
 	spin_unlock_irqrestore (&write_urb_pool_lock, flags);
 	spin_unlock_irqrestore (&write_urb_pool_lock, flags);
 
 
-	dbg("%s - returns %d", __FUNCTION__, chars);
+	dbg("%s - returns %d", __func__, chars);
 
 
 	return (chars);
 	return (chars);
 
 
@@ -326,11 +326,11 @@ static void empeg_write_bulk_callback (struct urb *urb)
 	struct usb_serial_port *port = urb->context;
 	struct usb_serial_port *port = urb->context;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero write bulk status received: %d",
 		dbg("%s - nonzero write bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 
 
@@ -346,15 +346,15 @@ static void empeg_read_bulk_callback (struct urb *urb)
 	int result;
 	int result;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero read bulk status received: %d",
 		dbg("%s - nonzero read bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+	usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
 
 
 	tty = port->tty;
 	tty = port->tty;
 
 
@@ -379,7 +379,7 @@ static void empeg_read_bulk_callback (struct urb *urb)
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 
 
 	if (result)
 	if (result)
-		dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+		dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __func__, result);
 
 
 	return;
 	return;
 
 
@@ -388,7 +388,7 @@ static void empeg_read_bulk_callback (struct urb *urb)
 
 
 static void empeg_throttle (struct usb_serial_port *port)
 static void empeg_throttle (struct usb_serial_port *port)
 {
 {
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 	usb_kill_urb(port->read_urb);
 	usb_kill_urb(port->read_urb);
 }
 }
 
 
@@ -397,14 +397,14 @@ static void empeg_unthrottle (struct usb_serial_port *port)
 {
 {
 	int result;
 	int result;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	port->read_urb->dev = port->serial->dev;
 	port->read_urb->dev = port->serial->dev;
 
 
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 
 
 	if (result)
 	if (result)
-		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __func__, result);
 
 
 	return;
 	return;
 }
 }
@@ -414,14 +414,14 @@ static int  empeg_startup (struct usb_serial *serial)
 {
 {
 	int r;
 	int r;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
 	if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
 		err("active config #%d != 1 ??",
 		err("active config #%d != 1 ??",
 			serial->dev->actconfig->desc.bConfigurationValue);
 			serial->dev->actconfig->desc.bConfigurationValue);
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}
-	dbg("%s - reset config", __FUNCTION__);
+	dbg("%s - reset config", __func__);
 	r = usb_reset_configuration (serial->dev);
 	r = usb_reset_configuration (serial->dev);
 
 
 	/* continue on with initialization */
 	/* continue on with initialization */
@@ -432,13 +432,13 @@ static int  empeg_startup (struct usb_serial *serial)
 
 
 static void empeg_shutdown (struct usb_serial *serial)
 static void empeg_shutdown (struct usb_serial *serial)
 {
 {
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 }
 }
 
 
 
 
 static int empeg_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
 static int empeg_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
 {
 {
-	dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
+	dbg("%s - port %d, cmd 0x%.4x", __func__, port->number, cmd);
 
 
 	return -ENOIOCTLCMD;
 	return -ENOIOCTLCMD;
 }
 }
@@ -447,7 +447,7 @@ static int empeg_ioctl (struct usb_serial_port *port, struct file * file, unsign
 static void empeg_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
 static void empeg_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
 {
 {
 	struct ktermios *termios = port->tty->termios;
 	struct ktermios *termios = port->tty->termios;
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/*
 	/*
          * The empeg-car player wants these particular tty settings.
          * The empeg-car player wants these particular tty settings.
@@ -514,7 +514,7 @@ static int __init empeg_init (void)
 		urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
 		urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
 		if (!urb->transfer_buffer) {
 		if (!urb->transfer_buffer) {
 			err("%s - out of memory for urb buffers.", 
 			err("%s - out of memory for urb buffers.", 
-			    __FUNCTION__);
+			    __func__);
 			continue;
 			continue;
 		}
 		}
 	}
 	}

+ 4 - 4
drivers/usb/serial/ezusb.c

@@ -27,13 +27,13 @@ int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *da
 
 
 	/* dbg("ezusb_writememory %x, %d", address, length); */
 	/* dbg("ezusb_writememory %x, %d", address, length); */
 	if (!serial->dev) {
 	if (!serial->dev) {
-		err("%s - no physical device present, failing.", __FUNCTION__);
+		err("%s - no physical device present, failing.", __func__);
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}
 
 
 	transfer_buffer = kmemdup(data, length, GFP_KERNEL);
 	transfer_buffer = kmemdup(data, length, GFP_KERNEL);
 	if (!transfer_buffer) {
 	if (!transfer_buffer) {
-		dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, length);
+		dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __func__, length);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 	result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), bRequest, 0x40, address, 0, transfer_buffer, length, 3000);
 	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)
 {
 {
 	int response;
 	int response;
 
 
-	/* dbg("%s - %d", __FUNCTION__, reset_bit); */
+	/* dbg("%s - %d", __func__, reset_bit); */
 	response = ezusb_writememory (serial, CPUCS_REG, &reset_bit, 1, 0xa0);
 	response = ezusb_writememory (serial, CPUCS_REG, &reset_bit, 1, 0xa0);
 	if (response < 0)
 	if (response < 0)
-		dev_err(&serial->dev->dev, "%s- %d failed\n", __FUNCTION__, reset_bit);
+		dev_err(&serial->dev->dev, "%s- %d failed\n", __func__, reset_bit);
 	return response;
 	return response;
 }
 }
 
 

+ 78 - 78
drivers/usb/serial/ftdi_sio.c

@@ -525,7 +525,7 @@ static int update_mctrl(struct usb_serial_port *port, unsigned int set, unsigned
 	int rv;
 	int rv;
 
 
 	if (((set | clear) & (TIOCM_DTR | TIOCM_RTS)) == 0) {
 	if (((set | clear) & (TIOCM_DTR | TIOCM_RTS)) == 0) {
-		dbg("%s - DTR|RTS not being set|cleared", __FUNCTION__);
+		dbg("%s - DTR|RTS not being set|cleared", __func__);
 		return 0;	/* no change */
 		return 0;	/* no change */
 	}
 	}
 
 
@@ -553,13 +553,13 @@ static int update_mctrl(struct usb_serial_port *port, unsigned int set, unsigned
 	kfree(buf);
 	kfree(buf);
 	if (rv < 0) {
 	if (rv < 0) {
 		err("%s Error from MODEM_CTRL urb: DTR %s, RTS %s",
 		err("%s Error from MODEM_CTRL urb: DTR %s, RTS %s",
-				__FUNCTION__,
+				__func__,
 				(set & TIOCM_DTR) ? "HIGH" :
 				(set & TIOCM_DTR) ? "HIGH" :
 				(clear & TIOCM_DTR) ? "LOW" : "unchanged",
 				(clear & TIOCM_DTR) ? "LOW" : "unchanged",
 				(set & TIOCM_RTS) ? "HIGH" :
 				(set & TIOCM_RTS) ? "HIGH" :
 				(clear & TIOCM_RTS) ? "LOW" : "unchanged");
 				(clear & TIOCM_RTS) ? "LOW" : "unchanged");
 	} else {
 	} else {
-		dbg("%s - DTR %s, RTS %s", __FUNCTION__,
+		dbg("%s - DTR %s, RTS %s", __func__,
 				(set & TIOCM_DTR) ? "HIGH" :
 				(set & TIOCM_DTR) ? "HIGH" :
 				(clear & TIOCM_DTR) ? "LOW" : "unchanged",
 				(clear & TIOCM_DTR) ? "LOW" : "unchanged",
 				(set & TIOCM_RTS) ? "HIGH" :
 				(set & TIOCM_RTS) ? "HIGH" :
@@ -639,7 +639,7 @@ static __u32 get_ftdi_divisor(struct usb_serial_port * port)
 	/* 1. Get the baud rate from the tty settings, this observes alt_speed hack */
 	/* 1. Get the baud rate from the tty settings, this observes alt_speed hack */
 
 
 	baud = tty_get_baud_rate(port->tty);
 	baud = tty_get_baud_rate(port->tty);
-	dbg("%s - tty_get_baud_rate reports speed %d", __FUNCTION__, baud);
+	dbg("%s - tty_get_baud_rate reports speed %d", __func__, baud);
 
 
 	/* 2. Observe async-compatible custom_divisor hack, update baudrate if needed */
 	/* 2. Observe async-compatible custom_divisor hack, update baudrate if needed */
 
 
@@ -647,7 +647,7 @@ static __u32 get_ftdi_divisor(struct usb_serial_port * port)
 	    ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) &&
 	    ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) &&
 	     (priv->custom_divisor)) {
 	     (priv->custom_divisor)) {
 		baud = priv->baud_base / priv->custom_divisor;
 		baud = priv->baud_base / priv->custom_divisor;
-		dbg("%s - custom divisor %d sets baud rate to %d", __FUNCTION__, priv->custom_divisor, baud);
+		dbg("%s - custom divisor %d sets baud rate to %d", __func__, priv->custom_divisor, baud);
 	}
 	}
 
 
 	/* 3. Convert baudrate to device-specific divisor */
 	/* 3. Convert baudrate to device-specific divisor */
@@ -668,7 +668,7 @@ static __u32 get_ftdi_divisor(struct usb_serial_port * port)
 		case 115200: div_value = ftdi_sio_b115200; break;
 		case 115200: div_value = ftdi_sio_b115200; break;
 		} /* baud */
 		} /* baud */
 		if (div_value == 0) {
 		if (div_value == 0) {
-			dbg("%s - Baudrate (%d) requested is not supported", __FUNCTION__,  baud);
+			dbg("%s - Baudrate (%d) requested is not supported", __func__,  baud);
 			div_value = ftdi_sio_b9600;
 			div_value = ftdi_sio_b9600;
 			baud = 9600;
 			baud = 9600;
 			div_okay = 0;
 			div_okay = 0;
@@ -678,7 +678,7 @@ static __u32 get_ftdi_divisor(struct usb_serial_port * port)
 		if (baud <= 3000000) {
 		if (baud <= 3000000) {
 			div_value = ftdi_232am_baud_to_divisor(baud);
 			div_value = ftdi_232am_baud_to_divisor(baud);
 		} else {
 		} else {
-	                dbg("%s - Baud rate too high!", __FUNCTION__);
+	                dbg("%s - Baud rate too high!", __func__);
 			baud = 9600;
 			baud = 9600;
 			div_value = ftdi_232am_baud_to_divisor(9600);
 			div_value = ftdi_232am_baud_to_divisor(9600);
 			div_okay = 0;
 			div_okay = 0;
@@ -690,7 +690,7 @@ static __u32 get_ftdi_divisor(struct usb_serial_port * port)
 		if (baud <= 3000000) {
 		if (baud <= 3000000) {
 			div_value = ftdi_232bm_baud_to_divisor(baud);
 			div_value = ftdi_232bm_baud_to_divisor(baud);
 		} else {
 		} else {
-	                dbg("%s - Baud rate too high!", __FUNCTION__);
+	                dbg("%s - Baud rate too high!", __func__);
 			div_value = ftdi_232bm_baud_to_divisor(9600);
 			div_value = ftdi_232bm_baud_to_divisor(9600);
 			div_okay = 0;
 			div_okay = 0;
 			baud = 9600;
 			baud = 9600;
@@ -700,7 +700,7 @@ static __u32 get_ftdi_divisor(struct usb_serial_port * port)
 
 
 	if (div_okay) {
 	if (div_okay) {
 		dbg("%s - Baud rate set to %d (divisor 0x%lX) on chip %s",
 		dbg("%s - Baud rate set to %d (divisor 0x%lX) on chip %s",
-			__FUNCTION__, baud, (unsigned long)div_value,
+			__func__, baud, (unsigned long)div_value,
 			ftdi_chip_name[priv->chip_type]);
 			ftdi_chip_name[priv->chip_type]);
 	}
 	}
 
 
@@ -801,7 +801,7 @@ static void ftdi_determine_type(struct usb_serial_port *port)
 
 
 	version = le16_to_cpu(udev->descriptor.bcdDevice);
 	version = le16_to_cpu(udev->descriptor.bcdDevice);
 	interfaces = udev->actconfig->desc.bNumInterfaces;
 	interfaces = udev->actconfig->desc.bNumInterfaces;
-	dbg("%s: bcdDevice = 0x%x, bNumInterfaces = %u", __FUNCTION__,
+	dbg("%s: bcdDevice = 0x%x, bNumInterfaces = %u", __func__,
 			version, interfaces);
 			version, interfaces);
 	if (interfaces > 1) {
 	if (interfaces > 1) {
 		int inter;
 		int inter;
@@ -819,7 +819,7 @@ static void ftdi_determine_type(struct usb_serial_port *port)
 		 * to 0x200 when iSerialNumber is 0.  */
 		 * to 0x200 when iSerialNumber is 0.  */
 		if (version < 0x500) {
 		if (version < 0x500) {
 			dbg("%s: something fishy - bcdDevice too low for multi-interface device",
 			dbg("%s: something fishy - bcdDevice too low for multi-interface device",
-					__FUNCTION__);
+					__func__);
 		}
 		}
 	} else if (version < 0x200) {
 	} else if (version < 0x200) {
 		/* Old device.  Assume its the original SIO. */
 		/* Old device.  Assume its the original SIO. */
@@ -857,7 +857,7 @@ static ssize_t show_latency_timer(struct device *dev, struct device_attribute *a
 	int rv = 0;
 	int rv = 0;
 
 
 
 
-	dbg("%s",__FUNCTION__);
+	dbg("%s",__func__);
 
 
 	rv = usb_control_msg(udev,
 	rv = usb_control_msg(udev,
 			     usb_rcvctrlpipe(udev, 0),
 			     usb_rcvctrlpipe(udev, 0),
@@ -884,7 +884,7 @@ static ssize_t store_latency_timer(struct device *dev, struct device_attribute *
 	int v = simple_strtoul(valbuf, NULL, 10);
 	int v = simple_strtoul(valbuf, NULL, 10);
 	int rv = 0;
 	int rv = 0;
 
 
-	dbg("%s: setting latency timer = %i", __FUNCTION__, v);
+	dbg("%s: setting latency timer = %i", __func__, v);
 
 
 	rv = usb_control_msg(udev,
 	rv = usb_control_msg(udev,
 			     usb_sndctrlpipe(udev, 0),
 			     usb_sndctrlpipe(udev, 0),
@@ -913,7 +913,7 @@ static ssize_t store_event_char(struct device *dev, struct device_attribute *att
 	int v = simple_strtoul(valbuf, NULL, 10);
 	int v = simple_strtoul(valbuf, NULL, 10);
 	int rv = 0;
 	int rv = 0;
 
 
-	dbg("%s: setting event char = %i", __FUNCTION__, v);
+	dbg("%s: setting event char = %i", __func__, v);
 
 
 	rv = usb_control_msg(udev,
 	rv = usb_control_msg(udev,
 			     usb_sndctrlpipe(udev, 0),
 			     usb_sndctrlpipe(udev, 0),
@@ -938,7 +938,7 @@ static int create_sysfs_attrs(struct usb_serial_port *port)
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
 	int retval = 0;
 	int retval = 0;
 
 
-	dbg("%s",__FUNCTION__);
+	dbg("%s",__func__);
 
 
 	/* XXX I've no idea if the original SIO supports the event_char
 	/* XXX I've no idea if the original SIO supports the event_char
 	 * sysfs parameter, so I'm playing it safe.  */
 	 * sysfs parameter, so I'm playing it safe.  */
@@ -960,7 +960,7 @@ static void remove_sysfs_attrs(struct usb_serial_port *port)
 {
 {
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
 
 
-	dbg("%s",__FUNCTION__);
+	dbg("%s",__func__);
 
 
 	/* XXX see create_sysfs_attrs */
 	/* XXX see create_sysfs_attrs */
 	if (priv->chip_type != SIO) {
 	if (priv->chip_type != SIO) {
@@ -1002,11 +1002,11 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port)
 	struct ftdi_sio_quirk *quirk = usb_get_serial_data(port->serial);
 	struct ftdi_sio_quirk *quirk = usb_get_serial_data(port->serial);
 
 
 
 
-	dbg("%s",__FUNCTION__);
+	dbg("%s",__func__);
 
 
 	priv = kzalloc(sizeof(struct ftdi_private), GFP_KERNEL);
 	priv = kzalloc(sizeof(struct ftdi_private), GFP_KERNEL);
 	if (!priv){
 	if (!priv){
-		err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct ftdi_private));
+		err("%s- kmalloc(%Zd) failed.", __func__, sizeof(struct ftdi_private));
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 
 
@@ -1055,7 +1055,7 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port)
 /* Called from usbserial:serial_probe */
 /* Called from usbserial:serial_probe */
 static void ftdi_USB_UIRT_setup (struct ftdi_private *priv)
 static void ftdi_USB_UIRT_setup (struct ftdi_private *priv)
 {
 {
-	dbg("%s",__FUNCTION__);
+	dbg("%s",__func__);
 
 
 	priv->flags |= ASYNC_SPD_CUST;
 	priv->flags |= ASYNC_SPD_CUST;
 	priv->custom_divisor = 77;
 	priv->custom_divisor = 77;
@@ -1066,7 +1066,7 @@ static void ftdi_USB_UIRT_setup (struct ftdi_private *priv)
  * baudrate (38400 gets mapped to 100000) and RTS-CTS enabled.  */
  * baudrate (38400 gets mapped to 100000) and RTS-CTS enabled.  */
 static void ftdi_HE_TIRA1_setup (struct ftdi_private *priv)
 static void ftdi_HE_TIRA1_setup (struct ftdi_private *priv)
 {
 {
-	dbg("%s",__FUNCTION__);
+	dbg("%s",__func__);
 
 
 	priv->flags |= ASYNC_SPD_CUST;
 	priv->flags |= ASYNC_SPD_CUST;
 	priv->custom_divisor = 240;
 	priv->custom_divisor = 240;
@@ -1084,7 +1084,7 @@ static int ftdi_jtag_probe(struct usb_serial *serial)
 	struct usb_device *udev = serial->dev;
 	struct usb_device *udev = serial->dev;
 	struct usb_interface *interface = serial->interface;
 	struct usb_interface *interface = serial->interface;
 
 
-	dbg("%s",__FUNCTION__);
+	dbg("%s",__func__);
 
 
 	if (interface == udev->actconfig->interface[0]) {
 	if (interface == udev->actconfig->interface[0]) {
 		info("Ignoring serial port reserved for JTAG");
 		info("Ignoring serial port reserved for JTAG");
@@ -1120,14 +1120,14 @@ static int ftdi_mtxorb_hack_setup(struct usb_serial *serial)
  */
  */
 static void ftdi_shutdown (struct usb_serial *serial)
 static void ftdi_shutdown (struct usb_serial *serial)
 {
 {
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 }
 }
 
 
 static int ftdi_sio_port_remove(struct usb_serial_port *port)
 static int ftdi_sio_port_remove(struct usb_serial_port *port)
 {
 {
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	remove_sysfs_attrs(port);
 	remove_sysfs_attrs(port);
 
 
@@ -1152,7 +1152,7 @@ static int  ftdi_open (struct usb_serial_port *port, struct file *filp)
 	int result = 0;
 	int result = 0;
 	char buf[1]; /* Needed for the usb_control_msg I think */
 	char buf[1]; /* Needed for the usb_control_msg I think */
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	spin_lock_irqsave(&priv->tx_lock, flags);
 	spin_lock_irqsave(&priv->tx_lock, flags);
 	priv->tx_bytes = 0;
 	priv->tx_bytes = 0;
@@ -1197,7 +1197,7 @@ static int  ftdi_open (struct usb_serial_port *port, struct file *filp)
 		      ftdi_read_bulk_callback, port);
 		      ftdi_read_bulk_callback, port);
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	if (result)
 	if (result)
-		err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
+		err("%s - failed submitting read urb, error %d", __func__, result);
 
 
 
 
 	return result;
 	return result;
@@ -1219,7 +1219,7 @@ static void ftdi_close (struct usb_serial_port *port, struct file *filp)
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
 	char buf[1];
 	char buf[1];
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	mutex_lock(&port->serial->disc_mutex);
 	mutex_lock(&port->serial->disc_mutex);
 	if (c_cflag & HUPCL && !port->serial->disconnected){
 	if (c_cflag & HUPCL && !port->serial->disconnected){
@@ -1266,7 +1266,7 @@ static int ftdi_write (struct usb_serial_port *port,
 	int transfer_size;
 	int transfer_size;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s port %d, %d bytes", __FUNCTION__, port->number, count);
+	dbg("%s port %d, %d bytes", __func__, port->number, count);
 
 
 	if (count == 0) {
 	if (count == 0) {
 		dbg("write request of 0 bytes");
 		dbg("write request of 0 bytes");
@@ -1275,7 +1275,7 @@ static int ftdi_write (struct usb_serial_port *port,
 	spin_lock_irqsave(&priv->tx_lock, flags);
 	spin_lock_irqsave(&priv->tx_lock, flags);
 	if (priv->tx_outstanding_urbs > URB_UPPER_LIMIT) {
 	if (priv->tx_outstanding_urbs > URB_UPPER_LIMIT) {
 		spin_unlock_irqrestore(&priv->tx_lock, flags);
 		spin_unlock_irqrestore(&priv->tx_lock, flags);
-		dbg("%s - write limit hit\n", __FUNCTION__);
+		dbg("%s - write limit hit\n", __func__);
 		return 0;
 		return 0;
 	}
 	}
 	priv->tx_outstanding_urbs++;
 	priv->tx_outstanding_urbs++;
@@ -1295,14 +1295,14 @@ static int ftdi_write (struct usb_serial_port *port,
 
 
 	buffer = kmalloc (transfer_size, GFP_ATOMIC);
 	buffer = kmalloc (transfer_size, GFP_ATOMIC);
 	if (!buffer) {
 	if (!buffer) {
-		err("%s ran out of kernel memory for urb ...", __FUNCTION__);
+		err("%s ran out of kernel memory for urb ...", __func__);
 		count = -ENOMEM;
 		count = -ENOMEM;
 		goto error_no_buffer;
 		goto error_no_buffer;
 	}
 	}
 
 
 	urb = usb_alloc_urb(0, GFP_ATOMIC);
 	urb = usb_alloc_urb(0, GFP_ATOMIC);
 	if (!urb) {
 	if (!urb) {
-		err("%s - no more free urbs", __FUNCTION__);
+		err("%s - no more free urbs", __func__);
 		count = -ENOMEM;
 		count = -ENOMEM;
 		goto error_no_urb;
 		goto error_no_urb;
 	}
 	}
@@ -1334,7 +1334,7 @@ static int ftdi_write (struct usb_serial_port *port,
 		memcpy (buffer, buf, count);
 		memcpy (buffer, buf, count);
 	}
 	}
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, transfer_size, buffer);
+	usb_serial_debug_data(debug, &port->dev, __func__, transfer_size, buffer);
 
 
 	/* fill the buffer and send it */
 	/* fill the buffer and send it */
 	usb_fill_bulk_urb(urb, port->serial->dev,
 	usb_fill_bulk_urb(urb, port->serial->dev,
@@ -1344,7 +1344,7 @@ static int ftdi_write (struct usb_serial_port *port,
 
 
 	status = usb_submit_urb(urb, GFP_ATOMIC);
 	status = usb_submit_urb(urb, GFP_ATOMIC);
 	if (status) {
 	if (status) {
-		err("%s - failed submitting write urb, error %d", __FUNCTION__, status);
+		err("%s - failed submitting write urb, error %d", __func__, status);
 		count = status;
 		count = status;
 		goto error;
 		goto error;
 	} else {
 	} else {
@@ -1358,7 +1358,7 @@ static int ftdi_write (struct usb_serial_port *port,
 	 * really free it when it is finished with it */
 	 * really free it when it is finished with it */
 	usb_free_urb(urb);
 	usb_free_urb(urb);
 
 
-	dbg("%s write returning: %d", __FUNCTION__, count);
+	dbg("%s write returning: %d", __func__, count);
 	return count;
 	return count;
 error:
 error:
 	usb_free_urb(urb);
 	usb_free_urb(urb);
@@ -1386,7 +1386,7 @@ static void ftdi_write_bulk_callback (struct urb *urb)
 	/* free up the transfer buffer, as usb_free_urb() does not do this */
 	/* free up the transfer buffer, as usb_free_urb() does not do this */
 	kfree (urb->transfer_buffer);
 	kfree (urb->transfer_buffer);
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (status) {
 	if (status) {
 		dbg("nonzero write bulk status received: %d", status);
 		dbg("nonzero write bulk status received: %d", status);
@@ -1395,7 +1395,7 @@ static void ftdi_write_bulk_callback (struct urb *urb)
 
 
 	priv = usb_get_serial_port_data(port);
 	priv = usb_get_serial_port_data(port);
 	if (!priv) {
 	if (!priv) {
-		dbg("%s - bad port private data pointer - exiting", __FUNCTION__);
+		dbg("%s - bad port private data pointer - exiting", __func__);
 		return;
 		return;
 	}
 	}
 	/* account for transferred data */
 	/* account for transferred data */
@@ -1420,7 +1420,7 @@ static int ftdi_write_room( struct usb_serial_port *port )
 	int room;
 	int room;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->tx_lock, flags);
 	spin_lock_irqsave(&priv->tx_lock, flags);
 	if (priv->tx_outstanding_urbs < URB_UPPER_LIMIT) {
 	if (priv->tx_outstanding_urbs < URB_UPPER_LIMIT) {
@@ -1444,13 +1444,13 @@ static int ftdi_chars_in_buffer (struct usb_serial_port *port)
 	int buffered;
 	int buffered;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->tx_lock, flags);
 	spin_lock_irqsave(&priv->tx_lock, flags);
 	buffered = (int)priv->tx_outstanding_bytes;
 	buffered = (int)priv->tx_outstanding_bytes;
 	spin_unlock_irqrestore(&priv->tx_lock, flags);
 	spin_unlock_irqrestore(&priv->tx_lock, flags);
 	if (buffered < 0) {
 	if (buffered < 0) {
-		err("%s outstanding tx bytes is negative!", __FUNCTION__);
+		err("%s outstanding tx bytes is negative!", __func__);
 		buffered = 0;
 		buffered = 0;
 	}
 	}
 	return buffered;
 	return buffered;
@@ -1468,30 +1468,30 @@ static void ftdi_read_bulk_callback (struct urb *urb)
 	int status = urb->status;
 	int status = urb->status;
 
 
 	if (urb->number_of_packets > 0) {
 	if (urb->number_of_packets > 0) {
-		err("%s transfer_buffer_length %d actual_length %d number of packets %d",__FUNCTION__,
+		err("%s transfer_buffer_length %d actual_length %d number of packets %d",__func__,
 		    urb->transfer_buffer_length, urb->actual_length, urb->number_of_packets );
 		    urb->transfer_buffer_length, urb->actual_length, urb->number_of_packets );
-		err("%s transfer_flags %x ", __FUNCTION__,urb->transfer_flags );
+		err("%s transfer_flags %x ", __func__,urb->transfer_flags );
 	}
 	}
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (port->open_count <= 0)
 	if (port->open_count <= 0)
 		return;
 		return;
 
 
 	tty = port->tty;
 	tty = port->tty;
 	if (!tty) {
 	if (!tty) {
-		dbg("%s - bad tty pointer - exiting",__FUNCTION__);
+		dbg("%s - bad tty pointer - exiting",__func__);
 		return;
 		return;
 	}
 	}
 
 
 	priv = usb_get_serial_port_data(port);
 	priv = usb_get_serial_port_data(port);
 	if (!priv) {
 	if (!priv) {
-		dbg("%s - bad port private data pointer - exiting", __FUNCTION__);
+		dbg("%s - bad port private data pointer - exiting", __func__);
 		return;
 		return;
 	}
 	}
 
 
 	if (urb != port->read_urb) {
 	if (urb != port->read_urb) {
-		err("%s - Not my urb!", __FUNCTION__);
+		err("%s - Not my urb!", __func__);
 	}
 	}
 
 
 	if (status) {
 	if (status) {
@@ -1529,39 +1529,39 @@ static void ftdi_process_read (struct work_struct *work)
 	int packet_offset;
 	int packet_offset;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (port->open_count <= 0)
 	if (port->open_count <= 0)
 		return;
 		return;
 
 
 	tty = port->tty;
 	tty = port->tty;
 	if (!tty) {
 	if (!tty) {
-		dbg("%s - bad tty pointer - exiting",__FUNCTION__);
+		dbg("%s - bad tty pointer - exiting",__func__);
 		return;
 		return;
 	}
 	}
 
 
 	priv = usb_get_serial_port_data(port);
 	priv = usb_get_serial_port_data(port);
 	if (!priv) {
 	if (!priv) {
-		dbg("%s - bad port private data pointer - exiting", __FUNCTION__);
+		dbg("%s - bad port private data pointer - exiting", __func__);
 		return;
 		return;
 	}
 	}
 
 
 	urb = port->read_urb;
 	urb = port->read_urb;
 	if (!urb) {
 	if (!urb) {
-		dbg("%s - bad read_urb pointer - exiting", __FUNCTION__);
+		dbg("%s - bad read_urb pointer - exiting", __func__);
 		return;
 		return;
 	}
 	}
 
 
 	data = urb->transfer_buffer;
 	data = urb->transfer_buffer;
 
 
 	if (priv->rx_processed) {
 	if (priv->rx_processed) {
-		dbg("%s - already processed: %d bytes, %d remain", __FUNCTION__,
+		dbg("%s - already processed: %d bytes, %d remain", __func__,
 				priv->rx_processed,
 				priv->rx_processed,
 				urb->actual_length - priv->rx_processed);
 				urb->actual_length - priv->rx_processed);
 	} else {
 	} else {
 		/* The first two bytes of every read packet are status */
 		/* The first two bytes of every read packet are status */
 		if (urb->actual_length > 2) {
 		if (urb->actual_length > 2) {
-			usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+			usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
 		} else {
 		} else {
 			dbg("Status only: %03oo %03oo",data[0],data[1]);
 			dbg("Status only: %03oo %03oo",data[0],data[1]);
 		}
 		}
@@ -1591,17 +1591,17 @@ static void ftdi_process_read (struct work_struct *work)
 
 
 		length = min(PKTSZ, urb->actual_length-packet_offset)-2;
 		length = min(PKTSZ, urb->actual_length-packet_offset)-2;
 		if (length < 0) {
 		if (length < 0) {
-			err("%s - bad packet length: %d", __FUNCTION__, length+2);
+			err("%s - bad packet length: %d", __func__, length+2);
 			length = 0;
 			length = 0;
 		}
 		}
 
 
 		if (priv->rx_flags & THROTTLED) {
 		if (priv->rx_flags & THROTTLED) {
-			dbg("%s - throttled", __FUNCTION__);
+			dbg("%s - throttled", __func__);
 			break;
 			break;
 		}
 		}
 		if (tty_buffer_request_room(tty, length) < length) {
 		if (tty_buffer_request_room(tty, length) < length) {
 			/* break out & wait for throttling/unthrottling to happen */
 			/* break out & wait for throttling/unthrottling to happen */
-			dbg("%s - receive room low", __FUNCTION__);
+			dbg("%s - receive room low", __func__);
 			break;
 			break;
 		}
 		}
 
 
@@ -1669,7 +1669,7 @@ static void ftdi_process_read (struct work_struct *work)
 		/* not completely processed - record progress */
 		/* not completely processed - record progress */
 		priv->rx_processed = packet_offset;
 		priv->rx_processed = packet_offset;
 		dbg("%s - incomplete, %d bytes processed, %d remain",
 		dbg("%s - incomplete, %d bytes processed, %d remain",
-				__FUNCTION__, packet_offset,
+				__func__, packet_offset,
 				urb->actual_length - packet_offset);
 				urb->actual_length - packet_offset);
 		/* check if we were throttled while processing */
 		/* check if we were throttled while processing */
 		spin_lock_irqsave(&priv->rx_lock, flags);
 		spin_lock_irqsave(&priv->rx_lock, flags);
@@ -1677,7 +1677,7 @@ static void ftdi_process_read (struct work_struct *work)
 			priv->rx_flags |= ACTUALLY_THROTTLED;
 			priv->rx_flags |= ACTUALLY_THROTTLED;
 			spin_unlock_irqrestore(&priv->rx_lock, flags);
 			spin_unlock_irqrestore(&priv->rx_lock, flags);
 			dbg("%s - deferring remainder until unthrottled",
 			dbg("%s - deferring remainder until unthrottled",
-					__FUNCTION__);
+					__func__);
 			return;
 			return;
 		}
 		}
 		spin_unlock_irqrestore(&priv->rx_lock, flags);
 		spin_unlock_irqrestore(&priv->rx_lock, flags);
@@ -1686,7 +1686,7 @@ static void ftdi_process_read (struct work_struct *work)
 			/* delay processing of remainder */
 			/* delay processing of remainder */
 			schedule_delayed_work(&priv->rx_work, 1);
 			schedule_delayed_work(&priv->rx_work, 1);
 		} else {
 		} else {
-			dbg("%s - port is closed", __FUNCTION__);
+			dbg("%s - port is closed", __func__);
 		}
 		}
 		return;
 		return;
 	}
 	}
@@ -1704,7 +1704,7 @@ static void ftdi_process_read (struct work_struct *work)
 
 
 		result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 		result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 		if (result)
 		if (result)
-			err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
+			err("%s - failed resubmitting read urb, error %d", __func__, result);
 	}
 	}
 
 
 	return;
 	return;
@@ -1733,10 +1733,10 @@ static void ftdi_break_ctl( struct usb_serial_port *port, int break_state )
 			    FTDI_SIO_SET_DATA_REQUEST_TYPE,
 			    FTDI_SIO_SET_DATA_REQUEST_TYPE,
 			    urb_value , priv->interface,
 			    urb_value , priv->interface,
 			    buf, 0, WDR_TIMEOUT) < 0) {
 			    buf, 0, WDR_TIMEOUT) < 0) {
-		err("%s FAILED to enable/disable break state (state was %d)", __FUNCTION__,break_state);
+		err("%s FAILED to enable/disable break state (state was %d)", __func__,break_state);
 	}
 	}
 
 
-	dbg("%s break state is %d - urb is %d", __FUNCTION__,break_state, urb_value);
+	dbg("%s break state is %d - urb is %d", __func__,break_state, urb_value);
 
 
 }
 }
 
 
@@ -1760,18 +1760,18 @@ static void ftdi_set_termios (struct usb_serial_port *port, struct ktermios *old
 	unsigned char vstop;
 	unsigned char vstop;
 	unsigned char vstart;
 	unsigned char vstart;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	/* Force baud rate if this device requires it, unless it is set to B0. */
 	/* Force baud rate if this device requires it, unless it is set to B0. */
 	if (priv->force_baud && ((termios->c_cflag & CBAUD) != B0)) {
 	if (priv->force_baud && ((termios->c_cflag & CBAUD) != B0)) {
-		dbg("%s: forcing baud rate for this device", __FUNCTION__);
+		dbg("%s: forcing baud rate for this device", __func__);
 		tty_encode_baud_rate(port->tty, priv->force_baud,
 		tty_encode_baud_rate(port->tty, priv->force_baud,
 					priv->force_baud);
 					priv->force_baud);
 	}
 	}
 
 
 	/* Force RTS-CTS if this device requires it. */
 	/* Force RTS-CTS if this device requires it. */
 	if (priv->force_rtscts) {
 	if (priv->force_rtscts) {
-		dbg("%s: forcing rtscts for this device", __FUNCTION__);
+		dbg("%s: forcing rtscts for this device", __func__);
 		termios->c_cflag |= CRTSCTS;
 		termios->c_cflag |= CRTSCTS;
 	}
 	}
 
 
@@ -1815,7 +1815,7 @@ static void ftdi_set_termios (struct usb_serial_port *port, struct ktermios *old
 			    FTDI_SIO_SET_DATA_REQUEST_TYPE,
 			    FTDI_SIO_SET_DATA_REQUEST_TYPE,
 			    urb_value , priv->interface,
 			    urb_value , priv->interface,
 			    buf, 0, WDR_SHORT_TIMEOUT) < 0) {
 			    buf, 0, WDR_SHORT_TIMEOUT) < 0) {
-		err("%s FAILED to set databits/stopbits/parity", __FUNCTION__);
+		err("%s FAILED to set databits/stopbits/parity", __func__);
 	}
 	}
 
 
 	/* Now do the baudrate */
 	/* Now do the baudrate */
@@ -1826,14 +1826,14 @@ static void ftdi_set_termios (struct usb_serial_port *port, struct ktermios *old
 				    FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
 				    FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
 				    0, priv->interface,
 				    0, priv->interface,
 				    buf, 0, WDR_TIMEOUT) < 0) {
 				    buf, 0, WDR_TIMEOUT) < 0) {
-			err("%s error from disable flowcontrol urb", __FUNCTION__);
+			err("%s error from disable flowcontrol urb", __func__);
 		}
 		}
 		/* Drop RTS and DTR */
 		/* Drop RTS and DTR */
 		clear_mctrl(port, TIOCM_DTR | TIOCM_RTS);
 		clear_mctrl(port, TIOCM_DTR | TIOCM_RTS);
 	} else {
 	} else {
 		/* set the baudrate determined before */
 		/* set the baudrate determined before */
 		if (change_speed(port)) {
 		if (change_speed(port)) {
-			err("%s urb failed to set baudrate", __FUNCTION__);
+			err("%s urb failed to set baudrate", __func__);
 		}
 		}
 		/* Ensure RTS and DTR are raised when baudrate changed from 0 */
 		/* Ensure RTS and DTR are raised when baudrate changed from 0 */
 		if (!old_termios || (old_termios->c_cflag & CBAUD) == B0) {
 		if (!old_termios || (old_termios->c_cflag & CBAUD) == B0) {
@@ -1844,7 +1844,7 @@ static void ftdi_set_termios (struct usb_serial_port *port, struct ktermios *old
 	/* Set flow control */
 	/* Set flow control */
 	/* Note device also supports DTR/CD (ugh) and Xon/Xoff in hardware */
 	/* Note device also supports DTR/CD (ugh) and Xon/Xoff in hardware */
 	if (cflag & CRTSCTS) {
 	if (cflag & CRTSCTS) {
-		dbg("%s Setting to CRTSCTS flow control", __FUNCTION__);
+		dbg("%s Setting to CRTSCTS flow control", __func__);
 		if (usb_control_msg(dev,
 		if (usb_control_msg(dev,
 				    usb_sndctrlpipe(dev, 0),
 				    usb_sndctrlpipe(dev, 0),
 				    FTDI_SIO_SET_FLOW_CTRL_REQUEST,
 				    FTDI_SIO_SET_FLOW_CTRL_REQUEST,
@@ -1862,7 +1862,7 @@ static void ftdi_set_termios (struct usb_serial_port *port, struct ktermios *old
 		 * if IXOFF is not set, the pre-xon/xoff code is executed.
 		 * if IXOFF is not set, the pre-xon/xoff code is executed.
 		*/
 		*/
 		if (iflag & IXOFF) {
 		if (iflag & IXOFF) {
-			dbg("%s  request to enable xonxoff iflag=%04x",__FUNCTION__,iflag);
+			dbg("%s  request to enable xonxoff iflag=%04x",__func__,iflag);
 			// Try to enable the XON/XOFF on the ftdi_sio
 			// Try to enable the XON/XOFF on the ftdi_sio
 			// Set the vstart and vstop -- could have been done up above where
 			// Set the vstart and vstop -- could have been done up above where
 			// a lot of other dereferencing is done but that would be very
 			// 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
 		} else {
 		} else {
 			/* else clause to only run if cfag ! CRTSCTS and iflag ! XOFF */
 			/* else clause to only run if cfag ! CRTSCTS and iflag ! XOFF */
 			/* CHECKME Assuming XON/XOFF handled by tty stack - not by device */
 			/* CHECKME Assuming XON/XOFF handled by tty stack - not by device */
-			dbg("%s Turning off hardware flow control", __FUNCTION__);
+			dbg("%s Turning off hardware flow control", __func__);
 			if (usb_control_msg(dev,
 			if (usb_control_msg(dev,
 					    usb_sndctrlpipe(dev, 0),
 					    usb_sndctrlpipe(dev, 0),
 					    FTDI_SIO_SET_FLOW_CTRL_REQUEST,
 					    FTDI_SIO_SET_FLOW_CTRL_REQUEST,
@@ -1905,7 +1905,7 @@ static int ftdi_tiocmget (struct usb_serial_port *port, struct file *file)
 	unsigned char buf[2];
 	unsigned char buf[2];
 	int ret;
 	int ret;
 
 
-	dbg("%s TIOCMGET", __FUNCTION__);
+	dbg("%s TIOCMGET", __func__);
 	switch (priv->chip_type) {
 	switch (priv->chip_type) {
 	case SIO:
 	case SIO:
 		/* Request the status from the device */
 		/* Request the status from the device */
@@ -1915,7 +1915,7 @@ static int ftdi_tiocmget (struct usb_serial_port *port, struct file *file)
 					   FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
 					   FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
 					   0, 0,
 					   0, 0,
 					   buf, 1, WDR_TIMEOUT)) < 0 ) {
 					   buf, 1, WDR_TIMEOUT)) < 0 ) {
-			err("%s Could not get modem status of device - err: %d", __FUNCTION__,
+			err("%s Could not get modem status of device - err: %d", __func__,
 			    ret);
 			    ret);
 			return(ret);
 			return(ret);
 		}
 		}
@@ -1932,7 +1932,7 @@ static int ftdi_tiocmget (struct usb_serial_port *port, struct file *file)
 					   FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
 					   FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
 					   0, priv->interface,
 					   0, priv->interface,
 					   buf, 2, WDR_TIMEOUT)) < 0 ) {
 					   buf, 2, WDR_TIMEOUT)) < 0 ) {
-			err("%s Could not get modem status of device - err: %d", __FUNCTION__,
+			err("%s Could not get modem status of device - err: %d", __func__,
 			    ret);
 			    ret);
 			return(ret);
 			return(ret);
 		}
 		}
@@ -1951,7 +1951,7 @@ static int ftdi_tiocmget (struct usb_serial_port *port, struct file *file)
 
 
 static int ftdi_tiocmset(struct usb_serial_port *port, struct file * file, unsigned int set, unsigned int clear)
 static int ftdi_tiocmset(struct usb_serial_port *port, struct file * file, unsigned int set, unsigned int clear)
 {
 {
-	dbg("%s TIOCMSET", __FUNCTION__);
+	dbg("%s TIOCMSET", __func__);
 	return update_mctrl(port, set, clear);
 	return update_mctrl(port, set, clear);
 }
 }
 
 
@@ -1960,7 +1960,7 @@ static int ftdi_ioctl (struct usb_serial_port *port, struct file * file, unsigne
 {
 {
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
 
 
-	dbg("%s cmd 0x%04x", __FUNCTION__, cmd);
+	dbg("%s cmd 0x%04x", __func__, cmd);
 
 
 	/* Based on code from acm.c and others */
 	/* Based on code from acm.c and others */
 	switch (cmd) {
 	switch (cmd) {
@@ -2019,7 +2019,7 @@ static int ftdi_ioctl (struct usb_serial_port *port, struct file * file, unsigne
 	/* This is not necessarily an error - turns out the higher layers will do
 	/* This is not necessarily an error - turns out the higher layers will do
 	 *  some ioctls itself (see comment above)
 	 *  some ioctls itself (see comment above)
 	 */
 	 */
-	dbg("%s arg not supported - it was 0x%04x - check /usr/include/asm/ioctls.h", __FUNCTION__, cmd);
+	dbg("%s arg not supported - it was 0x%04x - check /usr/include/asm/ioctls.h", __func__, cmd);
 
 
 	return(-ENOIOCTLCMD);
 	return(-ENOIOCTLCMD);
 } /* ftdi_ioctl */
 } /* ftdi_ioctl */
@@ -2030,7 +2030,7 @@ static void ftdi_throttle (struct usb_serial_port *port)
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->rx_lock, flags);
 	spin_lock_irqsave(&priv->rx_lock, flags);
 	priv->rx_flags |= THROTTLED;
 	priv->rx_flags |= THROTTLED;
@@ -2044,7 +2044,7 @@ static void ftdi_unthrottle (struct usb_serial_port *port)
 	int actually_throttled;
 	int actually_throttled;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->rx_lock, flags);
 	spin_lock_irqsave(&priv->rx_lock, flags);
 	actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED;
 	actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED;
@@ -2059,7 +2059,7 @@ static int __init ftdi_init (void)
 {
 {
 	int retval;
 	int retval;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 	if (vendor > 0 && product > 0) {
 	if (vendor > 0 && product > 0) {
 		/* Add user specified VID/PID to reserved element of table. */
 		/* Add user specified VID/PID to reserved element of table. */
 		int i;
 		int i;
@@ -2088,7 +2088,7 @@ failed_sio_register:
 static void __exit ftdi_exit (void)
 static void __exit ftdi_exit (void)
 {
 {
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	usb_deregister (&ftdi_driver);
 	usb_deregister (&ftdi_driver);
 	usb_serial_deregister (&ftdi_sio_device);
 	usb_serial_deregister (&ftdi_sio_device);

+ 53 - 53
drivers/usb/serial/garmin_gps.c

@@ -280,7 +280,7 @@ static void send_to_tty(struct usb_serial_port *port,
 	if (tty && actual_length) {
 	if (tty && actual_length) {
 
 
 		usb_serial_debug_data(debug, &port->dev, 
 		usb_serial_debug_data(debug, &port->dev, 
-					__FUNCTION__, actual_length, data);
+					__func__, actual_length, data);
 
 
 		tty_buffer_request_room(tty, actual_length);
 		tty_buffer_request_room(tty, actual_length);
 		tty_insert_flip_string(tty, data, actual_length);
 		tty_insert_flip_string(tty, data, actual_length);
@@ -355,7 +355,7 @@ static void pkt_clear(struct garmin_data * garmin_data_p)
 	unsigned long flags;
 	unsigned long flags;
 	struct garmin_packet *result = NULL;
 	struct garmin_packet *result = NULL;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	spin_lock_irqsave(&garmin_data_p->lock, flags);
 	spin_lock_irqsave(&garmin_data_p->lock, flags);
 	while (!list_empty(&garmin_data_p->pktlist)) {
 	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)
 	__u8 *ptr = pkt;
 	__u8 *ptr = pkt;
 	unsigned  l = 0;
 	unsigned  l = 0;
 
 
-	dbg("%s - pkt-id: 0x%X.", __FUNCTION__, 0xFF & pkt_id);
+	dbg("%s - pkt-id: 0x%X.", __func__, 0xFF & pkt_id);
 
 
 	*ptr++ = DLE;
 	*ptr++ = DLE;
 	*ptr++ = ACK;
 	*ptr++ = ACK;
@@ -429,11 +429,11 @@ static int gsp_rec_packet(struct garmin_data * garmin_data_p, int count)
 	int size = recpkt[1];
 	int size = recpkt[1];
 
 
 	usb_serial_debug_data(debug, &garmin_data_p->port->dev,
 	usb_serial_debug_data(debug, &garmin_data_p->port->dev,
-			       __FUNCTION__, count-GSP_INITIAL_OFFSET, recpkt);
+			       __func__, count-GSP_INITIAL_OFFSET, recpkt);
 
 
 	if (size != (count-GSP_INITIAL_OFFSET-3)) {
 	if (size != (count-GSP_INITIAL_OFFSET-3)) {
 		dbg("%s - invalid size, expected %d bytes, got %d",
 		dbg("%s - invalid size, expected %d bytes, got %d",
-			__FUNCTION__, size, (count-GSP_INITIAL_OFFSET-3));
+			__func__, size, (count-GSP_INITIAL_OFFSET-3));
 		return -EINVPKT;
 		return -EINVPKT;
 	}
 	}
 
 
@@ -443,7 +443,7 @@ static int gsp_rec_packet(struct garmin_data * garmin_data_p, int count)
 	// sanity check, remove after test ...
 	// sanity check, remove after test ...
 	if ((__u8*)&(usbdata[3]) != recpkt) {
 	if ((__u8*)&(usbdata[3]) != recpkt) {
 		dbg("%s - ptr mismatch %p - %p",
 		dbg("%s - ptr mismatch %p - %p",
-			__FUNCTION__, &(usbdata[4]), recpkt);
+			__func__, &(usbdata[4]), recpkt);
 		return -EINVPKT;
 		return -EINVPKT;
 	}
 	}
 
 
@@ -454,7 +454,7 @@ static int gsp_rec_packet(struct garmin_data * garmin_data_p, int count)
 
 
 	if ((0xff & (cksum + *recpkt)) != 0) {
 	if ((0xff & (cksum + *recpkt)) != 0) {
 		dbg("%s - invalid checksum, expected %02x, got %02x",
 		dbg("%s - invalid checksum, expected %02x, got %02x",
-			__FUNCTION__, 0xff & -cksum, 0xff & *recpkt);
+			__func__, 0xff & -cksum, 0xff & *recpkt);
 		return -EINVPKT;
 		return -EINVPKT;
 	}
 	}
 
 
@@ -519,7 +519,7 @@ static int gsp_receive(struct garmin_data * garmin_data_p,
 	spin_unlock_irqrestore(&garmin_data_p->lock, flags);
 	spin_unlock_irqrestore(&garmin_data_p->lock, flags);
 
 
 	dbg("%s - dle=%d skip=%d size=%d count=%d",
 	dbg("%s - dle=%d skip=%d size=%d count=%d",
-		__FUNCTION__, dleSeen, skip, size, count);
+		__func__, dleSeen, skip, size, count);
 
 
 	if (size == 0) {
 	if (size == 0) {
 		size = GSP_INITIAL_OFFSET;
 		size = GSP_INITIAL_OFFSET;
@@ -578,7 +578,7 @@ static int gsp_receive(struct garmin_data * garmin_data_p,
 		}
 		}
 
 
 		if (size >= GPS_IN_BUFSIZ) {
 		if (size >= GPS_IN_BUFSIZ) {
-			dbg("%s - packet too large.", __FUNCTION__);
+			dbg("%s - packet too large.", __func__);
 			skip = 1;
 			skip = 1;
 			size = GSP_INITIAL_OFFSET;
 			size = GSP_INITIAL_OFFSET;
 			dleSeen = 0;
 			dleSeen = 0;
@@ -634,7 +634,7 @@ static int gsp_send(struct garmin_data * garmin_data_p,
 	int i=0;
 	int i=0;
 	int k;
 	int k;
 
 
-	dbg("%s - state %d - %d bytes.", __FUNCTION__,
+	dbg("%s - state %d - %d bytes.", __func__,
 	         garmin_data_p->state, count);
 	         garmin_data_p->state, count);
 
 
 	k = garmin_data_p->outsize;
 	k = garmin_data_p->outsize;
@@ -658,13 +658,13 @@ static int gsp_send(struct garmin_data * garmin_data_p,
 		return 0;
 		return 0;
 	}
 	}
 
 
-	dbg("%s - %d bytes in buffer, %d bytes in pkt.", __FUNCTION__,
+	dbg("%s - %d bytes in buffer, %d bytes in pkt.", __func__,
 	         k, i);
 	         k, i);
 
 
 	/* garmin_data_p->outbuffer now contains a complete packet */
 	/* garmin_data_p->outbuffer now contains a complete packet */
 
 
 	usb_serial_debug_data(debug, &garmin_data_p->port->dev,
 	usb_serial_debug_data(debug, &garmin_data_p->port->dev,
-		                   __FUNCTION__, k, garmin_data_p->outbuffer);
+		                   __func__, k, garmin_data_p->outbuffer);
 
 
 	garmin_data_p->outsize = 0;
 	garmin_data_p->outsize = 0;
 
 
@@ -749,7 +749,7 @@ static void gsp_next_packet(struct garmin_data * garmin_data_p)
 	struct garmin_packet *pkt = NULL;
 	struct garmin_packet *pkt = NULL;
 
 
 	while ((pkt = pkt_pop(garmin_data_p)) != NULL) {
 	while ((pkt = pkt_pop(garmin_data_p)) != NULL) {
-		dbg("%s - next pkt: %d", __FUNCTION__, pkt->seq);
+		dbg("%s - next pkt: %d", __func__, pkt->seq);
 		if (gsp_send(garmin_data_p, pkt->data, pkt->size) > 0) {
 		if (gsp_send(garmin_data_p, pkt->data, pkt->size) > 0) {
 			kfree(pkt);
 			kfree(pkt);
 			return;
 			return;
@@ -794,7 +794,7 @@ static int nat_receive(struct garmin_data * garmin_data_p,
 		if (len >= GPS_IN_BUFSIZ) {
 		if (len >= GPS_IN_BUFSIZ) {
 			/* seem to be an invalid packet, ignore rest of input */
 			/* seem to be an invalid packet, ignore rest of input */
 			dbg("%s - packet size too large: %d",
 			dbg("%s - packet size too large: %d",
-			        __FUNCTION__, len);
+			        __func__, len);
 			garmin_data_p->insize = 0;
 			garmin_data_p->insize = 0;
 			count = 0;
 			count = 0;
 			result = -EINVPKT;
 			result = -EINVPKT;
@@ -873,11 +873,11 @@ static int process_resetdev_request(struct usb_serial_port *port)
 	spin_unlock_irqrestore(&garmin_data_p->lock, flags);
 	spin_unlock_irqrestore(&garmin_data_p->lock, flags);
 
 
 	usb_kill_urb (port->interrupt_in_urb);
 	usb_kill_urb (port->interrupt_in_urb);
-	dbg("%s - usb_reset_device", __FUNCTION__ );
+	dbg("%s - usb_reset_device", __func__ );
 	status = usb_reset_device(port->serial->dev);
 	status = usb_reset_device(port->serial->dev);
 	if (status)
 	if (status)
 		dbg("%s - usb_reset_device failed: %d",
 		dbg("%s - usb_reset_device failed: %d",
-			__FUNCTION__, status);
+			__func__, status);
 	return status;
 	return status;
 }
 }
 
 
@@ -926,18 +926,18 @@ static int garmin_init_session(struct usb_serial_port *port)
 	if (status == 0) {
 	if (status == 0) {
 		usb_kill_urb (port->interrupt_in_urb);
 		usb_kill_urb (port->interrupt_in_urb);
 
 
-		dbg("%s - adding interrupt input", __FUNCTION__);
+		dbg("%s - adding interrupt input", __func__);
 		port->interrupt_in_urb->dev = serial->dev;
 		port->interrupt_in_urb->dev = serial->dev;
 		status = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 		status = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 		if (status)
 		if (status)
 			dev_err(&serial->dev->dev,
 			dev_err(&serial->dev->dev,
 			        "%s - failed submitting interrupt urb,"
 			        "%s - failed submitting interrupt urb,"
 				" error %d\n",
 				" error %d\n",
-			        __FUNCTION__, status);
+			        __func__, status);
 	}
 	}
 
 
 	if (status == 0) {
 	if (status == 0) {
-		dbg("%s - starting session ...", __FUNCTION__);
+		dbg("%s - starting session ...", __func__);
 		garmin_data_p->state = STATE_ACTIVE;
 		garmin_data_p->state = STATE_ACTIVE;
 		status = garmin_write_bulk(port, GARMIN_START_SESSION_REQ,
 		status = garmin_write_bulk(port, GARMIN_START_SESSION_REQ,
 		                           sizeof(GARMIN_START_SESSION_REQ),
 		                           sizeof(GARMIN_START_SESSION_REQ),
@@ -976,7 +976,7 @@ static int garmin_open (struct usb_serial_port *port, struct file *filp)
 	int status = 0;
 	int status = 0;
 	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
 	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/*
 	/*
 	 * Force low_latency on so that our tty_push actually forces the data
 	 * 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)
 	struct usb_serial *serial = port->serial;
 	struct usb_serial *serial = port->serial;
 	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
 	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
 
 
-	dbg("%s - port %d - mode=%d state=%d flags=0x%X", __FUNCTION__,
+	dbg("%s - port %d - mode=%d state=%d flags=0x%X", __func__,
 		port->number, garmin_data_p->mode,
 		port->number, garmin_data_p->mode,
 		garmin_data_p->state, garmin_data_p->flags);
 		garmin_data_p->state, garmin_data_p->flags);
 
 
@@ -1052,7 +1052,7 @@ static void garmin_write_bulk_callback (struct urb *urb)
 	if (port) {
 	if (port) {
 		struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
 		struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
 
 
-		dbg("%s - port %d", __FUNCTION__, port->number);
+		dbg("%s - port %d", __func__, port->number);
 
 
 		if (GARMIN_LAYERID_APPL == getLayerId(urb->transfer_buffer)
 		if (GARMIN_LAYERID_APPL == getLayerId(urb->transfer_buffer)
 		    && (garmin_data_p->mode == MODE_GARMIN_SERIAL))  {
 		    && (garmin_data_p->mode == MODE_GARMIN_SERIAL))  {
@@ -1061,7 +1061,7 @@ static void garmin_write_bulk_callback (struct urb *urb)
 
 
 		if (status) {
 		if (status) {
 			dbg("%s - nonzero write bulk status received: %d",
 			dbg("%s - nonzero write bulk status received: %d",
-			    __FUNCTION__, urb->status);
+			    __func__, urb->status);
 			spin_lock_irqsave(&garmin_data_p->lock, flags);
 			spin_lock_irqsave(&garmin_data_p->lock, flags);
 			garmin_data_p->flags |= CLEAR_HALT_REQUIRED;
 			garmin_data_p->flags |= CLEAR_HALT_REQUIRED;
 			spin_unlock_irqrestore(&garmin_data_p->lock, flags);
 			spin_unlock_irqrestore(&garmin_data_p->lock, flags);
@@ -1088,7 +1088,7 @@ static int garmin_write_bulk (struct usb_serial_port *port,
 	unsigned char *buffer;
 	unsigned char *buffer;
 	int status;
 	int status;
 
 
-	dbg("%s - port %d, state %d", __FUNCTION__, port->number,
+	dbg("%s - port %d, state %d", __func__, port->number,
 		garmin_data_p->state);
 		garmin_data_p->state);
 
 
 	spin_lock_irqsave(&garmin_data_p->lock, flags);
 	spin_lock_irqsave(&garmin_data_p->lock, flags);
@@ -1110,7 +1110,7 @@ static int garmin_write_bulk (struct usb_serial_port *port,
 
 
 	memcpy (buffer, buf, count);
 	memcpy (buffer, buf, count);
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buffer);
+	usb_serial_debug_data(debug, &port->dev, __func__, count, buffer);
 
 
 	usb_fill_bulk_urb (urb, serial->dev,
 	usb_fill_bulk_urb (urb, serial->dev,
 			 	usb_sndbulkpipe (serial->dev,
 			 	usb_sndbulkpipe (serial->dev,
@@ -1134,7 +1134,7 @@ static int garmin_write_bulk (struct usb_serial_port *port,
 		dev_err(&port->dev,
 		dev_err(&port->dev,
 		        "%s - usb_submit_urb(write bulk) "
 		        "%s - usb_submit_urb(write bulk) "
 		        "failed with status = %d\n",
 		        "failed with status = %d\n",
-				__FUNCTION__, status);
+				__func__, status);
 		count = status;
 		count = status;
 	}
 	}
 
 
@@ -1154,7 +1154,7 @@ static int garmin_write (struct usb_serial_port *port,
 	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
 	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
 	__le32 *privpkt = (__le32 *)garmin_data_p->privpkt;
 	__le32 *privpkt = (__le32 *)garmin_data_p->privpkt;
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buf);
+	usb_serial_debug_data(debug, &port->dev, __func__, count, buf);
 
 
 	/* check for our private packets */
 	/* check for our private packets */
 	if (count >= GARMIN_PKTHDR_LENGTH) {
 	if (count >= GARMIN_PKTHDR_LENGTH) {
@@ -1172,7 +1172,7 @@ static int garmin_write (struct usb_serial_port *port,
 		    && GARMIN_LAYERID_PRIVATE == getLayerId(garmin_data_p->privpkt)) {
 		    && GARMIN_LAYERID_PRIVATE == getLayerId(garmin_data_p->privpkt)) {
 
 
 			dbg("%s - processing private request %d",
 			dbg("%s - processing private request %d",
-				__FUNCTION__, pktid);
+				__func__, pktid);
 
 
 			// drop all unfinished transfers
 			// drop all unfinished transfers
 			garmin_clear(garmin_data_p);
 			garmin_clear(garmin_data_p);
@@ -1184,7 +1184,7 @@ static int garmin_write (struct usb_serial_port *port,
 					return -EINVPKT;
 					return -EINVPKT;
 				debug = __le32_to_cpu(privpkt[3]);
 				debug = __le32_to_cpu(privpkt[3]);
 				dbg("%s - debug level set to 0x%X",
 				dbg("%s - debug level set to 0x%X",
-					__FUNCTION__, debug);
+					__func__, debug);
 				break;
 				break;
 
 
 			case PRIV_PKTID_SET_MODE:
 			case PRIV_PKTID_SET_MODE:
@@ -1192,7 +1192,7 @@ static int garmin_write (struct usb_serial_port *port,
 					return -EINVPKT;
 					return -EINVPKT;
 				garmin_data_p->mode = __le32_to_cpu(privpkt[3]);
 				garmin_data_p->mode = __le32_to_cpu(privpkt[3]);
 				dbg("%s - mode set to %d",
 				dbg("%s - mode set to %d",
-					__FUNCTION__, garmin_data_p->mode);
+					__func__, garmin_data_p->mode);
 				break;
 				break;
 
 
 			case PRIV_PKTID_INFO_REQ:
 			case PRIV_PKTID_INFO_REQ:
@@ -1208,7 +1208,7 @@ static int garmin_write (struct usb_serial_port *port,
 					return -EINVPKT;
 					return -EINVPKT;
 				initial_mode = __le32_to_cpu(privpkt[3]);
 				initial_mode = __le32_to_cpu(privpkt[3]);
 				dbg("%s - initial_mode set to %d",
 				dbg("%s - initial_mode set to %d",
-					__FUNCTION__,
+					__func__,
 					garmin_data_p->mode);
 					garmin_data_p->mode);
 				break;
 				break;
 			}
 			}
@@ -1255,7 +1255,7 @@ static void garmin_read_process(struct garmin_data * garmin_data_p,
 {
 {
 	if (garmin_data_p->flags & FLAGS_DROP_DATA) {
 	if (garmin_data_p->flags & FLAGS_DROP_DATA) {
 		/* abort-transfer cmd is actice */
 		/* abort-transfer cmd is actice */
-		dbg("%s - pkt dropped", __FUNCTION__);
+		dbg("%s - pkt dropped", __func__);
 	} else if (garmin_data_p->state != STATE_DISCONNECTED &&
 	} else if (garmin_data_p->state != STATE_DISCONNECTED &&
 	           garmin_data_p->state != STATE_RESET ) {
 	           garmin_data_p->state != STATE_RESET ) {
 
 
@@ -1293,21 +1293,21 @@ static void garmin_read_bulk_callback (struct urb *urb)
 	int status = urb->status;
 	int status = urb->status;
 	int retval;
 	int retval;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (!serial) {
 	if (!serial) {
-		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
+		dbg("%s - bad serial pointer, exiting", __func__);
 		return;
 		return;
 	}
 	}
 
 
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero read bulk status received: %d",
 		dbg("%s - nonzero read bulk status received: %d",
-			__FUNCTION__, status);
+			__func__, status);
 		return;
 		return;
 	}
 	}
 
 
 	usb_serial_debug_data(debug, &port->dev, 
 	usb_serial_debug_data(debug, &port->dev, 
-				__FUNCTION__, urb->actual_length, data);
+				__func__, urb->actual_length, data);
 
 
 	garmin_read_process(garmin_data_p, data, urb->actual_length);
 	garmin_read_process(garmin_data_p, data, urb->actual_length);
 
 
@@ -1320,7 +1320,7 @@ static void garmin_read_bulk_callback (struct urb *urb)
 		if (retval)
 		if (retval)
 			dev_err(&port->dev,
 			dev_err(&port->dev,
 				"%s - failed resubmitting read urb, error %d\n",
 				"%s - failed resubmitting read urb, error %d\n",
-				__FUNCTION__, retval);
+				__func__, retval);
 	} else if (urb->actual_length > 0) {
 	} else if (urb->actual_length > 0) {
 		/* Continue trying to read until nothing more is received  */
 		/* Continue trying to read until nothing more is received  */
 		if (0 == (garmin_data_p->flags & FLAGS_THROTTLED)) {
 		if (0 == (garmin_data_p->flags & FLAGS_THROTTLED)) {
@@ -1328,10 +1328,10 @@ static void garmin_read_bulk_callback (struct urb *urb)
 			if (retval)
 			if (retval)
 				dev_err(&port->dev,
 				dev_err(&port->dev,
 					"%s - failed resubmitting read urb, "
 					"%s - failed resubmitting read urb, "
-					"error %d\n", __FUNCTION__, retval);
+					"error %d\n", __func__, retval);
 		}
 		}
 	} else {
 	} else {
-		dbg("%s - end of bulk data", __FUNCTION__);
+		dbg("%s - end of bulk data", __func__);
 		spin_lock_irqsave(&garmin_data_p->lock, flags);
 		spin_lock_irqsave(&garmin_data_p->lock, flags);
 		garmin_data_p->flags &= ~FLAGS_BULK_IN_ACTIVE;
 		garmin_data_p->flags &= ~FLAGS_BULK_IN_ACTIVE;
 		spin_unlock_irqrestore(&garmin_data_p->lock, flags);
 		spin_unlock_irqrestore(&garmin_data_p->lock, flags);
@@ -1359,22 +1359,22 @@ static void garmin_read_int_callback (struct urb *urb)
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
 		/* this urb is terminated, clean up */
 		/* this urb is terminated, clean up */
 		dbg("%s - urb shutting down with status: %d",
 		dbg("%s - urb shutting down with status: %d",
-			__FUNCTION__, status);
+			__func__, status);
 		return;
 		return;
 	default:
 	default:
 		dbg("%s - nonzero urb status received: %d",
 		dbg("%s - nonzero urb status received: %d",
-			__FUNCTION__, status);
+			__func__, status);
 		return;
 		return;
 	}
 	}
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, 
+	usb_serial_debug_data(debug, &port->dev, __func__,
 				urb->actual_length, urb->transfer_buffer);
 				urb->actual_length, urb->transfer_buffer);
 
 
 	if (urb->actual_length == sizeof(GARMIN_BULK_IN_AVAIL_REPLY) &&
 	if (urb->actual_length == sizeof(GARMIN_BULK_IN_AVAIL_REPLY) &&
 	    0 == memcmp(data, GARMIN_BULK_IN_AVAIL_REPLY,
 	    0 == memcmp(data, GARMIN_BULK_IN_AVAIL_REPLY,
 		        sizeof(GARMIN_BULK_IN_AVAIL_REPLY))) {
 		        sizeof(GARMIN_BULK_IN_AVAIL_REPLY))) {
 
 
-		dbg("%s - bulk data available.", __FUNCTION__);
+		dbg("%s - bulk data available.", __func__);
 
 
 		if (0 == (garmin_data_p->flags & FLAGS_BULK_IN_ACTIVE)) {
 		if (0 == (garmin_data_p->flags & FLAGS_BULK_IN_ACTIVE)) {
 
 
@@ -1389,7 +1389,7 @@ static void garmin_read_int_callback (struct urb *urb)
 			if (retval) {
 			if (retval) {
 				dev_err(&port->dev,
 				dev_err(&port->dev,
 					"%s - failed submitting read urb, error %d\n",
 					"%s - failed submitting read urb, error %d\n",
-				__FUNCTION__, retval);
+				__func__, retval);
 			} else {
 			} else {
 				spin_lock_irqsave(&garmin_data_p->lock, flags);
 				spin_lock_irqsave(&garmin_data_p->lock, flags);
 				garmin_data_p->flags |= FLAGS_BULK_IN_ACTIVE;
 				garmin_data_p->flags |= FLAGS_BULK_IN_ACTIVE;
@@ -1417,14 +1417,14 @@ static void garmin_read_int_callback (struct urb *urb)
 			= __le32_to_cpup((__le32*)(data+GARMIN_PKTHDR_LENGTH));
 			= __le32_to_cpup((__le32*)(data+GARMIN_PKTHDR_LENGTH));
 
 
 		dbg("%s - start-of-session reply seen - serial %u.",
 		dbg("%s - start-of-session reply seen - serial %u.",
-			__FUNCTION__, garmin_data_p->serial_num);
+			__func__, garmin_data_p->serial_num);
 	}
 	}
 
 
 	if (garmin_data_p->ignorePkts) {
 	if (garmin_data_p->ignorePkts) {
 		/* this reply belongs to a request generated by the driver,
 		/* this reply belongs to a request generated by the driver,
 		   ignore it. */
 		   ignore it. */
 		dbg("%s - pkt ignored (%d)",
 		dbg("%s - pkt ignored (%d)",
-			__FUNCTION__, garmin_data_p->ignorePkts);
+			__func__, garmin_data_p->ignorePkts);
 		spin_lock_irqsave(&garmin_data_p->lock, flags);
 		spin_lock_irqsave(&garmin_data_p->lock, flags);
 		garmin_data_p->ignorePkts--;
 		garmin_data_p->ignorePkts--;
 		spin_unlock_irqrestore(&garmin_data_p->lock, flags);
 		spin_unlock_irqrestore(&garmin_data_p->lock, flags);
@@ -1437,7 +1437,7 @@ static void garmin_read_int_callback (struct urb *urb)
 	if (retval)
 	if (retval)
 		dev_err(&urb->dev->dev,
 		dev_err(&urb->dev->dev,
 			"%s - Error %d submitting interrupt urb\n",
 			"%s - Error %d submitting interrupt urb\n",
-			__FUNCTION__, retval);
+			__func__, retval);
 }
 }
 
 
 
 
@@ -1473,7 +1473,7 @@ static void garmin_throttle (struct usb_serial_port *port)
 	unsigned long flags;
 	unsigned long flags;
 	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
 	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 	/* set flag, data received will be put into a queue
 	/* set flag, data received will be put into a queue
 	   for later processing */
 	   for later processing */
 	spin_lock_irqsave(&garmin_data_p->lock, flags);
 	spin_lock_irqsave(&garmin_data_p->lock, flags);
@@ -1488,7 +1488,7 @@ static void garmin_unthrottle (struct usb_serial_port *port)
 	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
 	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
 	int status;
 	int status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 	spin_lock_irqsave(&garmin_data_p->lock, flags);
 	spin_lock_irqsave(&garmin_data_p->lock, flags);
 	garmin_data_p->flags &= ~FLAGS_THROTTLED;
 	garmin_data_p->flags &= ~FLAGS_THROTTLED;
 	spin_unlock_irqrestore(&garmin_data_p->lock, flags);
 	spin_unlock_irqrestore(&garmin_data_p->lock, flags);
@@ -1503,7 +1503,7 @@ static void garmin_unthrottle (struct usb_serial_port *port)
 		if (status)
 		if (status)
 			dev_err(&port->dev,
 			dev_err(&port->dev,
 				"%s - failed resubmitting read urb, error %d\n",
 				"%s - failed resubmitting read urb, error %d\n",
-				__FUNCTION__, status);
+				__func__, status);
 	}
 	}
 }
 }
 
 
@@ -1532,11 +1532,11 @@ static int garmin_attach (struct usb_serial *serial)
 	struct usb_serial_port *port = serial->port[0];
 	struct usb_serial_port *port = serial->port[0];
 	struct garmin_data * garmin_data_p = NULL;
 	struct garmin_data * garmin_data_p = NULL;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	garmin_data_p = kzalloc(sizeof(struct garmin_data), GFP_KERNEL);
 	garmin_data_p = kzalloc(sizeof(struct garmin_data), GFP_KERNEL);
 	if (garmin_data_p == NULL) {
 	if (garmin_data_p == NULL) {
-		dev_err(&port->dev, "%s - Out of memory\n", __FUNCTION__);
+		dev_err(&port->dev, "%s - Out of memory\n", __func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 	init_timer(&garmin_data_p->timer);
 	init_timer(&garmin_data_p->timer);
@@ -1561,7 +1561,7 @@ static void garmin_shutdown (struct usb_serial *serial)
 	struct usb_serial_port *port = serial->port[0];
 	struct usb_serial_port *port = serial->port[0];
 	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
 	struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	usb_kill_urb (port->interrupt_in_urb);
 	usb_kill_urb (port->interrupt_in_urb);
 	del_timer_sync(&garmin_data_p->timer);
 	del_timer_sync(&garmin_data_p->timer);

+ 22 - 22
drivers/usb/serial/generic.c

@@ -118,7 +118,7 @@ int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp)
 	int result = 0;
 	int result = 0;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* force low_latency on so that our tty_push actually forces the data through, 
 	/* force low_latency on so that our tty_push actually forces the data through, 
 	   otherwise it is scheduled, and with high data rates (like with OHCI) data
 	   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)
 				   port);
 				   port);
 		result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 		result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 		if (result)
 		if (result)
-			dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+			dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __func__, result);
 	}
 	}
 
 
 	return result;
 	return result;
@@ -156,7 +156,7 @@ static void generic_cleanup (struct usb_serial_port *port)
 {
 {
 	struct usb_serial *serial = port->serial;
 	struct usb_serial *serial = port->serial;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (serial->dev) {
 	if (serial->dev) {
 		/* shutdown any bulk reads that might be going on */
 		/* shutdown any bulk reads that might be going on */
@@ -194,7 +194,7 @@ int usb_serial_generic_resume(struct usb_serial *serial)
 
 
 void usb_serial_generic_close (struct usb_serial_port *port, struct file * filp)
 void usb_serial_generic_close (struct usb_serial_port *port, struct file * filp)
 {
 {
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 	generic_cleanup (port);
 	generic_cleanup (port);
 }
 }
 
 
@@ -204,10 +204,10 @@ int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char *
 	int result;
 	int result;
 	unsigned char *data;
 	unsigned char *data;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (count == 0) {
 	if (count == 0) {
-		dbg("%s - write request of 0 bytes", __FUNCTION__);
+		dbg("%s - write request of 0 bytes", __func__);
 		return (0);
 		return (0);
 	}
 	}
 
 
@@ -217,7 +217,7 @@ int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char *
 		spin_lock_irqsave(&port->lock, flags);
 		spin_lock_irqsave(&port->lock, flags);
 		if (port->write_urb_busy) {
 		if (port->write_urb_busy) {
 			spin_unlock_irqrestore(&port->lock, flags);
 			spin_unlock_irqrestore(&port->lock, flags);
-			dbg("%s - already writing", __FUNCTION__);
+			dbg("%s - already writing", __func__);
 			return 0;
 			return 0;
 		}
 		}
 		port->write_urb_busy = 1;
 		port->write_urb_busy = 1;
@@ -227,7 +227,7 @@ int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char *
 
 
 		memcpy (port->write_urb->transfer_buffer, buf, count);
 		memcpy (port->write_urb->transfer_buffer, buf, count);
 		data = port->write_urb->transfer_buffer;
 		data = port->write_urb->transfer_buffer;
-		usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, data);
+		usb_serial_debug_data(debug, &port->dev, __func__, count, data);
 
 
 		/* set up our urb */
 		/* set up our urb */
 		usb_fill_bulk_urb (port->write_urb, serial->dev,
 		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 *
 		port->write_urb_busy = 1;
 		port->write_urb_busy = 1;
 		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 		if (result) {
 		if (result) {
-			dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+			dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __func__, result);
 			/* don't have to grab the lock here, as we will retry if != 0 */
 			/* don't have to grab the lock here, as we will retry if != 0 */
 			port->write_urb_busy = 0;
 			port->write_urb_busy = 0;
 		} else
 		} else
@@ -260,14 +260,14 @@ int usb_serial_generic_write_room (struct usb_serial_port *port)
 	struct usb_serial *serial = port->serial;
 	struct usb_serial *serial = port->serial;
 	int room = 0;
 	int room = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (serial->num_bulk_out) {
 	if (serial->num_bulk_out) {
 		if (!(port->write_urb_busy))
 		if (!(port->write_urb_busy))
 			room = port->bulk_out_size;
 			room = port->bulk_out_size;
 	}
 	}
 
 
-	dbg("%s - returns %d", __FUNCTION__, room);
+	dbg("%s - returns %d", __func__, room);
 	return (room);
 	return (room);
 }
 }
 
 
@@ -276,14 +276,14 @@ int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port)
 	struct usb_serial *serial = port->serial;
 	struct usb_serial *serial = port->serial;
 	int chars = 0;
 	int chars = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (serial->num_bulk_out) {
 	if (serial->num_bulk_out) {
 		if (port->write_urb_busy)
 		if (port->write_urb_busy)
 			chars = port->write_urb->transfer_buffer_length;
 			chars = port->write_urb->transfer_buffer_length;
 	}
 	}
 
 
-	dbg("%s - returns %d", __FUNCTION__, chars);
+	dbg("%s - returns %d", __func__, chars);
 	return (chars);
 	return (chars);
 }
 }
 
 
@@ -305,7 +305,7 @@ static void resubmit_read_urb(struct usb_serial_port *port, gfp_t mem_flags)
 			     usb_serial_generic_read_bulk_callback), port);
 			     usb_serial_generic_read_bulk_callback), port);
 	result = usb_submit_urb(urb, mem_flags);
 	result = usb_submit_urb(urb, mem_flags);
 	if (result)
 	if (result)
-		dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __func__, result);
 }
 }
 
 
 /* Push data to tty layer and resubmit the bulk read URB */
 /* 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)
 	int status = urb->status;
 	int status = urb->status;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (unlikely(status != 0)) {
 	if (unlikely(status != 0)) {
 		dbg("%s - nonzero read bulk status received: %d",
 		dbg("%s - nonzero read bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+	usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
 
 
 	/* Throttle the device if requested by tty */
 	/* Throttle the device if requested by tty */
 	spin_lock_irqsave(&port->lock, flags);
 	spin_lock_irqsave(&port->lock, flags);
@@ -360,12 +360,12 @@ void usb_serial_generic_write_bulk_callback (struct urb *urb)
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	port->write_urb_busy = 0;
 	port->write_urb_busy = 0;
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero write bulk status received: %d",
 		dbg("%s - nonzero write bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 
 
@@ -377,7 +377,7 @@ void usb_serial_generic_throttle (struct usb_serial_port *port)
 {
 {
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* Set the throttle request flag. It will be picked up
 	/* Set the throttle request flag. It will be picked up
 	 * by usb_serial_generic_read_bulk_callback(). */
 	 * by usb_serial_generic_read_bulk_callback(). */
@@ -391,7 +391,7 @@ void usb_serial_generic_unthrottle (struct usb_serial_port *port)
 	int was_throttled;
 	int was_throttled;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* Clear the throttle flags */
 	/* Clear the throttle flags */
 	spin_lock_irqsave(&port->lock, flags);
 	spin_lock_irqsave(&port->lock, flags);
@@ -409,7 +409,7 @@ void usb_serial_generic_shutdown (struct usb_serial *serial)
 {
 {
 	int i;
 	int i;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	/* stop reads and writes on all ports */
 	/* stop reads and writes on all ports */
 	for (i=0; i < serial->num_ports; ++i) {
 	for (i=0; i < serial->num_ports; ++i) {

文件差異過大導致無法顯示
+ 129 - 129
drivers/usb/serial/io_edgeport.c


文件差異過大導致無法顯示
+ 132 - 132
drivers/usb/serial/io_ti.c


+ 22 - 22
drivers/usb/serial/ipaq.c

@@ -594,13 +594,13 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
 	int			i, result = 0;
 	int			i, result = 0;
 	int			retries = connect_retries;
 	int			retries = connect_retries;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	bytes_in = 0;
 	bytes_in = 0;
 	bytes_out = 0;
 	bytes_out = 0;
 	priv = kmalloc(sizeof(struct ipaq_private), GFP_KERNEL);
 	priv = kmalloc(sizeof(struct ipaq_private), GFP_KERNEL);
 	if (priv == NULL) {
 	if (priv == NULL) {
-		err("%s - Out of memory", __FUNCTION__);
+		err("%s - Out of memory", __func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 	usb_set_serial_port_data(port, priv);
 	usb_set_serial_port_data(port, priv);
@@ -679,7 +679,7 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
 	}
 	}
 
 
 	if (!retries && result) {
 	if (!retries && result) {
-		err("%s - failed doing control urb, error %d", __FUNCTION__,
+		err("%s - failed doing control urb, error %d", __func__,
 		    result);
 		    result);
 		goto error;
 		goto error;
 	}
 	}
@@ -692,7 +692,7 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
 
 
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	if (result) {
 	if (result) {
-		err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
+		err("%s - failed submitting read urb, error %d", __func__, result);
 		goto error;
 		goto error;
 	}
 	}
 
 
@@ -700,7 +700,7 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
 
 
 enomem:
 enomem:
 	result = -ENOMEM;
 	result = -ENOMEM;
-	err("%s - Out of memory", __FUNCTION__);
+	err("%s - Out of memory", __func__);
 error:
 error:
 	ipaq_destroy_lists(port);
 	ipaq_destroy_lists(port);
 	kfree(priv);
 	kfree(priv);
@@ -712,7 +712,7 @@ static void ipaq_close(struct usb_serial_port *port, struct file *filp)
 {
 {
 	struct ipaq_private	*priv = usb_get_serial_port_data(port);
 	struct ipaq_private	*priv = usb_get_serial_port_data(port);
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 			 
 			 
 	/*
 	/*
 	 * shut down bulk read and write
 	 * shut down bulk read and write
@@ -735,15 +735,15 @@ static void ipaq_read_bulk_callback(struct urb *urb)
 	int			result;
 	int			result;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero read bulk status received: %d",
 		dbg("%s - nonzero read bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+	usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
 
 
 	tty = port->tty;
 	tty = port->tty;
 	if (tty && urb->actual_length) {
 	if (tty && urb->actual_length) {
@@ -760,7 +760,7 @@ static void ipaq_read_bulk_callback(struct urb *urb)
 		      ipaq_read_bulk_callback, port);
 		      ipaq_read_bulk_callback, port);
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	if (result)
 	if (result)
-		err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
+		err("%s - failed resubmitting read urb, error %d", __func__, result);
 	return;
 	return;
 }
 }
 
 
@@ -771,7 +771,7 @@ static int ipaq_write(struct usb_serial_port *port, const unsigned char *buf,
 	int			bytes_sent = 0;
 	int			bytes_sent = 0;
 	int			transfer_size;
 	int			transfer_size;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	while (count > 0) {
 	while (count > 0) {
 		transfer_size = min(count, PACKET_SIZE);
 		transfer_size = min(count, PACKET_SIZE);
@@ -796,7 +796,7 @@ static int ipaq_write_bulk(struct usb_serial_port *port, const unsigned char *bu
 	unsigned long		flags;
 	unsigned long		flags;
 
 
 	if (priv->free_len <= 0) {
 	if (priv->free_len <= 0) {
-		dbg("%s - we're stuffed", __FUNCTION__);
+		dbg("%s - we're stuffed", __func__);
 		return -EAGAIN;
 		return -EAGAIN;
 	}
 	}
 
 
@@ -808,12 +808,12 @@ static int ipaq_write_bulk(struct usb_serial_port *port, const unsigned char *bu
 	}
 	}
 	spin_unlock_irqrestore(&write_list_lock, flags);
 	spin_unlock_irqrestore(&write_list_lock, flags);
 	if (pkt == NULL) {
 	if (pkt == NULL) {
-		dbg("%s - we're stuffed", __FUNCTION__);
+		dbg("%s - we're stuffed", __func__);
 		return -EAGAIN;
 		return -EAGAIN;
 	}
 	}
 
 
 	memcpy(pkt->data, buf, count);
 	memcpy(pkt->data, buf, count);
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, pkt->data);
+	usb_serial_debug_data(debug, &port->dev, __func__, count, pkt->data);
 
 
 	pkt->len = count;
 	pkt->len = count;
 	pkt->written = 0;
 	pkt->written = 0;
@@ -826,7 +826,7 @@ static int ipaq_write_bulk(struct usb_serial_port *port, const unsigned char *bu
 		spin_unlock_irqrestore(&write_list_lock, flags);
 		spin_unlock_irqrestore(&write_list_lock, flags);
 		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 		if (result) {
 		if (result) {
-			err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
+			err("%s - failed submitting write urb, error %d", __func__, result);
 		}
 		}
 	} else {
 	} else {
 		spin_unlock_irqrestore(&write_list_lock, flags);
 		spin_unlock_irqrestore(&write_list_lock, flags);
@@ -875,11 +875,11 @@ static void ipaq_write_bulk_callback(struct urb *urb)
 	int			result;
 	int			result;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero write bulk status received: %d",
 		dbg("%s - nonzero write bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 
 
@@ -889,7 +889,7 @@ static void ipaq_write_bulk_callback(struct urb *urb)
 		spin_unlock_irqrestore(&write_list_lock, flags);
 		spin_unlock_irqrestore(&write_list_lock, flags);
 		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 		if (result) {
 		if (result) {
-			err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
+			err("%s - failed submitting write urb, error %d", __func__, result);
 		}
 		}
 	} else {
 	} else {
 		priv->active = 0;
 		priv->active = 0;
@@ -903,7 +903,7 @@ static int ipaq_write_room(struct usb_serial_port *port)
 {
 {
 	struct ipaq_private	*priv = usb_get_serial_port_data(port);
 	struct ipaq_private	*priv = usb_get_serial_port_data(port);
 
 
-	dbg("%s - freelen %d", __FUNCTION__, priv->free_len);
+	dbg("%s - freelen %d", __func__, priv->free_len);
 	return priv->free_len;
 	return priv->free_len;
 }
 }
 
 
@@ -911,7 +911,7 @@ static int ipaq_chars_in_buffer(struct usb_serial_port *port)
 {
 {
 	struct ipaq_private	*priv = usb_get_serial_port_data(port);
 	struct ipaq_private	*priv = usb_get_serial_port_data(port);
 
 
-	dbg("%s - queuelen %d", __FUNCTION__, priv->queue_len);
+	dbg("%s - queuelen %d", __func__, priv->queue_len);
 	return priv->queue_len;
 	return priv->queue_len;
 }
 }
 
 
@@ -933,7 +933,7 @@ static void ipaq_destroy_lists(struct usb_serial_port *port)
 
 
 static int ipaq_startup(struct usb_serial *serial)
 static int ipaq_startup(struct usb_serial *serial)
 {
 {
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 	if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
 	if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
 		err("active config #%d != 1 ??",
 		err("active config #%d != 1 ??",
 			serial->dev->actconfig->desc.bConfigurationValue);
 			serial->dev->actconfig->desc.bConfigurationValue);
@@ -944,7 +944,7 @@ static int ipaq_startup(struct usb_serial *serial)
 
 
 static void ipaq_shutdown(struct usb_serial *serial)
 static void ipaq_shutdown(struct usb_serial *serial)
 {
 {
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 }
 }
 
 
 static int __init ipaq_init(void)
 static int __init ipaq_init(void)

+ 24 - 24
drivers/usb/serial/ipw.c

@@ -169,15 +169,15 @@ static void ipw_read_bulk_callback(struct urb *urb)
 	int result;
 	int result;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero read bulk status received: %d",
 		dbg("%s - nonzero read bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+	usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
 
 
 	tty = port->tty;
 	tty = port->tty;
 	if (tty && urb->actual_length) {
 	if (tty && urb->actual_length) {
@@ -195,7 +195,7 @@ static void ipw_read_bulk_callback(struct urb *urb)
 			   ipw_read_bulk_callback, port);
 			   ipw_read_bulk_callback, port);
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	if (result)
 	if (result)
-		dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __func__, result);
 	return;
 	return;
 }
 }
 
 
@@ -206,7 +206,7 @@ static int ipw_open(struct usb_serial_port *port, struct file *filp)
 	u8 *buf_flow_init;
 	u8 *buf_flow_init;
 	int result;
 	int result;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	buf_flow_init = kmemdup(buf_flow_static, 16, GFP_KERNEL);
 	buf_flow_init = kmemdup(buf_flow_static, 16, GFP_KERNEL);
 	if (!buf_flow_init)
 	if (!buf_flow_init)
@@ -217,7 +217,7 @@ static int ipw_open(struct usb_serial_port *port, struct file *filp)
 
 
 	/* --1: Tell the modem to initialize (we think) From sniffs this is always the
 	/* --1: Tell the modem to initialize (we think) From sniffs this is always the
 	 * first thing that gets sent to the modem during opening of the device */
 	 * first thing that gets sent to the modem during opening of the device */
-	dbg("%s: Sending SIO_INIT (we guess)",__FUNCTION__);
+	dbg("%s: Sending SIO_INIT (we guess)",__func__);
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev,0),
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev,0),
 				 IPW_SIO_INIT,
 				 IPW_SIO_INIT,
 				 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
 				 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)
 	usb_clear_halt(dev, usb_sndbulkpipe(dev, port->bulk_out_endpointAddress));
 	usb_clear_halt(dev, usb_sndbulkpipe(dev, port->bulk_out_endpointAddress));
 
 
 	/*--2: Start reading from the device */	
 	/*--2: Start reading from the device */	
-	dbg("%s: setting up bulk read callback",__FUNCTION__);
+	dbg("%s: setting up bulk read callback",__func__);
 	usb_fill_bulk_urb(port->read_urb, dev,
 	usb_fill_bulk_urb(port->read_urb, dev,
 			  usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress),
 			  usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress),
 			  port->bulk_in_buffer,
 			  port->bulk_in_buffer,
@@ -242,10 +242,10 @@ static int ipw_open(struct usb_serial_port *port, struct file *filp)
 			  ipw_read_bulk_callback, port);
 			  ipw_read_bulk_callback, port);
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	if (result < 0)
 	if (result < 0)
-		dbg("%s - usb_submit_urb(read bulk) failed with status %d", __FUNCTION__, result);
+		dbg("%s - usb_submit_urb(read bulk) failed with status %d", __func__, result);
 
 
 	/*--3: Tell the modem to open the floodgates on the rx bulk channel */
 	/*--3: Tell the modem to open the floodgates on the rx bulk channel */
-	dbg("%s:asking modem for RxRead (RXBULK_ON)",__FUNCTION__);
+	dbg("%s:asking modem for RxRead (RXBULK_ON)",__func__);
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 				 IPW_SIO_RXCTL,
 				 IPW_SIO_RXCTL,
 				 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
 				 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)
 		dev_err(&port->dev, "Enabling bulk RxRead failed (error = %d)\n", result);
 		dev_err(&port->dev, "Enabling bulk RxRead failed (error = %d)\n", result);
 
 
 	/*--4: setup the initial flowcontrol */
 	/*--4: setup the initial flowcontrol */
-	dbg("%s:setting init flowcontrol (%s)",__FUNCTION__,buf_flow_init);
+	dbg("%s:setting init flowcontrol (%s)",__func__,buf_flow_init);
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 				 IPW_SIO_HANDFLOW,
 				 IPW_SIO_HANDFLOW,
 				 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
 				 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)
 
 
 
 
 	/*--5: raise the dtr */
 	/*--5: raise the dtr */
-	dbg("%s:raising dtr",__FUNCTION__);
+	dbg("%s:raising dtr",__func__);
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 				 IPW_SIO_SET_PIN,
 				 IPW_SIO_SET_PIN,
 				 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
 				 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)
 		dev_err(&port->dev, "setting dtr failed (error = %d)\n", result);
 		dev_err(&port->dev, "setting dtr failed (error = %d)\n", result);
 
 
 	/*--6: raise the rts */
 	/*--6: raise the rts */
-	dbg("%s:raising rts",__FUNCTION__);
+	dbg("%s:raising rts",__func__);
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 				 IPW_SIO_SET_PIN,
 				 IPW_SIO_SET_PIN,
 				 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
 				 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)
 	int result;
 	int result;
 
 
 	if (tty_hung_up_p(filp)) {
 	if (tty_hung_up_p(filp)) {
-		dbg("%s: tty_hung_up_p ...", __FUNCTION__);
+		dbg("%s: tty_hung_up_p ...", __func__);
 		return;
 		return;
 	}
 	}
 
 
 	/*--1: drop the dtr */
 	/*--1: drop the dtr */
-	dbg("%s:dropping dtr",__FUNCTION__);
+	dbg("%s:dropping dtr",__func__);
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 				 IPW_SIO_SET_PIN,
 				 IPW_SIO_SET_PIN,
 				 USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
 				 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)
 		dev_err(&port->dev, "dropping dtr failed (error = %d)\n", result);
 		dev_err(&port->dev, "dropping dtr failed (error = %d)\n", result);
 
 
 	/*--2: drop the rts */
 	/*--2: drop the rts */
-	dbg("%s:dropping rts",__FUNCTION__);
+	dbg("%s:dropping rts",__func__);
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 				 IPW_SIO_SET_PIN, USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
 				 IPW_SIO_SET_PIN, USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
 				 IPW_PIN_CLRRTS,
 				 IPW_PIN_CLRRTS,
@@ -338,7 +338,7 @@ static void ipw_close(struct usb_serial_port *port, struct file * filp)
 
 
 
 
 	/*--3: purge */
 	/*--3: purge */
-	dbg("%s:sending purge",__FUNCTION__);
+	dbg("%s:sending purge",__func__);
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 	result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 				 IPW_SIO_PURGE, USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
 				 IPW_SIO_PURGE, USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
 				 0x03,
 				 0x03,
@@ -373,13 +373,13 @@ static void ipw_write_bulk_callback(struct urb *urb)
 	struct usb_serial_port *port = urb->context;
 	struct usb_serial_port *port = urb->context;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	port->write_urb_busy = 0;
 	port->write_urb_busy = 0;
 
 
 	if (status)
 	if (status)
 		dbg("%s - nonzero write bulk status received: %d",
 		dbg("%s - nonzero write bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 
 
 	usb_serial_port_softint(port);
 	usb_serial_port_softint(port);
 }
 }
@@ -389,18 +389,18 @@ static int ipw_write(struct usb_serial_port *port, const unsigned char *buf, int
 	struct usb_device *dev = port->serial->dev;
 	struct usb_device *dev = port->serial->dev;
 	int ret;
 	int ret;
 
 
-	dbg("%s: TOP: count=%d, in_interrupt=%ld", __FUNCTION__,
+	dbg("%s: TOP: count=%d, in_interrupt=%ld", __func__,
 		count, in_interrupt() );
 		count, in_interrupt() );
 
 
 	if (count == 0) {
 	if (count == 0) {
-		dbg("%s - write request of 0 bytes", __FUNCTION__);
+		dbg("%s - write request of 0 bytes", __func__);
 		return 0;
 		return 0;
 	}
 	}
 
 
 	spin_lock_bh(&port->lock);
 	spin_lock_bh(&port->lock);
 	if (port->write_urb_busy) {
 	if (port->write_urb_busy) {
 		spin_unlock_bh(&port->lock);
 		spin_unlock_bh(&port->lock);
-		dbg("%s - already writing", __FUNCTION__);
+		dbg("%s - already writing", __func__);
 		return 0;
 		return 0;
 	}
 	}
 	port->write_urb_busy = 1;
 	port->write_urb_busy = 1;
@@ -409,7 +409,7 @@ static int ipw_write(struct usb_serial_port *port, const unsigned char *buf, int
 	count = min(count, port->bulk_out_size);
 	count = min(count, port->bulk_out_size);
 	memcpy(port->bulk_out_buffer, buf, count);
 	memcpy(port->bulk_out_buffer, buf, count);
 
 
-	dbg("%s count now:%d", __FUNCTION__, count);
+	dbg("%s count now:%d", __func__, count);
 
 
 	usb_fill_bulk_urb(port->write_urb, dev,
 	usb_fill_bulk_urb(port->write_urb, dev,
 			  usb_sndbulkpipe(dev, port->bulk_out_endpointAddress),
 			  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
 	ret = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 	ret = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 	if (ret != 0) {
 	if (ret != 0) {
 		port->write_urb_busy = 0;
 		port->write_urb_busy = 0;
-		dbg("%s - usb_submit_urb(write bulk) failed with error = %d", __FUNCTION__, ret);
+		dbg("%s - usb_submit_urb(write bulk) failed with error = %d", __func__, ret);
 		return ret;
 		return ret;
 	}
 	}
 
 
-	dbg("%s returning %d", __FUNCTION__, count);
+	dbg("%s returning %d", __func__, count);
 	return count;
 	return count;
 } 
 } 
 
 

+ 23 - 23
drivers/usb/serial/ir-usb.c

@@ -195,16 +195,16 @@ static struct irda_class_desc *irda_usb_find_class_desc(struct usb_device *dev,
 			USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
 			USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
 			0, ifnum, desc, sizeof(*desc), 1000);
 			0, ifnum, desc, sizeof(*desc), 1000);
 	
 	
-	dbg("%s -  ret=%d", __FUNCTION__, ret);
+	dbg("%s -  ret=%d", __func__, ret);
 	if (ret < sizeof(*desc)) {
 	if (ret < sizeof(*desc)) {
 		dbg("%s - class descriptor read %s (%d)",
 		dbg("%s - class descriptor read %s (%d)",
-				__FUNCTION__, 
+				__func__,
 				(ret<0) ? "failed" : "too short",
 				(ret<0) ? "failed" : "too short",
 				ret);
 				ret);
 		goto error;
 		goto error;
 	}
 	}
 	if (desc->bDescriptorType != USB_DT_IRDA) {
 	if (desc->bDescriptorType != USB_DT_IRDA) {
-		dbg("%s - bad class descriptor type", __FUNCTION__);
+		dbg("%s - bad class descriptor type", __func__);
 		goto error;
 		goto error;
 	}
 	}
 	
 	
@@ -248,7 +248,7 @@ static int ir_startup (struct usb_serial *serial)
 	}
 	}
 
 
 	dbg ("%s - Baud rates supported:%s%s%s%s%s%s%s%s%s",
 	dbg ("%s - Baud rates supported:%s%s%s%s%s%s%s%s%s",
-		__FUNCTION__,
+		__func__,
 		(irda_desc->wBaudRate & 0x0001) ? " 2400"    : "",
 		(irda_desc->wBaudRate & 0x0001) ? " 2400"    : "",
 		(irda_desc->wBaudRate & 0x0002) ? " 9600"    : "",
 		(irda_desc->wBaudRate & 0x0002) ? " 9600"    : "",
 		(irda_desc->wBaudRate & 0x0004) ? " 19200"   : "",
 		(irda_desc->wBaudRate & 0x0004) ? " 19200"   : "",
@@ -281,13 +281,13 @@ static int ir_open (struct usb_serial_port *port, struct file *filp)
 	char *buffer;
 	char *buffer;
 	int result = 0;
 	int result = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (buffer_size) {
 	if (buffer_size) {
 		/* override the default buffer sizes */
 		/* override the default buffer sizes */
 		buffer = kmalloc (buffer_size, GFP_KERNEL);
 		buffer = kmalloc (buffer_size, GFP_KERNEL);
 		if (!buffer) {
 		if (!buffer) {
-			dev_err (&port->dev, "%s - out of memory.\n", __FUNCTION__);
+			dev_err (&port->dev, "%s - out of memory.\n", __func__);
 			return -ENOMEM;
 			return -ENOMEM;
 		}
 		}
 		kfree (port->read_urb->transfer_buffer);
 		kfree (port->read_urb->transfer_buffer);
@@ -296,7 +296,7 @@ static int ir_open (struct usb_serial_port *port, struct file *filp)
 
 
 		buffer = kmalloc (buffer_size, GFP_KERNEL);
 		buffer = kmalloc (buffer_size, GFP_KERNEL);
 		if (!buffer) {
 		if (!buffer) {
-			dev_err (&port->dev, "%s - out of memory.\n", __FUNCTION__);
+			dev_err (&port->dev, "%s - out of memory.\n", __func__);
 			return -ENOMEM;
 			return -ENOMEM;
 		}
 		}
 		kfree (port->write_urb->transfer_buffer);
 		kfree (port->write_urb->transfer_buffer);
@@ -316,14 +316,14 @@ static int ir_open (struct usb_serial_port *port, struct file *filp)
 		port);
 		port);
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	if (result)
 	if (result)
-		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __func__, result);
 
 
 	return result;
 	return result;
 }
 }
 
 
 static void ir_close (struct usb_serial_port *port, struct file * filp)
 static void ir_close (struct usb_serial_port *port, struct file * filp)
 {
 {
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 			 
 			 
 	/* shutdown our bulk read */
 	/* shutdown our bulk read */
 	usb_kill_urb(port->read_urb);
 	usb_kill_urb(port->read_urb);
@@ -335,10 +335,10 @@ static int ir_write (struct usb_serial_port *port, const unsigned char *buf, int
 	int result;
 	int result;
 	int transfer_size;
 	int transfer_size;
 
 
-	dbg("%s - port = %d, count = %d", __FUNCTION__, port->number, count);
+	dbg("%s - port = %d, count = %d", __func__, port->number, count);
 
 
 	if (!port->tty) {
 	if (!port->tty) {
-		dev_err (&port->dev, "%s - no tty???\n", __FUNCTION__);
+		dev_err (&port->dev, "%s - no tty???\n", __func__);
 		return 0;
 		return 0;
 	}
 	}
 
 
@@ -348,7 +348,7 @@ static int ir_write (struct usb_serial_port *port, const unsigned char *buf, int
 	spin_lock_bh(&port->lock);
 	spin_lock_bh(&port->lock);
 	if (port->write_urb_busy) {
 	if (port->write_urb_busy) {
 		spin_unlock_bh(&port->lock);
 		spin_unlock_bh(&port->lock);
-		dbg("%s - already writing", __FUNCTION__);
+		dbg("%s - already writing", __func__);
 		return 0;
 		return 0;
 	}
 	}
 	port->write_urb_busy = 1;
 	port->write_urb_busy = 1;
@@ -384,7 +384,7 @@ static int ir_write (struct usb_serial_port *port, const unsigned char *buf, int
 	result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
 	result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
 	if (result) {
 	if (result) {
 		port->write_urb_busy = 0;
 		port->write_urb_busy = 0;
-		dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __func__, result);
 	} else
 	} else
 		result = transfer_size;
 		result = transfer_size;
 
 
@@ -396,19 +396,19 @@ static void ir_write_bulk_callback (struct urb *urb)
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	port->write_urb_busy = 0;
 	port->write_urb_busy = 0;
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero write bulk status received: %d",
 		dbg("%s - nonzero write bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 
 
 	usb_serial_debug_data (
 	usb_serial_debug_data (
 		debug,
 		debug,
 		&port->dev,
 		&port->dev,
-		__FUNCTION__,
+		__func__,
 		urb->actual_length,
 		urb->actual_length,
 		urb->transfer_buffer);
 		urb->transfer_buffer);
 
 
@@ -423,10 +423,10 @@ static void ir_read_bulk_callback (struct urb *urb)
 	int result;
 	int result;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (!port->open_count) {
 	if (!port->open_count) {
-		dbg("%s - port closed.", __FUNCTION__);
+		dbg("%s - port closed.", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -444,7 +444,7 @@ static void ir_read_bulk_callback (struct urb *urb)
 			usb_serial_debug_data (
 			usb_serial_debug_data (
 				debug,
 				debug,
 				&port->dev,
 				&port->dev,
-				__FUNCTION__,
+				__func__,
 				urb->actual_length,
 				urb->actual_length,
 				data);
 				data);
 
 
@@ -477,13 +477,13 @@ static void ir_read_bulk_callback (struct urb *urb)
 			result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 			result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 			if (result)
 			if (result)
 				dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n",
 				dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n",
-					__FUNCTION__, result);
+					__func__, result);
 
 
 			break ;
 			break ;
 
 
 		default:
 		default:
 			dbg("%s - nonzero read bulk status received: %d",
 			dbg("%s - nonzero read bulk status received: %d",
-				__FUNCTION__, 
+				__func__,
 				status);
 				status);
 			break ;
 			break ;
 
 
@@ -499,7 +499,7 @@ static void ir_set_termios (struct usb_serial_port *port, struct ktermios *old_t
 	speed_t baud;
 	speed_t baud;
 	int ir_baud;
 	int ir_baud;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	baud = tty_get_baud_rate(port->tty);
 	baud = tty_get_baud_rate(port->tty);
 
 
@@ -551,7 +551,7 @@ static void ir_set_termios (struct usb_serial_port *port, struct ktermios *old_t
 
 
 	result = usb_submit_urb (port->write_urb, GFP_KERNEL);
 	result = usb_submit_urb (port->write_urb, GFP_KERNEL);
 	if (result)
 	if (result)
-		dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __func__, result);
 
 
 	/* Only speed changes are supported */
 	/* Only speed changes are supported */
 	tty_termios_copy_hw(port->tty->termios, old_termios);
 	tty_termios_copy_hw(port->tty->termios, old_termios);

+ 64 - 64
drivers/usb/serial/iuu_phoenix.c

@@ -98,10 +98,10 @@ static int iuu_alloc_buf(struct iuu_private *priv)
 	priv->writebuf = kzalloc(256, GFP_KERNEL);
 	priv->writebuf = kzalloc(256, GFP_KERNEL);
 	if (!priv->buf || !priv->dbgbuf || !priv->writebuf) {
 	if (!priv->buf || !priv->dbgbuf || !priv->writebuf) {
 		iuu_free_buf(priv);
 		iuu_free_buf(priv);
-		dbg("%s problem allocation buffer", __FUNCTION__);
+		dbg("%s problem allocation buffer", __func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
-	dbg("%s - Privates buffers allocation success", __FUNCTION__);
+	dbg("%s - Privates buffers allocation success", __func__);
 	return 0;
 	return 0;
 }
 }
 
 
@@ -109,7 +109,7 @@ static int iuu_startup(struct usb_serial *serial)
 {
 {
 	struct iuu_private *priv;
 	struct iuu_private *priv;
 	priv = kzalloc(sizeof(struct iuu_private), GFP_KERNEL);
 	priv = kzalloc(sizeof(struct iuu_private), GFP_KERNEL);
-	dbg("%s- priv allocation success", __FUNCTION__);
+	dbg("%s- priv allocation success", __func__);
 	if (!priv)
 	if (!priv)
 		return -ENOMEM;
 		return -ENOMEM;
 	if (iuu_alloc_buf(priv)) {
 	if (iuu_alloc_buf(priv)) {
@@ -130,17 +130,17 @@ static void iuu_shutdown(struct usb_serial *serial)
 	if (!port)
 	if (!port)
 		return;
 		return;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	if (priv) {
 	if (priv) {
 		iuu_free_buf(priv);
 		iuu_free_buf(priv);
-		dbg("%s - I will free all", __FUNCTION__);
+		dbg("%s - I will free all", __func__);
 		usb_set_serial_port_data(port, NULL);
 		usb_set_serial_port_data(port, NULL);
 
 
-		dbg("%s - priv is not anymore in port structure", __FUNCTION__);
+		dbg("%s - priv is not anymore in port structure", __func__);
 		kfree(priv);
 		kfree(priv);
 
 
-		dbg("%s priv is now kfree", __FUNCTION__);
+		dbg("%s priv is now kfree", __func__);
 	}
 	}
 }
 }
 
 
@@ -151,7 +151,7 @@ static int iuu_tiocmset(struct usb_serial_port *port, struct file *file,
 	unsigned long flags;
 	unsigned long flags;
 
 
 	/* FIXME: locking on tiomstatus */
 	/* FIXME: locking on tiomstatus */
-	dbg("%s (%d) msg : SET = 0x%04x, CLEAR = 0x%04x ", __FUNCTION__,
+	dbg("%s (%d) msg : SET = 0x%04x, CLEAR = 0x%04x ", __func__,
 	    port->number, set, clear);
 	    port->number, set, clear);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
@@ -159,7 +159,7 @@ static int iuu_tiocmset(struct usb_serial_port *port, struct file *file,
 		priv->tiostatus = TIOCM_RTS;
 		priv->tiostatus = TIOCM_RTS;
 
 
 	if (!(set & TIOCM_RTS) && priv->tiostatus == TIOCM_RTS) {
 	if (!(set & TIOCM_RTS) && priv->tiostatus == TIOCM_RTS) {
-		dbg("%s TIOCMSET RESET called !!!", __FUNCTION__);
+		dbg("%s TIOCMSET RESET called !!!", __func__);
 		priv->reset = 1;
 		priv->reset = 1;
 	}
 	}
 	spin_unlock_irqrestore(&priv->lock, flags);
 	spin_unlock_irqrestore(&priv->lock, flags);
@@ -188,10 +188,10 @@ static void iuu_rxcmd(struct urb *urb)
 {
 {
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	int result;
 	int result;
-	dbg("%s - enter", __FUNCTION__);
+	dbg("%s - enter", __func__);
 
 
 	if (urb->status) {
 	if (urb->status) {
-		dbg("%s - urb->status = %d", __FUNCTION__, urb->status);
+		dbg("%s - urb->status = %d", __func__, urb->status);
 		/* error stop all */
 		/* error stop all */
 		return;
 		return;
 	}
 	}
@@ -211,7 +211,7 @@ static int iuu_reset(struct usb_serial_port *port, u8 wt)
 	struct iuu_private *priv = usb_get_serial_port_data(port);
 	struct iuu_private *priv = usb_get_serial_port_data(port);
 	int result;
 	int result;
 	char *buf_ptr = port->write_urb->transfer_buffer;
 	char *buf_ptr = port->write_urb->transfer_buffer;
-	dbg("%s - enter", __FUNCTION__);
+	dbg("%s - enter", __func__);
 
 
 	/* Prepare the reset sequence */
 	/* Prepare the reset sequence */
 
 
@@ -243,16 +243,16 @@ static void iuu_update_status_callback(struct urb *urb)
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	struct iuu_private *priv = usb_get_serial_port_data(port);
 	struct iuu_private *priv = usb_get_serial_port_data(port);
 	u8 *st;
 	u8 *st;
-	dbg("%s - enter", __FUNCTION__);
+	dbg("%s - enter", __func__);
 
 
 	if (urb->status) {
 	if (urb->status) {
-		dbg("%s - urb->status = %d", __FUNCTION__, urb->status);
+		dbg("%s - urb->status = %d", __func__, urb->status);
 		/* error stop all */
 		/* error stop all */
 		return;
 		return;
 	}
 	}
 
 
 	st = urb->transfer_buffer;
 	st = urb->transfer_buffer;
-	dbg("%s - enter", __FUNCTION__);
+	dbg("%s - enter", __func__);
 	if (urb->actual_length == 1) {
 	if (urb->actual_length == 1) {
 		switch (st[0]) {
 		switch (st[0]) {
 		case 0x1:
 		case 0x1:
@@ -272,9 +272,9 @@ static void iuu_status_callback(struct urb *urb)
 {
 {
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	int result;
 	int result;
-	dbg("%s - enter", __FUNCTION__);
+	dbg("%s - enter", __func__);
 
 
-	dbg("%s - urb->status = %d", __FUNCTION__, urb->status);
+	dbg("%s - urb->status = %d", __func__, urb->status);
 	usb_fill_bulk_urb(port->read_urb, port->serial->dev,
 	usb_fill_bulk_urb(port->read_urb, port->serial->dev,
 			  usb_rcvbulkpipe(port->serial->dev,
 			  usb_rcvbulkpipe(port->serial->dev,
 					  port->bulk_in_endpointAddress),
 					  port->bulk_in_endpointAddress),
@@ -287,7 +287,7 @@ static int iuu_status(struct usb_serial_port *port)
 {
 {
 	int result;
 	int result;
 
 
-	dbg("%s - enter", __FUNCTION__);
+	dbg("%s - enter", __func__);
 
 
 	memset(port->write_urb->transfer_buffer, IUU_GET_STATE_REGISTER, 1);
 	memset(port->write_urb->transfer_buffer, IUU_GET_STATE_REGISTER, 1);
 	usb_fill_bulk_urb(port->write_urb, port->serial->dev,
 	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)
 	struct usb_serial *serial = port->serial;
 	struct usb_serial *serial = port->serial;
 	int actual = 0;
 	int actual = 0;
 
 
-	dbg("%s - enter", __FUNCTION__);
+	dbg("%s - enter", __func__);
 
 
 	/* send the data out the bulk port */
 	/* send the data out the bulk port */
 
 
@@ -317,9 +317,9 @@ static int bulk_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
 			 count, &actual, HZ * 1);
 			 count, &actual, HZ * 1);
 
 
 	if (status != IUU_OPERATION_OK) {
 	if (status != IUU_OPERATION_OK) {
-		dbg("%s - error = %2x", __FUNCTION__, status);
+		dbg("%s - error = %2x", __func__, status);
 	} else {
 	} else {
-		dbg("%s - write OK !", __FUNCTION__);
+		dbg("%s - write OK !", __func__);
 	}
 	}
 	return status;
 	return status;
 }
 }
@@ -330,7 +330,7 @@ static int read_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
 	struct usb_serial *serial = port->serial;
 	struct usb_serial *serial = port->serial;
 	int actual = 0;
 	int actual = 0;
 
 
-	dbg("%s - enter", __FUNCTION__);
+	dbg("%s - enter", __func__);
 
 
 	/* send the data out the bulk port */
 	/* send the data out the bulk port */
 
 
@@ -341,9 +341,9 @@ static int read_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
 			 count, &actual, HZ * 1);
 			 count, &actual, HZ * 1);
 
 
 	if (status != IUU_OPERATION_OK) {
 	if (status != IUU_OPERATION_OK) {
-		dbg("%s - error = %2x", __FUNCTION__, status);
+		dbg("%s - error = %2x", __func__, status);
 	} else {
 	} else {
-		dbg("%s - read OK !", __FUNCTION__);
+		dbg("%s - read OK !", __func__);
 	}
 	}
 
 
 	return status;
 	return status;
@@ -358,7 +358,7 @@ static int iuu_led(struct usb_serial_port *port, unsigned int R,
 	if (!buf)
 	if (!buf)
 		return -ENOMEM;
 		return -ENOMEM;
 
 
-	dbg("%s - enter", __FUNCTION__);
+	dbg("%s - enter", __func__);
 
 
 	buf[0] = IUU_SET_LED;
 	buf[0] = IUU_SET_LED;
 	buf[1] = R & 0xFF;
 	buf[1] = R & 0xFF;
@@ -371,9 +371,9 @@ static int iuu_led(struct usb_serial_port *port, unsigned int R,
 	status = bulk_immediate(port, buf, 8);
 	status = bulk_immediate(port, buf, 8);
 	kfree(buf);
 	kfree(buf);
 	if (status != IUU_OPERATION_OK)
 	if (status != IUU_OPERATION_OK)
-		dbg("%s - led error status = %2x", __FUNCTION__, status);
+		dbg("%s - led error status = %2x", __func__, status);
 	else
 	else
-		dbg("%s - led OK !", __FUNCTION__);
+		dbg("%s - led OK !", __func__);
 	return IUU_OPERATION_OK;
 	return IUU_OPERATION_OK;
 }
 }
 
 
@@ -451,7 +451,7 @@ static int iuu_clk(struct usb_serial_port *port, int dwFrq)
 	unsigned int P2 = 0;
 	unsigned int P2 = 0;
 	int frq = (int)dwFrq;
 	int frq = (int)dwFrq;
 
 
-	dbg("%s - enter", __FUNCTION__);
+	dbg("%s - enter", __func__);
 
 
 	if (frq == 0) {
 	if (frq == 0) {
 		priv->buf[Count++] = IUU_UART_WRITE_I2C;
 		priv->buf[Count++] = IUU_UART_WRITE_I2C;
@@ -461,7 +461,7 @@ static int iuu_clk(struct usb_serial_port *port, int dwFrq)
 
 
 		status = bulk_immediate(port, (u8 *) priv->buf, Count);
 		status = bulk_immediate(port, (u8 *) priv->buf, Count);
 		if (status != 0) {
 		if (status != 0) {
-			dbg("%s - write error ", __FUNCTION__);
+			dbg("%s - write error ", __func__);
 			return status;
 			return status;
 		}
 		}
 	} else if (frq == 3579000) {
 	} else if (frq == 3579000) {
@@ -570,7 +570,7 @@ static int iuu_clk(struct usb_serial_port *port, int dwFrq)
 
 
 	status = bulk_immediate(port, (u8 *) priv->buf, Count);
 	status = bulk_immediate(port, (u8 *) priv->buf, Count);
 	if (status != IUU_OPERATION_OK)
 	if (status != IUU_OPERATION_OK)
-		dbg("%s - write error ", __FUNCTION__);
+		dbg("%s - write error ", __func__);
 	return status;
 	return status;
 }
 }
 
 
@@ -581,7 +581,7 @@ static int iuu_uart_flush(struct usb_serial_port *port)
 	u8 rxcmd = IUU_UART_RX;
 	u8 rxcmd = IUU_UART_RX;
 	struct iuu_private *priv = usb_get_serial_port_data(port);
 	struct iuu_private *priv = usb_get_serial_port_data(port);
 
 
-	dbg("%s - enter", __FUNCTION__);
+	dbg("%s - enter", __func__);
 
 
 	if (iuu_led(port, 0xF000, 0, 0, 0xFF) < 0)
 	if (iuu_led(port, 0xF000, 0, 0, 0xFF) < 0)
 		return -EIO;
 		return -EIO;
@@ -589,27 +589,27 @@ static int iuu_uart_flush(struct usb_serial_port *port)
 	for (i = 0; i < 2; i++) {
 	for (i = 0; i < 2; i++) {
 		status = bulk_immediate(port, &rxcmd, 1);
 		status = bulk_immediate(port, &rxcmd, 1);
 		if (status != IUU_OPERATION_OK) {
 		if (status != IUU_OPERATION_OK) {
-			dbg("%s - uart_flush_write error", __FUNCTION__);
+			dbg("%s - uart_flush_write error", __func__);
 			return status;
 			return status;
 		}
 		}
 
 
 		status = read_immediate(port, &priv->len, 1);
 		status = read_immediate(port, &priv->len, 1);
 		if (status != IUU_OPERATION_OK) {
 		if (status != IUU_OPERATION_OK) {
-			dbg("%s - uart_flush_read error", __FUNCTION__);
+			dbg("%s - uart_flush_read error", __func__);
 			return status;
 			return status;
 		}
 		}
 
 
 		if (priv->len > 0) {
 		if (priv->len > 0) {
-			dbg("%s - uart_flush datalen is : %i ", __FUNCTION__,
+			dbg("%s - uart_flush datalen is : %i ", __func__,
 			    priv->len);
 			    priv->len);
 			status = read_immediate(port, priv->buf, priv->len);
 			status = read_immediate(port, priv->buf, priv->len);
 			if (status != IUU_OPERATION_OK) {
 			if (status != IUU_OPERATION_OK) {
-				dbg("%s - uart_flush_read error", __FUNCTION__);
+				dbg("%s - uart_flush_read error", __func__);
 				return status;
 				return status;
 			}
 			}
 		}
 		}
 	}
 	}
-	dbg("%s - uart_flush_read OK!", __FUNCTION__);
+	dbg("%s - uart_flush_read OK!", __func__);
 	iuu_led(port, 0, 0xF000, 0, 0xFF);
 	iuu_led(port, 0, 0xF000, 0, 0xFF);
 	return status;
 	return status;
 }
 }
@@ -619,20 +619,20 @@ static void read_buf_callback(struct urb *urb)
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	unsigned char *data = urb->transfer_buffer;
 	unsigned char *data = urb->transfer_buffer;
 	struct tty_struct *tty;
 	struct tty_struct *tty;
-	dbg("%s - urb->status = %d", __FUNCTION__, urb->status);
+	dbg("%s - urb->status = %d", __func__, urb->status);
 
 
 	if (urb->status) {
 	if (urb->status) {
-		dbg("%s - urb->status = %d", __FUNCTION__, urb->status);
+		dbg("%s - urb->status = %d", __func__, urb->status);
 		if (urb->status == -EPROTO) {
 		if (urb->status == -EPROTO) {
 			/* reschedule needed */
 			/* reschedule needed */
 		}
 		}
 		return;
 		return;
 	}
 	}
 
 
-	dbg("%s - %i chars to write", __FUNCTION__, urb->actual_length);
+	dbg("%s - %i chars to write", __func__, urb->actual_length);
 	tty = port->tty;
 	tty = port->tty;
 	if (data == NULL)
 	if (data == NULL)
-		dbg("%s - data is NULL !!!", __FUNCTION__);
+		dbg("%s - data is NULL !!!", __func__);
 	if (tty && urb->actual_length && data) {
 	if (tty && urb->actual_length && data) {
 		tty_insert_flip_string(tty, data, urb->actual_length);
 		tty_insert_flip_string(tty, data, urb->actual_length);
 		tty_flip_buffer_push(tty);
 		tty_flip_buffer_push(tty);
@@ -647,7 +647,7 @@ static int iuu_bulk_write(struct usb_serial_port *port)
 	int result;
 	int result;
 	int i;
 	int i;
 	char *buf_ptr = port->write_urb->transfer_buffer;
 	char *buf_ptr = port->write_urb->transfer_buffer;
-	dbg("%s - enter", __FUNCTION__);
+	dbg("%s - enter", __func__);
 
 
 	*buf_ptr++ = IUU_UART_ESC;
 	*buf_ptr++ = IUU_UART_ESC;
 	*buf_ptr++ = IUU_UART_TX;
 	*buf_ptr++ = IUU_UART_TX;
@@ -660,7 +660,7 @@ static int iuu_bulk_write(struct usb_serial_port *port)
 			sprintf(priv->dbgbuf + i*2 ,
 			sprintf(priv->dbgbuf + i*2 ,
 				"%02X", priv->writebuf[i]);
 				"%02X", priv->writebuf[i]);
 		priv->dbgbuf[priv->writelen+i*2] = 0;
 		priv->dbgbuf[priv->writelen+i*2] = 0;
-		dbg("%s - writing %i chars : %s", __FUNCTION__,
+		dbg("%s - writing %i chars : %s", __func__,
 		    priv->writelen, priv->dbgbuf);
 		    priv->writelen, priv->dbgbuf);
 	}
 	}
 	usb_fill_bulk_urb(port->write_urb, port->serial->dev,
 	usb_fill_bulk_urb(port->write_urb, port->serial->dev,
@@ -679,7 +679,7 @@ static int iuu_bulk_write(struct usb_serial_port *port)
 static int iuu_read_buf(struct usb_serial_port *port, int len)
 static int iuu_read_buf(struct usb_serial_port *port, int len)
 {
 {
 	int result;
 	int result;
-	dbg("%s - enter", __FUNCTION__);
+	dbg("%s - enter", __func__);
 
 
 	usb_fill_bulk_urb(port->read_urb, port->serial->dev,
 	usb_fill_bulk_urb(port->read_urb, port->serial->dev,
 			  usb_rcvbulkpipe(port->serial->dev,
 			  usb_rcvbulkpipe(port->serial->dev,
@@ -701,21 +701,21 @@ static void iuu_uart_read_callback(struct urb *urb)
 	unsigned char *data = urb->transfer_buffer;
 	unsigned char *data = urb->transfer_buffer;
 	priv->poll++;
 	priv->poll++;
 
 
-	dbg("%s - enter", __FUNCTION__);
+	dbg("%s - enter", __func__);
 
 
 	if (urb->status) {
 	if (urb->status) {
-		dbg("%s - urb->status = %d", __FUNCTION__, urb->status);
+		dbg("%s - urb->status = %d", __func__, urb->status);
 		/* error stop all */
 		/* error stop all */
 		return;
 		return;
 	}
 	}
 	if (data == NULL)
 	if (data == NULL)
-		dbg("%s - data is NULL !!!", __FUNCTION__);
+		dbg("%s - data is NULL !!!", __func__);
 
 
 	if (urb->actual_length == 1  && data != NULL)
 	if (urb->actual_length == 1  && data != NULL)
 		len = (int) data[0];
 		len = (int) data[0];
 
 
 	if (urb->actual_length > 1) {
 	if (urb->actual_length > 1) {
-		dbg("%s - urb->actual_length = %i", __FUNCTION__,
+		dbg("%s - urb->actual_length = %i", __func__,
 		    urb->actual_length);
 		    urb->actual_length);
 		error = 1;
 		error = 1;
 		return;
 		return;
@@ -724,7 +724,7 @@ static void iuu_uart_read_callback(struct urb *urb)
 
 
 	if (len > 0 && error == 0) {
 	if (len > 0 && error == 0) {
 		dbg("%s - call read buf - len to read is %i ",
 		dbg("%s - call read buf - len to read is %i ",
-			__FUNCTION__, len);
+			__func__, len);
 		status = iuu_read_buf(port, len);
 		status = iuu_read_buf(port, len);
 		return;
 		return;
 	}
 	}
@@ -750,7 +750,7 @@ static void iuu_uart_read_callback(struct urb *urb)
 	}
 	}
 	spin_unlock_irqrestore(&priv->lock, flags);
 	spin_unlock_irqrestore(&priv->lock, flags);
 	/* if nothing to write call again rxcmd */
 	/* if nothing to write call again rxcmd */
-	dbg("%s - rxcmd recall", __FUNCTION__);
+	dbg("%s - rxcmd recall", __func__);
 	iuu_led_activity_off(urb);
 	iuu_led_activity_off(urb);
 	return;
 	return;
 }
 }
@@ -760,7 +760,7 @@ static int iuu_uart_write(struct usb_serial_port *port, const u8 *buf,
 {
 {
 	struct iuu_private *priv = usb_get_serial_port_data(port);
 	struct iuu_private *priv = usb_get_serial_port_data(port);
 	unsigned int flags;
 	unsigned int flags;
-	dbg("%s - enter", __FUNCTION__);
+	dbg("%s - enter", __func__);
 
 
 	if (count > 256)
 	if (count > 256)
 		return -ENOMEM;
 		return -ENOMEM;
@@ -783,12 +783,12 @@ static void read_rxcmd_callback(struct urb *urb)
 {
 {
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	int result;
 	int result;
-	dbg("%s - enter", __FUNCTION__);
+	dbg("%s - enter", __func__);
 
 
-	dbg("%s - urb->status = %d", __FUNCTION__, urb->status);
+	dbg("%s - urb->status = %d", __func__, urb->status);
 
 
 	if (urb->status) {
 	if (urb->status) {
-		dbg("%s - urb->status = %d", __FUNCTION__, urb->status);
+		dbg("%s - urb->status = %d", __func__, urb->status);
 		/* error stop all */
 		/* error stop all */
 		return;
 		return;
 	}
 	}
@@ -799,7 +799,7 @@ static void read_rxcmd_callback(struct urb *urb)
 			  port->read_urb->transfer_buffer, 256,
 			  port->read_urb->transfer_buffer, 256,
 			  iuu_uart_read_callback, port);
 			  iuu_uart_read_callback, port);
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
-	dbg("%s - submit result = %d", __FUNCTION__, result);
+	dbg("%s - submit result = %d", __func__, result);
 	return;
 	return;
 }
 }
 
 
@@ -820,13 +820,13 @@ static int iuu_uart_on(struct usb_serial_port *port)
 
 
 	status = bulk_immediate(port, buf, 4);
 	status = bulk_immediate(port, buf, 4);
 	if (status != IUU_OPERATION_OK) {
 	if (status != IUU_OPERATION_OK) {
-		dbg("%s - uart_on error", __FUNCTION__);
+		dbg("%s - uart_on error", __func__);
 		goto uart_enable_failed;
 		goto uart_enable_failed;
 	}
 	}
 	/*  iuu_reset() the card after iuu_uart_on() */
 	/*  iuu_reset() the card after iuu_uart_on() */
 	status = iuu_uart_flush(port);
 	status = iuu_uart_flush(port);
 	if (status != IUU_OPERATION_OK)
 	if (status != IUU_OPERATION_OK)
-		dbg("%s - uart_flush error", __FUNCTION__);
+		dbg("%s - uart_flush error", __func__);
 uart_enable_failed:
 uart_enable_failed:
 	kfree(buf);
 	kfree(buf);
 	return status;
 	return status;
@@ -844,7 +844,7 @@ static int iuu_uart_off(struct usb_serial_port *port)
 
 
 	status = bulk_immediate(port, buf, 1);
 	status = bulk_immediate(port, buf, 1);
 	if (status != IUU_OPERATION_OK)
 	if (status != IUU_OPERATION_OK)
-		dbg("%s - uart_off error", __FUNCTION__);
+		dbg("%s - uart_off error", __func__);
 
 
 	kfree(buf);
 	kfree(buf);
 	return status;
 	return status;
@@ -938,7 +938,7 @@ static int iuu_uart_baud(struct usb_serial_port *port, u32 baud,
 
 
 	status = bulk_immediate(port, dataout, DataCount);
 	status = bulk_immediate(port, dataout, DataCount);
 	if (status != IUU_OPERATION_OK)
 	if (status != IUU_OPERATION_OK)
-		dbg("%s - uart_off error", __FUNCTION__);
+		dbg("%s - uart_off error", __func__);
 	kfree(dataout);
 	kfree(dataout);
 	return status;
 	return status;
 }
 }
@@ -960,7 +960,7 @@ static void iuu_close(struct usb_serial_port *port, struct file *filp)
 	if (!serial)
 	if (!serial)
 		return;
 		return;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	iuu_uart_off(port);
 	iuu_uart_off(port);
 	if (serial->dev) {
 	if (serial->dev) {
@@ -977,7 +977,7 @@ static void iuu_close(struct usb_serial_port *port, struct file *filp)
 		}
 		}
 		/* free writebuf */
 		/* free writebuf */
 		/* shutdown our urbs */
 		/* shutdown our urbs */
-		dbg("%s - shutting down urbs", __FUNCTION__);
+		dbg("%s - shutting down urbs", __func__);
 		usb_kill_urb(port->write_urb);
 		usb_kill_urb(port->write_urb);
 		usb_kill_urb(port->read_urb);
 		usb_kill_urb(port->read_urb);
 		usb_kill_urb(port->interrupt_in_urb);
 		usb_kill_urb(port->interrupt_in_urb);
@@ -998,7 +998,7 @@ static int iuu_open(struct usb_serial_port *port, struct file *filp)
 	unsigned long flags;
 	unsigned long flags;
 	struct iuu_private *priv = usb_get_serial_port_data(port);
 	struct iuu_private *priv = usb_get_serial_port_data(port);
 
 
-	dbg("%s -  port %d", __FUNCTION__, port->number);
+	dbg("%s -  port %d", __func__, port->number);
 	usb_clear_halt(serial->dev, port->write_urb->pipe);
 	usb_clear_halt(serial->dev, port->write_urb->pipe);
 	usb_clear_halt(serial->dev, port->read_urb->pipe);
 	usb_clear_halt(serial->dev, port->read_urb->pipe);
 
 
@@ -1135,7 +1135,7 @@ static int iuu_open(struct usb_serial_port *port, struct file *filp)
 
 
 	iuu_uart_flush(port);
 	iuu_uart_flush(port);
 
 
-	dbg("%s - initialization done", __FUNCTION__);
+	dbg("%s - initialization done", __func__);
 
 
 	memset(port->write_urb->transfer_buffer, IUU_UART_RX, 1);
 	memset(port->write_urb->transfer_buffer, IUU_UART_RX, 1);
 	usb_fill_bulk_urb(port->write_urb, port->serial->dev,
 	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)
 
 
 	if (result) {
 	if (result) {
 		dev_err(&port->dev, "%s - failed submitting read urb,"
 		dev_err(&port->dev, "%s - failed submitting read urb,"
-			" error %d\n", __FUNCTION__, result);
+			" error %d\n", __func__, result);
 		iuu_close(port, NULL);
 		iuu_close(port, NULL);
 		return -EPROTO;
 		return -EPROTO;
 	} else {
 	} else {
-		dbg("%s - rxcmd OK", __FUNCTION__);
+		dbg("%s - rxcmd OK", __func__);
 	}
 	}
 	return result;
 	return result;
 }
 }

+ 117 - 117
drivers/usb/serial/keyspan.c

@@ -244,13 +244,13 @@ module_exit(keyspan_exit);
 
 
 static void keyspan_rx_throttle (struct usb_serial_port *port)
 static void keyspan_rx_throttle (struct usb_serial_port *port)
 {
 {
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 }
 }
 
 
 
 
 static void keyspan_rx_unthrottle (struct usb_serial_port *port)
 static void keyspan_rx_unthrottle (struct usb_serial_port *port)
 {
 {
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 }
 }
 
 
 
 
@@ -258,7 +258,7 @@ static void keyspan_break_ctl (struct usb_serial_port *port, int break_state)
 {
 {
 	struct keyspan_port_private 	*p_priv;
 	struct keyspan_port_private 	*p_priv;
 
 
- 	dbg("%s", __FUNCTION__);
+ 	dbg("%s", __func__);
 
 
 	p_priv = usb_get_serial_port_data(port);
 	p_priv = usb_get_serial_port_data(port);
 
 
@@ -280,7 +280,7 @@ static void keyspan_set_termios (struct usb_serial_port *port,
 	unsigned int 			cflag;
 	unsigned int 			cflag;
 	struct tty_struct		*tty = port->tty;
 	struct tty_struct		*tty = port->tty;
 
 
-	dbg("%s", __FUNCTION__); 
+	dbg("%s", __func__);
 
 
 	p_priv = usb_get_serial_port_data(port);
 	p_priv = usb_get_serial_port_data(port);
 	d_details = p_priv->device_details;
 	d_details = p_priv->device_details;
@@ -377,7 +377,7 @@ static int keyspan_write(struct usb_serial_port *port,
 	}
 	}
 	
 	
 	dbg("%s - for port %d (%d chars), flip=%d",
 	dbg("%s - for port %d (%d chars), flip=%d",
-	    __FUNCTION__, port->number, count, p_priv->out_flip);
+	    __func__, port->number, count, p_priv->out_flip);
 
 
 	for (left = count; left > 0; left -= todo) {
 	for (left = count; left > 0; left -= todo) {
 		todo = left;
 		todo = left;
@@ -389,11 +389,11 @@ static int keyspan_write(struct usb_serial_port *port,
 		/* Check we have a valid urb/endpoint before we use it... */
 		/* Check we have a valid urb/endpoint before we use it... */
 		if ((this_urb = p_priv->out_urbs[flip]) == NULL) {
 		if ((this_urb = p_priv->out_urbs[flip]) == NULL) {
 			/* no bulk out, so return 0 bytes written */
 			/* no bulk out, so return 0 bytes written */
-			dbg("%s - no output urb :(", __FUNCTION__);
+			dbg("%s - no output urb :(", __func__);
 			return count;
 			return count;
 		}
 		}
 
 
-		dbg("%s - endpoint %d flip %d", __FUNCTION__, usb_pipeendpoint(this_urb->pipe), flip);
+		dbg("%s - endpoint %d flip %d", __func__, usb_pipeendpoint(this_urb->pipe), flip);
 
 
 		if (this_urb->status == -EINPROGRESS) {
 		if (this_urb->status == -EINPROGRESS) {
 			if (time_before(jiffies, p_priv->tx_start_time[flip] + 10 * HZ))
 			if (time_before(jiffies, p_priv->tx_start_time[flip] + 10 * HZ))
@@ -435,13 +435,13 @@ static void	usa26_indat_callback(struct urb *urb)
 	unsigned char 		*data = urb->transfer_buffer;
 	unsigned char 		*data = urb->transfer_buffer;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg ("%s", __FUNCTION__); 
+	dbg ("%s", __func__);
 
 
 	endpoint = usb_pipeendpoint(urb->pipe);
 	endpoint = usb_pipeendpoint(urb->pipe);
 
 
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero status: %x on endpoint %d.",
 		dbg("%s - nonzero status: %x on endpoint %d.",
-		    __FUNCTION__, status, endpoint);
+		    __func__, status, endpoint);
 		return;
 		return;
 	}
 	}
 
 
@@ -459,7 +459,7 @@ static void	usa26_indat_callback(struct urb *urb)
 			}
 			}
 		} else {
 		} else {
 			/* some bytes had errors, every byte has status */
 			/* some bytes had errors, every byte has status */
-			dbg("%s - RX error!!!!", __FUNCTION__);
+			dbg("%s - RX error!!!!", __func__);
 			for (i = 0; i + 1 < urb->actual_length; i += 2) {
 			for (i = 0; i + 1 < urb->actual_length; i += 2) {
 				int stat = data[i], flag = 0;
 				int stat = data[i], flag = 0;
 				if (stat & RXERROR_OVERRUN)
 				if (stat & RXERROR_OVERRUN)
@@ -479,7 +479,7 @@ static void	usa26_indat_callback(struct urb *urb)
 	urb->dev = port->serial->dev;
 	urb->dev = port->serial->dev;
 	if (port->open_count)
 	if (port->open_count)
 		if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
 		if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
-			dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+			dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 		}
 		}
 	return;
 	return;
 }
 }
@@ -492,7 +492,7 @@ static void	usa2x_outdat_callback(struct urb *urb)
 
 
 	port = (struct usb_serial_port *) urb->context;
 	port = (struct usb_serial_port *) urb->context;
 	p_priv = usb_get_serial_port_data(port);
 	p_priv = usb_get_serial_port_data(port);
-	dbg ("%s - urb %d", __FUNCTION__, urb == p_priv->out_urbs[1]); 
+	dbg ("%s - urb %d", __func__, urb == p_priv->out_urbs[1]);
 
 
 	if (port->open_count)
 	if (port->open_count)
 		usb_serial_port_softint(port);
 		usb_serial_port_softint(port);
@@ -500,7 +500,7 @@ static void	usa2x_outdat_callback(struct urb *urb)
 
 
 static void	usa26_inack_callback(struct urb *urb)
 static void	usa26_inack_callback(struct urb *urb)
 {
 {
-	dbg ("%s", __FUNCTION__); 
+	dbg ("%s", __func__);
 	
 	
 }
 }
 
 
@@ -513,7 +513,7 @@ static void	usa26_outcont_callback(struct urb *urb)
 	p_priv = usb_get_serial_port_data(port);
 	p_priv = usb_get_serial_port_data(port);
 
 
 	if (p_priv->resend_cont) {
 	if (p_priv->resend_cont) {
-		dbg ("%s - sending setup", __FUNCTION__); 
+		dbg ("%s - sending setup", __func__);
 		keyspan_usa26_send_setup(port->serial, port, p_priv->resend_cont - 1);
 		keyspan_usa26_send_setup(port->serial, port, p_priv->resend_cont - 1);
 	}
 	}
 }
 }
@@ -531,11 +531,11 @@ static void	usa26_instat_callback(struct urb *urb)
 	serial = (struct usb_serial *) urb->context;
 	serial = (struct usb_serial *) urb->context;
 
 
 	if (status) {
 	if (status) {
-		dbg("%s - nonzero status: %x", __FUNCTION__, status);
+		dbg("%s - nonzero status: %x", __func__, status);
 		return;
 		return;
 	}
 	}
 	if (urb->actual_length != 9) {
 	if (urb->actual_length != 9) {
-		dbg("%s - %d byte report??", __FUNCTION__, urb->actual_length);
+		dbg("%s - %d byte report??", __func__, urb->actual_length);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -543,7 +543,7 @@ static void	usa26_instat_callback(struct urb *urb)
 
 
 #if 0
 #if 0
 	dbg("%s - port status: port %d cts %d dcd %d dsr %d ri %d toff %d txoff %d rxen %d cr %d",
 	dbg("%s - port status: port %d cts %d dcd %d dsr %d ri %d toff %d txoff %d rxen %d cr %d",
-	    __FUNCTION__, msg->port, msg->hskia_cts, msg->gpia_dcd, msg->dsr, msg->ri, msg->_txOff,
+	    __func__, msg->port, msg->hskia_cts, msg->gpia_dcd, msg->dsr, msg->ri, msg->_txOff,
 	    msg->_txXoff, msg->rxEnabled, msg->controlResponse);
 	    msg->_txXoff, msg->rxEnabled, msg->controlResponse);
 #endif
 #endif
 
 
@@ -552,7 +552,7 @@ static void	usa26_instat_callback(struct urb *urb)
 
 
 	/* Check port number from message and retrieve private data */	
 	/* Check port number from message and retrieve private data */	
 	if (msg->port >= serial->num_ports) {
 	if (msg->port >= serial->num_ports) {
-		dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port);
+		dbg ("%s - Unexpected port number %d", __func__, msg->port);
 		goto exit;
 		goto exit;
 	}
 	}
 	port = serial->port[msg->port];
 	port = serial->port[msg->port];
@@ -576,14 +576,14 @@ static void	usa26_instat_callback(struct urb *urb)
 	/* Resubmit urb so we continue receiving */
 	/* Resubmit urb so we continue receiving */
 	urb->dev = serial->dev;
 	urb->dev = serial->dev;
 	if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
 	if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
-		dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+		dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 	}
 	}
 exit: ;
 exit: ;
 }
 }
 
 
 static void	usa26_glocont_callback(struct urb *urb)
 static void	usa26_glocont_callback(struct urb *urb)
 {
 {
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 	
 	
 }
 }
 
 
@@ -597,7 +597,7 @@ static void usa28_indat_callback(struct urb *urb)
 	struct keyspan_port_private             *p_priv;
 	struct keyspan_port_private             *p_priv;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	port = (struct usb_serial_port *) urb->context;
 	port = (struct usb_serial_port *) urb->context;
 	p_priv = usb_get_serial_port_data(port);
 	p_priv = usb_get_serial_port_data(port);
@@ -609,7 +609,7 @@ static void usa28_indat_callback(struct urb *urb)
 	do {
 	do {
 		if (status) {
 		if (status) {
 			dbg("%s - nonzero status: %x on endpoint %d.",
 			dbg("%s - nonzero status: %x on endpoint %d.",
-			    __FUNCTION__, status, usb_pipeendpoint(urb->pipe));
+			    __func__, status, usb_pipeendpoint(urb->pipe));
 			return;
 			return;
 		}
 		}
 
 
@@ -629,7 +629,7 @@ static void usa28_indat_callback(struct urb *urb)
 		urb->dev = port->serial->dev;
 		urb->dev = port->serial->dev;
 		if (port->open_count)
 		if (port->open_count)
 			if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
 			if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
-				dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+				dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 			}
 			}
 		p_priv->in_flip ^= 1;
 		p_priv->in_flip ^= 1;
 
 
@@ -639,7 +639,7 @@ static void usa28_indat_callback(struct urb *urb)
 
 
 static void	usa28_inack_callback(struct urb *urb)
 static void	usa28_inack_callback(struct urb *urb)
 {
 {
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 }
 }
 
 
 static void	usa28_outcont_callback(struct urb *urb)
 static void	usa28_outcont_callback(struct urb *urb)
@@ -651,7 +651,7 @@ static void	usa28_outcont_callback(struct urb *urb)
 	p_priv = usb_get_serial_port_data(port);
 	p_priv = usb_get_serial_port_data(port);
 
 
 	if (p_priv->resend_cont) {
 	if (p_priv->resend_cont) {
-		dbg ("%s - sending setup", __FUNCTION__);
+		dbg ("%s - sending setup", __func__);
 		keyspan_usa28_send_setup(port->serial, port, p_priv->resend_cont - 1);
 		keyspan_usa28_send_setup(port->serial, port, p_priv->resend_cont - 1);
 	}
 	}
 }
 }
@@ -670,16 +670,16 @@ static void	usa28_instat_callback(struct urb *urb)
 	serial = (struct usb_serial *) urb->context;
 	serial = (struct usb_serial *) urb->context;
 
 
 	if (status) {
 	if (status) {
-		dbg("%s - nonzero status: %x", __FUNCTION__, status);
+		dbg("%s - nonzero status: %x", __func__, status);
 		return;
 		return;
 	}
 	}
 
 
 	if (urb->actual_length != sizeof(struct keyspan_usa28_portStatusMessage)) {
 	if (urb->actual_length != sizeof(struct keyspan_usa28_portStatusMessage)) {
-		dbg("%s - bad length %d", __FUNCTION__, urb->actual_length);
+		dbg("%s - bad length %d", __func__, urb->actual_length);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
-	/*dbg("%s %x %x %x %x %x %x %x %x %x %x %x %x", __FUNCTION__
+	/*dbg("%s %x %x %x %x %x %x %x %x %x %x %x %x", __func__
 	    data[0], data[1], data[2], data[3], data[4], data[5],
 	    data[0], data[1], data[2], data[3], data[4], data[5],
 	    data[6], data[7], data[8], data[9], data[10], data[11]);*/
 	    data[6], data[7], data[8], data[9], data[10], data[11]);*/
 	
 	
@@ -689,7 +689,7 @@ static void	usa28_instat_callback(struct urb *urb)
 
 
 		/* Check port number from message and retrieve private data */	
 		/* Check port number from message and retrieve private data */	
 	if (msg->port >= serial->num_ports) {
 	if (msg->port >= serial->num_ports) {
-		dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port);
+		dbg ("%s - Unexpected port number %d", __func__, msg->port);
 		goto exit;
 		goto exit;
 	}
 	}
 	port = serial->port[msg->port];
 	port = serial->port[msg->port];
@@ -713,14 +713,14 @@ static void	usa28_instat_callback(struct urb *urb)
 		/* Resubmit urb so we continue receiving */
 		/* Resubmit urb so we continue receiving */
 	urb->dev = serial->dev;
 	urb->dev = serial->dev;
 	if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
 	if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
-		dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+		dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 	}
 	}
 exit: ;
 exit: ;
 }
 }
 
 
 static void	usa28_glocont_callback(struct urb *urb)
 static void	usa28_glocont_callback(struct urb *urb)
 {
 {
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 }
 }
 
 
 
 
@@ -731,7 +731,7 @@ static void	usa49_glocont_callback(struct urb *urb)
 	struct keyspan_port_private *p_priv;
 	struct keyspan_port_private *p_priv;
 	int i;
 	int i;
 
 
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	serial = (struct usb_serial *) urb->context;
 	serial = (struct usb_serial *) urb->context;
 	for (i = 0; i < serial->num_ports; ++i) {
 	for (i = 0; i < serial->num_ports; ++i) {
@@ -739,7 +739,7 @@ static void	usa49_glocont_callback(struct urb *urb)
 		p_priv = usb_get_serial_port_data(port);
 		p_priv = usb_get_serial_port_data(port);
 
 
 		if (p_priv->resend_cont) {
 		if (p_priv->resend_cont) {
-			dbg ("%s - sending setup", __FUNCTION__); 
+			dbg ("%s - sending setup", __func__);
 			keyspan_usa49_send_setup(serial, port, p_priv->resend_cont - 1);
 			keyspan_usa49_send_setup(serial, port, p_priv->resend_cont - 1);
 			break;
 			break;
 		}
 		}
@@ -759,21 +759,21 @@ static void	usa49_instat_callback(struct urb *urb)
 	int old_dcd_state;
 	int old_dcd_state;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	serial = (struct usb_serial *) urb->context;
 	serial = (struct usb_serial *) urb->context;
 
 
 	if (status) {
 	if (status) {
-		dbg("%s - nonzero status: %x", __FUNCTION__, status);
+		dbg("%s - nonzero status: %x", __func__, status);
 		return;
 		return;
 	}
 	}
 
 
 	if (urb->actual_length != sizeof(struct keyspan_usa49_portStatusMessage)) {
 	if (urb->actual_length != sizeof(struct keyspan_usa49_portStatusMessage)) {
-		dbg("%s - bad length %d", __FUNCTION__, urb->actual_length);
+		dbg("%s - bad length %d", __func__, urb->actual_length);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
-	/*dbg(" %x %x %x %x %x %x %x %x %x %x %x", __FUNCTION__, 
+	/*dbg(" %x %x %x %x %x %x %x %x %x %x %x", __func__,
 	    data[0], data[1], data[2], data[3], data[4], data[5],
 	    data[0], data[1], data[2], data[3], data[4], data[5],
 	    data[6], data[7], data[8], data[9], data[10]);*/
 	    data[6], data[7], data[8], data[9], data[10]);*/
 	
 	
@@ -782,7 +782,7 @@ static void	usa49_instat_callback(struct urb *urb)
 
 
 		/* Check port number from message and retrieve private data */	
 		/* Check port number from message and retrieve private data */	
 	if (msg->portNumber >= serial->num_ports) {
 	if (msg->portNumber >= serial->num_ports) {
-		dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->portNumber);
+		dbg ("%s - Unexpected port number %d", __func__, msg->portNumber);
 		goto exit;
 		goto exit;
 	}
 	}
 	port = serial->port[msg->portNumber];
 	port = serial->port[msg->portNumber];
@@ -807,14 +807,14 @@ static void	usa49_instat_callback(struct urb *urb)
 	urb->dev = serial->dev;
 	urb->dev = serial->dev;
 
 
 	if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
 	if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
-		dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+		dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 	}
 	}
 exit:	;
 exit:	;
 }
 }
 
 
 static void	usa49_inack_callback(struct urb *urb)
 static void	usa49_inack_callback(struct urb *urb)
 {
 {
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 }
 }
 
 
 static void	usa49_indat_callback(struct urb *urb)
 static void	usa49_indat_callback(struct urb *urb)
@@ -826,12 +826,12 @@ static void	usa49_indat_callback(struct urb *urb)
 	unsigned char 		*data = urb->transfer_buffer;
 	unsigned char 		*data = urb->transfer_buffer;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	endpoint = usb_pipeendpoint(urb->pipe);
 	endpoint = usb_pipeendpoint(urb->pipe);
 
 
 	if (status) {
 	if (status) {
-		dbg("%s - nonzero status: %x on endpoint %d.", __FUNCTION__,
+		dbg("%s - nonzero status: %x on endpoint %d.", __func__,
 		    status, endpoint);
 		    status, endpoint);
 		return;
 		return;
 	}
 	}
@@ -866,7 +866,7 @@ static void	usa49_indat_callback(struct urb *urb)
 	urb->dev = port->serial->dev;
 	urb->dev = port->serial->dev;
 	if (port->open_count)
 	if (port->open_count)
 		if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
 		if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
-			dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+			dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 		}
 		}
 }
 }
 
 
@@ -879,12 +879,12 @@ static void usa49wg_indat_callback(struct urb *urb)
 	unsigned char 		*data = urb->transfer_buffer;
 	unsigned char 		*data = urb->transfer_buffer;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	serial = urb->context;
 	serial = urb->context;
 
 
 	if (status) {
 	if (status) {
-		dbg("%s - nonzero status: %x", __FUNCTION__, status);
+		dbg("%s - nonzero status: %x", __func__, status);
 		return;
 		return;
 	}
 	}
 
 
@@ -898,7 +898,7 @@ static void usa49wg_indat_callback(struct urb *urb)
 			/* Check port number from message*/
 			/* Check port number from message*/
 			if (data[i] >= serial->num_ports) {
 			if (data[i] >= serial->num_ports) {
 				dbg ("%s - Unexpected port number %d",
 				dbg ("%s - Unexpected port number %d",
-					__FUNCTION__, data[i]);
+					__func__, data[i]);
 				return;
 				return;
 			}
 			}
 			port = serial->port[data[i++]];
 			port = serial->port[data[i++]];
@@ -944,13 +944,13 @@ static void usa49wg_indat_callback(struct urb *urb)
 
 
 	err = usb_submit_urb(urb, GFP_ATOMIC);
 	err = usb_submit_urb(urb, GFP_ATOMIC);
 	if (err != 0)
 	if (err != 0)
-		dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+		dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 }
 }
 
 
 /* not used, usa-49 doesn't have per-port control endpoints */
 /* not used, usa-49 doesn't have per-port control endpoints */
 static void usa49_outcont_callback(struct urb *urb)
 static void usa49_outcont_callback(struct urb *urb)
 {
 {
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 }
 }
 
 
 static void usa90_indat_callback(struct urb *urb)
 static void usa90_indat_callback(struct urb *urb)
@@ -963,13 +963,13 @@ static void usa90_indat_callback(struct urb *urb)
 	unsigned char 		*data = urb->transfer_buffer;
 	unsigned char 		*data = urb->transfer_buffer;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg ("%s", __FUNCTION__); 
+	dbg ("%s", __func__);
 
 
 	endpoint = usb_pipeendpoint(urb->pipe);
 	endpoint = usb_pipeendpoint(urb->pipe);
 
 
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero status: %x on endpoint %d.",
 		dbg("%s - nonzero status: %x on endpoint %d.",
-		    __FUNCTION__, status, endpoint);
+		    __func__, status, endpoint);
 		return;
 		return;
 	}
 	}
 
 
@@ -1000,7 +1000,7 @@ static void usa90_indat_callback(struct urb *urb)
 			} 
 			} 
 			else {
 			else {
 			/* some bytes had errors, every byte has status */
 			/* some bytes had errors, every byte has status */
-				dbg("%s - RX error!!!!", __FUNCTION__);
+				dbg("%s - RX error!!!!", __func__);
 				for (i = 0; i + 1 < urb->actual_length; i += 2) {
 				for (i = 0; i + 1 < urb->actual_length; i += 2) {
 					int stat = data[i], flag = 0;
 					int stat = data[i], flag = 0;
 					if (stat & RXERROR_OVERRUN)
 					if (stat & RXERROR_OVERRUN)
@@ -1021,7 +1021,7 @@ static void usa90_indat_callback(struct urb *urb)
 	urb->dev = port->serial->dev;
 	urb->dev = port->serial->dev;
 	if (port->open_count)
 	if (port->open_count)
 		if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
 		if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
-			dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+			dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 		}
 		}
 	return;
 	return;
 }
 }
@@ -1040,11 +1040,11 @@ static void	usa90_instat_callback(struct urb *urb)
 	serial = (struct usb_serial *) urb->context;
 	serial = (struct usb_serial *) urb->context;
 
 
 	if (status) {
 	if (status) {
-		dbg("%s - nonzero status: %x", __FUNCTION__, status);
+		dbg("%s - nonzero status: %x", __func__, status);
 		return;
 		return;
 	}
 	}
 	if (urb->actual_length < 14) {
 	if (urb->actual_length < 14) {
-		dbg("%s - %d byte report??", __FUNCTION__, urb->actual_length);
+		dbg("%s - %d byte report??", __func__, urb->actual_length);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -1073,7 +1073,7 @@ static void	usa90_instat_callback(struct urb *urb)
 	/* Resubmit urb so we continue receiving */
 	/* Resubmit urb so we continue receiving */
 	urb->dev = serial->dev;
 	urb->dev = serial->dev;
 	if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
 	if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
-		dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+		dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 	}
 	}
 exit:
 exit:
 	;
 	;
@@ -1088,7 +1088,7 @@ static void	usa90_outcont_callback(struct urb *urb)
 	p_priv = usb_get_serial_port_data(port);
 	p_priv = usb_get_serial_port_data(port);
 
 
 	if (p_priv->resend_cont) {
 	if (p_priv->resend_cont) {
-		dbg ("%s - sending setup", __FUNCTION__); 
+		dbg ("%s - sending setup", __func__);
 		keyspan_usa90_send_setup(port->serial, port, p_priv->resend_cont - 1);
 		keyspan_usa90_send_setup(port->serial, port, p_priv->resend_cont - 1);
 	}
 	}
 }
 }
@@ -1105,17 +1105,17 @@ static void	usa67_instat_callback(struct urb *urb)
 	int old_dcd_state;
 	int old_dcd_state;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	serial = urb->context;
 	serial = urb->context;
 
 
 	if (status) {
 	if (status) {
-		dbg("%s - nonzero status: %x", __FUNCTION__, status);
+		dbg("%s - nonzero status: %x", __func__, status);
 		return;
 		return;
 	}
 	}
 
 
 	if (urb->actual_length != sizeof(struct keyspan_usa67_portStatusMessage)) {
 	if (urb->actual_length != sizeof(struct keyspan_usa67_portStatusMessage)) {
-		dbg("%s - bad length %d", __FUNCTION__, urb->actual_length);
+		dbg("%s - bad length %d", __func__, urb->actual_length);
 		return;
 		return;
 	}
 	}
 
 
@@ -1125,7 +1125,7 @@ static void	usa67_instat_callback(struct urb *urb)
 
 
 	/* Check port number from message and retrieve private data */
 	/* Check port number from message and retrieve private data */
 	if (msg->port >= serial->num_ports) {
 	if (msg->port >= serial->num_ports) {
-		dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port);
+		dbg ("%s - Unexpected port number %d", __func__, msg->port);
 		return;
 		return;
 	}
 	}
 
 
@@ -1149,7 +1149,7 @@ static void	usa67_instat_callback(struct urb *urb)
 	urb->dev = serial->dev;
 	urb->dev = serial->dev;
 	err = usb_submit_urb(urb, GFP_ATOMIC);
 	err = usb_submit_urb(urb, GFP_ATOMIC);
 	if (err != 0)
 	if (err != 0)
-		dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
+		dbg("%s - resubmit read urb failed. (%d)", __func__, err);
 }
 }
 
 
 static void usa67_glocont_callback(struct urb *urb)
 static void usa67_glocont_callback(struct urb *urb)
@@ -1159,7 +1159,7 @@ static void usa67_glocont_callback(struct urb *urb)
 	struct keyspan_port_private *p_priv;
 	struct keyspan_port_private *p_priv;
 	int i;
 	int i;
 
 
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	serial = urb->context;
 	serial = urb->context;
 	for (i = 0; i < serial->num_ports; ++i) {
 	for (i = 0; i < serial->num_ports; ++i) {
@@ -1167,7 +1167,7 @@ static void usa67_glocont_callback(struct urb *urb)
 		p_priv = usb_get_serial_port_data(port);
 		p_priv = usb_get_serial_port_data(port);
 
 
 		if (p_priv->resend_cont) {
 		if (p_priv->resend_cont) {
-			dbg ("%s - sending setup", __FUNCTION__);
+			dbg ("%s - sending setup", __func__);
 			keyspan_usa67_send_setup(serial, port,
 			keyspan_usa67_send_setup(serial, port,
 						p_priv->resend_cont - 1);
 						p_priv->resend_cont - 1);
 			break;
 			break;
@@ -1183,7 +1183,7 @@ static int keyspan_write_room (struct usb_serial_port *port)
 	int				data_len;
 	int				data_len;
 	struct urb			*this_urb;
 	struct urb			*this_urb;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 	p_priv = usb_get_serial_port_data(port);
 	p_priv = usb_get_serial_port_data(port);
 	d_details = p_priv->device_details;
 	d_details = p_priv->device_details;
 
 
@@ -1228,7 +1228,7 @@ static int keyspan_open (struct usb_serial_port *port, struct file *filp)
 	p_priv = usb_get_serial_port_data(port);
 	p_priv = usb_get_serial_port_data(port);
 	d_details = p_priv->device_details;
 	d_details = p_priv->device_details;
 
 
-	dbg("%s - port%d.", __FUNCTION__, port->number);
+	dbg("%s - port%d.", __func__, port->number);
 
 
 	/* Set some sane defaults */
 	/* Set some sane defaults */
 	p_priv->rts_state = 1;
 	p_priv->rts_state = 1;
@@ -1253,7 +1253,7 @@ static int keyspan_open (struct usb_serial_port *port, struct file *filp)
 		usb_clear_halt(urb->dev, urb->pipe);
 		usb_clear_halt(urb->dev, urb->pipe);
 
 
 		if ((err = usb_submit_urb(urb, GFP_KERNEL)) != 0) {
 		if ((err = usb_submit_urb(urb, GFP_KERNEL)) != 0) {
-			dbg("%s - submit urb %d failed (%d)", __FUNCTION__, i, err);
+			dbg("%s - submit urb %d failed (%d)", __func__, i, err);
 		}
 		}
 	}
 	}
 
 
@@ -1305,7 +1305,7 @@ static void keyspan_close(struct usb_serial_port *port, struct file *filp)
 	struct keyspan_serial_private 	*s_priv;
 	struct keyspan_serial_private 	*s_priv;
 	struct keyspan_port_private 	*p_priv;
 	struct keyspan_port_private 	*p_priv;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 	s_priv = usb_get_serial_data(serial);
 	s_priv = usb_get_serial_data(serial);
 	p_priv = usb_get_serial_port_data(port);
 	p_priv = usb_get_serial_port_data(port);
 	
 	
@@ -1320,7 +1320,7 @@ static void keyspan_close(struct usb_serial_port *port, struct file *filp)
 	}
 	}
 
 
 	/*while (p_priv->outcont_urb->status == -EINPROGRESS) {
 	/*while (p_priv->outcont_urb->status == -EINPROGRESS) {
-		dbg("%s - urb in progress", __FUNCTION__);
+		dbg("%s - urb in progress", __func__);
 	}*/
 	}*/
 
 
 	p_priv->out_flip = 0;
 	p_priv->out_flip = 0;
@@ -1484,10 +1484,10 @@ static struct urb *keyspan_setup_urb (struct usb_serial *serial, int endpoint,
 	if (endpoint == -1)
 	if (endpoint == -1)
 		return NULL;		/* endpoint not needed */
 		return NULL;		/* endpoint not needed */
 
 
-	dbg ("%s - alloc for endpoint %d.", __FUNCTION__, endpoint);
+	dbg ("%s - alloc for endpoint %d.", __func__, endpoint);
 	urb = usb_alloc_urb(0, GFP_KERNEL);		/* No ISO */
 	urb = usb_alloc_urb(0, GFP_KERNEL);		/* No ISO */
 	if (urb == NULL) {
 	if (urb == NULL) {
-		dbg ("%s - alloc for endpoint %d failed.", __FUNCTION__, endpoint);
+		dbg ("%s - alloc for endpoint %d failed.", __func__, endpoint);
 		return NULL;
 		return NULL;
 	}
 	}
 
 
@@ -1588,7 +1588,7 @@ static void keyspan_setup_urbs(struct usb_serial *serial)
 	struct callbacks		*cback;
 	struct callbacks		*cback;
 	int				endp;
 	int				endp;
 
 
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	s_priv = usb_get_serial_data(serial);
 	s_priv = usb_get_serial_data(serial);
 	d_details = s_priv->device_details;
 	d_details = s_priv->device_details;
@@ -1662,7 +1662,7 @@ static int keyspan_usa19_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
 		div,	/* divisor */	
 		div,	/* divisor */	
 		cnt;	/* inverse of divisor (programmed into 8051) */
 		cnt;	/* inverse of divisor (programmed into 8051) */
 		
 		
-	dbg ("%s - %d.", __FUNCTION__, baud_rate);
+	dbg ("%s - %d.", __func__, baud_rate);
 
 
 		/* prevent divide by zero...  */
 		/* prevent divide by zero...  */
 	if( (b16 = (baud_rate * 16L)) == 0) {
 	if( (b16 = (baud_rate * 16L)) == 0) {
@@ -1695,7 +1695,7 @@ static int keyspan_usa19_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
 		*rate_hi = (u8) ((cnt >> 8) & 0xff);
 		*rate_hi = (u8) ((cnt >> 8) & 0xff);
 	}
 	}
 	if (rate_low && rate_hi) {
 	if (rate_low && rate_hi) {
-		dbg ("%s - %d %02x %02x.", __FUNCTION__, baud_rate, *rate_hi, *rate_low);
+		dbg ("%s - %d %02x %02x.", __func__, baud_rate, *rate_hi, *rate_low);
 	}
 	}
 	
 	
 	return (KEYSPAN_BAUD_RATE_OK);
 	return (KEYSPAN_BAUD_RATE_OK);
@@ -1708,7 +1708,7 @@ static int keyspan_usa19hs_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
 	u32 	b16,	/* baud rate times 16 (actual rate used internally) */
 	u32 	b16,	/* baud rate times 16 (actual rate used internally) */
 			div;	/* divisor */	
 			div;	/* divisor */	
 		
 		
-	dbg ("%s - %d.", __FUNCTION__, baud_rate);
+	dbg ("%s - %d.", __func__, baud_rate);
 
 
 		/* prevent divide by zero...  */
 		/* prevent divide by zero...  */
 	if( (b16 = (baud_rate * 16L)) == 0) 
 	if( (b16 = (baud_rate * 16L)) == 0) 
@@ -1731,7 +1731,7 @@ static int keyspan_usa19hs_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
 		*rate_hi = (u8) ((div >> 8) & 0xff);
 		*rate_hi = (u8) ((div >> 8) & 0xff);
 	
 	
 	if (rate_low && rate_hi) 
 	if (rate_low && rate_hi) 
-		dbg ("%s - %d %02x %02x.", __FUNCTION__, baud_rate, *rate_hi, *rate_low);
+		dbg ("%s - %d %02x %02x.", __func__, baud_rate, *rate_hi, *rate_low);
 	
 	
 	return (KEYSPAN_BAUD_RATE_OK);
 	return (KEYSPAN_BAUD_RATE_OK);
 }
 }
@@ -1748,7 +1748,7 @@ static int keyspan_usa19w_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
 	u8	best_prescaler;
 	u8	best_prescaler;
 	int	i;
 	int	i;
 
 
-	dbg ("%s - %d.", __FUNCTION__, baud_rate);
+	dbg ("%s - %d.", __func__, baud_rate);
 
 
 		/* prevent divide by zero */
 		/* prevent divide by zero */
 	if( (b16 = baud_rate * 16L) == 0) {
 	if( (b16 = baud_rate * 16L) == 0) {
@@ -1796,7 +1796,7 @@ static int keyspan_usa19w_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
 	}
 	}
 	if (prescaler) {
 	if (prescaler) {
 		*prescaler = best_prescaler;
 		*prescaler = best_prescaler;
-		/*  dbg("%s - %d %d", __FUNCTION__, *prescaler, div); */
+		/*  dbg("%s - %d %d", __func__, *prescaler, div); */
 	}
 	}
 	return (KEYSPAN_BAUD_RATE_OK);
 	return (KEYSPAN_BAUD_RATE_OK);
 }
 }
@@ -1809,7 +1809,7 @@ static int keyspan_usa28_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
 		div,	/* divisor */	
 		div,	/* divisor */	
 		cnt;	/* inverse of divisor (programmed into 8051) */
 		cnt;	/* inverse of divisor (programmed into 8051) */
 
 
-	dbg ("%s - %d.", __FUNCTION__, baud_rate);
+	dbg ("%s - %d.", __func__, baud_rate);
 
 
 		/* prevent divide by zero */
 		/* prevent divide by zero */
 	if ((b16 = baud_rate * 16L) == 0)
 	if ((b16 = baud_rate * 16L) == 0)
@@ -1848,7 +1848,7 @@ static int keyspan_usa28_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
 	if (rate_hi) {
 	if (rate_hi) {
 		*rate_hi = (u8) ((cnt >> 8) & 0xff);
 		*rate_hi = (u8) ((cnt >> 8) & 0xff);
 	}
 	}
-	dbg ("%s - %d OK.", __FUNCTION__, baud_rate);
+	dbg ("%s - %d OK.", __func__, baud_rate);
 	return (KEYSPAN_BAUD_RATE_OK);
 	return (KEYSPAN_BAUD_RATE_OK);
 }
 }
 
 
@@ -1864,7 +1864,7 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
 	struct urb				*this_urb;
 	struct urb				*this_urb;
 	int 					device_port, err;
 	int 					device_port, err;
 
 
-	dbg ("%s reset=%d", __FUNCTION__, reset_port); 
+	dbg ("%s reset=%d", __func__, reset_port);
 
 
 	s_priv = usb_get_serial_data(serial);
 	s_priv = usb_get_serial_data(serial);
 	p_priv = usb_get_serial_port_data(port);
 	p_priv = usb_get_serial_port_data(port);
@@ -1874,11 +1874,11 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
 	outcont_urb = d_details->outcont_endpoints[port->number];
 	outcont_urb = d_details->outcont_endpoints[port->number];
 	this_urb = p_priv->outcont_urb;
 	this_urb = p_priv->outcont_urb;
 
 
-	dbg("%s - endpoint %d", __FUNCTION__, usb_pipeendpoint(this_urb->pipe));
+	dbg("%s - endpoint %d", __func__, usb_pipeendpoint(this_urb->pipe));
 
 
 		/* Make sure we have an urb then send the message */
 		/* Make sure we have an urb then send the message */
 	if (this_urb == NULL) {
 	if (this_urb == NULL) {
-		dbg("%s - oops no urb.", __FUNCTION__);
+		dbg("%s - oops no urb.", __func__);
 		return -1;
 		return -1;
 	}
 	}
 
 
@@ -1887,7 +1887,7 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
 	if ((reset_port + 1) > p_priv->resend_cont)
 	if ((reset_port + 1) > p_priv->resend_cont)
 		p_priv->resend_cont = reset_port + 1;
 		p_priv->resend_cont = reset_port + 1;
 	if (this_urb->status == -EINPROGRESS) {
 	if (this_urb->status == -EINPROGRESS) {
-		/*  dbg ("%s - already writing", __FUNCTION__); */
+		/*  dbg ("%s - already writing", __func__); */
 		mdelay(5);
 		mdelay(5);
 		return(-1);
 		return(-1);
 	}
 	}
@@ -1901,7 +1901,7 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
 		if (d_details->calculate_baud_rate
 		if (d_details->calculate_baud_rate
 		    (p_priv->baud, d_details->baudclk, &msg.baudHi,
 		    (p_priv->baud, d_details->baudclk, &msg.baudHi,
 		     &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
 		     &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
-			dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__,
+			dbg("%s - Invalid baud rate %d requested, using 9600.", __func__,
 			    p_priv->baud);
 			    p_priv->baud);
 			msg.baudLo = 0;
 			msg.baudLo = 0;
 			msg.baudHi = 125;	/* Values for 9600 baud */
 			msg.baudHi = 125;	/* Values for 9600 baud */
@@ -1996,11 +1996,11 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
 
 
 	this_urb->dev = serial->dev;
 	this_urb->dev = serial->dev;
 	if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
 	if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
-		dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, err);
+		dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err);
 	}
 	}
 #if 0
 #if 0
 	else {
 	else {
-		dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __FUNCTION__
+		dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __func__
 		    outcont_urb, this_urb->transfer_buffer_length,
 		    outcont_urb, this_urb->transfer_buffer_length,
 		    usb_pipeendpoint(this_urb->pipe));
 		    usb_pipeendpoint(this_urb->pipe));
 	}
 	}
@@ -2020,7 +2020,7 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
 	struct urb				*this_urb;
 	struct urb				*this_urb;
 	int 					device_port, err;
 	int 					device_port, err;
 
 
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	s_priv = usb_get_serial_data(serial);
 	s_priv = usb_get_serial_data(serial);
 	p_priv = usb_get_serial_port_data(port);
 	p_priv = usb_get_serial_port_data(port);
@@ -2029,7 +2029,7 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
 
 
 	/* only do something if we have a bulk out endpoint */
 	/* only do something if we have a bulk out endpoint */
 	if ((this_urb = p_priv->outcont_urb) == NULL) {
 	if ((this_urb = p_priv->outcont_urb) == NULL) {
-		dbg("%s - oops no urb.", __FUNCTION__);
+		dbg("%s - oops no urb.", __func__);
 		return -1;
 		return -1;
 	}
 	}
 
 
@@ -2038,7 +2038,7 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
 	if ((reset_port + 1) > p_priv->resend_cont)
 	if ((reset_port + 1) > p_priv->resend_cont)
 		p_priv->resend_cont = reset_port + 1;
 		p_priv->resend_cont = reset_port + 1;
 	if (this_urb->status == -EINPROGRESS) {
 	if (this_urb->status == -EINPROGRESS) {
-		dbg ("%s already writing", __FUNCTION__);
+		dbg ("%s already writing", __func__);
 		mdelay(5);
 		mdelay(5);
 		return(-1);
 		return(-1);
 	}
 	}
@@ -2048,7 +2048,7 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
 	msg.setBaudRate = 1;
 	msg.setBaudRate = 1;
 	if (d_details->calculate_baud_rate(p_priv->baud, d_details->baudclk,
 	if (d_details->calculate_baud_rate(p_priv->baud, d_details->baudclk,
 		&msg.baudHi, &msg.baudLo, NULL, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
 		&msg.baudHi, &msg.baudLo, NULL, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
-		dbg("%s - Invalid baud rate requested %d.", __FUNCTION__, p_priv->baud);
+		dbg("%s - Invalid baud rate requested %d.", __func__, p_priv->baud);
 		msg.baudLo = 0xff;
 		msg.baudLo = 0xff;
 		msg.baudHi = 0xb2;	/* Values for 9600 baud */
 		msg.baudHi = 0xb2;	/* Values for 9600 baud */
 	}
 	}
@@ -2122,11 +2122,11 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
 
 
 	this_urb->dev = serial->dev;
 	this_urb->dev = serial->dev;
 	if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
 	if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
-		dbg("%s - usb_submit_urb(setup) failed", __FUNCTION__);
+		dbg("%s - usb_submit_urb(setup) failed", __func__);
 	}
 	}
 #if 0
 #if 0
 	else {
 	else {
-		dbg("%s - usb_submit_urb(setup) OK %d bytes", __FUNCTION__,
+		dbg("%s - usb_submit_urb(setup) OK %d bytes", __func__,
 		    this_urb->transfer_buffer_length);
 		    this_urb->transfer_buffer_length);
 	}
 	}
 #endif
 #endif
@@ -2146,7 +2146,7 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
 	struct urb				*this_urb;
 	struct urb				*this_urb;
 	int 					err, device_port;
 	int 					err, device_port;
 
 
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	s_priv = usb_get_serial_data(serial);
 	s_priv = usb_get_serial_data(serial);
 	p_priv = usb_get_serial_port_data(port);
 	p_priv = usb_get_serial_port_data(port);
@@ -2157,11 +2157,11 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
 	/* Work out which port within the device is being setup */
 	/* Work out which port within the device is being setup */
 	device_port = port->number - port->serial->minor;
 	device_port = port->number - port->serial->minor;
 
 
-	dbg("%s - endpoint %d port %d (%d)",__FUNCTION__, usb_pipeendpoint(this_urb->pipe), port->number, device_port);
+	dbg("%s - endpoint %d port %d (%d)",__func__, usb_pipeendpoint(this_urb->pipe), port->number, device_port);
 
 
 		/* Make sure we have an urb then send the message */
 		/* Make sure we have an urb then send the message */
 	if (this_urb == NULL) {
 	if (this_urb == NULL) {
-		dbg("%s - oops no urb for port %d.", __FUNCTION__, port->number);
+		dbg("%s - oops no urb for port %d.", __func__, port->number);
 		return -1;
 		return -1;
 	}
 	}
 
 
@@ -2171,7 +2171,7 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
 		p_priv->resend_cont = reset_port + 1;
 		p_priv->resend_cont = reset_port + 1;
 
 
 	if (this_urb->status == -EINPROGRESS) {
 	if (this_urb->status == -EINPROGRESS) {
-		/*  dbg ("%s - already writing", __FUNCTION__); */
+		/*  dbg ("%s - already writing", __func__); */
 		mdelay(5);
 		mdelay(5);
 		return(-1);
 		return(-1);
 	}
 	}
@@ -2188,7 +2188,7 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
 		if (d_details->calculate_baud_rate
 		if (d_details->calculate_baud_rate
 		    (p_priv->baud, d_details->baudclk, &msg.baudHi,
 		    (p_priv->baud, d_details->baudclk, &msg.baudHi,
 		     &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
 		     &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
-			dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__,
+			dbg("%s - Invalid baud rate %d requested, using 9600.", __func__,
 			    p_priv->baud);
 			    p_priv->baud);
 			msg.baudLo = 0;
 			msg.baudLo = 0;
 			msg.baudHi = 125;	/* Values for 9600 baud */
 			msg.baudHi = 125;	/* Values for 9600 baud */
@@ -2307,11 +2307,11 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
 		this_urb->dev = serial->dev;
 		this_urb->dev = serial->dev;
 	}
 	}
 	if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
 	if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
-		dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, err);
+		dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err);
 	}
 	}
 #if 0
 #if 0
 	else {
 	else {
-		dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __FUNCTION__,
+		dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __func__,
 			   outcont_urb, this_urb->transfer_buffer_length,
 			   outcont_urb, this_urb->transfer_buffer_length,
 			   usb_pipeendpoint(this_urb->pipe));
 			   usb_pipeendpoint(this_urb->pipe));
 	}
 	}
@@ -2332,7 +2332,7 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial,
 	int 					err;
 	int 					err;
 	u8						prescaler;
 	u8						prescaler;
 
 
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	s_priv = usb_get_serial_data(serial);
 	s_priv = usb_get_serial_data(serial);
 	p_priv = usb_get_serial_port_data(port);
 	p_priv = usb_get_serial_port_data(port);
@@ -2340,7 +2340,7 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial,
 
 
 	/* only do something if we have a bulk out endpoint */
 	/* only do something if we have a bulk out endpoint */
 	if ((this_urb = p_priv->outcont_urb) == NULL) {
 	if ((this_urb = p_priv->outcont_urb) == NULL) {
-		dbg("%s - oops no urb.", __FUNCTION__);
+		dbg("%s - oops no urb.", __func__);
 		return -1;
 		return -1;
 	}
 	}
 
 
@@ -2349,7 +2349,7 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial,
 	if ((reset_port + 1) > p_priv->resend_cont)
 	if ((reset_port + 1) > p_priv->resend_cont)
 		p_priv->resend_cont = reset_port + 1;
 		p_priv->resend_cont = reset_port + 1;
 	if (this_urb->status == -EINPROGRESS) {
 	if (this_urb->status == -EINPROGRESS) {
-		dbg ("%s already writing", __FUNCTION__);
+		dbg ("%s already writing", __func__);
 		mdelay(5);
 		mdelay(5);
 		return(-1);
 		return(-1);
 	}
 	}
@@ -2363,7 +2363,7 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial,
 		if (d_details->calculate_baud_rate
 		if (d_details->calculate_baud_rate
 		    (p_priv->baud, d_details->baudclk, &msg.baudHi,
 		    (p_priv->baud, d_details->baudclk, &msg.baudHi,
 		     &msg.baudLo, &prescaler, 0) == KEYSPAN_INVALID_BAUD_RATE ) {
 		     &msg.baudLo, &prescaler, 0) == KEYSPAN_INVALID_BAUD_RATE ) {
-			dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__,
+			dbg("%s - Invalid baud rate %d requested, using 9600.", __func__,
 			    p_priv->baud);
 			    p_priv->baud);
 			p_priv->baud = 9600;
 			p_priv->baud = 9600;
 			d_details->calculate_baud_rate (p_priv->baud, d_details->baudclk, 
 			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,
 
 
 	this_urb->dev = serial->dev;
 	this_urb->dev = serial->dev;
 	if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
 	if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
-		dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, err);
+		dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err);
 	}
 	}
 	return (0);
 	return (0);
 }
 }
@@ -2469,7 +2469,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
 	struct urb				*this_urb;
 	struct urb				*this_urb;
 	int 					err, device_port;
 	int 					err, device_port;
 
 
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	s_priv = usb_get_serial_data(serial);
 	s_priv = usb_get_serial_data(serial);
 	p_priv = usb_get_serial_port_data(port);
 	p_priv = usb_get_serial_port_data(port);
@@ -2482,7 +2482,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
 
 
 	/* Make sure we have an urb then send the message */
 	/* Make sure we have an urb then send the message */
 	if (this_urb == NULL) {
 	if (this_urb == NULL) {
-		dbg("%s - oops no urb for port %d.", __FUNCTION__,
+		dbg("%s - oops no urb for port %d.", __func__,
 			port->number);
 			port->number);
 		return -1;
 		return -1;
 	}
 	}
@@ -2492,7 +2492,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
 	if ((reset_port + 1) > p_priv->resend_cont)
 	if ((reset_port + 1) > p_priv->resend_cont)
 		p_priv->resend_cont = reset_port + 1;
 		p_priv->resend_cont = reset_port + 1;
 	if (this_urb->status == -EINPROGRESS) {
 	if (this_urb->status == -EINPROGRESS) {
-		/*  dbg ("%s - already writing", __FUNCTION__); */
+		/*  dbg ("%s - already writing", __func__); */
 		mdelay(5);
 		mdelay(5);
 		return(-1);
 		return(-1);
 	}
 	}
@@ -2508,7 +2508,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
 		if (d_details->calculate_baud_rate
 		if (d_details->calculate_baud_rate
 		    (p_priv->baud, d_details->baudclk, &msg.baudHi,
 		    (p_priv->baud, d_details->baudclk, &msg.baudHi,
 		     &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
 		     &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
-			dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__,
+			dbg("%s - Invalid baud rate %d requested, using 9600.", __func__,
 			    p_priv->baud);
 			    p_priv->baud);
 			msg.baudLo = 0;
 			msg.baudLo = 0;
 			msg.baudHi = 125;	/* Values for 9600 baud */
 			msg.baudHi = 125;	/* Values for 9600 baud */
@@ -2601,7 +2601,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
 
 
 	err = usb_submit_urb(this_urb, GFP_ATOMIC);
 	err = usb_submit_urb(this_urb, GFP_ATOMIC);
 	if (err != 0)
 	if (err != 0)
-		dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__,
+		dbg("%s - usb_submit_urb(setup) failed (%d)", __func__,
 				err);
 				err);
 	return (0);
 	return (0);
 }
 }
@@ -2612,7 +2612,7 @@ static void keyspan_send_setup(struct usb_serial_port *port, int reset_port)
 	struct keyspan_serial_private *s_priv;
 	struct keyspan_serial_private *s_priv;
 	const struct keyspan_device_details *d_details;
 	const struct keyspan_device_details *d_details;
 
 
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	s_priv = usb_get_serial_data(serial);
 	s_priv = usb_get_serial_data(serial);
 	d_details = s_priv->device_details;
 	d_details = s_priv->device_details;
@@ -2647,20 +2647,20 @@ static int keyspan_startup (struct usb_serial *serial)
 	struct keyspan_port_private	*p_priv;
 	struct keyspan_port_private	*p_priv;
 	const struct keyspan_device_details	*d_details;
 	const struct keyspan_device_details	*d_details;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	for (i = 0; (d_details = keyspan_devices[i]) != NULL; ++i)
 	for (i = 0; (d_details = keyspan_devices[i]) != NULL; ++i)
 		if (d_details->product_id == le16_to_cpu(serial->dev->descriptor.idProduct))
 		if (d_details->product_id == le16_to_cpu(serial->dev->descriptor.idProduct))
 			break;
 			break;
 	if (d_details == NULL) {
 	if (d_details == NULL) {
-		dev_err(&serial->dev->dev, "%s - unknown product id %x\n", __FUNCTION__, le16_to_cpu(serial->dev->descriptor.idProduct));
+		dev_err(&serial->dev->dev, "%s - unknown product id %x\n", __func__, le16_to_cpu(serial->dev->descriptor.idProduct));
 		return 1;
 		return 1;
 	}
 	}
 
 
 	/* Setup private data for serial driver */
 	/* Setup private data for serial driver */
 	s_priv = kzalloc(sizeof(struct keyspan_serial_private), GFP_KERNEL);
 	s_priv = kzalloc(sizeof(struct keyspan_serial_private), GFP_KERNEL);
 	if (!s_priv) {
 	if (!s_priv) {
-		dbg("%s - kmalloc for keyspan_serial_private failed.", __FUNCTION__);
+		dbg("%s - kmalloc for keyspan_serial_private failed.", __func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 
 
@@ -2672,7 +2672,7 @@ static int keyspan_startup (struct usb_serial *serial)
 		port = serial->port[i];
 		port = serial->port[i];
 		p_priv = kzalloc(sizeof(struct keyspan_port_private), GFP_KERNEL);
 		p_priv = kzalloc(sizeof(struct keyspan_port_private), GFP_KERNEL);
 		if (!p_priv) {
 		if (!p_priv) {
-			dbg("%s - kmalloc for keyspan_port_private (%d) failed!.", __FUNCTION__, i);
+			dbg("%s - kmalloc for keyspan_port_private (%d) failed!.", __func__, i);
 			return (1);
 			return (1);
 		}
 		}
 		p_priv->device_details = d_details;
 		p_priv->device_details = d_details;
@@ -2685,14 +2685,14 @@ static int keyspan_startup (struct usb_serial *serial)
 		s_priv->instat_urb->dev = serial->dev;
 		s_priv->instat_urb->dev = serial->dev;
 		err = usb_submit_urb(s_priv->instat_urb, GFP_KERNEL);
 		err = usb_submit_urb(s_priv->instat_urb, GFP_KERNEL);
 		if (err != 0)
 		if (err != 0)
-			dbg("%s - submit instat urb failed %d", __FUNCTION__,
+			dbg("%s - submit instat urb failed %d", __func__,
 				err);
 				err);
 	}
 	}
 	if (s_priv->indat_urb != NULL) {
 	if (s_priv->indat_urb != NULL) {
 		s_priv->indat_urb->dev = serial->dev;
 		s_priv->indat_urb->dev = serial->dev;
 		err = usb_submit_urb(s_priv->indat_urb, GFP_KERNEL);
 		err = usb_submit_urb(s_priv->indat_urb, GFP_KERNEL);
 		if (err != 0)
 		if (err != 0)
-			dbg("%s - submit indat urb failed %d", __FUNCTION__,
+			dbg("%s - submit indat urb failed %d", __func__,
 				err);
 				err);
 	}
 	}
 			
 			
@@ -2706,7 +2706,7 @@ static void keyspan_shutdown (struct usb_serial *serial)
 	struct keyspan_serial_private 	*s_priv;
 	struct keyspan_serial_private 	*s_priv;
 	struct keyspan_port_private	*p_priv;
 	struct keyspan_port_private	*p_priv;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	s_priv = usb_get_serial_data(serial);
 	s_priv = usb_get_serial_data(serial);
 
 

+ 10 - 10
drivers/usb/serial/keyspan_pda.c

@@ -208,7 +208,7 @@ static void keyspan_pda_request_unthrottle(struct work_struct *work)
 				 2000);
 				 2000);
 	if (result < 0)
 	if (result < 0)
 		dbg("%s - error %d from usb_control_msg", 
 		dbg("%s - error %d from usb_control_msg", 
-		    __FUNCTION__, result);
+		    __func__, result);
 }
 }
 
 
 
 
@@ -232,11 +232,11 @@ static void keyspan_pda_rx_interrupt (struct urb *urb)
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
 		/* this urb is terminated, clean up */
 		/* this urb is terminated, clean up */
 		dbg("%s - urb shutting down with status: %d",
 		dbg("%s - urb shutting down with status: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	default:
 	default:
 		dbg("%s - nonzero urb status received: %d",
 		dbg("%s - nonzero urb status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -274,7 +274,7 @@ exit:
 	retval = usb_submit_urb (urb, GFP_ATOMIC);
 	retval = usb_submit_urb (urb, GFP_ATOMIC);
 	if (retval)
 	if (retval)
 		err ("%s - usb_submit_urb failed with result %d",
 		err ("%s - usb_submit_urb failed with result %d",
-		     __FUNCTION__, retval);
+		     __func__, retval);
 }
 }
 
 
 
 
@@ -358,7 +358,7 @@ static void keyspan_pda_break_ctl (struct usb_serial_port *port, int break_state
 				value, 0, NULL, 0, 2000);
 				value, 0, NULL, 0, 2000);
 	if (result < 0)
 	if (result < 0)
 		dbg("%s - error %d from usb_control_msg", 
 		dbg("%s - error %d from usb_control_msg", 
-		    __FUNCTION__, result);
+		    __func__, result);
 	/* there is something funky about this.. the TCSBRK that 'cu' performs
 	/* there is something funky about this.. the TCSBRK that 'cu' performs
 	   ought to translate into a break_ctl(-1),break_ctl(0) pair HZ/4
 	   ought to translate into a break_ctl(-1),break_ctl(0) pair HZ/4
 	   seconds apart, but it feels like the break sent isn't as long as it
 	   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)
 			     1,
 			     1,
 			     2000);
 			     2000);
 	if (rc < 0) {
 	if (rc < 0) {
-		dbg("%s - roomquery failed", __FUNCTION__);
+		dbg("%s - roomquery failed", __func__);
 		goto error;
 		goto error;
 	}
 	}
 	if (rc == 0) {
 	if (rc == 0) {
-		dbg("%s - roomquery returned 0 bytes", __FUNCTION__);
+		dbg("%s - roomquery returned 0 bytes", __func__);
 		rc = -EIO;
 		rc = -EIO;
 		goto error;
 		goto error;
 	}
 	}
@@ -688,7 +688,7 @@ static int keyspan_pda_open (struct usb_serial_port *port, struct file *filp)
 	port->interrupt_in_urb->dev = serial->dev;
 	port->interrupt_in_urb->dev = serial->dev;
 	rc = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 	rc = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 	if (rc) {
 	if (rc) {
-		dbg("%s - usb_submit_urb(read int) failed", __FUNCTION__);
+		dbg("%s - usb_submit_urb(read int) failed", __func__);
 		goto error;
 		goto error;
 	}
 	}
 
 
@@ -732,7 +732,7 @@ static int keyspan_pda_fake_startup (struct usb_serial *serial)
 		record = &xircom_pgs_firmware[0];
 		record = &xircom_pgs_firmware[0];
 #endif
 #endif
 	if (record == NULL) {
 	if (record == NULL) {
-		err("%s: unknown vendor, aborting.", __FUNCTION__);
+		err("%s: unknown vendor, aborting.", __func__);
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}
 
 
@@ -779,7 +779,7 @@ static int keyspan_pda_startup (struct usb_serial *serial)
 
 
 static void keyspan_pda_shutdown (struct usb_serial *serial)
 static void keyspan_pda_shutdown (struct usb_serial *serial)
 {
 {
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 	
 	
 	kfree(usb_get_serial_port_data(serial->port[0]));
 	kfree(usb_get_serial_port_data(serial->port[0]));
 }
 }

+ 39 - 39
drivers/usb/serial/kl5kusb105.c

@@ -191,7 +191,7 @@ static int klsi_105_chg_port_settings(struct usb_serial_port *port,
 	if (rc < 0)
 	if (rc < 0)
 		err("Change port settings failed (error = %d)", rc);
 		err("Change port settings failed (error = %d)", rc);
 	info("%s - %d byte block, baudrate %x, databits %d, u1 %d, u2 %d",
 	info("%s - %d byte block, baudrate %x, databits %d, u1 %d, u2 %d",
-	    __FUNCTION__,
+	    __func__,
 	    settings->pktlen,
 	    settings->pktlen,
 	    settings->baudrate, settings->databits,
 	    settings->baudrate, settings->databits,
 	    settings->unknown1, settings->unknown2);
 	    settings->unknown1, settings->unknown2);
@@ -222,7 +222,7 @@ static int klsi_105_get_line_state(struct usb_serial_port *port,
 	__u8 status_buf[KLSI_STATUSBUF_LEN] = { -1,-1};
 	__u8 status_buf[KLSI_STATUSBUF_LEN] = { -1,-1};
 	__u16 status;
 	__u16 status;
 
 
-	info("%s - sending SIO Poll request", __FUNCTION__);
+	info("%s - sending SIO Poll request", __func__);
         rc = usb_control_msg(port->serial->dev,
         rc = usb_control_msg(port->serial->dev,
 			     usb_rcvctrlpipe(port->serial->dev, 0),
 			     usb_rcvctrlpipe(port->serial->dev, 0),
 			     KL5KUSB105A_SIO_POLL,
 			     KL5KUSB105A_SIO_POLL,
@@ -237,7 +237,7 @@ static int klsi_105_get_line_state(struct usb_serial_port *port,
 	else {
 	else {
 		status = le16_to_cpu(*(u16 *)status_buf);
 		status = le16_to_cpu(*(u16 *)status_buf);
 
 
-		info("%s - read status %x %x", __FUNCTION__,
+		info("%s - read status %x %x", __func__,
 		     status_buf[0], status_buf[1]);
 		     status_buf[0], status_buf[1]);
 
 
 		*line_state_p = klsi_105_status2linestate(status);
 		*line_state_p = klsi_105_status2linestate(status);
@@ -265,7 +265,7 @@ static int klsi_105_startup (struct usb_serial *serial)
 		priv = kmalloc(sizeof(struct klsi_105_private),
 		priv = kmalloc(sizeof(struct klsi_105_private),
 						   GFP_KERNEL);
 						   GFP_KERNEL);
 		if (!priv) {
 		if (!priv) {
-			dbg("%skmalloc for klsi_105_private failed.", __FUNCTION__);
+			dbg("%skmalloc for klsi_105_private failed.", __func__);
 			i--;
 			i--;
 			goto err_cleanup;
 			goto err_cleanup;
 		}
 		}
@@ -295,7 +295,7 @@ static int klsi_105_startup (struct usb_serial *serial)
 			urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE,
 			urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE,
 							GFP_KERNEL);
 							GFP_KERNEL);
 			if (!urb->transfer_buffer) {
 			if (!urb->transfer_buffer) {
-				err("%s - out of memory for urb buffers.", __FUNCTION__);
+				err("%s - out of memory for urb buffers.", __func__);
 				goto err_cleanup;
 				goto err_cleanup;
 			}
 			}
 		}
 		}
@@ -325,7 +325,7 @@ static void klsi_105_shutdown (struct usb_serial *serial)
 {
 {
 	int i;
 	int i;
 	
 	
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	/* stop reads and writes on all ports */
 	/* stop reads and writes on all ports */
 	for (i=0; i < serial->num_ports; ++i) {
 	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)
 	struct klsi_105_port_settings cfg;
 	struct klsi_105_port_settings cfg;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s port %d", __FUNCTION__, port->number);
+	dbg("%s port %d", __func__, port->number);
 
 
 	/* force low_latency on so that our tty_push actually forces
 	/* force low_latency on so that our tty_push actually forces
 	 * the data through
 	 * the data through
@@ -416,7 +416,7 @@ static int  klsi_105_open (struct usb_serial_port *port, struct file *filp)
 
 
 	rc = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	rc = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	if (rc) {
 	if (rc) {
-		err("%s - failed submitting read urb, error %d", __FUNCTION__, rc);
+		err("%s - failed submitting read urb, error %d", __func__, rc);
 		retval = rc;
 		retval = rc;
 		goto exit;
 		goto exit;
 	}
 	}
@@ -434,14 +434,14 @@ static int  klsi_105_open (struct usb_serial_port *port, struct file *filp)
 		err("Enabling read failed (error = %d)", rc);
 		err("Enabling read failed (error = %d)", rc);
 		retval = rc;
 		retval = rc;
 	} else 
 	} else 
-		dbg("%s - enabled reading", __FUNCTION__);
+		dbg("%s - enabled reading", __func__);
 
 
 	rc = klsi_105_get_line_state(port, &line_state);
 	rc = klsi_105_get_line_state(port, &line_state);
 	if (rc >= 0) {
 	if (rc >= 0) {
 		spin_lock_irqsave (&priv->lock, flags);
 		spin_lock_irqsave (&priv->lock, flags);
 		priv->line_state = line_state;
 		priv->line_state = line_state;
 		spin_unlock_irqrestore (&priv->lock, flags);
 		spin_unlock_irqrestore (&priv->lock, flags);
-		dbg("%s - read line state 0x%lx", __FUNCTION__, line_state);
+		dbg("%s - read line state 0x%lx", __func__, line_state);
 		retval = 0;
 		retval = 0;
 	} else
 	} else
 		retval = rc;
 		retval = rc;
@@ -456,7 +456,7 @@ static void klsi_105_close (struct usb_serial_port *port, struct file *filp)
 	struct klsi_105_private *priv = usb_get_serial_port_data(port);
 	struct klsi_105_private *priv = usb_get_serial_port_data(port);
 	int rc;
 	int rc;
 
 
-	dbg("%s port %d", __FUNCTION__, port->number);
+	dbg("%s port %d", __func__, port->number);
 
 
 	mutex_lock(&port->serial->disc_mutex);
 	mutex_lock(&port->serial->disc_mutex);
 	if (!port->serial->disconnected) {
 	if (!port->serial->disconnected) {
@@ -499,7 +499,7 @@ static int klsi_105_write (struct usb_serial_port *port,
 	int result, size;
 	int result, size;
 	int bytes_sent=0;
 	int bytes_sent=0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	while (count > 0) {
 	while (count > 0) {
 		/* try to find a free urb (write 0 bytes if none) */
 		/* 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,
 		for (i=0; i<NUM_URBS; i++) {
 		for (i=0; i<NUM_URBS; i++) {
 			if (priv->write_urb_pool[i]->status != -EINPROGRESS) {
 			if (priv->write_urb_pool[i]->status != -EINPROGRESS) {
 				urb = priv->write_urb_pool[i];
 				urb = priv->write_urb_pool[i];
-				dbg("%s - using pool URB %d", __FUNCTION__, i);
+				dbg("%s - using pool URB %d", __func__, i);
 				break;
 				break;
 			}
 			}
 		}
 		}
 		spin_unlock_irqrestore (&priv->lock, flags);
 		spin_unlock_irqrestore (&priv->lock, flags);
 
 
 		if (urb==NULL) {
 		if (urb==NULL) {
-			dbg("%s - no more free urbs", __FUNCTION__);
+			dbg("%s - no more free urbs", __func__);
 			goto exit;
 			goto exit;
 		}
 		}
 
 
 		if (urb->transfer_buffer == NULL) {
 		if (urb->transfer_buffer == NULL) {
 			urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
 			urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
 			if (urb->transfer_buffer == NULL) {
 			if (urb->transfer_buffer == NULL) {
-				err("%s - no more kernel memory...", __FUNCTION__);
+				err("%s - no more kernel memory...", __func__);
 				goto exit;
 				goto exit;
 			}
 			}
 		}
 		}
@@ -551,7 +551,7 @@ static int klsi_105_write (struct usb_serial_port *port,
 		/* send the data out the bulk port */
 		/* send the data out the bulk port */
 		result = usb_submit_urb(urb, GFP_ATOMIC);
 		result = usb_submit_urb(urb, GFP_ATOMIC);
 		if (result) {
 		if (result) {
-			err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
+			err("%s - failed submitting write urb, error %d", __func__, result);
 			goto exit;
 			goto exit;
 		}
 		}
 		buf += size;
 		buf += size;
@@ -570,10 +570,10 @@ static void klsi_105_write_bulk_callback ( struct urb *urb)
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (status) {
 	if (status) {
-		dbg("%s - nonzero write bulk status received: %d", __FUNCTION__,
+		dbg("%s - nonzero write bulk status received: %d", __func__,
 		    status);
 		    status);
 		return;
 		return;
 	}
 	}
@@ -600,7 +600,7 @@ static int klsi_105_chars_in_buffer (struct usb_serial_port *port)
 
 
 	spin_unlock_irqrestore (&priv->lock, flags);
 	spin_unlock_irqrestore (&priv->lock, flags);
 
 
-	dbg("%s - returns %d", __FUNCTION__, chars);
+	dbg("%s - returns %d", __func__, chars);
 	return (chars);
 	return (chars);
 }
 }
 
 
@@ -620,7 +620,7 @@ static int klsi_105_write_room (struct usb_serial_port *port)
 
 
 	spin_unlock_irqrestore (&priv->lock, flags);
 	spin_unlock_irqrestore (&priv->lock, flags);
 
 
-	dbg("%s - returns %d", __FUNCTION__, room);
+	dbg("%s - returns %d", __func__, room);
 	return (room);
 	return (room);
 }
 }
 
 
@@ -635,11 +635,11 @@ static void klsi_105_read_bulk_callback (struct urb *urb)
 	int rc;
 	int rc;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* The urb might have been killed. */
 	/* The urb might have been killed. */
 	if (status) {
 	if (status) {
-		dbg("%s - nonzero read bulk status received: %d", __FUNCTION__,
+		dbg("%s - nonzero read bulk status received: %d", __func__,
 		    status);
 		    status);
 		return;
 		return;
 	}
 	}
@@ -649,12 +649,12 @@ static void klsi_105_read_bulk_callback (struct urb *urb)
 	 */
 	 */
 	if (urb->actual_length == 0) {
 	if (urb->actual_length == 0) {
 		/* empty urbs seem to happen, we ignore them */
 		/* empty urbs seem to happen, we ignore them */
-		/* dbg("%s - emtpy URB", __FUNCTION__); */
+		/* dbg("%s - emtpy URB", __func__); */
 	       ;
 	       ;
 	} else if (urb->actual_length <= 2) {
 	} else if (urb->actual_length <= 2) {
-		dbg("%s - size %d URB not understood", __FUNCTION__,
+		dbg("%s - size %d URB not understood", __func__,
 		    urb->actual_length);
 		    urb->actual_length);
-		usb_serial_debug_data(debug, &port->dev, __FUNCTION__,
+		usb_serial_debug_data(debug, &port->dev, __func__,
 				      urb->actual_length, data);
 				      urb->actual_length, data);
 	} else {
 	} else {
 		int bytes_sent = ((__u8 *) data)[0] +
 		int bytes_sent = ((__u8 *) data)[0] +
@@ -666,12 +666,12 @@ static void klsi_105_read_bulk_callback (struct urb *urb)
 		 * intermixed tty_flip_buffer_push()s
 		 * intermixed tty_flip_buffer_push()s
 		 * FIXME
 		 * FIXME
 		 */ 
 		 */ 
-		usb_serial_debug_data(debug, &port->dev, __FUNCTION__,
+		usb_serial_debug_data(debug, &port->dev, __func__,
 				      urb->actual_length, data);
 				      urb->actual_length, data);
 
 
 		if (bytes_sent + 2 > urb->actual_length) {
 		if (bytes_sent + 2 > urb->actual_length) {
 			dbg("%s - trying to read more data than available"
 			dbg("%s - trying to read more data than available"
-			    " (%d vs. %d)", __FUNCTION__,
+			    " (%d vs. %d)", __func__,
 			    bytes_sent+2, urb->actual_length);
 			    bytes_sent+2, urb->actual_length);
 			/* cap at implied limit */
 			/* cap at implied limit */
 			bytes_sent = urb->actual_length - 2;
 			bytes_sent = urb->actual_length - 2;
@@ -694,7 +694,7 @@ static void klsi_105_read_bulk_callback (struct urb *urb)
 		      port);
 		      port);
 	rc = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	rc = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	if (rc)
 	if (rc)
-		err("%s - failed resubmitting read urb, error %d", __FUNCTION__, rc);
+		err("%s - failed resubmitting read urb, error %d", __func__, rc);
 } /* klsi_105_read_bulk_callback */
 } /* klsi_105_read_bulk_callback */
 
 
 
 
@@ -718,7 +718,7 @@ static void klsi_105_set_termios (struct usb_serial_port *port,
 	if( (cflag & CBAUD) != (old_cflag & CBAUD) ) {
 	if( (cflag & CBAUD) != (old_cflag & CBAUD) ) {
 	        /* reassert DTR and (maybe) RTS on transition from B0 */
 	        /* reassert DTR and (maybe) RTS on transition from B0 */
 		if( (old_cflag & CBAUD) == B0 ) {
 		if( (old_cflag & CBAUD) == B0 ) {
-			dbg("%s: baud was B0", __FUNCTION__);
+			dbg("%s: baud was B0", __func__);
 #if 0
 #if 0
 			priv->control_state |= TIOCM_DTR;
 			priv->control_state |= TIOCM_DTR;
 			/* don't set RTS if using hardware flow control */
 			/* don't set RTS if using hardware flow control */
@@ -764,7 +764,7 @@ static void klsi_105_set_termios (struct usb_serial_port *port,
 			break;
 			break;
 		}
 		}
 		if ((cflag & CBAUD) == B0 ) {
 		if ((cflag & CBAUD) == B0 ) {
-			dbg("%s: baud is B0", __FUNCTION__);
+			dbg("%s: baud is B0", __func__);
 			/* Drop RTS and DTR */
 			/* Drop RTS and DTR */
 			/* maybe this should be simulated by sending read
 			/* maybe this should be simulated by sending read
 			 * disable and read enable messages?
 			 * disable and read enable messages?
@@ -781,11 +781,11 @@ static void klsi_105_set_termios (struct usb_serial_port *port,
 		/* set the number of data bits */
 		/* set the number of data bits */
 		switch (cflag & CSIZE) {
 		switch (cflag & CSIZE) {
 		case CS5:
 		case CS5:
-			dbg("%s - 5 bits/byte not supported", __FUNCTION__);
+			dbg("%s - 5 bits/byte not supported", __func__);
 			spin_unlock_irqrestore (&priv->lock, flags);
 			spin_unlock_irqrestore (&priv->lock, flags);
 			return ;
 			return ;
 		case CS6:
 		case CS6:
-			dbg("%s - 6 bits/byte not supported", __FUNCTION__);
+			dbg("%s - 6 bits/byte not supported", __func__);
 			spin_unlock_irqrestore (&priv->lock, flags);
 			spin_unlock_irqrestore (&priv->lock, flags);
 			return ;
 			return ;
 		case CS7:
 		case CS7:
@@ -859,7 +859,7 @@ static void mct_u232_break_ctl( struct usb_serial_port *port, int break_state )
 	struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
 	struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
 	unsigned char lcr = priv->last_lcr;
 	unsigned char lcr = priv->last_lcr;
 
 
-	dbg("%sstate=%d", __FUNCTION__, break_state);
+	dbg("%sstate=%d", __func__, break_state);
 
 
 	if (break_state)
 	if (break_state)
 		lcr |= MCT_U232_SET_BREAK;
 		lcr |= MCT_U232_SET_BREAK;
@@ -874,7 +874,7 @@ static int klsi_105_tiocmget (struct usb_serial_port *port, struct file *file)
 	unsigned long flags;
 	unsigned long flags;
 	int rc;
 	int rc;
 	unsigned long line_state;
 	unsigned long line_state;
-	dbg("%s - request, just guessing", __FUNCTION__);
+	dbg("%s - request, just guessing", __func__);
 
 
 	rc = klsi_105_get_line_state(port, &line_state);
 	rc = klsi_105_get_line_state(port, &line_state);
 	if (rc < 0) {
 	if (rc < 0) {
@@ -886,7 +886,7 @@ static int klsi_105_tiocmget (struct usb_serial_port *port, struct file *file)
 	spin_lock_irqsave (&priv->lock, flags);
 	spin_lock_irqsave (&priv->lock, flags);
 	priv->line_state = line_state;
 	priv->line_state = line_state;
 	spin_unlock_irqrestore (&priv->lock, flags);
 	spin_unlock_irqrestore (&priv->lock, flags);
-	dbg("%s - read line state 0x%lx", __FUNCTION__, line_state);
+	dbg("%s - read line state 0x%lx", __func__, line_state);
 	return (int)line_state;
 	return (int)line_state;
 }
 }
 
 
@@ -895,7 +895,7 @@ static int klsi_105_tiocmset (struct usb_serial_port *port, struct file *file,
 {
 {
 	int retval = -EINVAL;
 	int retval = -EINVAL;
 	
 	
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 /* if this ever gets implemented, it should be done something like this:
 /* if this ever gets implemented, it should be done something like this:
 	struct usb_serial *serial = port->serial;
 	struct usb_serial *serial = port->serial;
@@ -921,7 +921,7 @@ static int klsi_105_tiocmset (struct usb_serial_port *port, struct file *file,
 
 
 static void klsi_105_throttle (struct usb_serial_port *port)
 static void klsi_105_throttle (struct usb_serial_port *port)
 {
 {
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 	usb_kill_urb(port->read_urb);
 	usb_kill_urb(port->read_urb);
 }
 }
 
 
@@ -929,12 +929,12 @@ static void klsi_105_unthrottle (struct usb_serial_port *port)
 {
 {
 	int result;
 	int result;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	port->read_urb->dev = port->serial->dev;
 	port->read_urb->dev = port->serial->dev;
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	if (result)
 	if (result)
-		err("%s - failed submitting read urb, error %d", __FUNCTION__,
+		err("%s - failed submitting read urb, error %d", __func__,
 		    result);
 		    result);
 }
 }
 
 

+ 28 - 28
drivers/usb/serial/kobil_sct.c

@@ -183,11 +183,11 @@ static int kobil_startup (struct usb_serial *serial)
  	for (i = 0; i < altsetting->desc.bNumEndpoints; i++) {
  	for (i = 0; i < altsetting->desc.bNumEndpoints; i++) {
 		endpoint = &altsetting->endpoint[i];
 		endpoint = &altsetting->endpoint[i];
 		if (usb_endpoint_is_int_out(&endpoint->desc)) {
 		if (usb_endpoint_is_int_out(&endpoint->desc)) {
-		 	dbg("%s Found interrupt out endpoint. Address: %d", __FUNCTION__, endpoint->desc.bEndpointAddress);
+		 	dbg("%s Found interrupt out endpoint. Address: %d", __func__, endpoint->desc.bEndpointAddress);
 		 	priv->write_int_endpoint_address = endpoint->desc.bEndpointAddress;
 		 	priv->write_int_endpoint_address = endpoint->desc.bEndpointAddress;
  		}
  		}
 		if (usb_endpoint_is_int_in(&endpoint->desc)) {
 		if (usb_endpoint_is_int_in(&endpoint->desc)) {
-		 	dbg("%s Found interrupt in  endpoint. Address: %d", __FUNCTION__, endpoint->desc.bEndpointAddress);
+		 	dbg("%s Found interrupt in  endpoint. Address: %d", __func__, endpoint->desc.bEndpointAddress);
 		 	priv->read_int_endpoint_address = endpoint->desc.bEndpointAddress;
 		 	priv->read_int_endpoint_address = endpoint->desc.bEndpointAddress;
 	 	}
 	 	}
 	}
 	}
@@ -198,7 +198,7 @@ static int kobil_startup (struct usb_serial *serial)
 static void kobil_shutdown (struct usb_serial *serial)
 static void kobil_shutdown (struct usb_serial *serial)
 {
 {
 	int i;
 	int i;
-	dbg("%s - port %d", __FUNCTION__, serial->port[0]->number);
+	dbg("%s - port %d", __func__, serial->port[0]->number);
 
 
 	for (i=0; i < serial->num_ports; ++i) {
 	for (i=0; i < serial->num_ports; ++i) {
 		while (serial->port[i]->open_count > 0) {
 		while (serial->port[i]->open_count > 0) {
@@ -218,7 +218,7 @@ static int kobil_open (struct usb_serial_port *port, struct file *filp)
 	int transfer_buffer_length = 8;
 	int transfer_buffer_length = 8;
 	int write_urb_transfer_buffer_length = 8;
 	int write_urb_transfer_buffer_length = 8;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 	priv = usb_get_serial_port_data(port);
 	priv = usb_get_serial_port_data(port);
 
 
 	// someone sets the dev to 0 if the close method has been called
 	// 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)
 	
 	
 	// allocate write_urb
 	// allocate write_urb
 	if (!port->write_urb) { 
 	if (!port->write_urb) { 
-		dbg("%s - port %d  Allocating port->write_urb", __FUNCTION__, port->number);
+		dbg("%s - port %d  Allocating port->write_urb", __func__, port->number);
 		port->write_urb = usb_alloc_urb(0, GFP_KERNEL);  
 		port->write_urb = usb_alloc_urb(0, GFP_KERNEL);  
 		if (!port->write_urb) {
 		if (!port->write_urb) {
-			dbg("%s - port %d usb_alloc_urb failed", __FUNCTION__, port->number);
+			dbg("%s - port %d usb_alloc_urb failed", __func__, port->number);
 			kfree(transfer_buffer);
 			kfree(transfer_buffer);
 			return -ENOMEM;
 			return -ENOMEM;
 		}
 		}
@@ -274,7 +274,7 @@ static int kobil_open (struct usb_serial_port *port, struct file *filp)
 				  transfer_buffer_length,
 				  transfer_buffer_length,
 				  KOBIL_TIMEOUT
 				  KOBIL_TIMEOUT
 		);
 		);
-	dbg("%s - port %d Send get_HW_version URB returns: %i", __FUNCTION__, port->number, result);
+	dbg("%s - port %d Send get_HW_version URB returns: %i", __func__, port->number, result);
 	dbg("Harware version: %i.%i.%i", transfer_buffer[0], transfer_buffer[1], transfer_buffer[2] );
 	dbg("Harware version: %i.%i.%i", transfer_buffer[0], transfer_buffer[1], transfer_buffer[2] );
 	
 	
 	// get firmware version
 	// get firmware version
@@ -288,7 +288,7 @@ static int kobil_open (struct usb_serial_port *port, struct file *filp)
 				  transfer_buffer_length,
 				  transfer_buffer_length,
 				  KOBIL_TIMEOUT
 				  KOBIL_TIMEOUT
 		);
 		);
-	dbg("%s - port %d Send get_FW_version URB returns: %i", __FUNCTION__, port->number, result);
+	dbg("%s - port %d Send get_FW_version URB returns: %i", __func__, port->number, result);
 	dbg("Firmware version: %i.%i.%i", transfer_buffer[0], transfer_buffer[1], transfer_buffer[2] );
 	dbg("Firmware version: %i.%i.%i", transfer_buffer[0], transfer_buffer[1], transfer_buffer[2] );
 
 
 	if (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID || priv->device_type == KOBIL_ADAPTER_K_PRODUCT_ID) {
 	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)
 					  0,
 					  0,
 					  KOBIL_TIMEOUT
 					  KOBIL_TIMEOUT
 			);
 			);
-		dbg("%s - port %d Send set_baudrate URB returns: %i", __FUNCTION__, port->number, result);
+		dbg("%s - port %d Send set_baudrate URB returns: %i", __func__, port->number, result);
 		
 		
 		// reset all queues
 		// reset all queues
 		result = usb_control_msg( port->serial->dev, 
 		result = usb_control_msg( port->serial->dev, 
@@ -316,13 +316,13 @@ static int kobil_open (struct usb_serial_port *port, struct file *filp)
 					  0,
 					  0,
 					  KOBIL_TIMEOUT
 					  KOBIL_TIMEOUT
 			);
 			);
-		dbg("%s - port %d Send reset_all_queues URB returns: %i", __FUNCTION__, port->number, result);
+		dbg("%s - port %d Send reset_all_queues URB returns: %i", __func__, port->number, result);
 	}
 	}
 	if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID || priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID ||
 	if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID || priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID ||
 	    priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID) {
 	    priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID) {
 		// start reading (Adapter B 'cause PNP string)
 		// start reading (Adapter B 'cause PNP string)
 		result = usb_submit_urb( port->interrupt_in_urb, GFP_ATOMIC  ); 
 		result = usb_submit_urb( port->interrupt_in_urb, GFP_ATOMIC  ); 
-		dbg("%s - port %d Send read URB returns: %i", __FUNCTION__, port->number, result);
+		dbg("%s - port %d Send read URB returns: %i", __func__, port->number, result);
 	}
 	}
 
 
 	kfree(transfer_buffer);
 	kfree(transfer_buffer);
@@ -332,7 +332,7 @@ static int kobil_open (struct usb_serial_port *port, struct file *filp)
 
 
 static void kobil_close (struct usb_serial_port *port, struct file *filp)
 static void kobil_close (struct usb_serial_port *port, struct file *filp)
 {
 {
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (port->write_urb) {
 	if (port->write_urb) {
 		usb_kill_urb(port->write_urb);
 		usb_kill_urb(port->write_urb);
@@ -352,11 +352,11 @@ static void kobil_read_int_callback(struct urb *urb)
 	int status = urb->status;
 	int status = urb->status;
 //	char *dbg_data;
 //	char *dbg_data;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (status) {
 	if (status) {
 		dbg("%s - port %d Read int status not zero: %d",
 		dbg("%s - port %d Read int status not zero: %d",
-		    __FUNCTION__, port->number, status);
+		    __func__, port->number, status);
 		return;
 		return;
 	}
 	}
 
 
@@ -386,7 +386,7 @@ static void kobil_read_int_callback(struct urb *urb)
 	port->interrupt_in_urb->dev = port->serial->dev;
 	port->interrupt_in_urb->dev = port->serial->dev;
 
 
 	result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 	result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
-	dbg("%s - port %d Send read URB returns: %i", __FUNCTION__, port->number, result);
+	dbg("%s - port %d Send read URB returns: %i", __func__, port->number, result);
 }
 }
 
 
 
 
@@ -404,21 +404,21 @@ static int kobil_write (struct usb_serial_port *port,
 	struct kobil_private * priv;
 	struct kobil_private * priv;
 
 
 	if (count == 0) {
 	if (count == 0) {
-		dbg("%s - port %d write request of 0 bytes", __FUNCTION__, port->number);
+		dbg("%s - port %d write request of 0 bytes", __func__, port->number);
 		return 0;
 		return 0;
 	}
 	}
 
 
 	priv = usb_get_serial_port_data(port);
 	priv = usb_get_serial_port_data(port);
 
 
 	if (count > (KOBIL_BUF_LENGTH - priv->filled)) {
 	if (count > (KOBIL_BUF_LENGTH - priv->filled)) {
-		dbg("%s - port %d Error: write request bigger than buffer size", __FUNCTION__, port->number);
+		dbg("%s - port %d Error: write request bigger than buffer size", __func__, port->number);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 
 
 	// Copy data to buffer
 	// Copy data to buffer
 	memcpy (priv->buf + priv->filled, buf, count);
 	memcpy (priv->buf + priv->filled, buf, count);
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, priv->buf + priv->filled);
+	usb_serial_debug_data(debug, &port->dev, __func__, count, priv->buf + priv->filled);
 
 
 	priv->filled = priv->filled + count;
 	priv->filled = priv->filled + count;
 
 
@@ -450,7 +450,7 @@ static int kobil_write (struct usb_serial_port *port,
 
 
 			priv->cur_pos = priv->cur_pos + length;
 			priv->cur_pos = priv->cur_pos + length;
 			result = usb_submit_urb( port->write_urb, GFP_NOIO );
 			result = usb_submit_urb( port->write_urb, GFP_NOIO );
-			dbg("%s - port %d Send write URB returns: %i", __FUNCTION__, port->number, result);
+			dbg("%s - port %d Send write URB returns: %i", __func__, port->number, result);
 			todo = priv->filled - priv->cur_pos;
 			todo = priv->filled - priv->cur_pos;
 
 
 			if (todo > 0) {
 			if (todo > 0) {
@@ -471,7 +471,7 @@ static int kobil_write (struct usb_serial_port *port,
 			port->interrupt_in_urb->dev = port->serial->dev;
 			port->interrupt_in_urb->dev = port->serial->dev;
 			
 			
 			result = usb_submit_urb( port->interrupt_in_urb, GFP_NOIO ); 
 			result = usb_submit_urb( port->interrupt_in_urb, GFP_NOIO ); 
-			dbg("%s - port %d Send read URB returns: %i", __FUNCTION__, port->number, result);
+			dbg("%s - port %d Send read URB returns: %i", __func__, port->number, result);
 		}
 		}
 	}
 	}
 	return count;
 	return count;
@@ -480,7 +480,7 @@ static int kobil_write (struct usb_serial_port *port,
 
 
 static int kobil_write_room (struct usb_serial_port *port)
 static int kobil_write_room (struct usb_serial_port *port)
 {
 {
-	//dbg("%s - port %d", __FUNCTION__, port->number);
+	//dbg("%s - port %d", __func__, port->number);
 	return 8;
 	return 8;
 }
 }
 
 
@@ -515,7 +515,7 @@ static int kobil_tiocmget(struct usb_serial_port *port, struct file *file)
 				  KOBIL_TIMEOUT);
 				  KOBIL_TIMEOUT);
 
 
 	dbg("%s - port %d Send get_status_line_state URB returns: %i. Statusline: %02x", 
 	dbg("%s - port %d Send get_status_line_state URB returns: %i. Statusline: %02x", 
-	    __FUNCTION__, port->number, result, transfer_buffer[0]);
+	    __func__, port->number, result, transfer_buffer[0]);
 
 
 	result = 0;
 	result = 0;
 	if ((transfer_buffer[0] & SUSBCR_GSL_DSR) != 0)
 	if ((transfer_buffer[0] & SUSBCR_GSL_DSR) != 0)
@@ -558,9 +558,9 @@ static int  kobil_tiocmset(struct usb_serial_port *port, struct file *file,
 
 
 	if (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID) {
 	if (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID) {
 		if (dtr != 0)
 		if (dtr != 0)
-			dbg("%s - port %d Setting DTR", __FUNCTION__, port->number);
+			dbg("%s - port %d Setting DTR", __func__, port->number);
 		else
 		else
-			dbg("%s - port %d Clearing DTR", __FUNCTION__, port->number);
+			dbg("%s - port %d Clearing DTR", __func__, port->number);
 		result = usb_control_msg( port->serial->dev, 
 		result = usb_control_msg( port->serial->dev, 
 					  usb_rcvctrlpipe(port->serial->dev, 0 ), 
 					  usb_rcvctrlpipe(port->serial->dev, 0 ), 
 					  SUSBCRequest_SetStatusLinesOrQueues,
 					  SUSBCRequest_SetStatusLinesOrQueues,
@@ -572,9 +572,9 @@ static int  kobil_tiocmset(struct usb_serial_port *port, struct file *file,
 					  KOBIL_TIMEOUT);
 					  KOBIL_TIMEOUT);
 	} else {
 	} else {
 		if (rts != 0)
 		if (rts != 0)
-			dbg("%s - port %d Setting RTS", __FUNCTION__, port->number);
+			dbg("%s - port %d Setting RTS", __func__, port->number);
 		else
 		else
-			dbg("%s - port %d Clearing RTS", __FUNCTION__, port->number);
+			dbg("%s - port %d Clearing RTS", __func__, port->number);
 		result = usb_control_msg( port->serial->dev, 
 		result = usb_control_msg( port->serial->dev, 
 					  usb_rcvctrlpipe(port->serial->dev, 0 ), 
 					  usb_rcvctrlpipe(port->serial->dev, 0 ), 
 					  SUSBCRequest_SetStatusLinesOrQueues,
 					  SUSBCRequest_SetStatusLinesOrQueues,
@@ -585,7 +585,7 @@ static int  kobil_tiocmset(struct usb_serial_port *port, struct file *file,
 					  0,
 					  0,
 					  KOBIL_TIMEOUT);
 					  KOBIL_TIMEOUT);
 	}
 	}
-	dbg("%s - port %d Send set_status_line URB returns: %i", __FUNCTION__, port->number, result);
+	dbg("%s - port %d Send set_status_line URB returns: %i", __func__, port->number, result);
 	kfree(transfer_buffer);
 	kfree(transfer_buffer);
 	return (result < 0) ? result : 0;
 	return (result < 0) ? result : 0;
 }
 }
@@ -678,7 +678,7 @@ static int kobil_ioctl(struct usb_serial_port *port, struct file * file, unsigne
 					  KOBIL_TIMEOUT
 					  KOBIL_TIMEOUT
 			);
 			);
 		
 		
-		dbg("%s - port %d Send reset_all_queues (FLUSH) URB returns: %i", __FUNCTION__, port->number, result);
+		dbg("%s - port %d Send reset_all_queues (FLUSH) URB returns: %i", __func__, port->number, result);
 		kfree(transfer_buffer);
 		kfree(transfer_buffer);
 		return (result < 0) ? -EFAULT : 0;
 		return (result < 0) ? -EFAULT : 0;
 	default:
 	default:

+ 18 - 18
drivers/usb/serial/mct_u232.c

@@ -399,7 +399,7 @@ static void mct_u232_shutdown (struct usb_serial *serial)
 	struct mct_u232_private *priv;
 	struct mct_u232_private *priv;
 	int i;
 	int i;
 	
 	
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	for (i=0; i < serial->num_ports; ++i) {
 	for (i=0; i < serial->num_ports; ++i) {
 		/* My special items, the standard routines free my urbs */
 		/* 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)
 	unsigned char last_lcr;
 	unsigned char last_lcr;
 	unsigned char last_msr;
 	unsigned char last_msr;
 
 
-	dbg("%s port %d", __FUNCTION__, port->number);
+	dbg("%s port %d", __func__, port->number);
 
 
 	/* Compensate for a hardware bug: although the Sitecom U232-P25
 	/* Compensate for a hardware bug: although the Sitecom U232-P25
 	 * device reports a maximum output packet size of 32 bytes,
 	 * 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)
 	unsigned int c_cflag;
 	unsigned int c_cflag;
 	unsigned int control_state;
 	unsigned int control_state;
 	struct mct_u232_private *priv = usb_get_serial_port_data(port);
 	struct mct_u232_private *priv = usb_get_serial_port_data(port);
-	dbg("%s port %d", __FUNCTION__, port->number);
+	dbg("%s port %d", __func__, port->number);
 
 
    	if (port->tty) {
    	if (port->tty) {
 		c_cflag = port->tty->termios->c_cflag;
 		c_cflag = port->tty->termios->c_cflag;
@@ -532,21 +532,21 @@ static void mct_u232_read_int_callback (struct urb *urb)
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
 		/* this urb is terminated, clean up */
 		/* this urb is terminated, clean up */
 		dbg("%s - urb shutting down with status: %d",
 		dbg("%s - urb shutting down with status: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	default:
 	default:
 		dbg("%s - nonzero urb status received: %d",
 		dbg("%s - nonzero urb status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
 	if (!serial) {
 	if (!serial) {
-		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
+		dbg("%s - bad serial pointer, exiting", __func__);
 		return;
 		return;
 	}
 	}
 
 
-        dbg("%s - port %d", __FUNCTION__, port->number);
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+        dbg("%s - port %d", __func__, port->number);
+	usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
 
 
 	/*
 	/*
 	 * Work-a-round: handle the 'usual' bulk-in pipe here
 	 * Work-a-round: handle the 'usual' bulk-in pipe here
@@ -603,7 +603,7 @@ exit:
 	retval = usb_submit_urb (urb, GFP_ATOMIC);
 	retval = usb_submit_urb (urb, GFP_ATOMIC);
 	if (retval)
 	if (retval)
 		err ("%s - usb_submit_urb failed with result %d",
 		err ("%s - usb_submit_urb failed with result %d",
-		     __FUNCTION__, retval);
+		     __func__, retval);
 } /* mct_u232_read_int_callback */
 } /* mct_u232_read_int_callback */
 
 
 static void mct_u232_set_termios (struct usb_serial_port *port,
 static 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,
 
 
         /* reassert DTR and RTS on transition from B0 */
         /* reassert DTR and RTS on transition from B0 */
 	if ((old_cflag & CBAUD) == B0) {
 	if ((old_cflag & CBAUD) == B0) {
-		dbg("%s: baud was B0", __FUNCTION__);
+		dbg("%s: baud was B0", __func__);
 		control_state |= TIOCM_DTR | TIOCM_RTS;
 		control_state |= TIOCM_DTR | TIOCM_RTS;
 		mct_u232_set_modem_ctrl(serial, control_state);
 		mct_u232_set_modem_ctrl(serial, control_state);
 	}
 	}
@@ -641,7 +641,7 @@ static void mct_u232_set_termios (struct usb_serial_port *port,
 	mct_u232_set_baud_rate(serial, port, tty_get_baud_rate(port->tty));
 	mct_u232_set_baud_rate(serial, port, tty_get_baud_rate(port->tty));
 
 
 	if ((cflag & CBAUD) == B0 ) {
 	if ((cflag & CBAUD) == B0 ) {
-		dbg("%s: baud is B0", __FUNCTION__);
+		dbg("%s: baud is B0", __func__);
 		/* Drop RTS and DTR */
 		/* Drop RTS and DTR */
 		control_state &= ~(TIOCM_DTR | TIOCM_RTS);
 		control_state &= ~(TIOCM_DTR | TIOCM_RTS);
        		mct_u232_set_modem_ctrl(serial, control_state);
        		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 )
 	unsigned char lcr;
 	unsigned char lcr;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%sstate=%d", __FUNCTION__, break_state);
+	dbg("%sstate=%d", __func__, break_state);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	lcr = priv->last_lcr;
 	lcr = priv->last_lcr;
@@ -715,7 +715,7 @@ static int mct_u232_tiocmget (struct usb_serial_port *port, struct file *file)
 	unsigned int control_state;
 	unsigned int control_state;
 	unsigned long flags;
 	unsigned long flags;
 	
 	
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	control_state = priv->control_state;
 	control_state = priv->control_state;
@@ -732,7 +732,7 @@ static int mct_u232_tiocmset (struct usb_serial_port *port, struct file *file,
 	unsigned int control_state;
 	unsigned int control_state;
 	unsigned long flags;
 	unsigned long flags;
 	
 	
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	control_state = priv->control_state;
 	control_state = priv->control_state;
@@ -754,7 +754,7 @@ static int mct_u232_tiocmset (struct usb_serial_port *port, struct file *file,
 static int mct_u232_ioctl (struct usb_serial_port *port, struct file * file,
 static int mct_u232_ioctl (struct usb_serial_port *port, struct file * file,
 			   unsigned int cmd, unsigned long arg)
 			   unsigned int cmd, unsigned long arg)
 {
 {
-	dbg("%scmd=0x%x", __FUNCTION__, cmd);
+	dbg("%scmd=0x%x", __func__, cmd);
 
 
 	/* Based on code from acm.c and others */
 	/* Based on code from acm.c and others */
 	switch (cmd) {
 	switch (cmd) {
@@ -769,7 +769,7 @@ static int mct_u232_ioctl (struct usb_serial_port *port, struct file * file,
 		return 0;
 		return 0;
 
 
 	default:
 	default:
-		dbg("%s: arg not supported - 0x%04x", __FUNCTION__,cmd);
+		dbg("%s: arg not supported - 0x%04x", __func__,cmd);
 		return(-ENOIOCTLCMD);
 		return(-ENOIOCTLCMD);
 		break;
 		break;
 	}
 	}
@@ -784,7 +784,7 @@ static void mct_u232_throttle (struct usb_serial_port *port)
 	struct tty_struct *tty;
 	struct tty_struct *tty;
 
 
 	tty = port->tty;
 	tty = port->tty;
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	priv->rx_flags |= THROTTLED;
 	priv->rx_flags |= THROTTLED;
@@ -806,7 +806,7 @@ static void mct_u232_unthrottle (struct usb_serial_port *port)
 	unsigned int control_state;
 	unsigned int control_state;
 	struct tty_struct *tty;
 	struct tty_struct *tty;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	tty = port->tty;
 	tty = port->tty;
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);

+ 59 - 59
drivers/usb/serial/mos7720.c

@@ -118,11 +118,11 @@ static void mos7720_interrupt_callback(struct urb *urb)
 	case -ENOENT:
 	case -ENOENT:
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
 		/* this urb is terminated, clean up */
 		/* this urb is terminated, clean up */
-		dbg("%s - urb shutting down with status: %d", __FUNCTION__,
+		dbg("%s - urb shutting down with status: %d", __func__,
 		    status);
 		    status);
 		return;
 		return;
 	default:
 	default:
-		dbg("%s - nonzero urb status received: %d", __FUNCTION__,
+		dbg("%s - nonzero urb status received: %d", __func__,
 		    status);
 		    status);
 		goto exit;
 		goto exit;
 	}
 	}
@@ -183,7 +183,7 @@ exit:
 	if (result)
 	if (result)
 		dev_err(&urb->dev->dev,
 		dev_err(&urb->dev->dev,
 			"%s - Error %d submitting control urb\n",
 			"%s - Error %d submitting control urb\n",
-			__FUNCTION__, result);
+			__func__, result);
 	return;
 	return;
 }
 }
 
 
@@ -214,7 +214,7 @@ static void mos7720_bulk_in_callback(struct urb *urb)
 
 
 	port = mos7720_port->port;
 	port = mos7720_port->port;
 
 
-	dbg("Entering...%s", __FUNCTION__);
+	dbg("Entering...%s", __func__);
 
 
 	data = urb->transfer_buffer;
 	data = urb->transfer_buffer;
 
 
@@ -362,7 +362,7 @@ static int mos7720_open(struct usb_serial_port *port, struct file * filp)
 		urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
 		urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
 					       GFP_KERNEL);
 					       GFP_KERNEL);
 		if (!urb->transfer_buffer) {
 		if (!urb->transfer_buffer) {
-			err("%s-out of memory for urb buffers.", __FUNCTION__);
+			err("%s-out of memory for urb buffers.", __func__);
 			usb_free_urb(mos7720_port->write_urb_pool[j]);
 			usb_free_urb(mos7720_port->write_urb_pool[j]);
 			mos7720_port->write_urb_pool[j] = NULL;
 			mos7720_port->write_urb_pool[j] = NULL;
 			continue;
 			continue;
@@ -479,7 +479,7 @@ static int mos7720_open(struct usb_serial_port *port, struct file * filp)
 		if (response)
 		if (response)
 			dev_err(&port->dev,
 			dev_err(&port->dev,
 				"%s - Error %d submitting control urb\n",
 				"%s - Error %d submitting control urb\n",
-				__FUNCTION__, response);
+				__func__, response);
 	}
 	}
 
 
 	/* set up our bulk in urb */
 	/* set up our bulk in urb */
@@ -492,7 +492,7 @@ static int mos7720_open(struct usb_serial_port *port, struct file * filp)
 	response = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	response = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	if (response)
 	if (response)
 		dev_err(&port->dev,
 		dev_err(&port->dev,
-			"%s - Error %d submitting read urb\n", __FUNCTION__, response);
+			"%s - Error %d submitting read urb\n", __func__, response);
 
 
 	/* initialize our icount structure */
 	/* initialize our icount structure */
 	memset(&(mos7720_port->icount), 0x00, sizeof(mos7720_port->icount));
 	memset(&(mos7720_port->icount), 0x00, sizeof(mos7720_port->icount));
@@ -521,11 +521,11 @@ static int mos7720_chars_in_buffer(struct usb_serial_port *port)
 	int chars = 0;
 	int chars = 0;
 	struct moschip_port *mos7720_port;
 	struct moschip_port *mos7720_port;
 
 
-	dbg("%s:entering ...........", __FUNCTION__);
+	dbg("%s:entering ...........", __func__);
 
 
 	mos7720_port = usb_get_serial_port_data(port);
 	mos7720_port = usb_get_serial_port_data(port);
 	if (mos7720_port == NULL) {
 	if (mos7720_port == NULL) {
-		dbg("%s:leaving ...........", __FUNCTION__);
+		dbg("%s:leaving ...........", __func__);
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}
 
 
@@ -533,7 +533,7 @@ static int mos7720_chars_in_buffer(struct usb_serial_port *port)
 		if (mos7720_port->write_urb_pool[i] && mos7720_port->write_urb_pool[i]->status == -EINPROGRESS)
 		if (mos7720_port->write_urb_pool[i] && mos7720_port->write_urb_pool[i]->status == -EINPROGRESS)
 			chars += URB_TRANSFER_BUFFER_SIZE;
 			chars += URB_TRANSFER_BUFFER_SIZE;
 	}
 	}
-	dbg("%s - returns %d", __FUNCTION__, chars);
+	dbg("%s - returns %d", __func__, chars);
 	return chars;
 	return chars;
 }
 }
 
 
@@ -585,7 +585,7 @@ static void mos7720_close(struct usb_serial_port *port, struct file *filp)
 	mutex_unlock(&serial->disc_mutex);
 	mutex_unlock(&serial->disc_mutex);
 	mos7720_port->open = 0;
 	mos7720_port->open = 0;
 
 
-	dbg("Leaving %s", __FUNCTION__);
+	dbg("Leaving %s", __func__);
 }
 }
 
 
 static void mos7720_break(struct usb_serial_port *port, int break_state)
 static 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)
 	struct usb_serial *serial;
 	struct usb_serial *serial;
 	struct moschip_port *mos7720_port;
 	struct moschip_port *mos7720_port;
 
 
-	dbg("Entering %s", __FUNCTION__);
+	dbg("Entering %s", __func__);
 
 
 	serial = port->serial;
 	serial = port->serial;
 
 
@@ -627,11 +627,11 @@ static int mos7720_write_room(struct usb_serial_port *port)
 	int room = 0;
 	int room = 0;
 	int i;
 	int i;
 
 
-	dbg("%s:entering ...........", __FUNCTION__);
+	dbg("%s:entering ...........", __func__);
 
 
 	mos7720_port = usb_get_serial_port_data(port);
 	mos7720_port = usb_get_serial_port_data(port);
 	if (mos7720_port == NULL) {
 	if (mos7720_port == NULL) {
-		dbg("%s:leaving ...........", __FUNCTION__);
+		dbg("%s:leaving ...........", __func__);
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}
 
 
@@ -640,7 +640,7 @@ static int mos7720_write_room(struct usb_serial_port *port)
 			room += URB_TRANSFER_BUFFER_SIZE;
 			room += URB_TRANSFER_BUFFER_SIZE;
 	}
 	}
 
 
-	dbg("%s - returns %d", __FUNCTION__, room);
+	dbg("%s - returns %d", __func__, room);
 	return room;
 	return room;
 }
 }
 
 
@@ -657,7 +657,7 @@ static int mos7720_write(struct usb_serial_port *port,
 	struct urb    *urb;
 	struct urb    *urb;
 	const unsigned char *current_position = data;
 	const unsigned char *current_position = data;
 
 
-	dbg("%s:entering ...........", __FUNCTION__);
+	dbg("%s:entering ...........", __func__);
 
 
 	serial = port->serial;
 	serial = port->serial;
 
 
@@ -679,7 +679,7 @@ static int mos7720_write(struct usb_serial_port *port,
 	}
 	}
 
 
 	if (urb == NULL) {
 	if (urb == NULL) {
-		dbg("%s - no more free urbs", __FUNCTION__);
+		dbg("%s - no more free urbs", __func__);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -687,14 +687,14 @@ static int mos7720_write(struct usb_serial_port *port,
 		urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
 		urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
 					       GFP_KERNEL);
 					       GFP_KERNEL);
 		if (urb->transfer_buffer == NULL) {
 		if (urb->transfer_buffer == NULL) {
-			err("%s no more kernel memory...", __FUNCTION__);
+			err("%s no more kernel memory...", __func__);
 			goto exit;
 			goto exit;
 		}
 		}
 	}
 	}
 	transfer_size = min (count, URB_TRANSFER_BUFFER_SIZE);
 	transfer_size = min (count, URB_TRANSFER_BUFFER_SIZE);
 
 
 	memcpy(urb->transfer_buffer, current_position, transfer_size);
 	memcpy(urb->transfer_buffer, current_position, transfer_size);
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, transfer_size,
+	usb_serial_debug_data(debug, &port->dev, __func__, transfer_size,
 			      urb->transfer_buffer);
 			      urb->transfer_buffer);
 
 
 	/* fill urb with data and submit  */
 	/* fill urb with data and submit  */
@@ -708,7 +708,7 @@ static int mos7720_write(struct usb_serial_port *port,
 	status = usb_submit_urb(urb,GFP_ATOMIC);
 	status = usb_submit_urb(urb,GFP_ATOMIC);
 	if (status) {
 	if (status) {
 		err("%s - usb_submit_urb(write bulk) failed with status = %d",
 		err("%s - usb_submit_urb(write bulk) failed with status = %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		bytes_sent = status;
 		bytes_sent = status;
 		goto exit;
 		goto exit;
 	}
 	}
@@ -724,7 +724,7 @@ static void mos7720_throttle(struct usb_serial_port *port)
 	struct tty_struct *tty;
 	struct tty_struct *tty;
 	int status;
 	int status;
 
 
-	dbg("%s- port %d\n", __FUNCTION__, port->number);
+	dbg("%s- port %d\n", __func__, port->number);
 
 
 	mos7720_port = usb_get_serial_port_data(port);
 	mos7720_port = usb_get_serial_port_data(port);
 
 
@@ -736,11 +736,11 @@ static void mos7720_throttle(struct usb_serial_port *port)
 		return;
 		return;
 	}
 	}
 
 
-	dbg("%s: Entering ..........", __FUNCTION__);
+	dbg("%s: Entering ..........", __func__);
 
 
 	tty = port->tty;
 	tty = port->tty;
 	if (!tty) {
 	if (!tty) {
-		dbg("%s - no tty available", __FUNCTION__);
+		dbg("%s - no tty available", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -773,15 +773,15 @@ static void mos7720_unthrottle(struct usb_serial_port *port)
 		return;
 		return;
 
 
 	if (!mos7720_port->open) {
 	if (!mos7720_port->open) {
-		dbg("%s - port not opened", __FUNCTION__);
+		dbg("%s - port not opened", __func__);
 		return;
 		return;
 	}
 	}
 
 
-	dbg("%s: Entering ..........", __FUNCTION__);
+	dbg("%s: Entering ..........", __func__);
 
 
 	tty = port->tty;
 	tty = port->tty;
 	if (!tty) {
 	if (!tty) {
-		dbg("%s - no tty available", __FUNCTION__);
+		dbg("%s - no tty available", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -922,7 +922,7 @@ static int calc_baud_rate_divisor(int baudrate, int *divisor)
 	__u16 round;
 	__u16 round;
 
 
 
 
-	dbg("%s - %d", __FUNCTION__, baudrate);
+	dbg("%s - %d", __func__, baudrate);
 
 
 	for (i = 0; i < ARRAY_SIZE(divisor_table); i++) {
 	for (i = 0; i < ARRAY_SIZE(divisor_table); i++) {
 		if (divisor_table[i].baudrate == baudrate) {
 		if (divisor_table[i].baudrate == baudrate) {
@@ -973,15 +973,15 @@ static int send_cmd_write_baud_rate(struct moschip_port *mos7720_port,
 	port = mos7720_port->port;
 	port = mos7720_port->port;
 	serial = port->serial;
 	serial = port->serial;
 
 
-	dbg("%s: Entering ..........", __FUNCTION__);
+	dbg("%s: Entering ..........", __func__);
 
 
 	number = port->number - port->serial->minor;
 	number = port->number - port->serial->minor;
-	dbg("%s - port = %d, baud = %d", __FUNCTION__, port->number, baudrate);
+	dbg("%s - port = %d, baud = %d", __func__, port->number, baudrate);
 
 
         /* Calculate the Divisor */
         /* Calculate the Divisor */
 	status = calc_baud_rate_divisor(baudrate, &divisor);
 	status = calc_baud_rate_divisor(baudrate, &divisor);
 	if (status) {
 	if (status) {
-		err("%s - bad baud rate", __FUNCTION__);
+		err("%s - bad baud rate", __func__);
 		return status;
 		return status;
 	}
 	}
 
 
@@ -1034,16 +1034,16 @@ static void change_port_settings(struct moschip_port *mos7720_port,
 	serial = port->serial;
 	serial = port->serial;
 	port_number = port->number - port->serial->minor;
 	port_number = port->number - port->serial->minor;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (!mos7720_port->open) {
 	if (!mos7720_port->open) {
-		dbg("%s - port not opened", __FUNCTION__);
+		dbg("%s - port not opened", __func__);
 		return;
 		return;
 	}
 	}
 
 
 	tty = mos7720_port->port->tty;
 	tty = mos7720_port->port->tty;
 
 
-	dbg("%s: Entering ..........", __FUNCTION__);
+	dbg("%s: Entering ..........", __func__);
 
 
 	lData = UART_LCR_WLEN8;
 	lData = UART_LCR_WLEN8;
 	lStop = 0x00;	/* 1 stop bit */
 	lStop = 0x00;	/* 1 stop bit */
@@ -1078,14 +1078,14 @@ static void change_port_settings(struct moschip_port *mos7720_port,
 	if (cflag & PARENB) {
 	if (cflag & PARENB) {
 		if (cflag & PARODD) {
 		if (cflag & PARODD) {
 			lParity = UART_LCR_PARITY;
 			lParity = UART_LCR_PARITY;
-			dbg("%s - parity = odd", __FUNCTION__);
+			dbg("%s - parity = odd", __func__);
 		} else {
 		} else {
 			lParity = (UART_LCR_EPAR | UART_LCR_PARITY);
 			lParity = (UART_LCR_EPAR | UART_LCR_PARITY);
-			dbg("%s - parity = even", __FUNCTION__);
+			dbg("%s - parity = even", __func__);
 		}
 		}
 
 
 	} else {
 	} else {
-		dbg("%s - parity = none", __FUNCTION__);
+		dbg("%s - parity = none", __func__);
 	}
 	}
 
 
 	if (cflag & CMSPAR)
 	if (cflag & CMSPAR)
@@ -1094,10 +1094,10 @@ static void change_port_settings(struct moschip_port *mos7720_port,
 	/* Change the Stop bit */
 	/* Change the Stop bit */
 	if (cflag & CSTOPB) {
 	if (cflag & CSTOPB) {
 		lStop = UART_LCR_STOP;
 		lStop = UART_LCR_STOP;
-		dbg("%s - stop bits = 2", __FUNCTION__);
+		dbg("%s - stop bits = 2", __func__);
 	} else {
 	} else {
 		lStop = 0x00;
 		lStop = 0x00;
-		dbg("%s - stop bits = 1", __FUNCTION__);
+		dbg("%s - stop bits = 1", __func__);
 	}
 	}
 
 
 #define LCR_BITS_MASK		0x03	/* Mask for bits/char field */
 #define LCR_BITS_MASK		0x03	/* Mask for bits/char field */
@@ -1171,7 +1171,7 @@ static void change_port_settings(struct moschip_port *mos7720_port,
 		return;
 		return;
 	}
 	}
 
 
-	dbg("%s - baud rate = %d", __FUNCTION__, baud);
+	dbg("%s - baud rate = %d", __func__, baud);
 	status = send_cmd_write_baud_rate(mos7720_port, baud);
 	status = send_cmd_write_baud_rate(mos7720_port, baud);
 	/* FIXME: needs to write actual resulting baud back not just
 	/* FIXME: needs to write actual resulting baud back not just
 	   blindly do so */
 	   blindly do so */
@@ -1217,7 +1217,7 @@ static void mos7720_set_termios(struct usb_serial_port *port,
 
 
 
 
 	if (!mos7720_port->open) {
 	if (!mos7720_port->open) {
-		dbg("%s - port not opened", __FUNCTION__);
+		dbg("%s - port not opened", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -1225,15 +1225,15 @@ static void mos7720_set_termios(struct usb_serial_port *port,
 
 
 	cflag = tty->termios->c_cflag;
 	cflag = tty->termios->c_cflag;
 
 
-	dbg("%s - cflag %08x iflag %08x", __FUNCTION__,
+	dbg("%s - cflag %08x iflag %08x", __func__,
 	    tty->termios->c_cflag,
 	    tty->termios->c_cflag,
 	    RELEVANT_IFLAG(tty->termios->c_iflag));
 	    RELEVANT_IFLAG(tty->termios->c_iflag));
 
 
-	dbg("%s - old cflag %08x old iflag %08x", __FUNCTION__,
+	dbg("%s - old cflag %08x old iflag %08x", __func__,
 	    old_termios->c_cflag,
 	    old_termios->c_cflag,
 	    RELEVANT_IFLAG(old_termios->c_iflag));
 	    RELEVANT_IFLAG(old_termios->c_iflag));
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* change the port settings to the new ones specified */
 	/* change the port settings to the new ones specified */
 	change_port_settings(mos7720_port, old_termios);
 	change_port_settings(mos7720_port, old_termios);
@@ -1271,7 +1271,7 @@ static int get_lsr_info(struct moschip_port *mos7720_port,
 
 
 	count = mos7720_chars_in_buffer(mos7720_port->port);
 	count = mos7720_chars_in_buffer(mos7720_port->port);
 	if (count == 0) {
 	if (count == 0) {
-		dbg("%s -- Empty", __FUNCTION__);
+		dbg("%s -- Empty", __func__);
 		result = TIOCSER_TEMT;
 		result = TIOCSER_TEMT;
 	}
 	}
 
 
@@ -1296,7 +1296,7 @@ static int get_number_bytes_avail(struct moschip_port *mos7720_port,
 
 
 	result = tty->read_cnt;
 	result = tty->read_cnt;
 
 
-	dbg("%s(%d) = %d", __FUNCTION__,  mos7720_port->port->number, result);
+	dbg("%s(%d) = %d", __func__,  mos7720_port->port->number, result);
 	if (copy_to_user(value, &result, sizeof(int)))
 	if (copy_to_user(value, &result, sizeof(int)))
 		return -EFAULT;
 		return -EFAULT;
 
 
@@ -1374,7 +1374,7 @@ static int get_modem_info(struct moschip_port *mos7720_port,
 		  | ((msr & UART_MSR_DSR)	? TIOCM_DSR: 0);  /* 0x100 */
 		  | ((msr & UART_MSR_DSR)	? TIOCM_DSR: 0);  /* 0x100 */
 
 
 
 
-	dbg("%s -- %x", __FUNCTION__, result);
+	dbg("%s -- %x", __func__, result);
 
 
 	if (copy_to_user(value, &result, sizeof(int)))
 	if (copy_to_user(value, &result, sizeof(int)))
 		return -EFAULT;
 		return -EFAULT;
@@ -1418,45 +1418,45 @@ static int mos7720_ioctl(struct usb_serial_port *port, struct file *file,
 	if (mos7720_port == NULL)
 	if (mos7720_port == NULL)
 		return -ENODEV;
 		return -ENODEV;
 
 
-	dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd);
+	dbg("%s - port %d, cmd = 0x%x", __func__, port->number, cmd);
 
 
 	switch (cmd) {
 	switch (cmd) {
 	case TIOCINQ:
 	case TIOCINQ:
 		/* return number of bytes available */
 		/* return number of bytes available */
-		dbg("%s (%d) TIOCINQ", __FUNCTION__,  port->number);
+		dbg("%s (%d) TIOCINQ", __func__,  port->number);
 		return get_number_bytes_avail(mos7720_port,
 		return get_number_bytes_avail(mos7720_port,
 					      (unsigned int __user *)arg);
 					      (unsigned int __user *)arg);
 		break;
 		break;
 
 
 	case TIOCSERGETLSR:
 	case TIOCSERGETLSR:
-		dbg("%s (%d) TIOCSERGETLSR", __FUNCTION__,  port->number);
+		dbg("%s (%d) TIOCSERGETLSR", __func__,  port->number);
 		return get_lsr_info(mos7720_port, (unsigned int __user *)arg);
 		return get_lsr_info(mos7720_port, (unsigned int __user *)arg);
 		return 0;
 		return 0;
 
 
 	case TIOCMBIS:
 	case TIOCMBIS:
 	case TIOCMBIC:
 	case TIOCMBIC:
 	case TIOCMSET:
 	case TIOCMSET:
-		dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__,
+		dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __func__,
 		    port->number);
 		    port->number);
 		return set_modem_info(mos7720_port, cmd,
 		return set_modem_info(mos7720_port, cmd,
 				      (unsigned int __user *)arg);
 				      (unsigned int __user *)arg);
 
 
 	case TIOCMGET:
 	case TIOCMGET:
-		dbg("%s (%d) TIOCMGET", __FUNCTION__,  port->number);
+		dbg("%s (%d) TIOCMGET", __func__,  port->number);
 		return get_modem_info(mos7720_port,
 		return get_modem_info(mos7720_port,
 				      (unsigned int __user *)arg);
 				      (unsigned int __user *)arg);
 
 
 	case TIOCGSERIAL:
 	case TIOCGSERIAL:
-		dbg("%s (%d) TIOCGSERIAL", __FUNCTION__,  port->number);
+		dbg("%s (%d) TIOCGSERIAL", __func__,  port->number);
 		return get_serial_info(mos7720_port,
 		return get_serial_info(mos7720_port,
 				       (struct serial_struct __user *)arg);
 				       (struct serial_struct __user *)arg);
 
 
 	case TIOCSSERIAL:
 	case TIOCSSERIAL:
-		dbg("%s (%d) TIOCSSERIAL", __FUNCTION__,  port->number);
+		dbg("%s (%d) TIOCSSERIAL", __func__,  port->number);
 		break;
 		break;
 
 
 	case TIOCMIWAIT:
 	case TIOCMIWAIT:
-		dbg("%s (%d) TIOCMIWAIT", __FUNCTION__,  port->number);
+		dbg("%s (%d) TIOCMIWAIT", __func__,  port->number);
 		cprev = mos7720_port->icount;
 		cprev = mos7720_port->icount;
 		while (1) {
 		while (1) {
 			if (signal_pending(current))
 			if (signal_pending(current))
@@ -1490,7 +1490,7 @@ static int mos7720_ioctl(struct usb_serial_port *port, struct file *file,
 		icount.brk = cnow.brk;
 		icount.brk = cnow.brk;
 		icount.buf_overrun = cnow.buf_overrun;
 		icount.buf_overrun = cnow.buf_overrun;
 
 
-		dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__,
+		dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __func__,
 		    port->number, icount.rx, icount.tx );
 		    port->number, icount.rx, icount.tx );
 		if (copy_to_user((void __user *)arg, &icount, sizeof(icount)))
 		if (copy_to_user((void __user *)arg, &icount, sizeof(icount)))
 			return -EFAULT;
 			return -EFAULT;
@@ -1508,7 +1508,7 @@ static int mos7720_startup(struct usb_serial *serial)
 	int i;
 	int i;
 	char data;
 	char data;
 
 
-	dbg("%s: Entering ..........", __FUNCTION__);
+	dbg("%s: Entering ..........", __func__);
 
 
 	if (!serial) {
 	if (!serial) {
 		dbg("Invalid Handler");
 		dbg("Invalid Handler");
@@ -1520,7 +1520,7 @@ static int mos7720_startup(struct usb_serial *serial)
 	/* create our private serial structure */
 	/* create our private serial structure */
 	mos7720_serial = kzalloc(sizeof(struct moschip_serial), GFP_KERNEL);
 	mos7720_serial = kzalloc(sizeof(struct moschip_serial), GFP_KERNEL);
 	if (mos7720_serial == NULL) {
 	if (mos7720_serial == NULL) {
-		err("%s - Out of memory", __FUNCTION__);
+		err("%s - Out of memory", __func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 
 
@@ -1533,7 +1533,7 @@ static int mos7720_startup(struct usb_serial *serial)
 	for (i = 0; i < serial->num_ports; ++i) {
 	for (i = 0; i < serial->num_ports; ++i) {
 		mos7720_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL);
 		mos7720_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL);
 		if (mos7720_port == NULL) {
 		if (mos7720_port == NULL) {
-			err("%s - Out of memory", __FUNCTION__);
+			err("%s - Out of memory", __func__);
 			usb_set_serial_data(serial, NULL);
 			usb_set_serial_data(serial, NULL);
 			kfree(mos7720_serial);
 			kfree(mos7720_serial);
 			return -ENOMEM;
 			return -ENOMEM;
@@ -1617,7 +1617,7 @@ static int __init moschip7720_init(void)
 {
 {
 	int retval;
 	int retval;
 
 
-	dbg("%s: Entering ..........", __FUNCTION__);
+	dbg("%s: Entering ..........", __func__);
 
 
 	/* Register with the usb serial */
 	/* Register with the usb serial */
 	retval = usb_serial_register(&moschip7720_2port_driver);
 	retval = usb_serial_register(&moschip7720_2port_driver);

+ 75 - 75
drivers/usb/serial/mos7840.c

@@ -403,7 +403,7 @@ static void mos7840_handle_new_lsr(struct moschip_port *port, __u8 new_lsr)
 {
 {
 	struct async_icount *icount;
 	struct async_icount *icount;
 
 
-	dbg("%s - %02x", __FUNCTION__, new_lsr);
+	dbg("%s - %02x", __func__, new_lsr);
 
 
 	if (new_lsr & SERIAL_LSR_BI) {
 	if (new_lsr & SERIAL_LSR_BI) {
 		//
 		//
@@ -459,21 +459,21 @@ static void mos7840_control_callback(struct urb *urb)
 	case -ENOENT:
 	case -ENOENT:
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
 		/* this urb is terminated, clean up */
 		/* this urb is terminated, clean up */
-		dbg("%s - urb shutting down with status: %d", __FUNCTION__,
+		dbg("%s - urb shutting down with status: %d", __func__,
 		    status);
 		    status);
 		return;
 		return;
 	default:
 	default:
-		dbg("%s - nonzero urb status received: %d", __FUNCTION__,
+		dbg("%s - nonzero urb status received: %d", __func__,
 		    status);
 		    status);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
-	dbg("%s urb buffer size is %d\n", __FUNCTION__, urb->actual_length);
-	dbg("%s mos7840_port->MsrLsr is %d port %d\n", __FUNCTION__,
+	dbg("%s urb buffer size is %d\n", __func__, urb->actual_length);
+	dbg("%s mos7840_port->MsrLsr is %d port %d\n", __func__,
 	    mos7840_port->MsrLsr, mos7840_port->port_num);
 	    mos7840_port->MsrLsr, mos7840_port->port_num);
 	data = urb->transfer_buffer;
 	data = urb->transfer_buffer;
 	regval = (__u8) data[0];
 	regval = (__u8) data[0];
-	dbg("%s data is %x\n", __FUNCTION__, regval);
+	dbg("%s data is %x\n", __func__, regval);
 	if (mos7840_port->MsrLsr == 0)
 	if (mos7840_port->MsrLsr == 0)
 		mos7840_handle_new_msr(mos7840_port, regval);
 		mos7840_handle_new_msr(mos7840_port, regval);
 	else if (mos7840_port->MsrLsr == 1)
 	else if (mos7840_port->MsrLsr == 1)
@@ -487,7 +487,7 @@ exit:
 	if (result) {
 	if (result) {
 		dev_err(&urb->dev->dev,
 		dev_err(&urb->dev->dev,
 			"%s - Error %d submitting interrupt urb\n",
 			"%s - Error %d submitting interrupt urb\n",
-			__FUNCTION__, result);
+			__func__, result);
 	}
 	}
 }
 }
 
 
@@ -542,11 +542,11 @@ static void mos7840_interrupt_callback(struct urb *urb)
 	case -ENOENT:
 	case -ENOENT:
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
 		/* this urb is terminated, clean up */
 		/* this urb is terminated, clean up */
-		dbg("%s - urb shutting down with status: %d", __FUNCTION__,
+		dbg("%s - urb shutting down with status: %d", __func__,
 		    status);
 		    status);
 		return;
 		return;
 	default:
 	default:
-		dbg("%s - nonzero urb status received: %d", __FUNCTION__,
+		dbg("%s - nonzero urb status received: %d", __func__,
 		    status);
 		    status);
 		goto exit;
 		goto exit;
 	}
 	}
@@ -614,7 +614,7 @@ exit:
 	if (result) {
 	if (result) {
 		dev_err(&urb->dev->dev,
 		dev_err(&urb->dev->dev,
 			"%s - Error %d submitting interrupt urb\n",
 			"%s - Error %d submitting interrupt urb\n",
-			__FUNCTION__, result);
+			__func__, result);
 	}
 	}
 }
 }
 
 
@@ -692,12 +692,12 @@ static void mos7840_bulk_in_callback(struct urb *urb)
 	}
 	}
 
 
 	port = (struct usb_serial_port *)mos7840_port->port;
 	port = (struct usb_serial_port *)mos7840_port->port;
-	if (mos7840_port_paranoia_check(port, __FUNCTION__)) {
+	if (mos7840_port_paranoia_check(port, __func__)) {
 		dbg("%s", "Port Paranoia failed \n");
 		dbg("%s", "Port Paranoia failed \n");
 		return;
 		return;
 	}
 	}
 
 
-	serial = mos7840_get_usb_serial(port, __FUNCTION__);
+	serial = mos7840_get_usb_serial(port, __func__);
 	if (!serial) {
 	if (!serial) {
 		dbg("%s\n", "Bad serial pointer ");
 		dbg("%s\n", "Bad serial pointer ");
 		return;
 		return;
@@ -767,7 +767,7 @@ static void mos7840_bulk_out_data_callback(struct urb *urb)
 		return;
 		return;
 	}
 	}
 
 
-	if (mos7840_port_paranoia_check(mos7840_port->port, __FUNCTION__)) {
+	if (mos7840_port_paranoia_check(mos7840_port->port, __func__)) {
 		dbg("%s", "Port Paranoia failed \n");
 		dbg("%s", "Port Paranoia failed \n");
 		return;
 		return;
 	}
 	}
@@ -815,14 +815,14 @@ static int mos7840_open(struct usb_serial_port *port, struct file *filp)
 	struct moschip_port *mos7840_port;
 	struct moschip_port *mos7840_port;
 	struct moschip_port *port0;
 	struct moschip_port *port0;
 
 
-	if (mos7840_port_paranoia_check(port, __FUNCTION__)) {
+	if (mos7840_port_paranoia_check(port, __func__)) {
 		dbg("%s", "Port Paranoia failed \n");
 		dbg("%s", "Port Paranoia failed \n");
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}
 
 
 	serial = port->serial;
 	serial = port->serial;
 
 
-	if (mos7840_serial_paranoia_check(serial, __FUNCTION__)) {
+	if (mos7840_serial_paranoia_check(serial, __func__)) {
 		dbg("%s", "Serial Paranoia failed \n");
 		dbg("%s", "Serial Paranoia failed \n");
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}
@@ -851,7 +851,7 @@ static int mos7840_open(struct usb_serial_port *port, struct file *filp)
 		if (!urb->transfer_buffer) {
 		if (!urb->transfer_buffer) {
 			usb_free_urb(urb);
 			usb_free_urb(urb);
 			mos7840_port->write_urb_pool[j] = NULL;
 			mos7840_port->write_urb_pool[j] = NULL;
-			err("%s-out of memory for urb buffers.", __FUNCTION__);
+			err("%s-out of memory for urb buffers.", __func__);
 			continue;
 			continue;
 		}
 		}
 	}
 	}
@@ -1039,7 +1039,7 @@ static int mos7840_open(struct usb_serial_port *port, struct file *filp)
 					   GFP_KERNEL);
 					   GFP_KERNEL);
 			if (response) {
 			if (response) {
 				err("%s - Error %d submitting interrupt urb",
 				err("%s - Error %d submitting interrupt urb",
-				    __FUNCTION__, response);
+				    __func__, response);
 			}
 			}
 
 
 		}
 		}
@@ -1072,7 +1072,7 @@ static int mos7840_open(struct usb_serial_port *port, struct file *filp)
 	    port->bulk_in_endpointAddress);
 	    port->bulk_in_endpointAddress);
 	response = usb_submit_urb(mos7840_port->read_urb, GFP_KERNEL);
 	response = usb_submit_urb(mos7840_port->read_urb, GFP_KERNEL);
 	if (response) {
 	if (response) {
-		err("%s - Error %d submitting control urb", __FUNCTION__,
+		err("%s - Error %d submitting control urb", __func__,
 		    response);
 		    response);
 	}
 	}
 
 
@@ -1116,7 +1116,7 @@ static int mos7840_chars_in_buffer(struct usb_serial_port *port)
 
 
 	dbg("%s \n", " mos7840_chars_in_buffer:entering ...........");
 	dbg("%s \n", " mos7840_chars_in_buffer:entering ...........");
 
 
-	if (mos7840_port_paranoia_check(port, __FUNCTION__)) {
+	if (mos7840_port_paranoia_check(port, __func__)) {
 		dbg("%s", "Invalid port \n");
 		dbg("%s", "Invalid port \n");
 		return -1;
 		return -1;
 	}
 	}
@@ -1134,7 +1134,7 @@ static int mos7840_chars_in_buffer(struct usb_serial_port *port)
 		}
 		}
 	}
 	}
 	spin_unlock_irqrestore(&mos7840_port->pool_lock,flags);
 	spin_unlock_irqrestore(&mos7840_port->pool_lock,flags);
-	dbg("%s - returns %d", __FUNCTION__, chars);
+	dbg("%s - returns %d", __func__, chars);
 	return chars;
 	return chars;
 
 
 }
 }
@@ -1171,7 +1171,7 @@ static void mos7840_block_until_tx_empty(struct moschip_port *mos7840_port)
 		/* No activity.. count down section */
 		/* No activity.. count down section */
 		wait--;
 		wait--;
 		if (wait == 0) {
 		if (wait == 0) {
-			dbg("%s - TIMEOUT", __FUNCTION__);
+			dbg("%s - TIMEOUT", __func__);
 			return;
 			return;
 		} else {
 		} else {
 			/* Reset timeout value back to seconds */
 			/* Reset timeout value back to seconds */
@@ -1195,12 +1195,12 @@ static void mos7840_close(struct usb_serial_port *port, struct file *filp)
 
 
 	dbg("%s\n", "mos7840_close:entering...");
 	dbg("%s\n", "mos7840_close:entering...");
 
 
-	if (mos7840_port_paranoia_check(port, __FUNCTION__)) {
+	if (mos7840_port_paranoia_check(port, __func__)) {
 		dbg("%s", "Port Paranoia failed \n");
 		dbg("%s", "Port Paranoia failed \n");
 		return;
 		return;
 	}
 	}
 
 
-	serial = mos7840_get_usb_serial(port, __FUNCTION__);
+	serial = mos7840_get_usb_serial(port, __func__);
 	if (!serial) {
 	if (!serial) {
 		dbg("%s", "Serial Paranoia failed \n");
 		dbg("%s", "Serial Paranoia failed \n");
 		return;
 		return;
@@ -1314,7 +1314,7 @@ static void mos7840_block_until_chase_response(struct moschip_port
 		/* No activity.. count down section */
 		/* No activity.. count down section */
 		wait--;
 		wait--;
 		if (wait == 0) {
 		if (wait == 0) {
-			dbg("%s - TIMEOUT", __FUNCTION__);
+			dbg("%s - TIMEOUT", __func__);
 			return;
 			return;
 		} else {
 		} else {
 			/* Reset timeout value back to seconds */
 			/* Reset timeout value back to seconds */
@@ -1337,12 +1337,12 @@ static void mos7840_break(struct usb_serial_port *port, int break_state)
 	dbg("%s \n", "Entering ...........");
 	dbg("%s \n", "Entering ...........");
 	dbg("mos7840_break: Start\n");
 	dbg("mos7840_break: Start\n");
 
 
-	if (mos7840_port_paranoia_check(port, __FUNCTION__)) {
+	if (mos7840_port_paranoia_check(port, __func__)) {
 		dbg("%s", "Port Paranoia failed \n");
 		dbg("%s", "Port Paranoia failed \n");
 		return;
 		return;
 	}
 	}
 
 
-	serial = mos7840_get_usb_serial(port, __FUNCTION__);
+	serial = mos7840_get_usb_serial(port, __func__);
 	if (!serial) {
 	if (!serial) {
 		dbg("%s", "Serial Paranoia failed \n");
 		dbg("%s", "Serial Paranoia failed \n");
 		return;
 		return;
@@ -1392,7 +1392,7 @@ static int mos7840_write_room(struct usb_serial_port *port)
 
 
 	dbg("%s \n", " mos7840_write_room:entering ...........");
 	dbg("%s \n", " mos7840_write_room:entering ...........");
 
 
-	if (mos7840_port_paranoia_check(port, __FUNCTION__)) {
+	if (mos7840_port_paranoia_check(port, __func__)) {
 		dbg("%s", "Invalid port \n");
 		dbg("%s", "Invalid port \n");
 		dbg("%s \n", " mos7840_write_room:leaving ...........");
 		dbg("%s \n", " mos7840_write_room:leaving ...........");
 		return -1;
 		return -1;
@@ -1413,7 +1413,7 @@ static int mos7840_write_room(struct usb_serial_port *port)
 	spin_unlock_irqrestore(&mos7840_port->pool_lock, flags);
 	spin_unlock_irqrestore(&mos7840_port->pool_lock, flags);
 
 
 	room = (room == 0) ? 0 : room - URB_TRANSFER_BUFFER_SIZE + 1;
 	room = (room == 0) ? 0 : room - URB_TRANSFER_BUFFER_SIZE + 1;
-	dbg("%s - returns %d", __FUNCTION__, room);
+	dbg("%s - returns %d", __func__, room);
 	return room;
 	return room;
 
 
 }
 }
@@ -1480,13 +1480,13 @@ static int mos7840_write(struct usb_serial_port *port,
 	status = mos7840_set_uart_reg(port, LINE_CONTROL_REGISTER, Data);
 	status = mos7840_set_uart_reg(port, LINE_CONTROL_REGISTER, Data);
 #endif
 #endif
 
 
-	if (mos7840_port_paranoia_check(port, __FUNCTION__)) {
+	if (mos7840_port_paranoia_check(port, __func__)) {
 		dbg("%s", "Port Paranoia failed \n");
 		dbg("%s", "Port Paranoia failed \n");
 		return -1;
 		return -1;
 	}
 	}
 
 
 	serial = port->serial;
 	serial = port->serial;
-	if (mos7840_serial_paranoia_check(serial, __FUNCTION__)) {
+	if (mos7840_serial_paranoia_check(serial, __func__)) {
 		dbg("%s", "Serial Paranoia failed \n");
 		dbg("%s", "Serial Paranoia failed \n");
 		return -1;
 		return -1;
 	}
 	}
@@ -1512,7 +1512,7 @@ static int mos7840_write(struct usb_serial_port *port,
 	spin_unlock_irqrestore(&mos7840_port->pool_lock, flags);
 	spin_unlock_irqrestore(&mos7840_port->pool_lock, flags);
 
 
 	if (urb == NULL) {
 	if (urb == NULL) {
-		dbg("%s - no more free urbs", __FUNCTION__);
+		dbg("%s - no more free urbs", __func__);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -1521,7 +1521,7 @@ static int mos7840_write(struct usb_serial_port *port,
 		    kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
 		    kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
 
 
 		if (urb->transfer_buffer == NULL) {
 		if (urb->transfer_buffer == NULL) {
-			err("%s no more kernel memory...", __FUNCTION__);
+			err("%s no more kernel memory...", __func__);
 			goto exit;
 			goto exit;
 		}
 		}
 	}
 	}
@@ -1547,7 +1547,7 @@ static int mos7840_write(struct usb_serial_port *port,
 	if (status) {
 	if (status) {
 		mos7840_port->busy[i] = 0;
 		mos7840_port->busy[i] = 0;
 		err("%s - usb_submit_urb(write bulk) failed with status = %d",
 		err("%s - usb_submit_urb(write bulk) failed with status = %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		bytes_sent = status;
 		bytes_sent = status;
 		goto exit;
 		goto exit;
 	}
 	}
@@ -1573,7 +1573,7 @@ static void mos7840_throttle(struct usb_serial_port *port)
 	struct tty_struct *tty;
 	struct tty_struct *tty;
 	int status;
 	int status;
 
 
-	if (mos7840_port_paranoia_check(port, __FUNCTION__)) {
+	if (mos7840_port_paranoia_check(port, __func__)) {
 		dbg("%s", "Invalid port \n");
 		dbg("%s", "Invalid port \n");
 		return;
 		return;
 	}
 	}
@@ -1594,7 +1594,7 @@ static void mos7840_throttle(struct usb_serial_port *port)
 
 
 	tty = port->tty;
 	tty = port->tty;
 	if (!tty) {
 	if (!tty) {
-		dbg("%s - no tty available", __FUNCTION__);
+		dbg("%s - no tty available", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -1634,7 +1634,7 @@ static void mos7840_unthrottle(struct usb_serial_port *port)
 	int status;
 	int status;
 	struct moschip_port *mos7840_port = mos7840_get_port_private(port);
 	struct moschip_port *mos7840_port = mos7840_get_port_private(port);
 
 
-	if (mos7840_port_paranoia_check(port, __FUNCTION__)) {
+	if (mos7840_port_paranoia_check(port, __func__)) {
 		dbg("%s", "Invalid port \n");
 		dbg("%s", "Invalid port \n");
 		return;
 		return;
 	}
 	}
@@ -1643,7 +1643,7 @@ static void mos7840_unthrottle(struct usb_serial_port *port)
 		return;
 		return;
 
 
 	if (!mos7840_port->open) {
 	if (!mos7840_port->open) {
-		dbg("%s - port not opened", __FUNCTION__);
+		dbg("%s - port not opened", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -1651,7 +1651,7 @@ static void mos7840_unthrottle(struct usb_serial_port *port)
 
 
 	tty = port->tty;
 	tty = port->tty;
 	if (!tty) {
 	if (!tty) {
-		dbg("%s - no tty available", __FUNCTION__);
+		dbg("%s - no tty available", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -1688,7 +1688,7 @@ static int mos7840_tiocmget(struct usb_serial_port *port, struct file *file)
 	int status = 0;
 	int status = 0;
 	mos7840_port = mos7840_get_port_private(port);
 	mos7840_port = mos7840_get_port_private(port);
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (mos7840_port == NULL)
 	if (mos7840_port == NULL)
 		return -ENODEV;
 		return -ENODEV;
@@ -1703,7 +1703,7 @@ static int mos7840_tiocmget(struct usb_serial_port *port, struct file *file)
 	    | ((msr & MOS7840_MSR_RI) ? TIOCM_RI : 0)
 	    | ((msr & MOS7840_MSR_RI) ? TIOCM_RI : 0)
 	    | ((msr & MOS7840_MSR_DSR) ? TIOCM_DSR : 0);
 	    | ((msr & MOS7840_MSR_DSR) ? TIOCM_DSR : 0);
 
 
-	dbg("%s - 0x%04X", __FUNCTION__, result);
+	dbg("%s - 0x%04X", __func__, result);
 
 
 	return result;
 	return result;
 }
 }
@@ -1715,7 +1715,7 @@ static int mos7840_tiocmset(struct usb_serial_port *port, struct file *file,
 	unsigned int mcr;
 	unsigned int mcr;
 	unsigned int status;
 	unsigned int status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	mos7840_port = mos7840_get_port_private(port);
 	mos7840_port = mos7840_get_port_private(port);
 
 
@@ -1759,7 +1759,7 @@ static int mos7840_calc_baud_rate_divisor(int baudRate, int *divisor,
 					  __u16 * clk_sel_val)
 					  __u16 * clk_sel_val)
 {
 {
 
 
-	dbg("%s - %d", __FUNCTION__, baudRate);
+	dbg("%s - %d", __func__, baudRate);
 
 
 	if (baudRate <= 115200) {
 	if (baudRate <= 115200) {
 		*divisor = 115200 / baudRate;
 		*divisor = 115200 / baudRate;
@@ -1842,12 +1842,12 @@ static int mos7840_send_cmd_write_baud_rate(struct moschip_port *mos7840_port,
 		return -1;
 		return -1;
 
 
 	port = (struct usb_serial_port *)mos7840_port->port;
 	port = (struct usb_serial_port *)mos7840_port->port;
-	if (mos7840_port_paranoia_check(port, __FUNCTION__)) {
+	if (mos7840_port_paranoia_check(port, __func__)) {
 		dbg("%s", "Invalid port \n");
 		dbg("%s", "Invalid port \n");
 		return -1;
 		return -1;
 	}
 	}
 
 
-	if (mos7840_serial_paranoia_check(port->serial, __FUNCTION__)) {
+	if (mos7840_serial_paranoia_check(port->serial, __func__)) {
 		dbg("%s", "Invalid Serial \n");
 		dbg("%s", "Invalid Serial \n");
 		return -1;
 		return -1;
 	}
 	}
@@ -1856,7 +1856,7 @@ static int mos7840_send_cmd_write_baud_rate(struct moschip_port *mos7840_port,
 
 
 	number = mos7840_port->port->number - mos7840_port->port->serial->minor;
 	number = mos7840_port->port->number - mos7840_port->port->serial->minor;
 
 
-	dbg("%s - port = %d, baud = %d", __FUNCTION__,
+	dbg("%s - port = %d, baud = %d", __func__,
 	    mos7840_port->port->number, baudRate);
 	    mos7840_port->port->number, baudRate);
 	//reset clk_uart_sel in spregOffset
 	//reset clk_uart_sel in spregOffset
 	if (baudRate > 115200) {
 	if (baudRate > 115200) {
@@ -1916,7 +1916,7 @@ static int mos7840_send_cmd_write_baud_rate(struct moschip_port *mos7840_port,
 		/* Calculate the Divisor */
 		/* Calculate the Divisor */
 
 
 		if (status) {
 		if (status) {
-			err("%s - bad baud rate", __FUNCTION__);
+			err("%s - bad baud rate", __func__);
 			dbg("%s\n", "bad baud rate");
 			dbg("%s\n", "bad baud rate");
 			return status;
 			return status;
 		}
 		}
@@ -1970,22 +1970,22 @@ static void mos7840_change_port_settings(struct moschip_port *mos7840_port,
 
 
 	port = (struct usb_serial_port *)mos7840_port->port;
 	port = (struct usb_serial_port *)mos7840_port->port;
 
 
-	if (mos7840_port_paranoia_check(port, __FUNCTION__)) {
+	if (mos7840_port_paranoia_check(port, __func__)) {
 		dbg("%s", "Invalid port \n");
 		dbg("%s", "Invalid port \n");
 		return;
 		return;
 	}
 	}
 
 
-	if (mos7840_serial_paranoia_check(port->serial, __FUNCTION__)) {
+	if (mos7840_serial_paranoia_check(port->serial, __func__)) {
 		dbg("%s", "Invalid Serial \n");
 		dbg("%s", "Invalid Serial \n");
 		return;
 		return;
 	}
 	}
 
 
 	serial = port->serial;
 	serial = port->serial;
 
 
-	dbg("%s - port %d", __FUNCTION__, mos7840_port->port->number);
+	dbg("%s - port %d", __func__, mos7840_port->port->number);
 
 
 	if (!mos7840_port->open) {
 	if (!mos7840_port->open) {
-		dbg("%s - port not opened", __FUNCTION__);
+		dbg("%s - port not opened", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -2024,14 +2024,14 @@ static void mos7840_change_port_settings(struct moschip_port *mos7840_port,
 	if (cflag & PARENB) {
 	if (cflag & PARENB) {
 		if (cflag & PARODD) {
 		if (cflag & PARODD) {
 			lParity = LCR_PAR_ODD;
 			lParity = LCR_PAR_ODD;
-			dbg("%s - parity = odd", __FUNCTION__);
+			dbg("%s - parity = odd", __func__);
 		} else {
 		} else {
 			lParity = LCR_PAR_EVEN;
 			lParity = LCR_PAR_EVEN;
-			dbg("%s - parity = even", __FUNCTION__);
+			dbg("%s - parity = even", __func__);
 		}
 		}
 
 
 	} else {
 	} else {
-		dbg("%s - parity = none", __FUNCTION__);
+		dbg("%s - parity = none", __func__);
 	}
 	}
 
 
 	if (cflag & CMSPAR) {
 	if (cflag & CMSPAR) {
@@ -2041,10 +2041,10 @@ static void mos7840_change_port_settings(struct moschip_port *mos7840_port,
 	/* Change the Stop bit */
 	/* Change the Stop bit */
 	if (cflag & CSTOPB) {
 	if (cflag & CSTOPB) {
 		lStop = LCR_STOP_2;
 		lStop = LCR_STOP_2;
-		dbg("%s - stop bits = 2", __FUNCTION__);
+		dbg("%s - stop bits = 2", __func__);
 	} else {
 	} else {
 		lStop = LCR_STOP_1;
 		lStop = LCR_STOP_1;
-		dbg("%s - stop bits = 1", __FUNCTION__);
+		dbg("%s - stop bits = 1", __func__);
 	}
 	}
 
 
 	/* Update the LCR with the correct value */
 	/* Update the LCR with the correct value */
@@ -2101,7 +2101,7 @@ static void mos7840_change_port_settings(struct moschip_port *mos7840_port,
 		baud = 9600;
 		baud = 9600;
 	}
 	}
 
 
-	dbg("%s - baud rate = %d", __FUNCTION__, baud);
+	dbg("%s - baud rate = %d", __func__, baud);
 	status = mos7840_send_cmd_write_baud_rate(mos7840_port, baud);
 	status = mos7840_send_cmd_write_baud_rate(mos7840_port, baud);
 
 
 	/* Enable Interrupts */
 	/* Enable Interrupts */
@@ -2141,14 +2141,14 @@ static void mos7840_set_termios(struct usb_serial_port *port,
 	struct moschip_port *mos7840_port;
 	struct moschip_port *mos7840_port;
 	struct tty_struct *tty;
 	struct tty_struct *tty;
 	dbg("mos7840_set_termios: START\n");
 	dbg("mos7840_set_termios: START\n");
-	if (mos7840_port_paranoia_check(port, __FUNCTION__)) {
+	if (mos7840_port_paranoia_check(port, __func__)) {
 		dbg("%s", "Invalid port \n");
 		dbg("%s", "Invalid port \n");
 		return;
 		return;
 	}
 	}
 
 
 	serial = port->serial;
 	serial = port->serial;
 
 
-	if (mos7840_serial_paranoia_check(serial, __FUNCTION__)) {
+	if (mos7840_serial_paranoia_check(serial, __func__)) {
 		dbg("%s", "Invalid Serial \n");
 		dbg("%s", "Invalid Serial \n");
 		return;
 		return;
 	}
 	}
@@ -2161,7 +2161,7 @@ static void mos7840_set_termios(struct usb_serial_port *port,
 	tty = port->tty;
 	tty = port->tty;
 
 
 	if (!mos7840_port->open) {
 	if (!mos7840_port->open) {
-		dbg("%s - port not opened", __FUNCTION__);
+		dbg("%s - port not opened", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -2169,11 +2169,11 @@ static void mos7840_set_termios(struct usb_serial_port *port,
 
 
 	cflag = tty->termios->c_cflag;
 	cflag = tty->termios->c_cflag;
 
 
-	dbg("%s - clfag %08x iflag %08x", __FUNCTION__,
+	dbg("%s - clfag %08x iflag %08x", __func__,
 	    tty->termios->c_cflag, RELEVANT_IFLAG(tty->termios->c_iflag));
 	    tty->termios->c_cflag, RELEVANT_IFLAG(tty->termios->c_iflag));
-	dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__,
+	dbg("%s - old clfag %08x old iflag %08x", __func__,
 	    old_termios->c_cflag, RELEVANT_IFLAG(old_termios->c_iflag));
 	    old_termios->c_cflag, RELEVANT_IFLAG(old_termios->c_iflag));
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* change the port settings to the new ones specified */
 	/* change the port settings to the new ones specified */
 
 
@@ -2214,7 +2214,7 @@ static int mos7840_get_lsr_info(struct moschip_port *mos7840_port,
 
 
 	count = mos7840_chars_in_buffer(mos7840_port->port);
 	count = mos7840_chars_in_buffer(mos7840_port->port);
 	if (count == 0) {
 	if (count == 0) {
-		dbg("%s -- Empty", __FUNCTION__);
+		dbg("%s -- Empty", __func__);
 		result = TIOCSER_TEMT;
 		result = TIOCSER_TEMT;
 	}
 	}
 
 
@@ -2241,7 +2241,7 @@ static int mos7840_set_modem_info(struct moschip_port *mos7840_port,
 		return -1;
 		return -1;
 
 
 	port = (struct usb_serial_port *)mos7840_port->port;
 	port = (struct usb_serial_port *)mos7840_port->port;
-	if (mos7840_port_paranoia_check(port, __FUNCTION__)) {
+	if (mos7840_port_paranoia_check(port, __func__)) {
 		dbg("%s", "Invalid port \n");
 		dbg("%s", "Invalid port \n");
 		return -1;
 		return -1;
 	}
 	}
@@ -2315,7 +2315,7 @@ static int mos7840_get_modem_info(struct moschip_port *mos7840_port,
 	    |((msr & MOS7840_MSR_RI) ? TIOCM_RI : 0)	/* 0x080 */
 	    |((msr & MOS7840_MSR_RI) ? TIOCM_RI : 0)	/* 0x080 */
 	    |((msr & MOS7840_MSR_DSR) ? TIOCM_DSR : 0);	/* 0x100 */
 	    |((msr & MOS7840_MSR_DSR) ? TIOCM_DSR : 0);	/* 0x100 */
 
 
-	dbg("%s -- %x", __FUNCTION__, result);
+	dbg("%s -- %x", __func__, result);
 
 
 	if (copy_to_user(value, &result, sizeof(int)))
 	if (copy_to_user(value, &result, sizeof(int)))
 		return -EFAULT;
 		return -EFAULT;
@@ -2372,7 +2372,7 @@ static int mos7840_ioctl(struct usb_serial_port *port, struct file *file,
 	struct serial_icounter_struct icount;
 	struct serial_icounter_struct icount;
 	int mosret = 0;
 	int mosret = 0;
 
 
-	if (mos7840_port_paranoia_check(port, __FUNCTION__)) {
+	if (mos7840_port_paranoia_check(port, __func__)) {
 		dbg("%s", "Invalid port \n");
 		dbg("%s", "Invalid port \n");
 		return -1;
 		return -1;
 	}
 	}
@@ -2384,39 +2384,39 @@ static int mos7840_ioctl(struct usb_serial_port *port, struct file *file,
 
 
 	tty = mos7840_port->port->tty;
 	tty = mos7840_port->port->tty;
 
 
-	dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd);
+	dbg("%s - port %d, cmd = 0x%x", __func__, port->number, cmd);
 
 
 	switch (cmd) {
 	switch (cmd) {
 		/* return number of bytes available */
 		/* return number of bytes available */
 
 
 	case TIOCSERGETLSR:
 	case TIOCSERGETLSR:
-		dbg("%s (%d) TIOCSERGETLSR", __FUNCTION__, port->number);
+		dbg("%s (%d) TIOCSERGETLSR", __func__, port->number);
 		return mos7840_get_lsr_info(mos7840_port, argp);
 		return mos7840_get_lsr_info(mos7840_port, argp);
 		return 0;
 		return 0;
 
 
 	case TIOCMBIS:
 	case TIOCMBIS:
 	case TIOCMBIC:
 	case TIOCMBIC:
 	case TIOCMSET:
 	case TIOCMSET:
-		dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__,
+		dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __func__,
 		    port->number);
 		    port->number);
 		mosret =
 		mosret =
 		    mos7840_set_modem_info(mos7840_port, cmd, argp);
 		    mos7840_set_modem_info(mos7840_port, cmd, argp);
 		return mosret;
 		return mosret;
 
 
 	case TIOCMGET:
 	case TIOCMGET:
-		dbg("%s (%d) TIOCMGET", __FUNCTION__, port->number);
+		dbg("%s (%d) TIOCMGET", __func__, port->number);
 		return mos7840_get_modem_info(mos7840_port, argp);
 		return mos7840_get_modem_info(mos7840_port, argp);
 
 
 	case TIOCGSERIAL:
 	case TIOCGSERIAL:
-		dbg("%s (%d) TIOCGSERIAL", __FUNCTION__, port->number);
+		dbg("%s (%d) TIOCGSERIAL", __func__, port->number);
 		return mos7840_get_serial_info(mos7840_port, argp);
 		return mos7840_get_serial_info(mos7840_port, argp);
 
 
 	case TIOCSSERIAL:
 	case TIOCSSERIAL:
-		dbg("%s (%d) TIOCSSERIAL", __FUNCTION__, port->number);
+		dbg("%s (%d) TIOCSSERIAL", __func__, port->number);
 		break;
 		break;
 
 
 	case TIOCMIWAIT:
 	case TIOCMIWAIT:
-		dbg("%s (%d) TIOCMIWAIT", __FUNCTION__, port->number);
+		dbg("%s (%d) TIOCMIWAIT", __func__, port->number);
 		cprev = mos7840_port->icount;
 		cprev = mos7840_port->icount;
 		while (1) {
 		while (1) {
 			//interruptible_sleep_on(&mos7840_port->delta_msr_wait);
 			//interruptible_sleep_on(&mos7840_port->delta_msr_wait);
@@ -2459,7 +2459,7 @@ static int mos7840_ioctl(struct usb_serial_port *port, struct file *file,
 		icount.brk = cnow.brk;
 		icount.brk = cnow.brk;
 		icount.buf_overrun = cnow.buf_overrun;
 		icount.buf_overrun = cnow.buf_overrun;
 
 
-		dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__,
+		dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __func__,
 		    port->number, icount.rx, icount.tx);
 		    port->number, icount.rx, icount.tx);
 		if (copy_to_user(argp, &icount, sizeof(icount)))
 		if (copy_to_user(argp, &icount, sizeof(icount)))
 			return -EFAULT;
 			return -EFAULT;
@@ -2522,7 +2522,7 @@ static int mos7840_startup(struct usb_serial *serial)
 	for (i = 0; i < serial->num_ports; ++i) {
 	for (i = 0; i < serial->num_ports; ++i) {
 		mos7840_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL);
 		mos7840_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL);
 		if (mos7840_port == NULL) {
 		if (mos7840_port == NULL) {
-			err("%s - Out of memory", __FUNCTION__);
+			err("%s - Out of memory", __func__);
 			status = -ENOMEM;
 			status = -ENOMEM;
 			i--; /* don't follow NULL pointer cleaning up */
 			i--; /* don't follow NULL pointer cleaning up */
 			goto error;
 			goto error;

+ 9 - 9
drivers/usb/serial/navman.c

@@ -49,15 +49,15 @@ static void navman_read_int_callback(struct urb *urb)
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
 		/* this urb is terminated, clean up */
 		/* this urb is terminated, clean up */
 		dbg("%s - urb shutting down with status: %d",
 		dbg("%s - urb shutting down with status: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	default:
 	default:
 		dbg("%s - nonzero urb status received: %d",
 		dbg("%s - nonzero urb status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__,
+	usb_serial_debug_data(debug, &port->dev, __func__,
 			      urb->actual_length, data);
 			      urb->actual_length, data);
 
 
 	tty = port->tty;
 	tty = port->tty;
@@ -72,29 +72,29 @@ exit:
 	if (result)
 	if (result)
 		dev_err(&urb->dev->dev,
 		dev_err(&urb->dev->dev,
 			"%s - Error %d submitting interrupt urb\n",
 			"%s - Error %d submitting interrupt urb\n",
-			__FUNCTION__, result);
+			__func__, result);
 }
 }
 
 
 static int navman_open(struct usb_serial_port *port, struct file *filp)
 static int navman_open(struct usb_serial_port *port, struct file *filp)
 {
 {
 	int result = 0;
 	int result = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (port->interrupt_in_urb) {
 	if (port->interrupt_in_urb) {
-		dbg("%s - adding interrupt input for treo", __FUNCTION__);
+		dbg("%s - adding interrupt input for treo", __func__);
 		result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 		result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 		if (result)
 		if (result)
 			dev_err(&port->dev,
 			dev_err(&port->dev,
 				"%s - failed submitting interrupt urb, error %d\n",
 				"%s - failed submitting interrupt urb, error %d\n",
-				__FUNCTION__, result);
+				__func__, result);
 	}
 	}
 	return result;
 	return result;
 }
 }
 
 
 static void navman_close(struct usb_serial_port *port, struct file *filp)
 static void navman_close(struct usb_serial_port *port, struct file *filp)
 {
 {
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	usb_kill_urb(port->interrupt_in_urb);
 	usb_kill_urb(port->interrupt_in_urb);
 }
 }
@@ -102,7 +102,7 @@ static void navman_close(struct usb_serial_port *port, struct file *filp)
 static int navman_write(struct usb_serial_port *port,
 static int navman_write(struct usb_serial_port *port,
 			const unsigned char *buf, int count)
 			const unsigned char *buf, int count)
 {
 {
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/*
 	/*
 	 * This device can't write any data, only read from the device
 	 * This device can't write any data, only read from the device

+ 16 - 16
drivers/usb/serial/omninet.c

@@ -150,7 +150,7 @@ static int omninet_attach (struct usb_serial *serial)
 
 
 	od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL );
 	od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL );
 	if( !od ) {
 	if( !od ) {
-		err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct omninet_data));
+		err("%s- kmalloc(%Zd) failed.", __func__, sizeof(struct omninet_data));
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 	usb_set_serial_port_data(port, od);
 	usb_set_serial_port_data(port, od);
@@ -163,7 +163,7 @@ static int omninet_open (struct usb_serial_port *port, struct file *filp)
 	struct usb_serial_port	*wport;
 	struct usb_serial_port	*wport;
 	int			result = 0;
 	int			result = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	wport = serial->port[1];
 	wport = serial->port[1];
 	wport->tty = port->tty;
 	wport->tty = port->tty;
@@ -175,7 +175,7 @@ static int omninet_open (struct usb_serial_port *port, struct file *filp)
 		      omninet_read_bulk_callback, port);
 		      omninet_read_bulk_callback, port);
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	if (result) {
 	if (result) {
-		err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
+		err("%s - failed submitting read urb, error %d", __func__, result);
 	}
 	}
 
 
 	return result;
 	return result;
@@ -183,7 +183,7 @@ static int omninet_open (struct usb_serial_port *port, struct file *filp)
 
 
 static void omninet_close (struct usb_serial_port *port, struct file * filp)
 static void omninet_close (struct usb_serial_port *port, struct file * filp)
 {
 {
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 	usb_kill_urb(port->read_urb);
 	usb_kill_urb(port->read_urb);
 }
 }
 
 
@@ -201,11 +201,11 @@ static void omninet_read_bulk_callback (struct urb *urb)
 	int i;
 	int i;
 	int result;
 	int result;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero read bulk status received: %d",
 		dbg("%s - nonzero read bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 
 
@@ -233,7 +233,7 @@ static void omninet_read_bulk_callback (struct urb *urb)
 		      omninet_read_bulk_callback, port);
 		      omninet_read_bulk_callback, port);
 	result = usb_submit_urb(urb, GFP_ATOMIC);
 	result = usb_submit_urb(urb, GFP_ATOMIC);
 	if (result)
 	if (result)
-		err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
+		err("%s - failed resubmitting read urb, error %d", __func__, result);
 
 
 	return;
 	return;
 }
 }
@@ -248,17 +248,17 @@ static int omninet_write (struct usb_serial_port *port, const unsigned char *buf
 
 
 	int			result;
 	int			result;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (count == 0) {
 	if (count == 0) {
-		dbg("%s - write request of 0 bytes", __FUNCTION__);
+		dbg("%s - write request of 0 bytes", __func__);
 		return (0);
 		return (0);
 	}
 	}
 
 
 	spin_lock_bh(&wport->lock);
 	spin_lock_bh(&wport->lock);
 	if (wport->write_urb_busy) {
 	if (wport->write_urb_busy) {
 		spin_unlock_bh(&wport->lock);
 		spin_unlock_bh(&wport->lock);
-		dbg("%s - already writing", __FUNCTION__);
+		dbg("%s - already writing", __func__);
 		return 0;
 		return 0;
 	}
 	}
 	wport->write_urb_busy = 1;
 	wport->write_urb_busy = 1;
@@ -268,7 +268,7 @@ static int omninet_write (struct usb_serial_port *port, const unsigned char *buf
 
 
 	memcpy (wport->write_urb->transfer_buffer + OMNINET_DATAOFFSET, buf, count);
 	memcpy (wport->write_urb->transfer_buffer + OMNINET_DATAOFFSET, buf, count);
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, wport->write_urb->transfer_buffer);
+	usb_serial_debug_data(debug, &port->dev, __func__, count, wport->write_urb->transfer_buffer);
 
 
 	header->oh_seq 	= od->od_outseq++;
 	header->oh_seq 	= od->od_outseq++;
 	header->oh_len 	= count;
 	header->oh_len 	= count;
@@ -282,7 +282,7 @@ static int omninet_write (struct usb_serial_port *port, const unsigned char *buf
 	result = usb_submit_urb(wport->write_urb, GFP_ATOMIC);
 	result = usb_submit_urb(wport->write_urb, GFP_ATOMIC);
 	if (result) {
 	if (result) {
 		wport->write_urb_busy = 0;
 		wport->write_urb_busy = 0;
-		err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
+		err("%s - failed submitting write urb, error %d", __func__, result);
 	} else
 	} else
 		result = count;
 		result = count;
 
 
@@ -300,7 +300,7 @@ static int omninet_write_room (struct usb_serial_port *port)
 	if (wport->write_urb_busy)
 	if (wport->write_urb_busy)
 		room = wport->bulk_out_size - OMNINET_HEADERLEN;
 		room = wport->bulk_out_size - OMNINET_HEADERLEN;
 
 
-	dbg("%s - returns %d", __FUNCTION__, room);
+	dbg("%s - returns %d", __func__, room);
 
 
 	return (room);
 	return (room);
 }
 }
@@ -311,12 +311,12 @@ static void omninet_write_bulk_callback (struct urb *urb)
 	struct usb_serial_port 	*port   = (struct usb_serial_port *) urb->context;
 	struct usb_serial_port 	*port   = (struct usb_serial_port *) urb->context;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %0x\n", __FUNCTION__, port->number);
+	dbg("%s - port %0x\n", __func__, port->number);
 
 
 	port->write_urb_busy = 0;
 	port->write_urb_busy = 0;
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero write bulk status received: %d",
 		dbg("%s - nonzero write bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 
 
@@ -328,7 +328,7 @@ static void omninet_shutdown (struct usb_serial *serial)
 {
 {
 	struct usb_serial_port *wport = serial->port[1];
 	struct usb_serial_port *wport = serial->port[1];
 	struct usb_serial_port *port = serial->port[0];
 	struct usb_serial_port *port = serial->port[0];
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	usb_kill_urb(wport->write_urb);
 	usb_kill_urb(wport->write_urb);
 	kfree(usb_get_serial_port_data(port));
 	kfree(usb_get_serial_port_data(port));

+ 32 - 32
drivers/usb/serial/option.c

@@ -408,24 +408,24 @@ module_exit(option_exit);
 
 
 static void option_rx_throttle(struct usb_serial_port *port)
 static void option_rx_throttle(struct usb_serial_port *port)
 {
 {
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 }
 }
 
 
 static void option_rx_unthrottle(struct usb_serial_port *port)
 static void option_rx_unthrottle(struct usb_serial_port *port)
 {
 {
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 }
 }
 
 
 static void option_break_ctl(struct usb_serial_port *port, int break_state)
 static void option_break_ctl(struct usb_serial_port *port, int break_state)
 {
 {
 	/* Unfortunately, I don't know how to send a break */
 	/* Unfortunately, I don't know how to send a break */
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 }
 }
 
 
 static void option_set_termios(struct usb_serial_port *port,
 static void option_set_termios(struct usb_serial_port *port,
 			struct ktermios *old_termios)
 			struct ktermios *old_termios)
 {
 {
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 	/* Doesn't support option setting */
 	/* Doesn't support option setting */
 	tty_termios_copy_hw(port->tty->termios, old_termios);
 	tty_termios_copy_hw(port->tty->termios, old_termios);
 	option_send_setup(port);
 	option_send_setup(port);
@@ -486,7 +486,7 @@ static int option_write(struct usb_serial_port *port,
 
 
 	portdata = usb_get_serial_port_data(port);
 	portdata = usb_get_serial_port_data(port);
 
 
-	dbg("%s: write (%d chars)", __FUNCTION__, count);
+	dbg("%s: write (%d chars)", __func__, count);
 
 
 	i = 0;
 	i = 0;
 	left = count;
 	left = count;
@@ -507,7 +507,7 @@ static int option_write(struct usb_serial_port *port,
 			dbg("usb_write %p failed (err=%d)",
 			dbg("usb_write %p failed (err=%d)",
 				this_urb, this_urb->status);
 				this_urb, this_urb->status);
 
 
-		dbg("%s: endpoint %d buf %d", __FUNCTION__,
+		dbg("%s: endpoint %d buf %d", __func__,
 			usb_pipeendpoint(this_urb->pipe), i);
 			usb_pipeendpoint(this_urb->pipe), i);
 
 
 		/* send the data */
 		/* send the data */
@@ -529,7 +529,7 @@ static int option_write(struct usb_serial_port *port,
 	}
 	}
 
 
 	count -= left;
 	count -= left;
-	dbg("%s: wrote (did %d)", __FUNCTION__, count);
+	dbg("%s: wrote (did %d)", __func__, count);
 	return count;
 	return count;
 }
 }
 
 
@@ -542,14 +542,14 @@ static void option_indat_callback(struct urb *urb)
 	unsigned char *data = urb->transfer_buffer;
 	unsigned char *data = urb->transfer_buffer;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s: %p", __FUNCTION__, urb);
+	dbg("%s: %p", __func__, urb);
 
 
 	endpoint = usb_pipeendpoint(urb->pipe);
 	endpoint = usb_pipeendpoint(urb->pipe);
 	port = (struct usb_serial_port *) urb->context;
 	port = (struct usb_serial_port *) urb->context;
 
 
 	if (status) {
 	if (status) {
 		dbg("%s: nonzero status: %d on endpoint %02x.",
 		dbg("%s: nonzero status: %d on endpoint %02x.",
-		    __FUNCTION__, status, endpoint);
+		    __func__, status, endpoint);
 	} else {
 	} else {
 		tty = port->tty;
 		tty = port->tty;
 		if (urb->actual_length) {
 		if (urb->actual_length) {
@@ -557,7 +557,7 @@ static void option_indat_callback(struct urb *urb)
 			tty_insert_flip_string(tty, data, urb->actual_length);
 			tty_insert_flip_string(tty, data, urb->actual_length);
 			tty_flip_buffer_push(tty);
 			tty_flip_buffer_push(tty);
 		} else {
 		} else {
-			dbg("%s: empty read urb received", __FUNCTION__);
+			dbg("%s: empty read urb received", __func__);
 		}
 		}
 
 
 		/* Resubmit urb so we continue receiving */
 		/* Resubmit urb so we continue receiving */
@@ -565,7 +565,7 @@ static void option_indat_callback(struct urb *urb)
 			err = usb_submit_urb(urb, GFP_ATOMIC);
 			err = usb_submit_urb(urb, GFP_ATOMIC);
 			if (err)
 			if (err)
 				printk(KERN_ERR "%s: resubmit read urb failed. "
 				printk(KERN_ERR "%s: resubmit read urb failed. "
-					"(%d)", __FUNCTION__, err);
+					"(%d)", __func__, err);
 		}
 		}
 	}
 	}
 	return;
 	return;
@@ -577,7 +577,7 @@ static void option_outdat_callback(struct urb *urb)
 	struct option_port_private *portdata;
 	struct option_port_private *portdata;
 	int i;
 	int i;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	port = (struct usb_serial_port *) urb->context;
 	port = (struct usb_serial_port *) urb->context;
 
 
@@ -601,15 +601,15 @@ static void option_instat_callback(struct urb *urb)
 	struct option_port_private *portdata = usb_get_serial_port_data(port);
 	struct option_port_private *portdata = usb_get_serial_port_data(port);
 	struct usb_serial *serial = port->serial;
 	struct usb_serial *serial = port->serial;
 
 
-	dbg("%s", __FUNCTION__);
-	dbg("%s: urb %p port %p has data %p", __FUNCTION__,urb,port,portdata);
+	dbg("%s", __func__);
+	dbg("%s: urb %p port %p has data %p", __func__,urb,port,portdata);
 
 
 	if (status == 0) {
 	if (status == 0) {
 		struct usb_ctrlrequest *req_pkt =
 		struct usb_ctrlrequest *req_pkt =
 				(struct usb_ctrlrequest *)urb->transfer_buffer;
 				(struct usb_ctrlrequest *)urb->transfer_buffer;
 
 
 		if (!req_pkt) {
 		if (!req_pkt) {
-			dbg("%s: NULL req_pkt\n", __FUNCTION__);
+			dbg("%s: NULL req_pkt\n", __func__);
 			return;
 			return;
 		}
 		}
 		if ((req_pkt->bRequestType == 0xA1) &&
 		if ((req_pkt->bRequestType == 0xA1) &&
@@ -619,7 +619,7 @@ static void option_instat_callback(struct urb *urb)
 					urb->transfer_buffer +
 					urb->transfer_buffer +
 					sizeof(struct usb_ctrlrequest));
 					sizeof(struct usb_ctrlrequest));
 
 
-			dbg("%s: signal x%x", __FUNCTION__, signals);
+			dbg("%s: signal x%x", __func__, signals);
 
 
 			old_dcd_state = portdata->dcd_state;
 			old_dcd_state = portdata->dcd_state;
 			portdata->cts_state = 1;
 			portdata->cts_state = 1;
@@ -631,11 +631,11 @@ static void option_instat_callback(struct urb *urb)
 					old_dcd_state && !portdata->dcd_state)
 					old_dcd_state && !portdata->dcd_state)
 				tty_hangup(port->tty);
 				tty_hangup(port->tty);
 		} else {
 		} else {
-			dbg("%s: type %x req %x", __FUNCTION__,
+			dbg("%s: type %x req %x", __func__,
 				req_pkt->bRequestType,req_pkt->bRequest);
 				req_pkt->bRequestType,req_pkt->bRequest);
 		}
 		}
 	} else
 	} else
-		dbg("%s: error %d", __FUNCTION__, status);
+		dbg("%s: error %d", __func__, status);
 
 
 	/* Resubmit urb so we continue receiving IRQ data */
 	/* Resubmit urb so we continue receiving IRQ data */
 	if (status != -ESHUTDOWN) {
 	if (status != -ESHUTDOWN) {
@@ -643,7 +643,7 @@ static void option_instat_callback(struct urb *urb)
 		err = usb_submit_urb(urb, GFP_ATOMIC);
 		err = usb_submit_urb(urb, GFP_ATOMIC);
 		if (err)
 		if (err)
 			dbg("%s: resubmit intr urb failed. (%d)",
 			dbg("%s: resubmit intr urb failed. (%d)",
-				__FUNCTION__, err);
+				__func__, err);
 	}
 	}
 }
 }
 
 
@@ -662,7 +662,7 @@ static int option_write_room(struct usb_serial_port *port)
 			data_len += OUT_BUFLEN;
 			data_len += OUT_BUFLEN;
 	}
 	}
 
 
-	dbg("%s: %d", __FUNCTION__, data_len);
+	dbg("%s: %d", __func__, data_len);
 	return data_len;
 	return data_len;
 }
 }
 
 
@@ -680,7 +680,7 @@ static int option_chars_in_buffer(struct usb_serial_port *port)
 		if (this_urb && test_bit(i, &portdata->out_busy))
 		if (this_urb && test_bit(i, &portdata->out_busy))
 			data_len += this_urb->transfer_buffer_length;
 			data_len += this_urb->transfer_buffer_length;
 	}
 	}
-	dbg("%s: %d", __FUNCTION__, data_len);
+	dbg("%s: %d", __func__, data_len);
 	return data_len;
 	return data_len;
 }
 }
 
 
@@ -693,7 +693,7 @@ static int option_open(struct usb_serial_port *port, struct file *filp)
 
 
 	portdata = usb_get_serial_port_data(port);
 	portdata = usb_get_serial_port_data(port);
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	/* Set some sane defaults */
 	/* Set some sane defaults */
 	portdata->rts_state = 1;
 	portdata->rts_state = 1;
@@ -705,7 +705,7 @@ static int option_open(struct usb_serial_port *port, struct file *filp)
 		if (! urb)
 		if (! urb)
 			continue;
 			continue;
 		if (urb->dev != serial->dev) {
 		if (urb->dev != serial->dev) {
-			dbg("%s: dev %p != %p", __FUNCTION__,
+			dbg("%s: dev %p != %p", __func__,
 				urb->dev, serial->dev);
 				urb->dev, serial->dev);
 			continue;
 			continue;
 		}
 		}
@@ -719,7 +719,7 @@ static int option_open(struct usb_serial_port *port, struct file *filp)
 		err = usb_submit_urb(urb, GFP_KERNEL);
 		err = usb_submit_urb(urb, GFP_KERNEL);
 		if (err) {
 		if (err) {
 			dbg("%s: submit urb %d failed (%d) %d",
 			dbg("%s: submit urb %d failed (%d) %d",
-				__FUNCTION__, i, err,
+				__func__, i, err,
 				urb->transfer_buffer_length);
 				urb->transfer_buffer_length);
 		}
 		}
 	}
 	}
@@ -747,7 +747,7 @@ static void option_close(struct usb_serial_port *port, struct file *filp)
 	struct usb_serial *serial = port->serial;
 	struct usb_serial *serial = port->serial;
 	struct option_port_private *portdata;
 	struct option_port_private *portdata;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 	portdata = usb_get_serial_port_data(port);
 	portdata = usb_get_serial_port_data(port);
 
 
 	portdata->rts_state = 0;
 	portdata->rts_state = 0;
@@ -780,7 +780,7 @@ static struct urb *option_setup_urb(struct usb_serial *serial, int endpoint,
 
 
 	urb = usb_alloc_urb(0, GFP_KERNEL);		/* No ISO */
 	urb = usb_alloc_urb(0, GFP_KERNEL);		/* No ISO */
 	if (urb == NULL) {
 	if (urb == NULL) {
-		dbg("%s: alloc for endpoint %d failed.", __FUNCTION__, endpoint);
+		dbg("%s: alloc for endpoint %d failed.", __func__, endpoint);
 		return NULL;
 		return NULL;
 	}
 	}
 
 
@@ -799,7 +799,7 @@ static void option_setup_urbs(struct usb_serial *serial)
 	struct usb_serial_port *port;
 	struct usb_serial_port *port;
 	struct option_port_private *portdata;
 	struct option_port_private *portdata;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	for (i = 0; i < serial->num_ports; i++) {
 	for (i = 0; i < serial->num_ports; i++) {
 		port = serial->port[i];
 		port = serial->port[i];
@@ -832,7 +832,7 @@ static int option_send_setup(struct usb_serial_port *port)
 	struct usb_serial *serial = port->serial;
 	struct usb_serial *serial = port->serial;
 	struct option_port_private *portdata;
 	struct option_port_private *portdata;
 	int ifNum = serial->interface->cur_altsetting->desc.bInterfaceNumber;
 	int ifNum = serial->interface->cur_altsetting->desc.bInterfaceNumber;
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	portdata = usb_get_serial_port_data(port);
 	portdata = usb_get_serial_port_data(port);
 
 
@@ -858,7 +858,7 @@ static int option_startup(struct usb_serial *serial)
 	struct option_port_private *portdata;
 	struct option_port_private *portdata;
 	u8 *buffer;
 	u8 *buffer;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	/* Now setup per port private data */
 	/* Now setup per port private data */
 	for (i = 0; i < serial->num_ports; i++) {
 	for (i = 0; i < serial->num_ports; i++) {
@@ -866,7 +866,7 @@ static int option_startup(struct usb_serial *serial)
 		portdata = kzalloc(sizeof(*portdata), GFP_KERNEL);
 		portdata = kzalloc(sizeof(*portdata), GFP_KERNEL);
 		if (!portdata) {
 		if (!portdata) {
 			dbg("%s: kmalloc for option_port_private (%d) failed!.",
 			dbg("%s: kmalloc for option_port_private (%d) failed!.",
-					__FUNCTION__, i);
+					__func__, i);
 			return (1);
 			return (1);
 		}
 		}
 
 
@@ -891,7 +891,7 @@ static int option_startup(struct usb_serial *serial)
 		err = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 		err = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 		if (err)
 		if (err)
 			dbg("%s: submit irq_in urb failed %d",
 			dbg("%s: submit irq_in urb failed %d",
-				__FUNCTION__, err);
+				__func__, err);
 	}
 	}
 
 
 	option_setup_urbs(serial);
 	option_setup_urbs(serial);
@@ -915,7 +915,7 @@ static void option_shutdown(struct usb_serial *serial)
 	struct usb_serial_port *port;
 	struct usb_serial_port *port;
 	struct option_port_private *portdata;
 	struct option_port_private *portdata;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	/* Stop reading/writing urbs */
 	/* Stop reading/writing urbs */
 	for (i = 0; i < serial->num_ports; ++i) {
 	for (i = 0; i < serial->num_ports; ++i) {

+ 54 - 54
drivers/usb/serial/oti6858.c

@@ -235,10 +235,10 @@ static void setup_line(struct work_struct *work)
 	unsigned long flags;
 	unsigned long flags;
 	int result;
 	int result;
 
 
-	dbg("%s(port = %d)", __FUNCTION__, port->number);
+	dbg("%s(port = %d)", __func__, port->number);
 
 
 	if ((new_setup = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL)) == NULL) {
 	if ((new_setup = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL)) == NULL) {
-		dev_err(&port->dev, "%s(): out of memory!\n", __FUNCTION__);
+		dev_err(&port->dev, "%s(): out of memory!\n", __func__);
 		/* we will try again */
 		/* we will try again */
 		schedule_delayed_work(&priv->delayed_setup_work, msecs_to_jiffies(2));
 		schedule_delayed_work(&priv->delayed_setup_work, msecs_to_jiffies(2));
 		return;
 		return;
@@ -253,7 +253,7 @@ static void setup_line(struct work_struct *work)
 				100);
 				100);
 
 
 	if (result != OTI6858_CTRL_PKT_SIZE) {
 	if (result != OTI6858_CTRL_PKT_SIZE) {
-		dev_err(&port->dev, "%s(): error reading status\n", __FUNCTION__);
+		dev_err(&port->dev, "%s(): error reading status\n", __func__);
 		kfree(new_setup);
 		kfree(new_setup);
 		/* we will try again */
 		/* we will try again */
 		schedule_delayed_work(&priv->delayed_setup_work, msecs_to_jiffies(2));
 		schedule_delayed_work(&priv->delayed_setup_work, msecs_to_jiffies(2));
@@ -286,12 +286,12 @@ static void setup_line(struct work_struct *work)
 	priv->setup_done = 1;
 	priv->setup_done = 1;
 	spin_unlock_irqrestore(&priv->lock, flags);
 	spin_unlock_irqrestore(&priv->lock, flags);
 
 
-	dbg("%s(): submitting interrupt urb", __FUNCTION__);
+	dbg("%s(): submitting interrupt urb", __func__);
 	port->interrupt_in_urb->dev = port->serial->dev;
 	port->interrupt_in_urb->dev = port->serial->dev;
 	result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 	result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 	if (result != 0) {
 	if (result != 0) {
 		dev_err(&port->dev, "%s(): usb_submit_urb() failed"
 		dev_err(&port->dev, "%s(): usb_submit_urb() failed"
-				" with error %d\n", __FUNCTION__, result);
+				" with error %d\n", __func__, result);
 	}
 	}
 }
 }
 
 
@@ -303,7 +303,7 @@ void send_data(struct work_struct *work)
 	unsigned long flags;
 	unsigned long flags;
 	unsigned char allow;
 	unsigned char allow;
 
 
-	dbg("%s(port = %d)", __FUNCTION__, port->number);
+	dbg("%s(port = %d)", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	if (priv->flags.write_urb_in_use) {
 	if (priv->flags.write_urb_in_use) {
@@ -331,12 +331,12 @@ void send_data(struct work_struct *work)
 	if (count == 0) {
 	if (count == 0) {
 		priv->flags.write_urb_in_use = 0;
 		priv->flags.write_urb_in_use = 0;
 
 
-		dbg("%s(): submitting interrupt urb", __FUNCTION__);
+		dbg("%s(): submitting interrupt urb", __func__);
 		port->interrupt_in_urb->dev = port->serial->dev;
 		port->interrupt_in_urb->dev = port->serial->dev;
 		result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 		result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 		if (result != 0) {
 		if (result != 0) {
 			dev_err(&port->dev, "%s(): usb_submit_urb() failed"
 			dev_err(&port->dev, "%s(): usb_submit_urb() failed"
-				" with error %d\n", __FUNCTION__, result);
+				" with error %d\n", __func__, result);
 		}
 		}
 		return;
 		return;
 	}
 	}
@@ -350,7 +350,7 @@ void send_data(struct work_struct *work)
 	result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 	result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 	if (result != 0) {
 	if (result != 0) {
 		dev_err(&port->dev, "%s(): usb_submit_urb() failed"
 		dev_err(&port->dev, "%s(): usb_submit_urb() failed"
-			       " with error %d\n", __FUNCTION__, result);
+			       " with error %d\n", __func__, result);
 		priv->flags.write_urb_in_use = 0;
 		priv->flags.write_urb_in_use = 0;
 	}
 	}
 
 
@@ -401,7 +401,7 @@ static int oti6858_write(struct usb_serial_port *port,
 	struct oti6858_private *priv = usb_get_serial_port_data(port);
 	struct oti6858_private *priv = usb_get_serial_port_data(port);
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s(port = %d, count = %d)", __FUNCTION__, port->number, count);
+	dbg("%s(port = %d, count = %d)", __func__, port->number, count);
 
 
 	if (!count)
 	if (!count)
 		return count;
 		return count;
@@ -419,7 +419,7 @@ static int oti6858_write_room(struct usb_serial_port *port)
 	int room = 0;
 	int room = 0;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s(port = %d)", __FUNCTION__, port->number);
+	dbg("%s(port = %d)", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	room = oti6858_buf_space_avail(priv->buf);
 	room = oti6858_buf_space_avail(priv->buf);
@@ -434,7 +434,7 @@ static int oti6858_chars_in_buffer(struct usb_serial_port *port)
 	int chars = 0;
 	int chars = 0;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s(port = %d)", __FUNCTION__, port->number);
+	dbg("%s(port = %d)", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	chars = oti6858_buf_data_avail(priv->buf);
 	chars = oti6858_buf_data_avail(priv->buf);
@@ -453,10 +453,10 @@ static void oti6858_set_termios(struct usb_serial_port *port,
 	u16 divisor;
 	u16 divisor;
 	int br;
 	int br;
 
 
-	dbg("%s(port = %d)", __FUNCTION__, port->number);
+	dbg("%s(port = %d)", __func__, port->number);
 
 
 	if (!port->tty || !port->tty->termios) {
 	if (!port->tty || !port->tty->termios) {
-		dbg("%s(): no tty structures", __FUNCTION__);
+		dbg("%s(): no tty structures", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -572,7 +572,7 @@ static int oti6858_open(struct usb_serial_port *port, struct file *filp)
 	unsigned long flags;
 	unsigned long flags;
 	int result;
 	int result;
 
 
-	dbg("%s(port = %d)", __FUNCTION__, port->number);
+	dbg("%s(port = %d)", __func__, port->number);
 
 
 	usb_clear_halt(serial->dev, port->write_urb->pipe);
 	usb_clear_halt(serial->dev, port->write_urb->pipe);
 	usb_clear_halt(serial->dev, port->read_urb->pipe);
 	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)
 		return 0;
 		return 0;
 
 
 	if ((buf = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL)) == NULL) {
 	if ((buf = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL)) == NULL) {
-		dev_err(&port->dev, "%s(): out of memory!\n", __FUNCTION__);
+		dev_err(&port->dev, "%s(): out of memory!\n", __func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 
 
@@ -610,12 +610,12 @@ static int oti6858_open(struct usb_serial_port *port, struct file *filp)
 	spin_unlock_irqrestore(&priv->lock, flags);
 	spin_unlock_irqrestore(&priv->lock, flags);
 	kfree(buf);
 	kfree(buf);
 
 
-	dbg("%s(): submitting interrupt urb", __FUNCTION__);
+	dbg("%s(): submitting interrupt urb", __func__);
 	port->interrupt_in_urb->dev = serial->dev;
 	port->interrupt_in_urb->dev = serial->dev;
 	result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 	result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 	if (result != 0) {
 	if (result != 0) {
 		dev_err(&port->dev, "%s(): usb_submit_urb() failed"
 		dev_err(&port->dev, "%s(): usb_submit_urb() failed"
-			       " with error %d\n", __FUNCTION__, result);
+			       " with error %d\n", __func__, result);
 		oti6858_close(port, NULL);
 		oti6858_close(port, NULL);
 		return -EPROTO;
 		return -EPROTO;
 	}
 	}
@@ -634,14 +634,14 @@ static void oti6858_close(struct usb_serial_port *port, struct file *filp)
 	long timeout;
 	long timeout;
 	wait_queue_t wait;
 	wait_queue_t wait;
 
 
-	dbg("%s(port = %d)", __FUNCTION__, port->number);
+	dbg("%s(port = %d)", __func__, port->number);
 
 
 	/* wait for data to drain from the buffer */
 	/* wait for data to drain from the buffer */
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	timeout = 30 * HZ;	/* PL2303_CLOSING_WAIT */
 	timeout = 30 * HZ;	/* PL2303_CLOSING_WAIT */
 	init_waitqueue_entry(&wait, current);
 	init_waitqueue_entry(&wait, current);
 	add_wait_queue(&port->tty->write_wait, &wait);
 	add_wait_queue(&port->tty->write_wait, &wait);
-	dbg("%s(): entering wait loop", __FUNCTION__);
+	dbg("%s(): entering wait loop", __func__);
 	for (;;) {
 	for (;;) {
 		set_current_state(TASK_INTERRUPTIBLE);
 		set_current_state(TASK_INTERRUPTIBLE);
 		if (oti6858_buf_data_avail(priv->buf) == 0
 		if (oti6858_buf_data_avail(priv->buf) == 0
@@ -654,7 +654,7 @@ static void oti6858_close(struct usb_serial_port *port, struct file *filp)
 	}
 	}
 	set_current_state(TASK_RUNNING);
 	set_current_state(TASK_RUNNING);
 	remove_wait_queue(&port->tty->write_wait, &wait);
 	remove_wait_queue(&port->tty->write_wait, &wait);
-	dbg("%s(): after wait loop", __FUNCTION__);
+	dbg("%s(): after wait loop", __func__);
 
 
 	/* clear out any remaining data in the buffer */
 	/* clear out any remaining data in the buffer */
 	oti6858_buf_clear(priv->buf);
 	oti6858_buf_clear(priv->buf);
@@ -675,7 +675,7 @@ static void oti6858_close(struct usb_serial_port *port, struct file *filp)
 	*/
 	*/
 		timeout = 2*HZ;
 		timeout = 2*HZ;
 	schedule_timeout_interruptible(timeout);
 	schedule_timeout_interruptible(timeout);
-	dbg("%s(): after schedule_timeout_interruptible()", __FUNCTION__);
+	dbg("%s(): after schedule_timeout_interruptible()", __func__);
 
 
 	/* cancel scheduled setup */
 	/* cancel scheduled setup */
 	cancel_delayed_work(&priv->delayed_setup_work);
 	cancel_delayed_work(&priv->delayed_setup_work);
@@ -683,7 +683,7 @@ static void oti6858_close(struct usb_serial_port *port, struct file *filp)
 	flush_scheduled_work();
 	flush_scheduled_work();
 
 
 	/* shutdown our urbs */
 	/* shutdown our urbs */
-	dbg("%s(): shutting down urbs", __FUNCTION__);
+	dbg("%s(): shutting down urbs", __func__);
 	usb_kill_urb(port->write_urb);
 	usb_kill_urb(port->write_urb);
 	usb_kill_urb(port->read_urb);
 	usb_kill_urb(port->read_urb);
 	usb_kill_urb(port->interrupt_in_urb);
 	usb_kill_urb(port->interrupt_in_urb);
@@ -706,7 +706,7 @@ static int oti6858_tiocmset(struct usb_serial_port *port, struct file *file,
 	u8 control;
 	u8 control;
 
 
 	dbg("%s(port = %d, set = 0x%08x, clear = 0x%08x)",
 	dbg("%s(port = %d, set = 0x%08x, clear = 0x%08x)",
-				__FUNCTION__, port->number, set, clear);
+				__func__, port->number, set, clear);
 
 
 	if (!usb_get_intfdata(port->serial->interface))
 	if (!usb_get_intfdata(port->serial->interface))
 		return -ENODEV;
 		return -ENODEV;
@@ -738,7 +738,7 @@ static int oti6858_tiocmget(struct usb_serial_port *port, struct file *file)
 	unsigned pin_state;
 	unsigned pin_state;
 	unsigned result = 0;
 	unsigned result = 0;
 
 
-	dbg("%s(port = %d)", __FUNCTION__, port->number);
+	dbg("%s(port = %d)", __func__, port->number);
 
 
 	if (!usb_get_intfdata(port->serial->interface))
 	if (!usb_get_intfdata(port->serial->interface))
 		return -ENODEV;
 		return -ENODEV;
@@ -761,7 +761,7 @@ static int oti6858_tiocmget(struct usb_serial_port *port, struct file *file)
 	if ((pin_state & PIN_DCD) != 0)
 	if ((pin_state & PIN_DCD) != 0)
 		result |= TIOCM_CD;
 		result |= TIOCM_CD;
 
 
-	dbg("%s() = 0x%08x", __FUNCTION__, result);
+	dbg("%s() = 0x%08x", __func__, result);
 
 
 	return result;
 	return result;
 }
 }
@@ -808,7 +808,7 @@ static int oti6858_ioctl(struct usb_serial_port *port, struct file *file,
 	unsigned int x;
 	unsigned int x;
 
 
 	dbg("%s(port = %d, cmd = 0x%04x, arg = 0x%08lx)",
 	dbg("%s(port = %d, cmd = 0x%04x, arg = 0x%08lx)",
-				__FUNCTION__, port->number, cmd, arg);
+				__func__, port->number, cmd, arg);
 
 
 	switch (cmd) {
 	switch (cmd) {
 		case TIOCMBIS:
 		case TIOCMBIS:
@@ -822,11 +822,11 @@ static int oti6858_ioctl(struct usb_serial_port *port, struct file *file,
 			return oti6858_tiocmset(port, NULL, 0, x);
 			return oti6858_tiocmset(port, NULL, 0, x);
 
 
 		case TIOCMIWAIT:
 		case TIOCMIWAIT:
-			dbg("%s(): TIOCMIWAIT", __FUNCTION__);
+			dbg("%s(): TIOCMIWAIT", __func__);
 			return wait_modem_info(port, arg);
 			return wait_modem_info(port, arg);
 
 
 		default:
 		default:
-			dbg("%s(): 0x%04x not supported", __FUNCTION__, cmd);
+			dbg("%s(): 0x%04x not supported", __func__, cmd);
 			break;
 			break;
 	}
 	}
 
 
@@ -837,10 +837,10 @@ static void oti6858_break_ctl(struct usb_serial_port *port, int break_state)
 {
 {
 	int state;
 	int state;
 
 
-	dbg("%s(port = %d)", __FUNCTION__, port->number);
+	dbg("%s(port = %d)", __func__, port->number);
 
 
 	state = (break_state == 0) ? 0 : 1;
 	state = (break_state == 0) ? 0 : 1;
-	dbg("%s(): turning break %s", __FUNCTION__, state ? "on" : "off");
+	dbg("%s(): turning break %s", __func__, state ? "on" : "off");
 
 
 	/* FIXME */
 	/* FIXME */
 /*
 /*
@@ -848,7 +848,7 @@ static void oti6858_break_ctl(struct usb_serial_port *port, int break_state)
 				  BREAK_REQUEST, BREAK_REQUEST_TYPE, state,
 				  BREAK_REQUEST, BREAK_REQUEST_TYPE, state,
 				  0, NULL, 0, 100);
 				  0, NULL, 0, 100);
 	if (result != 0)
 	if (result != 0)
-		dbg("%s(): error sending break", __FUNCTION__);
+		dbg("%s(): error sending break", __func__);
  */
  */
 }
 }
 
 
@@ -857,7 +857,7 @@ static void oti6858_shutdown(struct usb_serial *serial)
 	struct oti6858_private *priv;
 	struct oti6858_private *priv;
 	int i;
 	int i;
 
 
-	dbg("%s()", __FUNCTION__);
+	dbg("%s()", __func__);
 
 
 	for (i = 0; i < serial->num_ports; ++i) {
 	for (i = 0; i < serial->num_ports; ++i) {
 		priv = usb_get_serial_port_data(serial->port[i]);
 		priv = usb_get_serial_port_data(serial->port[i]);
@@ -877,7 +877,7 @@ static void oti6858_read_int_callback(struct urb *urb)
 	int status = urb->status;
 	int status = urb->status;
 
 
 	dbg("%s(port = %d, status = %d)",
 	dbg("%s(port = %d, status = %d)",
-				__FUNCTION__, port->number, status);
+				__func__, port->number, status);
 
 
 	switch (status) {
 	switch (status) {
 	case 0:
 	case 0:
@@ -888,11 +888,11 @@ static void oti6858_read_int_callback(struct urb *urb)
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
 		/* this urb is terminated, clean up */
 		/* this urb is terminated, clean up */
 		dbg("%s(): urb shutting down with status: %d",
 		dbg("%s(): urb shutting down with status: %d",
-					__FUNCTION__, status);
+					__func__, status);
 		return;
 		return;
 	default:
 	default:
 		dbg("%s(): nonzero urb status received: %d",
 		dbg("%s(): nonzero urb status received: %d",
-					__FUNCTION__, status);
+					__func__, status);
 		break;
 		break;
 	}
 	}
 
 
@@ -909,7 +909,7 @@ static void oti6858_read_int_callback(struct urb *urb)
 					priv->setup_done = 0;
 					priv->setup_done = 0;
 					resubmit = 0;
 					resubmit = 0;
 					dbg("%s(): scheduling setup_line()",
 					dbg("%s(): scheduling setup_line()",
-					    __FUNCTION__);
+					    __func__);
 					schedule_delayed_work(&priv->delayed_setup_work, 0);
 					schedule_delayed_work(&priv->delayed_setup_work, 0);
 				}
 				}
 			}
 			}
@@ -924,7 +924,7 @@ static void oti6858_read_int_callback(struct urb *urb)
 					priv->setup_done = 0;
 					priv->setup_done = 0;
 					resubmit = 0;
 					resubmit = 0;
 					dbg("%s(): scheduling setup_line()",
 					dbg("%s(): scheduling setup_line()",
-					    __FUNCTION__);
+					    __func__);
 					schedule_delayed_work(&priv->delayed_setup_work, 0);
 					schedule_delayed_work(&priv->delayed_setup_work, 0);
 				}
 				}
 			}
 			}
@@ -953,7 +953,7 @@ static void oti6858_read_int_callback(struct urb *urb)
 		if (result != 0) {
 		if (result != 0) {
 			priv->flags.read_urb_in_use = 0;
 			priv->flags.read_urb_in_use = 0;
 			dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
 			dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
-					" error %d\n", __FUNCTION__, result);
+					" error %d\n", __func__, result);
 		} else {
 		} else {
 			resubmit = 0;
 			resubmit = 0;
 		}
 		}
@@ -972,13 +972,13 @@ static void oti6858_read_int_callback(struct urb *urb)
 	if (resubmit) {
 	if (resubmit) {
 		int result;
 		int result;
 
 
-//		dbg("%s(): submitting interrupt urb", __FUNCTION__);
+//		dbg("%s(): submitting interrupt urb", __func__);
 		urb->dev = port->serial->dev;
 		urb->dev = port->serial->dev;
 		result = usb_submit_urb(urb, GFP_ATOMIC);
 		result = usb_submit_urb(urb, GFP_ATOMIC);
 		if (result != 0) {
 		if (result != 0) {
 			dev_err(&urb->dev->dev,
 			dev_err(&urb->dev->dev,
 					"%s(): usb_submit_urb() failed with"
 					"%s(): usb_submit_urb() failed with"
-					" error %d\n", __FUNCTION__, result);
+					" error %d\n", __func__, result);
 		}
 		}
 	}
 	}
 }
 }
@@ -994,7 +994,7 @@ static void oti6858_read_bulk_callback(struct urb *urb)
 	int result;
 	int result;
 
 
 	dbg("%s(port = %d, status = %d)",
 	dbg("%s(port = %d, status = %d)",
-				__FUNCTION__, port->number, status);
+				__func__, port->number, status);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	priv->flags.read_urb_in_use = 0;
 	priv->flags.read_urb_in_use = 0;
@@ -1002,20 +1002,20 @@ static void oti6858_read_bulk_callback(struct urb *urb)
 
 
 	if (status != 0) {
 	if (status != 0) {
 		if (!port->open_count) {
 		if (!port->open_count) {
-			dbg("%s(): port is closed, exiting", __FUNCTION__);
+			dbg("%s(): port is closed, exiting", __func__);
 			return;
 			return;
 		}
 		}
 		/*
 		/*
 		if (status == -EPROTO) {
 		if (status == -EPROTO) {
 			// PL2303 mysteriously fails with -EPROTO reschedule the read
 			// PL2303 mysteriously fails with -EPROTO reschedule the read
-			dbg("%s - caught -EPROTO, resubmitting the urb", __FUNCTION__);
+			dbg("%s - caught -EPROTO, resubmitting the urb", __func__);
 			result = usb_submit_urb(urb, GFP_ATOMIC);
 			result = usb_submit_urb(urb, GFP_ATOMIC);
 			if (result)
 			if (result)
-				dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+				dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __func__, result);
 			return;
 			return;
 		}
 		}
 		*/
 		*/
-		dbg("%s(): unable to handle the error, exiting", __FUNCTION__);
+		dbg("%s(): unable to handle the error, exiting", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -1031,7 +1031,7 @@ static void oti6858_read_bulk_callback(struct urb *urb)
 		result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 		result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 		if (result != 0) {
 		if (result != 0) {
 			dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
 			dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
-					" error %d\n", __FUNCTION__, result);
+					" error %d\n", __func__, result);
 		}
 		}
 	}
 	}
 }
 }
@@ -1044,7 +1044,7 @@ static void oti6858_write_bulk_callback(struct urb *urb)
 	int result;
 	int result;
 
 
 	dbg("%s(port = %d, status = %d)",
 	dbg("%s(port = %d, status = %d)",
-				__FUNCTION__, port->number, status);
+				__func__, port->number, status);
 
 
 	switch (status) {
 	switch (status) {
 	case 0:
 	case 0:
@@ -1055,21 +1055,21 @@ static void oti6858_write_bulk_callback(struct urb *urb)
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
 		/* this urb is terminated, clean up */
 		/* this urb is terminated, clean up */
 		dbg("%s(): urb shutting down with status: %d",
 		dbg("%s(): urb shutting down with status: %d",
-					__FUNCTION__, status);
+					__func__, status);
 		priv->flags.write_urb_in_use = 0;
 		priv->flags.write_urb_in_use = 0;
 		return;
 		return;
 	default:
 	default:
 		/* error in the urb, so we have to resubmit it */
 		/* error in the urb, so we have to resubmit it */
 		dbg("%s(): nonzero write bulk status received: %d",
 		dbg("%s(): nonzero write bulk status received: %d",
-					__FUNCTION__, status);
-		dbg("%s(): overflow in write", __FUNCTION__);
+					__func__, status);
+		dbg("%s(): overflow in write", __func__);
 
 
 		port->write_urb->transfer_buffer_length = 1;
 		port->write_urb->transfer_buffer_length = 1;
 		port->write_urb->dev = port->serial->dev;
 		port->write_urb->dev = port->serial->dev;
 		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 		if (result) {
 		if (result) {
 			dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
 			dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
-					" error %d\n", __FUNCTION__, result);
+					" error %d\n", __func__, result);
 		} else {
 		} else {
 			return;
 			return;
 		}
 		}
@@ -1079,11 +1079,11 @@ static void oti6858_write_bulk_callback(struct urb *urb)
 
 
 	// schedule the interrupt urb if we are still open */
 	// schedule the interrupt urb if we are still open */
 	port->interrupt_in_urb->dev = port->serial->dev;
 	port->interrupt_in_urb->dev = port->serial->dev;
-	dbg("%s(): submitting interrupt urb", __FUNCTION__);
+	dbg("%s(): submitting interrupt urb", __func__);
 	result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 	result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
 	if (result != 0) {
 	if (result != 0) {
 		dev_err(&port->dev, "%s(): failed submitting int urb,"
 		dev_err(&port->dev, "%s(): failed submitting int urb,"
-					" error %d\n", __FUNCTION__, result);
+					" error %d\n", __func__, result);
 	}
 	}
 }
 }
 
 

+ 53 - 53
drivers/usb/serial/pl2303.c

@@ -410,7 +410,7 @@ static int set_control_lines(struct usb_device *dev, u8 value)
 	retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 	retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
 				 SET_CONTROL_REQUEST, SET_CONTROL_REQUEST_TYPE,
 				 SET_CONTROL_REQUEST, SET_CONTROL_REQUEST_TYPE,
 				 value, 0, NULL, 0, 100);
 				 value, 0, NULL, 0, 100);
-	dbg("%s - value = %d, retval = %d", __FUNCTION__, value, retval);
+	dbg("%s - value = %d, retval = %d", __func__, value, retval);
 	return retval;
 	return retval;
 }
 }
 
 
@@ -420,7 +420,7 @@ static void pl2303_send(struct usb_serial_port *port)
 	struct pl2303_private *priv = usb_get_serial_port_data(port);
 	struct pl2303_private *priv = usb_get_serial_port_data(port);
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 
 
@@ -441,7 +441,7 @@ static void pl2303_send(struct usb_serial_port *port)
 
 
 	spin_unlock_irqrestore(&priv->lock, flags);
 	spin_unlock_irqrestore(&priv->lock, flags);
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count,
+	usb_serial_debug_data(debug, &port->dev, __func__, count,
 			      port->write_urb->transfer_buffer);
 			      port->write_urb->transfer_buffer);
 
 
 	port->write_urb->transfer_buffer_length = count;
 	port->write_urb->transfer_buffer_length = count;
@@ -449,7 +449,7 @@ static void pl2303_send(struct usb_serial_port *port)
 	result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 	result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 	if (result) {
 	if (result) {
 		dev_err(&port->dev, "%s - failed submitting write urb,"
 		dev_err(&port->dev, "%s - failed submitting write urb,"
-			" error %d\n", __FUNCTION__, result);
+			" error %d\n", __func__, result);
 		priv->write_urb_in_use = 0;
 		priv->write_urb_in_use = 0;
 		// TODO: reschedule pl2303_send
 		// TODO: reschedule pl2303_send
 	}
 	}
@@ -463,7 +463,7 @@ static int pl2303_write(struct usb_serial_port *port, const unsigned char *buf,
 	struct pl2303_private *priv = usb_get_serial_port_data(port);
 	struct pl2303_private *priv = usb_get_serial_port_data(port);
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d, %d bytes", __FUNCTION__, port->number, count);
+	dbg("%s - port %d, %d bytes", __func__, port->number, count);
 
 
 	if (!count)
 	if (!count)
 		return count;
 		return count;
@@ -483,13 +483,13 @@ static int pl2303_write_room(struct usb_serial_port *port)
 	int room = 0;
 	int room = 0;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	room = pl2303_buf_space_avail(priv->buf);
 	room = pl2303_buf_space_avail(priv->buf);
 	spin_unlock_irqrestore(&priv->lock, flags);
 	spin_unlock_irqrestore(&priv->lock, flags);
 
 
-	dbg("%s - returns %d", __FUNCTION__, room);
+	dbg("%s - returns %d", __func__, room);
 	return room;
 	return room;
 }
 }
 
 
@@ -499,13 +499,13 @@ static int pl2303_chars_in_buffer(struct usb_serial_port *port)
 	int chars = 0;
 	int chars = 0;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	chars = pl2303_buf_data_avail(priv->buf);
 	chars = pl2303_buf_data_avail(priv->buf);
 	spin_unlock_irqrestore(&priv->lock, flags);
 	spin_unlock_irqrestore(&priv->lock, flags);
 
 
-	dbg("%s - returns %d", __FUNCTION__, chars);
+	dbg("%s - returns %d", __func__, chars);
 	return chars;
 	return chars;
 }
 }
 
 
@@ -521,7 +521,7 @@ static void pl2303_set_termios(struct usb_serial_port *port,
 	int i;
 	int i;
 	u8 control;
 	u8 control;
 
 
-	dbg("%s -  port %d", __FUNCTION__, port->number);
+	dbg("%s -  port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	if (!priv->termios_initialized) {
 	if (!priv->termios_initialized) {
@@ -545,7 +545,7 @@ static void pl2303_set_termios(struct usb_serial_port *port,
 
 
 	buf = kzalloc(7, GFP_KERNEL);
 	buf = kzalloc(7, GFP_KERNEL);
 	if (!buf) {
 	if (!buf) {
-		dev_err(&port->dev, "%s - out of memory.\n", __FUNCTION__);
+		dev_err(&port->dev, "%s - out of memory.\n", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -563,11 +563,11 @@ static void pl2303_set_termios(struct usb_serial_port *port,
 			default:
 			default:
 			case CS8:	buf[6] = 8;	break;
 			case CS8:	buf[6] = 8;	break;
 		}
 		}
-		dbg("%s - data bits = %d", __FUNCTION__, buf[6]);
+		dbg("%s - data bits = %d", __func__, buf[6]);
 	}
 	}
 
 
 	baud = tty_get_baud_rate(port->tty);;
 	baud = tty_get_baud_rate(port->tty);;
-	dbg("%s - baud = %d", __FUNCTION__, baud);
+	dbg("%s - baud = %d", __func__, baud);
 	if (baud) {
 	if (baud) {
 		buf[0] = baud & 0xff;
 		buf[0] = baud & 0xff;
 		buf[1] = (baud >> 8) & 0xff;
 		buf[1] = (baud >> 8) & 0xff;
@@ -580,10 +580,10 @@ static void pl2303_set_termios(struct usb_serial_port *port,
 	/* For reference buf[4]=2 is 2 stop bits */
 	/* For reference buf[4]=2 is 2 stop bits */
 	if (cflag & CSTOPB) {
 	if (cflag & CSTOPB) {
 		buf[4] = 2;
 		buf[4] = 2;
-		dbg("%s - stop bits = 2", __FUNCTION__);
+		dbg("%s - stop bits = 2", __func__);
 	} else {
 	} else {
 		buf[4] = 0;
 		buf[4] = 0;
-		dbg("%s - stop bits = 1", __FUNCTION__);
+		dbg("%s - stop bits = 1", __func__);
 	}
 	}
 
 
 	if (cflag & PARENB) {
 	if (cflag & PARENB) {
@@ -594,14 +594,14 @@ static void pl2303_set_termios(struct usb_serial_port *port,
 		/* For reference buf[5]=4 is space parity */
 		/* For reference buf[5]=4 is space parity */
 		if (cflag & PARODD) {
 		if (cflag & PARODD) {
 			buf[5] = 1;
 			buf[5] = 1;
-			dbg("%s - parity = odd", __FUNCTION__);
+			dbg("%s - parity = odd", __func__);
 		} else {
 		} else {
 			buf[5] = 2;
 			buf[5] = 2;
-			dbg("%s - parity = even", __FUNCTION__);
+			dbg("%s - parity = even", __func__);
 		}
 		}
 	} else {
 	} else {
 		buf[5] = 0;
 		buf[5] = 0;
-		dbg("%s - parity = none", __FUNCTION__);
+		dbg("%s - parity = none", __func__);
 	}
 	}
 
 
 	i = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
 	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)
 	long timeout;
 	long timeout;
 	wait_queue_t wait;
 	wait_queue_t wait;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* wait for data to drain from the buffer */
 	/* wait for data to drain from the buffer */
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
@@ -695,7 +695,7 @@ static void pl2303_close(struct usb_serial_port *port, struct file *filp)
 	schedule_timeout_interruptible(timeout);
 	schedule_timeout_interruptible(timeout);
 
 
 	/* shutdown our urbs */
 	/* shutdown our urbs */
-	dbg("%s - shutting down urbs", __FUNCTION__);
+	dbg("%s - shutting down urbs", __func__);
 	usb_kill_urb(port->write_urb);
 	usb_kill_urb(port->write_urb);
 	usb_kill_urb(port->read_urb);
 	usb_kill_urb(port->read_urb);
 	usb_kill_urb(port->interrupt_in_urb);
 	usb_kill_urb(port->interrupt_in_urb);
@@ -719,7 +719,7 @@ static int pl2303_open(struct usb_serial_port *port, struct file *filp)
 	struct pl2303_private *priv = usb_get_serial_port_data(port);
 	struct pl2303_private *priv = usb_get_serial_port_data(port);
 	int result;
 	int result;
 
 
-	dbg("%s -  port %d", __FUNCTION__, port->number);
+	dbg("%s -  port %d", __func__, port->number);
 
 
 	if (priv->type != HX) {
 	if (priv->type != HX) {
 		usb_clear_halt(serial->dev, port->write_urb->pipe);
 		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)
 
 
 	//FIXME: need to assert RTS and DTR if CRTSCTS off
 	//FIXME: need to assert RTS and DTR if CRTSCTS off
 
 
-	dbg("%s - submitting read urb", __FUNCTION__);
+	dbg("%s - submitting read urb", __func__);
 	port->read_urb->dev = serial->dev;
 	port->read_urb->dev = serial->dev;
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	if (result) {
 	if (result) {
 		dev_err(&port->dev, "%s - failed submitting read urb,"
 		dev_err(&port->dev, "%s - failed submitting read urb,"
-			" error %d\n", __FUNCTION__, result);
+			" error %d\n", __func__, result);
 		pl2303_close(port, NULL);
 		pl2303_close(port, NULL);
 		return -EPROTO;
 		return -EPROTO;
 	}
 	}
 
 
-	dbg("%s - submitting interrupt urb", __FUNCTION__);
+	dbg("%s - submitting interrupt urb", __func__);
 	port->interrupt_in_urb->dev = serial->dev;
 	port->interrupt_in_urb->dev = serial->dev;
 	result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 	result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 	if (result) {
 	if (result) {
 		dev_err(&port->dev, "%s - failed submitting interrupt urb,"
 		dev_err(&port->dev, "%s - failed submitting interrupt urb,"
-			" error %d\n", __FUNCTION__, result);
+			" error %d\n", __func__, result);
 		pl2303_close(port, NULL);
 		pl2303_close(port, NULL);
 		return -EPROTO;
 		return -EPROTO;
 	}
 	}
@@ -792,7 +792,7 @@ static int pl2303_tiocmget(struct usb_serial_port *port, struct file *file)
 	unsigned int status;
 	unsigned int status;
 	unsigned int result;
 	unsigned int result;
 
 
-	dbg("%s (%d)", __FUNCTION__, port->number);
+	dbg("%s (%d)", __func__, port->number);
 
 
 	if (!usb_get_intfdata(port->serial->interface))
 	if (!usb_get_intfdata(port->serial->interface))
 		return -ENODEV;
 		return -ENODEV;
@@ -809,7 +809,7 @@ static int pl2303_tiocmget(struct usb_serial_port *port, struct file *file)
 		  | ((status & UART_RING)	? TIOCM_RI  : 0)
 		  | ((status & UART_RING)	? TIOCM_RI  : 0)
 		  | ((status & UART_DCD)	? TIOCM_CD  : 0);
 		  | ((status & UART_DCD)	? TIOCM_CD  : 0);
 
 
-	dbg("%s - result = %x", __FUNCTION__, result);
+	dbg("%s - result = %x", __func__, result);
 
 
 	return result;
 	return result;
 }
 }
@@ -853,15 +853,15 @@ static int wait_modem_info(struct usb_serial_port *port, unsigned int arg)
 static int pl2303_ioctl(struct usb_serial_port *port, struct file *file,
 static int pl2303_ioctl(struct usb_serial_port *port, struct file *file,
 			unsigned int cmd, unsigned long arg)
 			unsigned int cmd, unsigned long arg)
 {
 {
-	dbg("%s (%d) cmd = 0x%04x", __FUNCTION__, port->number, cmd);
+	dbg("%s (%d) cmd = 0x%04x", __func__, port->number, cmd);
 
 
 	switch (cmd) {
 	switch (cmd) {
 		case TIOCMIWAIT:
 		case TIOCMIWAIT:
-			dbg("%s (%d) TIOCMIWAIT", __FUNCTION__,  port->number);
+			dbg("%s (%d) TIOCMIWAIT", __func__,  port->number);
 			return wait_modem_info(port, arg);
 			return wait_modem_info(port, arg);
 
 
 		default:
 		default:
-			dbg("%s not supported = 0x%04x", __FUNCTION__, cmd);
+			dbg("%s not supported = 0x%04x", __func__, cmd);
 			break;
 			break;
 	}
 	}
 
 
@@ -874,19 +874,19 @@ static void pl2303_break_ctl(struct usb_serial_port *port, int break_state)
 	u16 state;
 	u16 state;
 	int result;
 	int result;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (break_state == 0)
 	if (break_state == 0)
 		state = BREAK_OFF;
 		state = BREAK_OFF;
 	else
 	else
 		state = BREAK_ON;
 		state = BREAK_ON;
-	dbg("%s - turning break %s", __FUNCTION__, state==BREAK_OFF ? "off" : "on");
+	dbg("%s - turning break %s", __func__, state==BREAK_OFF ? "off" : "on");
 
 
 	result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
 	result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
 				 BREAK_REQUEST, BREAK_REQUEST_TYPE, state,
 				 BREAK_REQUEST, BREAK_REQUEST_TYPE, state,
 				 0, NULL, 0, 100);
 				 0, NULL, 0, 100);
 	if (result)
 	if (result)
-		dbg("%s - error sending break = %d", __FUNCTION__, result);
+		dbg("%s - error sending break = %d", __func__, result);
 }
 }
 
 
 static void pl2303_shutdown(struct usb_serial *serial)
 static void pl2303_shutdown(struct usb_serial *serial)
@@ -894,7 +894,7 @@ static void pl2303_shutdown(struct usb_serial *serial)
 	int i;
 	int i;
 	struct pl2303_private *priv;
 	struct pl2303_private *priv;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	for (i = 0; i < serial->num_ports; ++i) {
 	for (i = 0; i < serial->num_ports; ++i) {
 		priv = usb_get_serial_port_data(serial->port[i]);
 		priv = usb_get_serial_port_data(serial->port[i]);
@@ -949,7 +949,7 @@ static void pl2303_read_int_callback(struct urb *urb)
 	int status = urb->status;
 	int status = urb->status;
 	int retval;
 	int retval;
 
 
-	dbg("%s (%d)", __FUNCTION__, port->number);
+	dbg("%s (%d)", __func__, port->number);
 
 
 	switch (status) {
 	switch (status) {
 	case 0:
 	case 0:
@@ -959,16 +959,16 @@ static void pl2303_read_int_callback(struct urb *urb)
 	case -ENOENT:
 	case -ENOENT:
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
 		/* this urb is terminated, clean up */
 		/* this urb is terminated, clean up */
-		dbg("%s - urb shutting down with status: %d", __FUNCTION__,
+		dbg("%s - urb shutting down with status: %d", __func__,
 		    status);
 		    status);
 		return;
 		return;
 	default:
 	default:
-		dbg("%s - nonzero urb status received: %d", __FUNCTION__,
+		dbg("%s - nonzero urb status received: %d", __func__,
 		    status);
 		    status);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__,
+	usb_serial_debug_data(debug, &port->dev, __func__,
 			      urb->actual_length, urb->transfer_buffer);
 			      urb->actual_length, urb->transfer_buffer);
 
 
 	pl2303_update_line_status(port, data, actual_length);
 	pl2303_update_line_status(port, data, actual_length);
@@ -978,7 +978,7 @@ exit:
 	if (retval)
 	if (retval)
 		dev_err(&urb->dev->dev,
 		dev_err(&urb->dev->dev,
 			"%s - usb_submit_urb failed with result %d\n",
 			"%s - usb_submit_urb failed with result %d\n",
-			__FUNCTION__, retval);
+			__func__, retval);
 }
 }
 
 
 static void pl2303_read_bulk_callback(struct urb *urb)
 static void pl2303_read_bulk_callback(struct urb *urb)
@@ -994,32 +994,32 @@ static void pl2303_read_bulk_callback(struct urb *urb)
 	u8 line_status;
 	u8 line_status;
 	char tty_flag;
 	char tty_flag;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (status) {
 	if (status) {
-		dbg("%s - urb status = %d", __FUNCTION__, status);
+		dbg("%s - urb status = %d", __func__, status);
 		if (!port->open_count) {
 		if (!port->open_count) {
-			dbg("%s - port is closed, exiting.", __FUNCTION__);
+			dbg("%s - port is closed, exiting.", __func__);
 			return;
 			return;
 		}
 		}
 		if (status == -EPROTO) {
 		if (status == -EPROTO) {
 			/* PL2303 mysteriously fails with -EPROTO reschedule
 			/* PL2303 mysteriously fails with -EPROTO reschedule
 			 * the read */
 			 * the read */
 			dbg("%s - caught -EPROTO, resubmitting the urb",
 			dbg("%s - caught -EPROTO, resubmitting the urb",
-			    __FUNCTION__);
+			    __func__);
 			urb->dev = port->serial->dev;
 			urb->dev = port->serial->dev;
 			result = usb_submit_urb(urb, GFP_ATOMIC);
 			result = usb_submit_urb(urb, GFP_ATOMIC);
 			if (result)
 			if (result)
 				dev_err(&urb->dev->dev, "%s - failed"
 				dev_err(&urb->dev->dev, "%s - failed"
 					" resubmitting read urb, error %d\n",
 					" resubmitting read urb, error %d\n",
-					__FUNCTION__, result);
+					__func__, result);
 			return;
 			return;
 		}
 		}
-		dbg("%s - unable to handle the error, exiting.", __FUNCTION__);
+		dbg("%s - unable to handle the error, exiting.", __func__);
 		return;
 		return;
 	}
 	}
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__,
+	usb_serial_debug_data(debug, &port->dev, __func__,
 			      urb->actual_length, data);
 			      urb->actual_length, data);
 
 
 	/* get tty_flag from status */
 	/* get tty_flag from status */
@@ -1039,7 +1039,7 @@ static void pl2303_read_bulk_callback(struct urb *urb)
 		tty_flag = TTY_PARITY;
 		tty_flag = TTY_PARITY;
 	else if (line_status & UART_FRAME_ERROR)
 	else if (line_status & UART_FRAME_ERROR)
 		tty_flag = TTY_FRAME;
 		tty_flag = TTY_FRAME;
-	dbg("%s - tty_flag = %d", __FUNCTION__, tty_flag);
+	dbg("%s - tty_flag = %d", __func__, tty_flag);
 
 
 	tty = port->tty;
 	tty = port->tty;
 	if (tty && urb->actual_length) {
 	if (tty && urb->actual_length) {
@@ -1058,7 +1058,7 @@ static void pl2303_read_bulk_callback(struct urb *urb)
 		result = usb_submit_urb(urb, GFP_ATOMIC);
 		result = usb_submit_urb(urb, GFP_ATOMIC);
 		if (result)
 		if (result)
 			dev_err(&urb->dev->dev, "%s - failed resubmitting"
 			dev_err(&urb->dev->dev, "%s - failed resubmitting"
-				" read urb, error %d\n", __FUNCTION__, result);
+				" read urb, error %d\n", __func__, result);
 	}
 	}
 
 
 	return;
 	return;
@@ -1071,7 +1071,7 @@ static void pl2303_write_bulk_callback(struct urb *urb)
 	int result;
 	int result;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	switch (status) {
 	switch (status) {
 	case 0:
 	case 0:
@@ -1081,21 +1081,21 @@ static void pl2303_write_bulk_callback(struct urb *urb)
 	case -ENOENT:
 	case -ENOENT:
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
 		/* this urb is terminated, clean up */
 		/* this urb is terminated, clean up */
-		dbg("%s - urb shutting down with status: %d", __FUNCTION__,
+		dbg("%s - urb shutting down with status: %d", __func__,
 		    status);
 		    status);
 		priv->write_urb_in_use = 0;
 		priv->write_urb_in_use = 0;
 		return;
 		return;
 	default:
 	default:
 		/* error in the urb, so we have to resubmit it */
 		/* error in the urb, so we have to resubmit it */
-		dbg("%s - Overflow in write", __FUNCTION__);
-		dbg("%s - nonzero write bulk status received: %d", __FUNCTION__,
+		dbg("%s - Overflow in write", __func__);
+		dbg("%s - nonzero write bulk status received: %d", __func__,
 		    status);
 		    status);
 		port->write_urb->transfer_buffer_length = 1;
 		port->write_urb->transfer_buffer_length = 1;
 		port->write_urb->dev = port->serial->dev;
 		port->write_urb->dev = port->serial->dev;
 		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 		if (result)
 		if (result)
 			dev_err(&urb->dev->dev, "%s - failed resubmitting write"
 			dev_err(&urb->dev->dev, "%s - failed resubmitting write"
-				" urb, error %d\n", __FUNCTION__, result);
+				" urb, error %d\n", __func__, result);
 		else
 		else
 			return;
 			return;
 	}
 	}

+ 14 - 14
drivers/usb/serial/safe_serial.c

@@ -202,11 +202,11 @@ static void safe_read_bulk_callback (struct urb *urb)
 	int result;
 	int result;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero read bulk status received: %d",
 		dbg("%s - nonzero read bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 
 
@@ -232,18 +232,18 @@ static void safe_read_bulk_callback (struct urb *urb)
 
 
 			if (actual_length <= (length - 2)) {
 			if (actual_length <= (length - 2)) {
 
 
-				info ("%s - actual: %d", __FUNCTION__, actual_length);
+				info ("%s - actual: %d", __func__, actual_length);
 
 
 				for (i = 0; i < actual_length; i++) {
 				for (i = 0; i < actual_length; i++) {
 					tty_insert_flip_char (port->tty, data[i], 0);
 					tty_insert_flip_char (port->tty, data[i], 0);
 				}
 				}
 				tty_flip_buffer_push (port->tty);
 				tty_flip_buffer_push (port->tty);
 			} else {
 			} else {
-				err ("%s - inconsistent lengths %d:%d", __FUNCTION__,
+				err ("%s - inconsistent lengths %d:%d", __func__,
 				     actual_length, length);
 				     actual_length, length);
 			}
 			}
 		} else {
 		} else {
-			err ("%s - bad CRC %x", __FUNCTION__, fcs);
+			err ("%s - bad CRC %x", __func__, fcs);
 		}
 		}
 	} else {
 	} else {
 		for (i = 0; i < length; i++) {
 		for (i = 0; i < length; i++) {
@@ -259,7 +259,7 @@ static void safe_read_bulk_callback (struct urb *urb)
 		       safe_read_bulk_callback, port);
 		       safe_read_bulk_callback, port);
 
 
 	if ((result = usb_submit_urb (urb, GFP_ATOMIC))) {
 	if ((result = usb_submit_urb (urb, GFP_ATOMIC))) {
-		err ("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
+		err ("%s - failed resubmitting read urb, error %d", __func__, result);
 	}
 	}
 }
 }
 
 
@@ -274,7 +274,7 @@ static int safe_write (struct usb_serial_port *port, const unsigned char *buf, i
 	     count);
 	     count);
 
 
 	if (!port->write_urb) {
 	if (!port->write_urb) {
-		dbg ("%s - write urb NULL", __FUNCTION__);
+		dbg ("%s - write urb NULL", __func__);
 		return (0);
 		return (0);
 	}
 	}
 
 
@@ -282,17 +282,17 @@ static int safe_write (struct usb_serial_port *port, const unsigned char *buf, i
 	     port->write_urb->transfer_buffer_length);
 	     port->write_urb->transfer_buffer_length);
 
 
 	if (!port->write_urb->transfer_buffer_length) {
 	if (!port->write_urb->transfer_buffer_length) {
-		dbg ("%s - write urb transfer_buffer_length zero", __FUNCTION__);
+		dbg ("%s - write urb transfer_buffer_length zero", __func__);
 		return (0);
 		return (0);
 	}
 	}
 	if (count == 0) {
 	if (count == 0) {
-		dbg ("%s - write request of 0 bytes", __FUNCTION__);
+		dbg ("%s - write request of 0 bytes", __func__);
 		return (0);
 		return (0);
 	}
 	}
 	spin_lock_bh(&port->lock);
 	spin_lock_bh(&port->lock);
 	if (port->write_urb_busy) {
 	if (port->write_urb_busy) {
 		spin_unlock_bh(&port->lock);
 		spin_unlock_bh(&port->lock);
-		dbg("%s - already writing", __FUNCTION__);
+		dbg("%s - already writing", __func__);
 		return 0;
 		return 0;
 	}
 	}
 	port->write_urb_busy = 1;
 	port->write_urb_busy = 1;
@@ -332,7 +332,7 @@ static int safe_write (struct usb_serial_port *port, const unsigned char *buf, i
 		port->write_urb->transfer_buffer_length = count;
 		port->write_urb->transfer_buffer_length = count;
 	}
 	}
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, port->write_urb->transfer_buffer);
+	usb_serial_debug_data(debug, &port->dev, __func__, count, port->write_urb->transfer_buffer);
 #ifdef ECHO_TX
 #ifdef ECHO_TX
 	{
 	{
 		int i;
 		int i;
@@ -349,10 +349,10 @@ static int safe_write (struct usb_serial_port *port, const unsigned char *buf, i
 	port->write_urb->dev = port->serial->dev;
 	port->write_urb->dev = port->serial->dev;
 	if ((result = usb_submit_urb (port->write_urb, GFP_KERNEL))) {
 	if ((result = usb_submit_urb (port->write_urb, GFP_KERNEL))) {
 		port->write_urb_busy = 0;
 		port->write_urb_busy = 0;
-		err ("%s - failed submitting write urb, error %d", __FUNCTION__, result);
+		err ("%s - failed submitting write urb, error %d", __func__, result);
 		return 0;
 		return 0;
 	}
 	}
-	dbg ("%s urb: %p submitted", __FUNCTION__, port->write_urb);
+	dbg ("%s urb: %p submitted", __func__, port->write_urb);
 
 
 	return (count);
 	return (count);
 }
 }
@@ -361,7 +361,7 @@ static int safe_write_room (struct usb_serial_port *port)
 {
 {
 	int room = 0;		// Default: no room
 	int room = 0;		// Default: no room
 
 
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	if (port->write_urb_busy)
 	if (port->write_urb_busy)
 		room = port->bulk_out_size - (safe ? 2 : 0);
 		room = port->bulk_out_size - (safe ? 2 : 0);

+ 31 - 31
drivers/usb/serial/sierra.c

@@ -256,7 +256,7 @@ static int sierra_send_setup(struct usb_serial_port *port)
 	struct sierra_port_private *portdata;
 	struct sierra_port_private *portdata;
 	__u16 interface = 0;
 	__u16 interface = 0;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	portdata = usb_get_serial_port_data(port);
 	portdata = usb_get_serial_port_data(port);
 
 
@@ -286,24 +286,24 @@ static int sierra_send_setup(struct usb_serial_port *port)
 
 
 static void sierra_rx_throttle(struct usb_serial_port *port)
 static void sierra_rx_throttle(struct usb_serial_port *port)
 {
 {
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 }
 }
 
 
 static void sierra_rx_unthrottle(struct usb_serial_port *port)
 static void sierra_rx_unthrottle(struct usb_serial_port *port)
 {
 {
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 }
 }
 
 
 static void sierra_break_ctl(struct usb_serial_port *port, int break_state)
 static void sierra_break_ctl(struct usb_serial_port *port, int break_state)
 {
 {
 	/* Unfortunately, I don't know how to send a break */
 	/* Unfortunately, I don't know how to send a break */
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 }
 }
 
 
 static void sierra_set_termios(struct usb_serial_port *port,
 static void sierra_set_termios(struct usb_serial_port *port,
 			struct ktermios *old_termios)
 			struct ktermios *old_termios)
 {
 {
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 	tty_termios_copy_hw(port->tty->termios, old_termios);
 	tty_termios_copy_hw(port->tty->termios, old_termios);
 	sierra_send_setup(port);
 	sierra_send_setup(port);
 }
 }
@@ -357,14 +357,14 @@ static void sierra_outdat_callback(struct urb *urb)
 	int status = urb->status;
 	int status = urb->status;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* free up the transfer buffer, as usb_free_urb() does not do this */
 	/* free up the transfer buffer, as usb_free_urb() does not do this */
 	kfree(urb->transfer_buffer);
 	kfree(urb->transfer_buffer);
 
 
 	if (status)
 	if (status)
 		dbg("%s - nonzero write bulk status received: %d",
 		dbg("%s - nonzero write bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 
 
 	spin_lock_irqsave(&portdata->lock, flags);
 	spin_lock_irqsave(&portdata->lock, flags);
 	--portdata->outstanding_urbs;
 	--portdata->outstanding_urbs;
@@ -386,12 +386,12 @@ static int sierra_write(struct usb_serial_port *port,
 
 
 	portdata = usb_get_serial_port_data(port);
 	portdata = usb_get_serial_port_data(port);
 
 
-	dbg("%s: write (%d chars)", __FUNCTION__, count);
+	dbg("%s: write (%d chars)", __func__, count);
 
 
 	spin_lock_irqsave(&portdata->lock, flags);
 	spin_lock_irqsave(&portdata->lock, flags);
 	if (portdata->outstanding_urbs > N_OUT_URB) {
 	if (portdata->outstanding_urbs > N_OUT_URB) {
 		spin_unlock_irqrestore(&portdata->lock, flags);
 		spin_unlock_irqrestore(&portdata->lock, flags);
-		dbg("%s - write limit hit\n", __FUNCTION__);
+		dbg("%s - write limit hit\n", __func__);
 		return 0;
 		return 0;
 	}
 	}
 	portdata->outstanding_urbs++;
 	portdata->outstanding_urbs++;
@@ -413,7 +413,7 @@ static int sierra_write(struct usb_serial_port *port,
 
 
 	memcpy(buffer, buf, count);
 	memcpy(buffer, buf, count);
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buffer);
+	usb_serial_debug_data(debug, &port->dev, __func__, count, buffer);
 
 
 	usb_fill_bulk_urb(urb, serial->dev,
 	usb_fill_bulk_urb(urb, serial->dev,
 			  usb_sndbulkpipe(serial->dev,
 			  usb_sndbulkpipe(serial->dev,
@@ -424,7 +424,7 @@ static int sierra_write(struct usb_serial_port *port,
 	status = usb_submit_urb(urb, GFP_ATOMIC);
 	status = usb_submit_urb(urb, GFP_ATOMIC);
 	if (status) {
 	if (status) {
 		dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed "
 		dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed "
-			"with status = %d\n", __FUNCTION__, status);
+			"with status = %d\n", __func__, status);
 		count = status;
 		count = status;
 		goto error;
 		goto error;
 	}
 	}
@@ -454,14 +454,14 @@ static void sierra_indat_callback(struct urb *urb)
 	unsigned char *data = urb->transfer_buffer;
 	unsigned char *data = urb->transfer_buffer;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s: %p", __FUNCTION__, urb);
+	dbg("%s: %p", __func__, urb);
 
 
 	endpoint = usb_pipeendpoint(urb->pipe);
 	endpoint = usb_pipeendpoint(urb->pipe);
 	port = (struct usb_serial_port *) urb->context;
 	port = (struct usb_serial_port *) urb->context;
 
 
 	if (status) {
 	if (status) {
 		dbg("%s: nonzero status: %d on endpoint %02x.",
 		dbg("%s: nonzero status: %d on endpoint %02x.",
-		    __FUNCTION__, status, endpoint);
+		    __func__, status, endpoint);
 	} else {
 	} else {
 		tty = port->tty;
 		tty = port->tty;
 		if (urb->actual_length) {
 		if (urb->actual_length) {
@@ -469,7 +469,7 @@ static void sierra_indat_callback(struct urb *urb)
 			tty_insert_flip_string(tty, data, urb->actual_length);
 			tty_insert_flip_string(tty, data, urb->actual_length);
 			tty_flip_buffer_push(tty);
 			tty_flip_buffer_push(tty);
 		} else {
 		} else {
-			dbg("%s: empty read urb received", __FUNCTION__);
+			dbg("%s: empty read urb received", __func__);
 		}
 		}
 
 
 		/* Resubmit urb so we continue receiving */
 		/* Resubmit urb so we continue receiving */
@@ -491,15 +491,15 @@ static void sierra_instat_callback(struct urb *urb)
 	struct sierra_port_private *portdata = usb_get_serial_port_data(port);
 	struct sierra_port_private *portdata = usb_get_serial_port_data(port);
 	struct usb_serial *serial = port->serial;
 	struct usb_serial *serial = port->serial;
 
 
-	dbg("%s", __FUNCTION__);
-	dbg("%s: urb %p port %p has data %p", __FUNCTION__, urb, port, portdata);
+	dbg("%s", __func__);
+	dbg("%s: urb %p port %p has data %p", __func__, urb, port, portdata);
 
 
 	if (status == 0) {
 	if (status == 0) {
 		struct usb_ctrlrequest *req_pkt =
 		struct usb_ctrlrequest *req_pkt =
 				(struct usb_ctrlrequest *)urb->transfer_buffer;
 				(struct usb_ctrlrequest *)urb->transfer_buffer;
 
 
 		if (!req_pkt) {
 		if (!req_pkt) {
-			dbg("%s: NULL req_pkt\n", __FUNCTION__);
+			dbg("%s: NULL req_pkt\n", __func__);
 			return;
 			return;
 		}
 		}
 		if ((req_pkt->bRequestType == 0xA1) &&
 		if ((req_pkt->bRequestType == 0xA1) &&
@@ -509,7 +509,7 @@ static void sierra_instat_callback(struct urb *urb)
 					urb->transfer_buffer +
 					urb->transfer_buffer +
 					sizeof(struct usb_ctrlrequest));
 					sizeof(struct usb_ctrlrequest));
 
 
-			dbg("%s: signal x%x", __FUNCTION__, signals);
+			dbg("%s: signal x%x", __func__, signals);
 
 
 			old_dcd_state = portdata->dcd_state;
 			old_dcd_state = portdata->dcd_state;
 			portdata->cts_state = 1;
 			portdata->cts_state = 1;
@@ -521,11 +521,11 @@ static void sierra_instat_callback(struct urb *urb)
 					old_dcd_state && !portdata->dcd_state)
 					old_dcd_state && !portdata->dcd_state)
 				tty_hangup(port->tty);
 				tty_hangup(port->tty);
 		} else {
 		} else {
-			dbg("%s: type %x req %x", __FUNCTION__,
+			dbg("%s: type %x req %x", __func__,
 				req_pkt->bRequestType, req_pkt->bRequest);
 				req_pkt->bRequestType, req_pkt->bRequest);
 		}
 		}
 	} else
 	} else
-		dbg("%s: error %d", __FUNCTION__, status);
+		dbg("%s: error %d", __func__, status);
 
 
 	/* Resubmit urb so we continue receiving IRQ data */
 	/* Resubmit urb so we continue receiving IRQ data */
 	if (status != -ESHUTDOWN) {
 	if (status != -ESHUTDOWN) {
@@ -533,7 +533,7 @@ static void sierra_instat_callback(struct urb *urb)
 		err = usb_submit_urb(urb, GFP_ATOMIC);
 		err = usb_submit_urb(urb, GFP_ATOMIC);
 		if (err)
 		if (err)
 			dbg("%s: resubmit intr urb failed. (%d)",
 			dbg("%s: resubmit intr urb failed. (%d)",
-				__FUNCTION__, err);
+				__func__, err);
 	}
 	}
 }
 }
 
 
@@ -542,14 +542,14 @@ static int sierra_write_room(struct usb_serial_port *port)
 	struct sierra_port_private *portdata = usb_get_serial_port_data(port);
 	struct sierra_port_private *portdata = usb_get_serial_port_data(port);
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* try to give a good number back based on if we have any free urbs at
 	/* try to give a good number back based on if we have any free urbs at
 	 * this point in time */
 	 * this point in time */
 	spin_lock_irqsave(&portdata->lock, flags);
 	spin_lock_irqsave(&portdata->lock, flags);
 	if (portdata->outstanding_urbs > N_OUT_URB * 2 / 3) {
 	if (portdata->outstanding_urbs > N_OUT_URB * 2 / 3) {
 		spin_unlock_irqrestore(&portdata->lock, flags);
 		spin_unlock_irqrestore(&portdata->lock, flags);
-		dbg("%s - write limit hit\n", __FUNCTION__);
+		dbg("%s - write limit hit\n", __func__);
 		return 0;
 		return 0;
 	}
 	}
 	spin_unlock_irqrestore(&portdata->lock, flags);
 	spin_unlock_irqrestore(&portdata->lock, flags);
@@ -559,7 +559,7 @@ static int sierra_write_room(struct usb_serial_port *port)
 
 
 static int sierra_chars_in_buffer(struct usb_serial_port *port)
 static int sierra_chars_in_buffer(struct usb_serial_port *port)
 {
 {
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/*
 	/*
 	 * We can't really account for how much data we
 	 * 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)
 
 
 	portdata = usb_get_serial_port_data(port);
 	portdata = usb_get_serial_port_data(port);
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	/* Set some sane defaults */
 	/* Set some sane defaults */
 	portdata->rts_state = 1;
 	portdata->rts_state = 1;
@@ -592,7 +592,7 @@ static int sierra_open(struct usb_serial_port *port, struct file *filp)
 		if (!urb)
 		if (!urb)
 			continue;
 			continue;
 		if (urb->dev != serial->dev) {
 		if (urb->dev != serial->dev) {
-			dbg("%s: dev %p != %p", __FUNCTION__,
+			dbg("%s: dev %p != %p", __func__,
 				urb->dev, serial->dev);
 				urb->dev, serial->dev);
 			continue;
 			continue;
 		}
 		}
@@ -630,7 +630,7 @@ static void sierra_close(struct usb_serial_port *port, struct file *filp)
 	struct usb_serial *serial = port->serial;
 	struct usb_serial *serial = port->serial;
 	struct sierra_port_private *portdata;
 	struct sierra_port_private *portdata;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 	portdata = usb_get_serial_port_data(port);
 	portdata = usb_get_serial_port_data(port);
 
 
 	portdata->rts_state = 0;
 	portdata->rts_state = 0;
@@ -660,7 +660,7 @@ static int sierra_startup(struct usb_serial *serial)
 	int i;
 	int i;
 	int j;
 	int j;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	/* Set Device mode to D0 */
 	/* Set Device mode to D0 */
 	sierra_set_power_state(serial->dev, 0x0000);
 	sierra_set_power_state(serial->dev, 0x0000);
@@ -675,7 +675,7 @@ static int sierra_startup(struct usb_serial *serial)
 		portdata = kzalloc(sizeof(*portdata), GFP_KERNEL);
 		portdata = kzalloc(sizeof(*portdata), GFP_KERNEL);
 		if (!portdata) {
 		if (!portdata) {
 			dbg("%s: kmalloc for sierra_port_private (%d) failed!.",
 			dbg("%s: kmalloc for sierra_port_private (%d) failed!.",
-					__FUNCTION__, i);
+					__func__, i);
 			return -ENOMEM;
 			return -ENOMEM;
 		}
 		}
 		spin_lock_init(&portdata->lock);
 		spin_lock_init(&portdata->lock);
@@ -696,7 +696,7 @@ static int sierra_startup(struct usb_serial *serial)
 			urb = usb_alloc_urb(0, GFP_KERNEL);
 			urb = usb_alloc_urb(0, GFP_KERNEL);
 			if (urb == NULL) {
 			if (urb == NULL) {
 				dbg("%s: alloc for in port failed.",
 				dbg("%s: alloc for in port failed.",
-				    __FUNCTION__);
+				    __func__);
 				continue;
 				continue;
 			}
 			}
 			/* Fill URB using supplied data. */
 			/* Fill URB using supplied data. */
@@ -718,7 +718,7 @@ static void sierra_shutdown(struct usb_serial *serial)
 	struct usb_serial_port *port;
 	struct usb_serial_port *port;
 	struct sierra_port_private *portdata;
 	struct sierra_port_private *portdata;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	for (i = 0; i < serial->num_ports; ++i) {
 	for (i = 0; i < serial->num_ports; ++i) {
 		port = serial->port[i];
 		port = serial->port[i];

+ 95 - 95
drivers/usb/serial/ti_usb_3410_5052.c

@@ -408,14 +408,14 @@ static int ti_startup(struct usb_serial *serial)
 
 
 
 
 	dbg("%s - product 0x%4X, num configurations %d, configuration value %d",
 	dbg("%s - product 0x%4X, num configurations %d, configuration value %d",
-	    __FUNCTION__, le16_to_cpu(dev->descriptor.idProduct),
+	    __func__, le16_to_cpu(dev->descriptor.idProduct),
 	    dev->descriptor.bNumConfigurations,
 	    dev->descriptor.bNumConfigurations,
 	    dev->actconfig->desc.bConfigurationValue);
 	    dev->actconfig->desc.bConfigurationValue);
 
 
 	/* create device structure */
 	/* create device structure */
 	tdev = kzalloc(sizeof(struct ti_device), GFP_KERNEL);
 	tdev = kzalloc(sizeof(struct ti_device), GFP_KERNEL);
 	if (tdev == NULL) {
 	if (tdev == NULL) {
-		dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err(&dev->dev, "%s - out of memory\n", __func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 	mutex_init(&tdev->td_open_close_lock);
 	mutex_init(&tdev->td_open_close_lock);
@@ -425,7 +425,7 @@ static int ti_startup(struct usb_serial *serial)
 	/* determine device type */
 	/* determine device type */
 	if (usb_match_id(serial->interface, ti_id_table_3410))
 	if (usb_match_id(serial->interface, ti_id_table_3410))
 		tdev->td_is_3410 = 1;
 		tdev->td_is_3410 = 1;
-	dbg("%s - device type is %s", __FUNCTION__, tdev->td_is_3410 ? "3410" : "5052");
+	dbg("%s - device type is %s", __func__, tdev->td_is_3410 ? "3410" : "5052");
 
 
 	/* if we have only 1 configuration, download firmware */
 	/* if we have only 1 configuration, download firmware */
 	if (dev->descriptor.bNumConfigurations == 1) {
 	if (dev->descriptor.bNumConfigurations == 1) {
@@ -459,7 +459,7 @@ static int ti_startup(struct usb_serial *serial)
 	for (i = 0; i < serial->num_ports; ++i) {
 	for (i = 0; i < serial->num_ports; ++i) {
 		tport = kzalloc(sizeof(struct ti_port), GFP_KERNEL);
 		tport = kzalloc(sizeof(struct ti_port), GFP_KERNEL);
 		if (tport == NULL) {
 		if (tport == NULL) {
-			dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
+			dev_err(&dev->dev, "%s - out of memory\n", __func__);
 			status = -ENOMEM;
 			status = -ENOMEM;
 			goto free_tports;
 			goto free_tports;
 		}
 		}
@@ -471,7 +471,7 @@ static int ti_startup(struct usb_serial *serial)
 		init_waitqueue_head(&tport->tp_write_wait);
 		init_waitqueue_head(&tport->tp_write_wait);
 		tport->tp_write_buf = ti_buf_alloc();
 		tport->tp_write_buf = ti_buf_alloc();
 		if (tport->tp_write_buf == NULL) {
 		if (tport->tp_write_buf == NULL) {
-			dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
+			dev_err(&dev->dev, "%s - out of memory\n", __func__);
 			kfree(tport);
 			kfree(tport);
 			status = -ENOMEM;
 			status = -ENOMEM;
 			goto free_tports;
 			goto free_tports;
@@ -504,7 +504,7 @@ static void ti_shutdown(struct usb_serial *serial)
 	struct ti_device *tdev = usb_get_serial_data(serial);
 	struct ti_device *tdev = usb_get_serial_data(serial);
 	struct ti_port *tport;
 	struct ti_port *tport;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	for (i=0; i < serial->num_ports; ++i) {
 	for (i=0; i < serial->num_ports; ++i) {
 		tport = usb_get_serial_port_data(serial->port[i]);
 		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)
 			     TI_PIPE_TIMEOUT_ENABLE | 
 			     TI_PIPE_TIMEOUT_ENABLE | 
 			     (TI_TRANSFER_TIMEOUT << 2));
 			     (TI_TRANSFER_TIMEOUT << 2));
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (tport == NULL)
 	if (tport == NULL)
 		return -ENODEV;
 		return -ENODEV;
@@ -557,10 +557,10 @@ static int ti_open(struct usb_serial_port *port, struct file *file)
 
 
 	/* start interrupt urb the first time a port is opened on this device */
 	/* start interrupt urb the first time a port is opened on this device */
 	if (tdev->td_open_port_count == 0) {
 	if (tdev->td_open_port_count == 0) {
-		dbg("%s - start interrupt in urb", __FUNCTION__);
+		dbg("%s - start interrupt in urb", __func__);
 		urb = tdev->td_serial->port[0]->interrupt_in_urb;
 		urb = tdev->td_serial->port[0]->interrupt_in_urb;
 		if (!urb) {
 		if (!urb) {
-			dev_err(&port->dev, "%s - no interrupt urb\n", __FUNCTION__);
+			dev_err(&port->dev, "%s - no interrupt urb\n", __func__);
 			status = -EINVAL;
 			status = -EINVAL;
 			goto release_lock;
 			goto release_lock;
 		}
 		}
@@ -569,40 +569,40 @@ static int ti_open(struct usb_serial_port *port, struct file *file)
 		urb->dev = dev;
 		urb->dev = dev;
 		status = usb_submit_urb(urb, GFP_KERNEL);
 		status = usb_submit_urb(urb, GFP_KERNEL);
 		if (status) {
 		if (status) {
-			dev_err(&port->dev, "%s - submit interrupt urb failed, %d\n", __FUNCTION__, status);
+			dev_err(&port->dev, "%s - submit interrupt urb failed, %d\n", __func__, status);
 			goto release_lock;
 			goto release_lock;
 		}
 		}
 	}
 	}
 
 
 	ti_set_termios(port, port->tty->termios);
 	ti_set_termios(port, port->tty->termios);
 
 
-	dbg("%s - sending TI_OPEN_PORT", __FUNCTION__);
+	dbg("%s - sending TI_OPEN_PORT", __func__);
 	status = ti_command_out_sync(tdev, TI_OPEN_PORT,
 	status = ti_command_out_sync(tdev, TI_OPEN_PORT,
 		(__u8)(TI_UART1_PORT + port_number), open_settings, NULL, 0);
 		(__u8)(TI_UART1_PORT + port_number), open_settings, NULL, 0);
 	if (status) {
 	if (status) {
-		dev_err(&port->dev, "%s - cannot send open command, %d\n", __FUNCTION__, status);
+		dev_err(&port->dev, "%s - cannot send open command, %d\n", __func__, status);
 		goto unlink_int_urb;
 		goto unlink_int_urb;
 	}
 	}
 
 
-	dbg("%s - sending TI_START_PORT", __FUNCTION__);
+	dbg("%s - sending TI_START_PORT", __func__);
 	status = ti_command_out_sync(tdev, TI_START_PORT,
 	status = ti_command_out_sync(tdev, TI_START_PORT,
 		(__u8)(TI_UART1_PORT + port_number), 0, NULL, 0);
 		(__u8)(TI_UART1_PORT + port_number), 0, NULL, 0);
 	if (status) {
 	if (status) {
-		dev_err(&port->dev, "%s - cannot send start command, %d\n", __FUNCTION__, status);
+		dev_err(&port->dev, "%s - cannot send start command, %d\n", __func__, status);
 		goto unlink_int_urb;
 		goto unlink_int_urb;
 	}
 	}
 
 
-	dbg("%s - sending TI_PURGE_PORT", __FUNCTION__);
+	dbg("%s - sending TI_PURGE_PORT", __func__);
 	status = ti_command_out_sync(tdev, TI_PURGE_PORT,
 	status = ti_command_out_sync(tdev, TI_PURGE_PORT,
 		(__u8)(TI_UART1_PORT + port_number), TI_PURGE_INPUT, NULL, 0);
 		(__u8)(TI_UART1_PORT + port_number), TI_PURGE_INPUT, NULL, 0);
 	if (status) {
 	if (status) {
-		dev_err(&port->dev, "%s - cannot clear input buffers, %d\n", __FUNCTION__, status);
+		dev_err(&port->dev, "%s - cannot clear input buffers, %d\n", __func__, status);
 		goto unlink_int_urb;
 		goto unlink_int_urb;
 	}
 	}
 	status = ti_command_out_sync(tdev, TI_PURGE_PORT,
 	status = ti_command_out_sync(tdev, TI_PURGE_PORT,
 		(__u8)(TI_UART1_PORT + port_number), TI_PURGE_OUTPUT, NULL, 0);
 		(__u8)(TI_UART1_PORT + port_number), TI_PURGE_OUTPUT, NULL, 0);
 	if (status) {
 	if (status) {
-		dev_err(&port->dev, "%s - cannot clear output buffers, %d\n", __FUNCTION__, status);
+		dev_err(&port->dev, "%s - cannot clear output buffers, %d\n", __func__, status);
 		goto unlink_int_urb;
 		goto unlink_int_urb;
 	}
 	}
 
 
@@ -613,27 +613,27 @@ static int ti_open(struct usb_serial_port *port, struct file *file)
 
 
 	ti_set_termios(port, port->tty->termios);
 	ti_set_termios(port, port->tty->termios);
 
 
-	dbg("%s - sending TI_OPEN_PORT (2)", __FUNCTION__);
+	dbg("%s - sending TI_OPEN_PORT (2)", __func__);
 	status = ti_command_out_sync(tdev, TI_OPEN_PORT,
 	status = ti_command_out_sync(tdev, TI_OPEN_PORT,
 		(__u8)(TI_UART1_PORT + port_number), open_settings, NULL, 0);
 		(__u8)(TI_UART1_PORT + port_number), open_settings, NULL, 0);
 	if (status) {
 	if (status) {
-		dev_err(&port->dev, "%s - cannot send open command (2), %d\n", __FUNCTION__, status);
+		dev_err(&port->dev, "%s - cannot send open command (2), %d\n", __func__, status);
 		goto unlink_int_urb;
 		goto unlink_int_urb;
 	}
 	}
 
 
-	dbg("%s - sending TI_START_PORT (2)", __FUNCTION__);
+	dbg("%s - sending TI_START_PORT (2)", __func__);
 	status = ti_command_out_sync(tdev, TI_START_PORT,
 	status = ti_command_out_sync(tdev, TI_START_PORT,
 		(__u8)(TI_UART1_PORT + port_number), 0, NULL, 0);
 		(__u8)(TI_UART1_PORT + port_number), 0, NULL, 0);
 	if (status) {
 	if (status) {
-		dev_err(&port->dev, "%s - cannot send start command (2), %d\n", __FUNCTION__, status);
+		dev_err(&port->dev, "%s - cannot send start command (2), %d\n", __func__, status);
 		goto unlink_int_urb;
 		goto unlink_int_urb;
 	}
 	}
 
 
 	/* start read urb */
 	/* start read urb */
-	dbg("%s - start read urb", __FUNCTION__);
+	dbg("%s - start read urb", __func__);
 	urb = port->read_urb;
 	urb = port->read_urb;
 	if (!urb) {
 	if (!urb) {
-		dev_err(&port->dev, "%s - no read urb\n", __FUNCTION__);
+		dev_err(&port->dev, "%s - no read urb\n", __func__);
 		status = -EINVAL;
 		status = -EINVAL;
 		goto unlink_int_urb;
 		goto unlink_int_urb;
 	}
 	}
@@ -643,7 +643,7 @@ static int ti_open(struct usb_serial_port *port, struct file *file)
 	urb->dev = dev;
 	urb->dev = dev;
 	status = usb_submit_urb(urb, GFP_KERNEL);
 	status = usb_submit_urb(urb, GFP_KERNEL);
 	if (status) {
 	if (status) {
-		dev_err(&port->dev, "%s - submit read urb failed, %d\n", __FUNCTION__, status);
+		dev_err(&port->dev, "%s - submit read urb failed, %d\n", __func__, status);
 		goto unlink_int_urb;
 		goto unlink_int_urb;
 	}
 	}
 
 
@@ -657,7 +657,7 @@ unlink_int_urb:
 		usb_kill_urb(port->serial->port[0]->interrupt_in_urb);
 		usb_kill_urb(port->serial->port[0]->interrupt_in_urb);
 release_lock:
 release_lock:
 	mutex_unlock(&tdev->td_open_close_lock);
 	mutex_unlock(&tdev->td_open_close_lock);
-	dbg("%s - exit %d", __FUNCTION__, status);
+	dbg("%s - exit %d", __func__, status);
 	return status;
 	return status;
 }
 }
 
 
@@ -670,7 +670,7 @@ static void ti_close(struct usb_serial_port *port, struct file *file)
 	int status;
 	int status;
 	int do_unlock;
 	int do_unlock;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 			 
 			 
 	tdev = usb_get_serial_data(port->serial);
 	tdev = usb_get_serial_data(port->serial);
 	tport = usb_get_serial_port_data(port);
 	tport = usb_get_serial_port_data(port);
@@ -687,11 +687,11 @@ static void ti_close(struct usb_serial_port *port, struct file *file)
 
 
 	port_number = port->number - port->serial->minor;
 	port_number = port->number - port->serial->minor;
 
 
-	dbg("%s - sending TI_CLOSE_PORT", __FUNCTION__);
+	dbg("%s - sending TI_CLOSE_PORT", __func__);
 	status = ti_command_out_sync(tdev, TI_CLOSE_PORT,
 	status = ti_command_out_sync(tdev, TI_CLOSE_PORT,
 		     (__u8)(TI_UART1_PORT + port_number), 0, NULL, 0);
 		     (__u8)(TI_UART1_PORT + port_number), 0, NULL, 0);
 	if (status)
 	if (status)
-		dev_err(&port->dev, "%s - cannot send close port command, %d\n" , __FUNCTION__, status);
+		dev_err(&port->dev, "%s - cannot send close port command, %d\n" , __func__, status);
 
 
 	/* if mutex_lock is interrupted, continue anyway */
 	/* if mutex_lock is interrupted, continue anyway */
 	do_unlock = !mutex_lock_interruptible(&tdev->td_open_close_lock);
 	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)
 	if (do_unlock)
 	if (do_unlock)
 		mutex_unlock(&tdev->td_open_close_lock);
 		mutex_unlock(&tdev->td_open_close_lock);
 
 
-	dbg("%s - exit", __FUNCTION__);
+	dbg("%s - exit", __func__);
 }
 }
 
 
 
 
@@ -714,10 +714,10 @@ static int ti_write(struct usb_serial_port *port, const unsigned char *data,
 	struct ti_port *tport = usb_get_serial_port_data(port);
 	struct ti_port *tport = usb_get_serial_port_data(port);
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (count == 0) {
 	if (count == 0) {
-		dbg("%s - write request of 0 bytes", __FUNCTION__);
+		dbg("%s - write request of 0 bytes", __func__);
 		return 0;
 		return 0;
 	}
 	}
 
 
@@ -740,7 +740,7 @@ static int ti_write_room(struct usb_serial_port *port)
 	int room = 0;
 	int room = 0;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (tport == NULL)
 	if (tport == NULL)
 		return -ENODEV;
 		return -ENODEV;
@@ -749,7 +749,7 @@ static int ti_write_room(struct usb_serial_port *port)
 	room = ti_buf_space_avail(tport->tp_write_buf);
 	room = ti_buf_space_avail(tport->tp_write_buf);
 	spin_unlock_irqrestore(&tport->tp_lock, flags);
 	spin_unlock_irqrestore(&tport->tp_lock, flags);
 
 
-	dbg("%s - returns %d", __FUNCTION__, room);
+	dbg("%s - returns %d", __func__, room);
 	return room;
 	return room;
 }
 }
 
 
@@ -760,7 +760,7 @@ static int ti_chars_in_buffer(struct usb_serial_port *port)
 	int chars = 0;
 	int chars = 0;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (tport == NULL)
 	if (tport == NULL)
 		return -ENODEV;
 		return -ENODEV;
@@ -769,7 +769,7 @@ static int ti_chars_in_buffer(struct usb_serial_port *port)
 	chars = ti_buf_data_avail(tport->tp_write_buf);
 	chars = ti_buf_data_avail(tport->tp_write_buf);
 	spin_unlock_irqrestore(&tport->tp_lock, flags);
 	spin_unlock_irqrestore(&tport->tp_lock, flags);
 
 
-	dbg("%s - returns %d", __FUNCTION__, chars);
+	dbg("%s - returns %d", __func__, chars);
 	return chars;
 	return chars;
 }
 }
 
 
@@ -779,14 +779,14 @@ static void ti_throttle(struct usb_serial_port *port)
 	struct ti_port *tport = usb_get_serial_port_data(port);
 	struct ti_port *tport = usb_get_serial_port_data(port);
 	struct tty_struct *tty;
 	struct tty_struct *tty;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (tport == NULL)
 	if (tport == NULL)
 		return;
 		return;
 
 
 	tty = port->tty;
 	tty = port->tty;
 	if (!tty) {
 	if (!tty) {
-		dbg("%s - no tty", __FUNCTION__);
+		dbg("%s - no tty", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -802,21 +802,21 @@ static void ti_unthrottle(struct usb_serial_port *port)
 	struct tty_struct *tty;
 	struct tty_struct *tty;
 	int status;
 	int status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (tport == NULL)
 	if (tport == NULL)
 		return;
 		return;
 
 
 	tty = port->tty;
 	tty = port->tty;
 	if (!tty) {
 	if (!tty) {
-		dbg("%s - no tty", __FUNCTION__);
+		dbg("%s - no tty", __func__);
 		return;
 		return;
 	}
 	}
 
 
 	if (I_IXOFF(tty) || C_CRTSCTS(tty)) {
 	if (I_IXOFF(tty) || C_CRTSCTS(tty)) {
 		status = ti_restart_read(tport, tty);
 		status = ti_restart_read(tport, tty);
 		if (status)
 		if (status)
-			dev_err(&port->dev, "%s - cannot restart read, %d\n", __FUNCTION__, status);
+			dev_err(&port->dev, "%s - cannot restart read, %d\n", __func__, status);
 	}
 	}
 }
 }
 
 
@@ -828,24 +828,24 @@ static int ti_ioctl(struct usb_serial_port *port, struct file *file,
 	struct async_icount cnow;
 	struct async_icount cnow;
 	struct async_icount cprev;
 	struct async_icount cprev;
 
 
-	dbg("%s - port %d, cmd = 0x%04X", __FUNCTION__, port->number, cmd);
+	dbg("%s - port %d, cmd = 0x%04X", __func__, port->number, cmd);
 
 
 	if (tport == NULL)
 	if (tport == NULL)
 		return -ENODEV;
 		return -ENODEV;
 
 
 	switch (cmd) {
 	switch (cmd) {
 		case TIOCGSERIAL:
 		case TIOCGSERIAL:
-			dbg("%s - (%d) TIOCGSERIAL", __FUNCTION__, port->number);
+			dbg("%s - (%d) TIOCGSERIAL", __func__, port->number);
 			return ti_get_serial_info(tport, (struct serial_struct __user *)arg);
 			return ti_get_serial_info(tport, (struct serial_struct __user *)arg);
 			break;
 			break;
 
 
 		case TIOCSSERIAL:
 		case TIOCSSERIAL:
-			dbg("%s - (%d) TIOCSSERIAL", __FUNCTION__, port->number);
+			dbg("%s - (%d) TIOCSSERIAL", __func__, port->number);
 			return ti_set_serial_info(tport, (struct serial_struct __user *)arg);
 			return ti_set_serial_info(tport, (struct serial_struct __user *)arg);
 			break;
 			break;
 
 
 		case TIOCMIWAIT:
 		case TIOCMIWAIT:
-			dbg("%s - (%d) TIOCMIWAIT", __FUNCTION__, port->number);
+			dbg("%s - (%d) TIOCMIWAIT", __func__, port->number);
 			cprev = tport->tp_icount;
 			cprev = tport->tp_icount;
 			while (1) {
 			while (1) {
 				interruptible_sleep_on(&tport->tp_msr_wait);
 				interruptible_sleep_on(&tport->tp_msr_wait);
@@ -866,7 +866,7 @@ static int ti_ioctl(struct usb_serial_port *port, struct file *file,
 			break;
 			break;
 
 
 		case TIOCGICOUNT:
 		case TIOCGICOUNT:
-			dbg("%s - (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__, port->number, tport->tp_icount.rx, tport->tp_icount.tx);
+			dbg("%s - (%d) TIOCGICOUNT RX=%d, TX=%d", __func__, port->number, tport->tp_icount.rx, tport->tp_icount.tx);
 			if (copy_to_user((void __user *)arg, &tport->tp_icount, sizeof(tport->tp_icount)))
 			if (copy_to_user((void __user *)arg, &tport->tp_icount, sizeof(tport->tp_icount)))
 				return -EFAULT;
 				return -EFAULT;
 			return 0;
 			return 0;
@@ -888,20 +888,20 @@ static void ti_set_termios(struct usb_serial_port *port,
 	int port_number = port->number - port->serial->minor;
 	int port_number = port->number - port->serial->minor;
 	unsigned int mcr;
 	unsigned int mcr;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	cflag = tty->termios->c_cflag;
 	cflag = tty->termios->c_cflag;
 	iflag = tty->termios->c_iflag;
 	iflag = tty->termios->c_iflag;
 
 
-	dbg("%s - cflag %08x, iflag %08x", __FUNCTION__, cflag, iflag);
-	dbg("%s - old clfag %08x, old iflag %08x", __FUNCTION__, old_termios->c_cflag, old_termios->c_iflag);
+	dbg("%s - cflag %08x, iflag %08x", __func__, cflag, iflag);
+	dbg("%s - old clfag %08x, old iflag %08x", __func__, old_termios->c_cflag, old_termios->c_iflag);
 
 
 	if (tport == NULL)
 	if (tport == NULL)
 		return;
 		return;
 
 
 	config = kmalloc(sizeof(*config), GFP_KERNEL);
 	config = kmalloc(sizeof(*config), GFP_KERNEL);
 	if (!config) {
 	if (!config) {
-		dev_err(&port->dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err(&port->dev, "%s - out of memory\n", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -985,7 +985,7 @@ static void ti_set_termios(struct usb_serial_port *port,
 		tty_encode_baud_rate(tty, baud, baud);
 		tty_encode_baud_rate(tty, baud, baud);
 
 
 	dbg("%s - BaudRate=%d, wBaudRate=%d, wFlags=0x%04X, bDataBits=%d, bParity=%d, bStopBits=%d, cXon=%d, cXoff=%d, bUartMode=%d",
 	dbg("%s - BaudRate=%d, wBaudRate=%d, wFlags=0x%04X, bDataBits=%d, bParity=%d, bStopBits=%d, cXon=%d, cXoff=%d, bUartMode=%d",
-	__FUNCTION__, baud, config->wBaudRate, config->wFlags, config->bDataBits, config->bParity, config->bStopBits, config->cXon, config->cXoff, config->bUartMode);
+	__func__, baud, config->wBaudRate, config->wFlags, config->bDataBits, config->bParity, config->bStopBits, config->cXon, config->cXoff, config->bUartMode);
 
 
 	cpu_to_be16s(&config->wBaudRate);
 	cpu_to_be16s(&config->wBaudRate);
 	cpu_to_be16s(&config->wFlags);
 	cpu_to_be16s(&config->wFlags);
@@ -994,7 +994,7 @@ static void ti_set_termios(struct usb_serial_port *port,
 		(__u8)(TI_UART1_PORT + port_number), 0, (__u8 *)config,
 		(__u8)(TI_UART1_PORT + port_number), 0, (__u8 *)config,
 		sizeof(*config));
 		sizeof(*config));
 	if (status)
 	if (status)
-		dev_err(&port->dev, "%s - cannot set config on port %d, %d\n", __FUNCTION__, port_number, status);
+		dev_err(&port->dev, "%s - cannot set config on port %d, %d\n", __func__, port_number, status);
 
 
 	/* SET_CONFIG asserts RTS and DTR, reset them correctly */
 	/* SET_CONFIG asserts RTS and DTR, reset them correctly */
 	mcr = tport->tp_shadow_mcr;
 	mcr = tport->tp_shadow_mcr;
@@ -1003,7 +1003,7 @@ static void ti_set_termios(struct usb_serial_port *port,
 		mcr &= ~(TI_MCR_DTR | TI_MCR_RTS);
 		mcr &= ~(TI_MCR_DTR | TI_MCR_RTS);
 	status = ti_set_mcr(tport, mcr);
 	status = ti_set_mcr(tport, mcr);
 	if (status)
 	if (status)
-		dev_err(&port->dev, "%s - cannot set modem control on port %d, %d\n", __FUNCTION__, port_number, status);
+		dev_err(&port->dev, "%s - cannot set modem control on port %d, %d\n", __func__, port_number, status);
 
 
 	kfree(config);
 	kfree(config);
 }
 }
@@ -1017,7 +1017,7 @@ static int ti_tiocmget(struct usb_serial_port *port, struct file *file)
 	unsigned int mcr;
 	unsigned int mcr;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (tport == NULL)
 	if (tport == NULL)
 		return -ENODEV;
 		return -ENODEV;
@@ -1035,7 +1035,7 @@ static int ti_tiocmget(struct usb_serial_port *port, struct file *file)
 		| ((msr & TI_MSR_RI) ? TIOCM_RI : 0)
 		| ((msr & TI_MSR_RI) ? TIOCM_RI : 0)
 		| ((msr & TI_MSR_DSR) ? TIOCM_DSR : 0);
 		| ((msr & TI_MSR_DSR) ? TIOCM_DSR : 0);
 
 
-	dbg("%s - 0x%04X", __FUNCTION__, result);
+	dbg("%s - 0x%04X", __func__, result);
 
 
 	return result;
 	return result;
 }
 }
@@ -1048,7 +1048,7 @@ static int ti_tiocmset(struct usb_serial_port *port, struct file *file,
 	unsigned int mcr;
 	unsigned int mcr;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (tport == NULL)
 	if (tport == NULL)
 		return -ENODEV;
 		return -ENODEV;
@@ -1080,7 +1080,7 @@ static void ti_break(struct usb_serial_port *port, int break_state)
 	struct ti_port *tport = usb_get_serial_port_data(port);
 	struct ti_port *tport = usb_get_serial_port_data(port);
 	int status;
 	int status;
 
 
-	dbg("%s - state = %d", __FUNCTION__, break_state);
+	dbg("%s - state = %d", __func__, break_state);
 
 
 	if (tport == NULL)
 	if (tport == NULL)
 		return;
 		return;
@@ -1092,7 +1092,7 @@ static void ti_break(struct usb_serial_port *port, int break_state)
 		TI_LCR_BREAK, break_state == -1 ? TI_LCR_BREAK : 0);
 		TI_LCR_BREAK, break_state == -1 ? TI_LCR_BREAK : 0);
 
 
 	if (status)
 	if (status)
-		dbg("%s - error setting break, %d", __FUNCTION__, status);
+		dbg("%s - error setting break, %d", __func__, status);
 }
 }
 
 
 
 
@@ -1111,7 +1111,7 @@ static void ti_interrupt_callback(struct urb *urb)
 	int retval;
 	int retval;
 	__u8 msr;
 	__u8 msr;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	switch (status) {
 	switch (status) {
 	case 0:
 	case 0:
@@ -1119,33 +1119,33 @@ static void ti_interrupt_callback(struct urb *urb)
 	case -ECONNRESET:
 	case -ECONNRESET:
 	case -ENOENT:
 	case -ENOENT:
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
-		dbg("%s - urb shutting down, %d", __FUNCTION__, status);
+		dbg("%s - urb shutting down, %d", __func__, status);
 		tdev->td_urb_error = 1;
 		tdev->td_urb_error = 1;
 		return;
 		return;
 	default:
 	default:
 		dev_err(dev, "%s - nonzero urb status, %d\n",
 		dev_err(dev, "%s - nonzero urb status, %d\n",
-			__FUNCTION__, status);
+			__func__, status);
 		tdev->td_urb_error = 1;
 		tdev->td_urb_error = 1;
 		goto exit;
 		goto exit;
 	}
 	}
 
 
 	if (length != 2) {
 	if (length != 2) {
-		dbg("%s - bad packet size, %d", __FUNCTION__, length);
+		dbg("%s - bad packet size, %d", __func__, length);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
 	if (data[0] == TI_CODE_HARDWARE_ERROR) {
 	if (data[0] == TI_CODE_HARDWARE_ERROR) {
-		dev_err(dev, "%s - hardware error, %d\n", __FUNCTION__, data[1]);
+		dev_err(dev, "%s - hardware error, %d\n", __func__, data[1]);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
 	port_number = TI_GET_PORT_FROM_CODE(data[0]);
 	port_number = TI_GET_PORT_FROM_CODE(data[0]);
 	function = TI_GET_FUNC_FROM_CODE(data[0]);
 	function = TI_GET_FUNC_FROM_CODE(data[0]);
 
 
-	dbg("%s - port_number %d, function %d, data 0x%02X", __FUNCTION__, port_number, function, data[1]);
+	dbg("%s - port_number %d, function %d, data 0x%02X", __func__, port_number, function, data[1]);
 
 
 	if (port_number >= serial->num_ports) {
 	if (port_number >= serial->num_ports) {
-		dev_err(dev, "%s - bad port number, %d\n", __FUNCTION__, port_number);
+		dev_err(dev, "%s - bad port number, %d\n", __func__, port_number);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -1157,17 +1157,17 @@ static void ti_interrupt_callback(struct urb *urb)
 
 
 	switch (function) {
 	switch (function) {
 	case TI_CODE_DATA_ERROR:
 	case TI_CODE_DATA_ERROR:
-		dev_err(dev, "%s - DATA ERROR, port %d, data 0x%02X\n", __FUNCTION__, port_number, data[1]);
+		dev_err(dev, "%s - DATA ERROR, port %d, data 0x%02X\n", __func__, port_number, data[1]);
 		break;
 		break;
 
 
 	case TI_CODE_MODEM_STATUS:
 	case TI_CODE_MODEM_STATUS:
 		msr = data[1];
 		msr = data[1];
-		dbg("%s - port %d, msr 0x%02X", __FUNCTION__, port_number, msr);
+		dbg("%s - port %d, msr 0x%02X", __func__, port_number, msr);
 		ti_handle_new_msr(tport, msr);
 		ti_handle_new_msr(tport, msr);
 		break;
 		break;
 
 
 	default:
 	default:
-		dev_err(dev, "%s - unknown interrupt code, 0x%02X\n", __FUNCTION__, data[1]);
+		dev_err(dev, "%s - unknown interrupt code, 0x%02X\n", __func__, data[1]);
 		break;
 		break;
 	}
 	}
 
 
@@ -1175,7 +1175,7 @@ exit:
 	retval = usb_submit_urb(urb, GFP_ATOMIC);
 	retval = usb_submit_urb(urb, GFP_ATOMIC);
 	if (retval)
 	if (retval)
 		dev_err(dev, "%s - resubmit interrupt urb failed, %d\n",
 		dev_err(dev, "%s - resubmit interrupt urb failed, %d\n",
-			__FUNCTION__, retval);
+			__func__, retval);
 }
 }
 
 
 
 
@@ -1187,7 +1187,7 @@ static void ti_bulk_in_callback(struct urb *urb)
 	int status = urb->status;
 	int status = urb->status;
 	int retval = 0;
 	int retval = 0;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	switch (status) {
 	switch (status) {
 	case 0:
 	case 0:
@@ -1195,13 +1195,13 @@ static void ti_bulk_in_callback(struct urb *urb)
 	case -ECONNRESET:
 	case -ECONNRESET:
 	case -ENOENT:
 	case -ENOENT:
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
-		dbg("%s - urb shutting down, %d", __FUNCTION__, status);
+		dbg("%s - urb shutting down, %d", __func__, status);
 		tport->tp_tdev->td_urb_error = 1;
 		tport->tp_tdev->td_urb_error = 1;
 		wake_up_interruptible(&tport->tp_write_wait);
 		wake_up_interruptible(&tport->tp_write_wait);
 		return;
 		return;
 	default:
 	default:
 		dev_err(dev, "%s - nonzero urb status, %d\n",
 		dev_err(dev, "%s - nonzero urb status, %d\n",
-			__FUNCTION__, status );
+			__func__, status );
 		tport->tp_tdev->td_urb_error = 1;
 		tport->tp_tdev->td_urb_error = 1;
 		wake_up_interruptible(&tport->tp_write_wait);
 		wake_up_interruptible(&tport->tp_write_wait);
 	}
 	}
@@ -1210,16 +1210,16 @@ static void ti_bulk_in_callback(struct urb *urb)
 		goto exit;
 		goto exit;
 
 
 	if (status) {
 	if (status) {
-		dev_err(dev, "%s - stopping read!\n", __FUNCTION__);
+		dev_err(dev, "%s - stopping read!\n", __func__);
 		return;
 		return;
 	}
 	}
 
 
 	if (port->tty && urb->actual_length) {
 	if (port->tty && urb->actual_length) {
-		usb_serial_debug_data(debug, dev, __FUNCTION__,
+		usb_serial_debug_data(debug, dev, __func__,
 			urb->actual_length, urb->transfer_buffer);
 			urb->actual_length, urb->transfer_buffer);
 
 
 		if (!tport->tp_is_open)
 		if (!tport->tp_is_open)
-			dbg("%s - port closed, dropping data", __FUNCTION__);
+			dbg("%s - port closed, dropping data", __func__);
 		else
 		else
 			ti_recv(&urb->dev->dev, port->tty, urb->transfer_buffer,
 			ti_recv(&urb->dev->dev, port->tty, urb->transfer_buffer,
 				urb->actual_length);
 				urb->actual_length);
@@ -1241,7 +1241,7 @@ exit:
 	spin_unlock(&tport->tp_lock);
 	spin_unlock(&tport->tp_lock);
 	if (retval)
 	if (retval)
 		dev_err(dev, "%s - resubmit read urb failed, %d\n",
 		dev_err(dev, "%s - resubmit read urb failed, %d\n",
-			__FUNCTION__, retval);
+			__func__, retval);
 }
 }
 
 
 
 
@@ -1252,7 +1252,7 @@ static void ti_bulk_out_callback(struct urb *urb)
 	struct device *dev = &urb->dev->dev;
 	struct device *dev = &urb->dev->dev;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	tport->tp_write_urb_in_use = 0;
 	tport->tp_write_urb_in_use = 0;
 
 
@@ -1262,13 +1262,13 @@ static void ti_bulk_out_callback(struct urb *urb)
 	case -ECONNRESET:
 	case -ECONNRESET:
 	case -ENOENT:
 	case -ENOENT:
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
-		dbg("%s - urb shutting down, %d", __FUNCTION__, status);
+		dbg("%s - urb shutting down, %d", __func__, status);
 		tport->tp_tdev->td_urb_error = 1;
 		tport->tp_tdev->td_urb_error = 1;
 		wake_up_interruptible(&tport->tp_write_wait);
 		wake_up_interruptible(&tport->tp_write_wait);
 		return;
 		return;
 	default:
 	default:
 		dev_err(dev, "%s - nonzero urb status, %d\n",
 		dev_err(dev, "%s - nonzero urb status, %d\n",
-			__FUNCTION__, status);
+			__func__, status);
 		tport->tp_tdev->td_urb_error = 1;
 		tport->tp_tdev->td_urb_error = 1;
 		wake_up_interruptible(&tport->tp_write_wait);
 		wake_up_interruptible(&tport->tp_write_wait);
 	}
 	}
@@ -1286,7 +1286,7 @@ static void ti_recv(struct device *dev, struct tty_struct *tty,
 	do {
 	do {
 		cnt = tty_buffer_request_room(tty, length);
 		cnt = tty_buffer_request_room(tty, length);
 		if (cnt < length) {
 		if (cnt < length) {
-			dev_err(dev, "%s - dropping data, %d bytes lost\n", __FUNCTION__, length - cnt);
+			dev_err(dev, "%s - dropping data, %d bytes lost\n", __func__, length - cnt);
 			if(cnt == 0)
 			if(cnt == 0)
 				break;
 				break;
 		}
 		}
@@ -1307,7 +1307,7 @@ static void ti_send(struct ti_port *tport)
 	unsigned long flags;
 	unsigned long flags;
 
 
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&tport->tp_lock, flags);
 	spin_lock_irqsave(&tport->tp_lock, flags);
 
 
@@ -1329,7 +1329,7 @@ static void ti_send(struct ti_port *tport)
 
 
 	spin_unlock_irqrestore(&tport->tp_lock, flags);
 	spin_unlock_irqrestore(&tport->tp_lock, flags);
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, port->write_urb->transfer_buffer);
+	usb_serial_debug_data(debug, &port->dev, __func__, count, port->write_urb->transfer_buffer);
 
 
 	usb_fill_bulk_urb(port->write_urb, port->serial->dev,
 	usb_fill_bulk_urb(port->write_urb, port->serial->dev,
 			   usb_sndbulkpipe(port->serial->dev,
 			   usb_sndbulkpipe(port->serial->dev,
@@ -1339,7 +1339,7 @@ static void ti_send(struct ti_port *tport)
 
 
 	result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 	result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
 	if (result) {
 	if (result) {
-		dev_err(&port->dev, "%s - submit write urb failed, %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - submit write urb failed, %d\n", __func__, result);
 		tport->tp_write_urb_in_use = 0; 
 		tport->tp_write_urb_in_use = 0; 
 		/* TODO: reschedule ti_send */
 		/* TODO: reschedule ti_send */
 	} else {
 	} else {
@@ -1381,23 +1381,23 @@ static int ti_get_lsr(struct ti_port *tport)
 	int port_number = port->number - port->serial->minor;
 	int port_number = port->number - port->serial->minor;
 	struct ti_port_status *data;
 	struct ti_port_status *data;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	size = sizeof(struct ti_port_status);
 	size = sizeof(struct ti_port_status);
 	data = kmalloc(size, GFP_KERNEL);
 	data = kmalloc(size, GFP_KERNEL);
 	if (!data) {
 	if (!data) {
-		dev_err(&port->dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err(&port->dev, "%s - out of memory\n", __func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 
 
 	status = ti_command_in_sync(tdev, TI_GET_PORT_STATUS,
 	status = ti_command_in_sync(tdev, TI_GET_PORT_STATUS,
 		(__u8)(TI_UART1_PORT+port_number), 0, (__u8 *)data, size);
 		(__u8)(TI_UART1_PORT+port_number), 0, (__u8 *)data, size);
 	if (status) {
 	if (status) {
-		dev_err(&port->dev, "%s - get port status command failed, %d\n", __FUNCTION__, status);
+		dev_err(&port->dev, "%s - get port status command failed, %d\n", __func__, status);
 		goto free_data;
 		goto free_data;
 	}
 	}
 
 
-	dbg("%s - lsr 0x%02X", __FUNCTION__, data->bLSR);
+	dbg("%s - lsr 0x%02X", __func__, data->bLSR);
 
 
 	tport->tp_lsr = data->bLSR;
 	tport->tp_lsr = data->bLSR;
 
 
@@ -1458,7 +1458,7 @@ static void ti_handle_new_msr(struct ti_port *tport, __u8 msr)
 	struct tty_struct *tty;
 	struct tty_struct *tty;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - msr 0x%02X", __FUNCTION__, msr);
+	dbg("%s - msr 0x%02X", __func__, msr);
 
 
 	if (msr & TI_MSR_DELTA_MASK) {
 	if (msr & TI_MSR_DELTA_MASK) {
 		spin_lock_irqsave(&tport->tp_lock, flags);
 		spin_lock_irqsave(&tport->tp_lock, flags);
@@ -1496,7 +1496,7 @@ static void ti_drain(struct ti_port *tport, unsigned long timeout, int flush)
 	struct usb_serial_port *port = tport->tp_port;
 	struct usb_serial_port *port = tport->tp_port;
 	wait_queue_t wait;
 	wait_queue_t wait;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irq(&tport->tp_lock);
 	spin_lock_irq(&tport->tp_lock);
 
 
@@ -1628,12 +1628,12 @@ static int ti_write_byte(struct ti_device *tdev, unsigned long addr,
 	struct ti_write_data_bytes *data;
 	struct ti_write_data_bytes *data;
 	struct device *dev = &tdev->td_serial->dev->dev;
 	struct device *dev = &tdev->td_serial->dev->dev;
 
 
-	dbg("%s - addr 0x%08lX, mask 0x%02X, byte 0x%02X", __FUNCTION__, addr, mask, byte);
+	dbg("%s - addr 0x%08lX, mask 0x%02X, byte 0x%02X", __func__, addr, mask, byte);
 
 
 	size = sizeof(struct ti_write_data_bytes) + 2;
 	size = sizeof(struct ti_write_data_bytes) + 2;
 	data = kmalloc(size, GFP_KERNEL);
 	data = kmalloc(size, GFP_KERNEL);
 	if (!data) {
 	if (!data) {
-		dev_err(dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err(dev, "%s - out of memory\n", __func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 
 
@@ -1649,7 +1649,7 @@ static int ti_write_byte(struct ti_device *tdev, unsigned long addr,
 		(__u8 *)data, size);
 		(__u8 *)data, size);
 
 
 	if (status < 0)
 	if (status < 0)
-		dev_err(dev, "%s - failed, %d\n", __FUNCTION__, status);
+		dev_err(dev, "%s - failed, %d\n", __func__, status);
 
 
 	kfree(data);
 	kfree(data);
 
 
@@ -1676,7 +1676,7 @@ static int ti_download_firmware(struct ti_device *tdev,
 	buffer_size = TI_FIRMWARE_BUF_SIZE + sizeof(struct ti_firmware_header);
 	buffer_size = TI_FIRMWARE_BUF_SIZE + sizeof(struct ti_firmware_header);
 	buffer = kmalloc(buffer_size, GFP_KERNEL);
 	buffer = kmalloc(buffer_size, GFP_KERNEL);
 	if (!buffer) {
 	if (!buffer) {
-		dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err(&dev->dev, "%s - out of memory\n", __func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 
 
@@ -1690,7 +1690,7 @@ static int ti_download_firmware(struct ti_device *tdev,
 	header->wLength = cpu_to_le16((__u16)(buffer_size - sizeof(struct ti_firmware_header)));
 	header->wLength = cpu_to_le16((__u16)(buffer_size - sizeof(struct ti_firmware_header)));
 	header->bCheckSum = cs;
 	header->bCheckSum = cs;
 
 
-	dbg("%s - downloading firmware", __FUNCTION__);
+	dbg("%s - downloading firmware", __func__);
 	for (pos = 0; pos < buffer_size; pos += done) {
 	for (pos = 0; pos < buffer_size; pos += done) {
 		len = min(buffer_size - pos, TI_DOWNLOAD_MAX_PACKET_SIZE);
 		len = min(buffer_size - pos, TI_DOWNLOAD_MAX_PACKET_SIZE);
 		status = usb_bulk_msg(dev, pipe, buffer+pos, len, &done, 1000);
 		status = usb_bulk_msg(dev, pipe, buffer+pos, len, &done, 1000);
@@ -1701,11 +1701,11 @@ static int ti_download_firmware(struct ti_device *tdev,
 	kfree(buffer);
 	kfree(buffer);
 
 
 	if (status) {
 	if (status) {
-		dev_err(&dev->dev, "%s - error downloading firmware, %d\n", __FUNCTION__, status);
+		dev_err(&dev->dev, "%s - error downloading firmware, %d\n", __func__, status);
 		return status;
 		return status;
 	}
 	}
 
 
-	dbg("%s - download successful", __FUNCTION__);
+	dbg("%s - download successful", __func__);
 
 
 	return 0;
 	return 0;
 }
 }

+ 39 - 39
drivers/usb/serial/usb-serial.c

@@ -81,7 +81,7 @@ static struct usb_serial *get_free_serial (struct usb_serial *serial, int num_po
 	unsigned int i, j;
 	unsigned int i, j;
 	int good_spot;
 	int good_spot;
 
 
-	dbg("%s %d", __FUNCTION__, num_ports);
+	dbg("%s %d", __func__, num_ports);
 
 
 	*minor = 0;
 	*minor = 0;
 	mutex_lock(&table_lock);
 	mutex_lock(&table_lock);
@@ -101,7 +101,7 @@ static struct usb_serial *get_free_serial (struct usb_serial *serial, int num_po
 
 
 		*minor = i;
 		*minor = i;
 		j = 0;
 		j = 0;
-		dbg("%s - minor base = %d", __FUNCTION__, *minor);
+		dbg("%s - minor base = %d", __func__, *minor);
 		for (i = *minor; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i) {
 		for (i = *minor; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i) {
 			serial_table[i] = serial;
 			serial_table[i] = serial;
 			serial->port[j++]->number = i;
 			serial->port[j++]->number = i;
@@ -117,7 +117,7 @@ static void return_serial(struct usb_serial *serial)
 {
 {
 	int i;
 	int i;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	if (serial == NULL)
 	if (serial == NULL)
 		return;
 		return;
@@ -135,7 +135,7 @@ static void destroy_serial(struct kref *kref)
 
 
 	serial = to_usb_serial(kref);
 	serial = to_usb_serial(kref);
 
 
-	dbg("%s - %s", __FUNCTION__, serial->type->description);
+	dbg("%s - %s", __func__, serial->type->description);
 
 
 	serial->type->shutdown(serial);
 	serial->type->shutdown(serial);
 
 
@@ -187,7 +187,7 @@ static int serial_open (struct tty_struct *tty, struct file * filp)
 	unsigned int portNumber;
 	unsigned int portNumber;
 	int retval;
 	int retval;
 	
 	
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	/* get the serial object associated with this tty pointer */
 	/* get the serial object associated with this tty pointer */
 	serial = usb_serial_get_by_index(tty->index);
 	serial = usb_serial_get_by_index(tty->index);
@@ -259,7 +259,7 @@ static void serial_close(struct tty_struct *tty, struct file * filp)
 	if (!port)
 	if (!port)
 		return;
 		return;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	mutex_lock(&port->mutex);
 	mutex_lock(&port->mutex);
 
 
@@ -299,11 +299,11 @@ static int serial_write (struct tty_struct * tty, const unsigned char *buf, int
 	if (!port || port->serial->dev->state == USB_STATE_NOTATTACHED)
 	if (!port || port->serial->dev->state == USB_STATE_NOTATTACHED)
 		goto exit;
 		goto exit;
 
 
-	dbg("%s - port %d, %d byte(s)", __FUNCTION__, port->number, count);
+	dbg("%s - port %d, %d byte(s)", __func__, port->number, count);
 
 
 	if (!port->open_count) {
 	if (!port->open_count) {
 		retval = -EINVAL;
 		retval = -EINVAL;
-		dbg("%s - port not opened", __FUNCTION__);
+		dbg("%s - port not opened", __func__);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -322,10 +322,10 @@ static int serial_write_room (struct tty_struct *tty)
 	if (!port)
 	if (!port)
 		goto exit;
 		goto exit;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (!port->open_count) {
 	if (!port->open_count) {
-		dbg("%s - port not open", __FUNCTION__);
+		dbg("%s - port not open", __func__);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -344,10 +344,10 @@ static int serial_chars_in_buffer (struct tty_struct *tty)
 	if (!port)
 	if (!port)
 		goto exit;
 		goto exit;
 
 
-	dbg("%s = port %d", __FUNCTION__, port->number);
+	dbg("%s = port %d", __func__, port->number);
 
 
 	if (!port->open_count) {
 	if (!port->open_count) {
-		dbg("%s - port not open", __FUNCTION__);
+		dbg("%s - port not open", __func__);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -365,10 +365,10 @@ static void serial_throttle (struct tty_struct * tty)
 	if (!port)
 	if (!port)
 		return;
 		return;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (!port->open_count) {
 	if (!port->open_count) {
-		dbg ("%s - port not open", __FUNCTION__);
+		dbg ("%s - port not open", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -384,10 +384,10 @@ static void serial_unthrottle (struct tty_struct * tty)
 	if (!port)
 	if (!port)
 		return;
 		return;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (!port->open_count) {
 	if (!port->open_count) {
-		dbg("%s - port not open", __FUNCTION__);
+		dbg("%s - port not open", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -405,11 +405,11 @@ static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned in
 	if (!port)
 	if (!port)
 		goto exit;
 		goto exit;
 
 
-	dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
+	dbg("%s - port %d, cmd 0x%.4x", __func__, port->number, cmd);
 
 
 	/* Caution - port->open_count is BKL protected */
 	/* Caution - port->open_count is BKL protected */
 	if (!port->open_count) {
 	if (!port->open_count) {
-		dbg ("%s - port not open", __FUNCTION__);
+		dbg ("%s - port not open", __func__);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -430,10 +430,10 @@ static void serial_set_termios (struct tty_struct *tty, struct ktermios * old)
 	if (!port)
 	if (!port)
 		return;
 		return;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (!port->open_count) {
 	if (!port->open_count) {
-		dbg("%s - port not open", __FUNCTION__);
+		dbg("%s - port not open", __func__);
 		return;
 		return;
 	}
 	}
 
 
@@ -454,10 +454,10 @@ static void serial_break (struct tty_struct *tty, int break_state)
 		return;
 		return;
 	}
 	}
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (!port->open_count) {
 	if (!port->open_count) {
-		dbg("%s - port not open", __FUNCTION__);
+		dbg("%s - port not open", __func__);
 		unlock_kernel();
 		unlock_kernel();
 		return;
 		return;
 	}
 	}
@@ -476,7 +476,7 @@ static int serial_read_proc (char *page, char **start, off_t off, int count, int
 	off_t begin = 0;
 	off_t begin = 0;
 	char tmp[40];
 	char tmp[40];
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 	length += sprintf (page, "usbserinfo:1.0 driver:2.0\n");
 	length += sprintf (page, "usbserinfo:1.0 driver:2.0\n");
 	for (i = 0; i < SERIAL_TTY_MINORS && length < PAGE_SIZE; ++i) {
 	for (i = 0; i < SERIAL_TTY_MINORS && length < PAGE_SIZE; ++i) {
 		serial = usb_serial_get_by_index(i);
 		serial = usb_serial_get_by_index(i);
@@ -522,10 +522,10 @@ static int serial_tiocmget (struct tty_struct *tty, struct file *file)
 	if (!port)
 	if (!port)
 		return -ENODEV;
 		return -ENODEV;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (!port->open_count) {
 	if (!port->open_count) {
-		dbg("%s - port not open", __FUNCTION__);
+		dbg("%s - port not open", __func__);
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}
 
 
@@ -543,10 +543,10 @@ static int serial_tiocmset (struct tty_struct *tty, struct file *file,
 	if (!port)
 	if (!port)
 		return -ENODEV;
 		return -ENODEV;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (!port->open_count) {
 	if (!port->open_count) {
-		dbg("%s - port not open", __FUNCTION__);
+		dbg("%s - port not open", __func__);
 		return -ENODEV;
 		return -ENODEV;
 	}
 	}
 
 
@@ -572,7 +572,7 @@ static void usb_serial_port_work(struct work_struct *work)
 		container_of(work, struct usb_serial_port, work);
 		container_of(work, struct usb_serial_port, work);
 	struct tty_struct *tty;
 	struct tty_struct *tty;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 	
 	
 	if (!port)
 	if (!port)
 		return;
 		return;
@@ -588,7 +588,7 @@ static void port_release(struct device *dev)
 {
 {
 	struct usb_serial_port *port = to_usb_serial_port(dev);
 	struct usb_serial_port *port = to_usb_serial_port(dev);
 
 
-	dbg ("%s - %s", __FUNCTION__, dev->bus_id);
+	dbg ("%s - %s", __func__, dev->bus_id);
 	port_free(port);
 	port_free(port);
 }
 }
 
 
@@ -634,7 +634,7 @@ static struct usb_serial * create_serial (struct usb_device *dev,
 
 
 	serial = kzalloc(sizeof(*serial), GFP_KERNEL);
 	serial = kzalloc(sizeof(*serial), GFP_KERNEL);
 	if (!serial) {
 	if (!serial) {
-		dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err(&dev->dev, "%s - out of memory\n", __func__);
 		return NULL;
 		return NULL;
 	}
 	}
 	serial->dev = usb_get_dev(dev);
 	serial->dev = usb_get_dev(dev);
@@ -729,7 +729,7 @@ int usb_serial_probe(struct usb_interface *interface,
 	serial = create_serial (dev, interface, type);
 	serial = create_serial (dev, interface, type);
 	if (!serial) {
 	if (!serial) {
 		unlock_kernel();
 		unlock_kernel();
-		dev_err(&interface->dev, "%s - out of memory\n", __FUNCTION__);
+		dev_err(&interface->dev, "%s - out of memory\n", __func__);
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
 
 
@@ -874,7 +874,7 @@ int usb_serial_probe(struct usb_interface *interface,
 	serial->num_port_pointers = max_endpoints;
 	serial->num_port_pointers = max_endpoints;
 	unlock_kernel();
 	unlock_kernel();
 
 
-	dbg("%s - setting up %d port structures for this device", __FUNCTION__, max_endpoints);
+	dbg("%s - setting up %d port structures for this device", __func__, max_endpoints);
 	for (i = 0; i < max_endpoints; ++i) {
 	for (i = 0; i < max_endpoints; ++i) {
 		port = kzalloc(sizeof(struct usb_serial_port), GFP_KERNEL);
 		port = kzalloc(sizeof(struct usb_serial_port), GFP_KERNEL);
 		if (!port)
 		if (!port)
@@ -1022,7 +1022,7 @@ int usb_serial_probe(struct usb_interface *interface,
 		port->dev.release = &port_release;
 		port->dev.release = &port_release;
 
 
 		snprintf (&port->dev.bus_id[0], sizeof(port->dev.bus_id), "ttyUSB%d", port->number);
 		snprintf (&port->dev.bus_id[0], sizeof(port->dev.bus_id), "ttyUSB%d", port->number);
-		dbg ("%s - registering %s", __FUNCTION__, port->dev.bus_id);
+		dbg ("%s - registering %s", __func__, port->dev.bus_id);
 		retval = device_register(&port->dev);
 		retval = device_register(&port->dev);
 		if (retval)
 		if (retval)
 			dev_err(&port->dev, "Error registering port device, "
 			dev_err(&port->dev, "Error registering port device, "
@@ -1081,7 +1081,7 @@ void usb_serial_disconnect(struct usb_interface *interface)
 	struct usb_serial_port *port;
 	struct usb_serial_port *port;
 
 
 	usb_serial_console_disconnect(serial);
 	usb_serial_console_disconnect(serial);
-	dbg ("%s", __FUNCTION__);
+	dbg ("%s", __func__);
 
 
 	mutex_lock(&serial->disc_mutex);
 	mutex_lock(&serial->disc_mutex);
 	usb_set_intfdata (interface, NULL);
 	usb_set_intfdata (interface, NULL);
@@ -1165,7 +1165,7 @@ static int __init usb_serial_init(void)
 
 
 	result = bus_register(&usb_serial_bus_type);
 	result = bus_register(&usb_serial_bus_type);
 	if (result) {
 	if (result) {
-		err("%s - registering bus driver failed", __FUNCTION__);
+		err("%s - registering bus driver failed", __func__);
 		goto exit_bus;
 		goto exit_bus;
 	}
 	}
 
 
@@ -1182,21 +1182,21 @@ static int __init usb_serial_init(void)
 	tty_set_operations(usb_serial_tty_driver, &serial_ops);
 	tty_set_operations(usb_serial_tty_driver, &serial_ops);
 	result = tty_register_driver(usb_serial_tty_driver);
 	result = tty_register_driver(usb_serial_tty_driver);
 	if (result) {
 	if (result) {
-		err("%s - tty_register_driver failed", __FUNCTION__);
+		err("%s - tty_register_driver failed", __func__);
 		goto exit_reg_driver;
 		goto exit_reg_driver;
 	}
 	}
 
 
 	/* register the USB driver */
 	/* register the USB driver */
 	result = usb_register(&usb_serial_driver);
 	result = usb_register(&usb_serial_driver);
 	if (result < 0) {
 	if (result < 0) {
-		err("%s - usb_register failed", __FUNCTION__);
+		err("%s - usb_register failed", __func__);
 		goto exit_tty;
 		goto exit_tty;
 	}
 	}
 
 
 	/* register the generic driver, if we should */
 	/* register the generic driver, if we should */
 	result = usb_serial_generic_register(debug);
 	result = usb_serial_generic_register(debug);
 	if (result < 0) {
 	if (result < 0) {
-		err("%s - registering generic driver failed", __FUNCTION__);
+		err("%s - registering generic driver failed", __func__);
 		goto exit_generic;
 		goto exit_generic;
 	}
 	}
 
 
@@ -1214,7 +1214,7 @@ exit_reg_driver:
 	bus_unregister(&usb_serial_bus_type);
 	bus_unregister(&usb_serial_bus_type);
 
 
 exit_bus:
 exit_bus:
-	err ("%s - returning with error %d", __FUNCTION__, result);
+	err ("%s - returning with error %d", __func__, result);
 	put_tty_driver(usb_serial_tty_driver);
 	put_tty_driver(usb_serial_tty_driver);
 	return result;
 	return result;
 }
 }

+ 43 - 43
drivers/usb/serial/visor.c

@@ -281,7 +281,7 @@ static int visor_open (struct usb_serial_port *port, struct file *filp)
 	unsigned long flags;
 	unsigned long flags;
 	int result = 0;
 	int result = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (!port->read_urb) {
 	if (!port->read_urb) {
 		/* this is needed for some brain dead Sony devices */
 		/* 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)
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	result = usb_submit_urb(port->read_urb, GFP_KERNEL);
 	if (result) {
 	if (result) {
 		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n",
 		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n",
-			__FUNCTION__, result);
+			__func__, result);
 		goto exit;
 		goto exit;
 	}
 	}
 	
 	
 	if (port->interrupt_in_urb) {
 	if (port->interrupt_in_urb) {
-		dbg("%s - adding interrupt input for treo", __FUNCTION__);
+		dbg("%s - adding interrupt input for treo", __func__);
 		result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 		result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
 		if (result)
 		if (result)
 			dev_err(&port->dev, "%s - failed submitting interrupt urb, error %d\n",
 			dev_err(&port->dev, "%s - failed submitting interrupt urb, error %d\n",
-				__FUNCTION__, result);
+				__func__, result);
 	}
 	}
 exit:	
 exit:	
 	return result;
 	return result;
@@ -334,7 +334,7 @@ static void visor_close (struct usb_serial_port *port, struct file * filp)
 	struct visor_private *priv = usb_get_serial_port_data(port);
 	struct visor_private *priv = usb_get_serial_port_data(port);
 	unsigned char *transfer_buffer;
 	unsigned char *transfer_buffer;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 			 
 			 
 	/* shutdown our urbs */
 	/* shutdown our urbs */
 	usb_kill_urb(port->read_urb);
 	usb_kill_urb(port->read_urb);
@@ -370,12 +370,12 @@ static int visor_write (struct usb_serial_port *port, const unsigned char *buf,
 	unsigned long flags;
 	unsigned long flags;
 	int status;
 	int status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	if (priv->outstanding_urbs > URB_UPPER_LIMIT) {
 	if (priv->outstanding_urbs > URB_UPPER_LIMIT) {
 		spin_unlock_irqrestore(&priv->lock, flags);
 		spin_unlock_irqrestore(&priv->lock, flags);
-		dbg("%s - write limit hit\n", __FUNCTION__);
+		dbg("%s - write limit hit\n", __func__);
 		return 0;
 		return 0;
 	}
 	}
 	priv->outstanding_urbs++;
 	priv->outstanding_urbs++;
@@ -397,7 +397,7 @@ static int visor_write (struct usb_serial_port *port, const unsigned char *buf,
 
 
 	memcpy (buffer, buf, count);
 	memcpy (buffer, buf, count);
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buffer);
+	usb_serial_debug_data(debug, &port->dev, __func__, count, buffer);
 
 
 	usb_fill_bulk_urb (urb, serial->dev,
 	usb_fill_bulk_urb (urb, serial->dev,
 			   usb_sndbulkpipe (serial->dev,
 			   usb_sndbulkpipe (serial->dev,
@@ -409,7 +409,7 @@ static int visor_write (struct usb_serial_port *port, const unsigned char *buf,
 	status = usb_submit_urb(urb, GFP_ATOMIC);
 	status = usb_submit_urb(urb, GFP_ATOMIC);
 	if (status) {
 	if (status) {
 		dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n",
 		dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n",
-			__FUNCTION__, status);
+			__func__, status);
 		count = status;
 		count = status;
 		goto error;
 		goto error;
 	} else {
 	} else {
@@ -440,7 +440,7 @@ static int visor_write_room (struct usb_serial_port *port)
 	struct visor_private *priv = usb_get_serial_port_data(port);
 	struct visor_private *priv = usb_get_serial_port_data(port);
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/*
 	/*
 	 * We really can take anything the user throws at us
 	 * We really can take anything the user throws at us
@@ -451,7 +451,7 @@ static int visor_write_room (struct usb_serial_port *port)
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	if (priv->outstanding_urbs > URB_UPPER_LIMIT * 2 / 3) {
 	if (priv->outstanding_urbs > URB_UPPER_LIMIT * 2 / 3) {
 		spin_unlock_irqrestore(&priv->lock, flags);
 		spin_unlock_irqrestore(&priv->lock, flags);
-		dbg("%s - write limit hit\n", __FUNCTION__);
+		dbg("%s - write limit hit\n", __func__);
 		return 0;
 		return 0;
 	}
 	}
 	spin_unlock_irqrestore(&priv->lock, flags);
 	spin_unlock_irqrestore(&priv->lock, flags);
@@ -462,7 +462,7 @@ static int visor_write_room (struct usb_serial_port *port)
 
 
 static int visor_chars_in_buffer (struct usb_serial_port *port)
 static int visor_chars_in_buffer (struct usb_serial_port *port)
 {
 {
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	/* 
 	/* 
 	 * We can't really account for how much data we
 	 * We can't really account for how much data we
@@ -484,11 +484,11 @@ static void visor_write_bulk_callback (struct urb *urb)
 	/* free up the transfer buffer, as usb_free_urb() does not do this */
 	/* free up the transfer buffer, as usb_free_urb() does not do this */
 	kfree (urb->transfer_buffer);
 	kfree (urb->transfer_buffer);
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (status)
 	if (status)
 		dbg("%s - nonzero write bulk status received: %d",
 		dbg("%s - nonzero write bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 
 
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	--priv->outstanding_urbs;
 	--priv->outstanding_urbs;
@@ -508,15 +508,15 @@ static void visor_read_bulk_callback (struct urb *urb)
 	int result;
 	int result;
 	int available_room;
 	int available_room;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero read bulk status received: %d",
 		dbg("%s - nonzero read bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+	usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
 
 
 	tty = port->tty;
 	tty = port->tty;
 	if (tty && urb->actual_length) {
 	if (tty && urb->actual_length) {
@@ -542,7 +542,7 @@ static void visor_read_bulk_callback (struct urb *urb)
 				   visor_read_bulk_callback, port);
 				   visor_read_bulk_callback, port);
 		result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 		result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 		if (result)
 		if (result)
-			dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+			dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __func__, result);
 	} else {
 	} else {
 		priv->actually_throttled = 1;
 		priv->actually_throttled = 1;
 	}
 	}
@@ -564,11 +564,11 @@ static void visor_read_int_callback (struct urb *urb)
 	case -ESHUTDOWN:
 	case -ESHUTDOWN:
 		/* this urb is terminated, clean up */
 		/* this urb is terminated, clean up */
 		dbg("%s - urb shutting down with status: %d",
 		dbg("%s - urb shutting down with status: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	default:
 	default:
 		dbg("%s - nonzero urb status received: %d",
 		dbg("%s - nonzero urb status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -579,14 +579,14 @@ static void visor_read_int_callback (struct urb *urb)
 	 * Rumor has it this endpoint is used to notify when data
 	 * Rumor has it this endpoint is used to notify when data
 	 * is ready to be read from the bulk ones.
 	 * is ready to be read from the bulk ones.
 	 */
 	 */
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__,
+	usb_serial_debug_data(debug, &port->dev, __func__,
 			      urb->actual_length, urb->transfer_buffer);
 			      urb->actual_length, urb->transfer_buffer);
 
 
 exit:
 exit:
 	result = usb_submit_urb (urb, GFP_ATOMIC);
 	result = usb_submit_urb (urb, GFP_ATOMIC);
 	if (result)
 	if (result)
 		dev_err(&urb->dev->dev, "%s - Error %d submitting interrupt urb\n",
 		dev_err(&urb->dev->dev, "%s - Error %d submitting interrupt urb\n",
-			__FUNCTION__, result);
+			__func__, result);
 }
 }
 
 
 static void visor_throttle (struct usb_serial_port *port)
 static void visor_throttle (struct usb_serial_port *port)
@@ -594,7 +594,7 @@ static void visor_throttle (struct usb_serial_port *port)
 	struct visor_private *priv = usb_get_serial_port_data(port);
 	struct visor_private *priv = usb_get_serial_port_data(port);
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	priv->throttled = 1;
 	priv->throttled = 1;
 	spin_unlock_irqrestore(&priv->lock, flags);
 	spin_unlock_irqrestore(&priv->lock, flags);
@@ -607,7 +607,7 @@ static void visor_unthrottle (struct usb_serial_port *port)
 	unsigned long flags;
 	unsigned long flags;
 	int result;
 	int result;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 	spin_lock_irqsave(&priv->lock, flags);
 	spin_lock_irqsave(&priv->lock, flags);
 	priv->throttled = 0;
 	priv->throttled = 0;
 	priv->actually_throttled = 0;
 	priv->actually_throttled = 0;
@@ -616,7 +616,7 @@ static void visor_unthrottle (struct usb_serial_port *port)
 	port->read_urb->dev = port->serial->dev;
 	port->read_urb->dev = port->serial->dev;
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	if (result)
 	if (result)
-		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+		dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __func__, result);
 }
 }
 
 
 static int palm_os_3_probe (struct usb_serial *serial, const struct usb_device_id *id)
 static 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
 	int i;
 	int i;
 	int num_ports = 0;
 	int num_ports = 0;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	transfer_buffer = kmalloc (sizeof (*connection_info), GFP_KERNEL);
 	transfer_buffer = kmalloc (sizeof (*connection_info), GFP_KERNEL);
 	if (!transfer_buffer) {
 	if (!transfer_buffer) {
-		dev_err(dev, "%s - kmalloc(%Zd) failed.\n", __FUNCTION__,
+		dev_err(dev, "%s - kmalloc(%Zd) failed.\n", __func__,
 			sizeof(*connection_info));
 			sizeof(*connection_info));
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
@@ -646,7 +646,7 @@ static int palm_os_3_probe (struct usb_serial *serial, const struct usb_device_i
 				  sizeof(*connection_info), 300);
 				  sizeof(*connection_info), 300);
 	if (retval < 0) {
 	if (retval < 0) {
 		dev_err(dev, "%s - error %d getting connection information\n",
 		dev_err(dev, "%s - error %d getting connection information\n",
-			__FUNCTION__, retval);
+			__func__, retval);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -706,7 +706,7 @@ static int palm_os_3_probe (struct usb_serial *serial, const struct usb_device_i
 				  0x02, 300);
 				  0x02, 300);
 	if (retval < 0)
 	if (retval < 0)
 		dev_err(dev, "%s - error %d getting bytes available request\n",
 		dev_err(dev, "%s - error %d getting bytes available request\n",
-			__FUNCTION__, retval);
+			__func__, retval);
 	retval = 0;
 	retval = 0;
 
 
 exit:
 exit:
@@ -722,11 +722,11 @@ static int palm_os_4_probe (struct usb_serial *serial, const struct usb_device_i
 	unsigned char *transfer_buffer;
 	unsigned char *transfer_buffer;
 	int retval;
 	int retval;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	transfer_buffer =  kmalloc (sizeof (*connection_info), GFP_KERNEL);
 	transfer_buffer =  kmalloc (sizeof (*connection_info), GFP_KERNEL);
 	if (!transfer_buffer) {
 	if (!transfer_buffer) {
-		dev_err(dev, "%s - kmalloc(%Zd) failed.\n", __FUNCTION__,
+		dev_err(dev, "%s - kmalloc(%Zd) failed.\n", __func__,
 			sizeof(*connection_info));
 			sizeof(*connection_info));
 		return -ENOMEM;
 		return -ENOMEM;
 	}
 	}
@@ -738,9 +738,9 @@ static int palm_os_4_probe (struct usb_serial *serial, const struct usb_device_i
 				  sizeof (*connection_info), 300);
 				  sizeof (*connection_info), 300);
 	if (retval < 0)
 	if (retval < 0)
 		dev_err(dev, "%s - error %d getting connection info\n",
 		dev_err(dev, "%s - error %d getting connection info\n",
-			__FUNCTION__, retval);
+			__func__, retval);
 	else
 	else
-		usb_serial_debug_data(debug, &serial->dev->dev, __FUNCTION__,
+		usb_serial_debug_data(debug, &serial->dev->dev, __func__,
 				      retval, transfer_buffer);
 				      retval, transfer_buffer);
 
 
 	kfree (transfer_buffer);
 	kfree (transfer_buffer);
@@ -753,7 +753,7 @@ static int visor_probe (struct usb_serial *serial, const struct usb_device_id *i
 	int retval = 0;
 	int retval = 0;
 	int (*startup) (struct usb_serial *serial, const struct usb_device_id *id);
 	int (*startup) (struct usb_serial *serial, const struct usb_device_id *id);
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
 	if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
 		err("active config #%d != 1 ??",
 		err("active config #%d != 1 ??",
@@ -807,7 +807,7 @@ static int clie_3_5_startup (struct usb_serial *serial)
 	int result;
 	int result;
 	u8 data;
 	u8 data;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	/*
 	/*
 	 * Note that PEG-300 series devices expect the following two calls.
 	 * 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)
 				  USB_REQ_GET_CONFIGURATION, USB_DIR_IN,
 				  USB_REQ_GET_CONFIGURATION, USB_DIR_IN,
 				  0, 0, &data, 1, 3000);
 				  0, 0, &data, 1, 3000);
 	if (result < 0) {
 	if (result < 0) {
-		dev_err(dev, "%s: get config number failed: %d\n", __FUNCTION__, result);
+		dev_err(dev, "%s: get config number failed: %d\n", __func__, result);
 		return result;
 		return result;
 	}
 	}
 	if (result != 1) {
 	if (result != 1) {
-		dev_err(dev, "%s: get config number bad return length: %d\n", __FUNCTION__, result);
+		dev_err(dev, "%s: get config number bad return length: %d\n", __func__, result);
 		return -EIO;
 		return -EIO;
 	}
 	}
 
 
@@ -832,11 +832,11 @@ static int clie_3_5_startup (struct usb_serial *serial)
 				  USB_DIR_IN | USB_RECIP_INTERFACE,
 				  USB_DIR_IN | USB_RECIP_INTERFACE,
 				  0, 0, &data, 1, 3000);
 				  0, 0, &data, 1, 3000);
 	if (result < 0) {
 	if (result < 0) {
-		dev_err(dev, "%s: get interface number failed: %d\n", __FUNCTION__, result);
+		dev_err(dev, "%s: get interface number failed: %d\n", __func__, result);
 		return result;
 		return result;
 	}
 	}
 	if (result != 1) {
 	if (result != 1) {
-		dev_err(dev, "%s: get interface number bad return length: %d\n", __FUNCTION__, result);
+		dev_err(dev, "%s: get interface number bad return length: %d\n", __func__, result);
 		return -EIO;
 		return -EIO;
 	}
 	}
 
 
@@ -854,7 +854,7 @@ static int treo_attach (struct usb_serial *serial)
 	    (serial->num_interrupt_in == 0))
 	    (serial->num_interrupt_in == 0))
 		goto generic_startup;
 		goto generic_startup;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	/*
 	/*
 	* It appears that Treos and Kyoceras want to use the 
 	* It appears that Treos and Kyoceras want to use the 
@@ -885,7 +885,7 @@ generic_startup:
 
 
 static int clie_5_attach (struct usb_serial *serial)
 static int clie_5_attach (struct usb_serial *serial)
 {
 {
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	/* TH55 registers 2 ports. 
 	/* TH55 registers 2 ports. 
 	   Communication in from the UX50/TH55 uses bulk_in_endpointAddress from port 0 
 	   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)
 	struct visor_private *priv;
 	struct visor_private *priv;
 	int i;
 	int i;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	for (i = 0; i < serial->num_ports; i++) {
 	for (i = 0; i < serial->num_ports; i++) {
 		priv = usb_get_serial_port_data(serial->port[i]);
 		priv = usb_get_serial_port_data(serial->port[i]);
@@ -922,7 +922,7 @@ static void visor_shutdown (struct usb_serial *serial)
 
 
 static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
 static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
 {
 {
-	dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
+	dbg("%s - port %d, cmd 0x%.4x", __func__, port->number, cmd);
 
 
 	return -ENOIOCTLCMD;
 	return -ENOIOCTLCMD;
 }
 }

+ 52 - 52
drivers/usb/serial/whiteheat.c

@@ -282,7 +282,7 @@ static int whiteheat_firmware_download (struct usb_serial *serial, const struct
 	int response;
 	int response;
 	const struct whiteheat_hex_record *record;
 	const struct whiteheat_hex_record *record;
 	
 	
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 	
 	
 	response = ezusb_set_reset (serial, 1);
 	response = ezusb_set_reset (serial, 1);
 
 
@@ -292,7 +292,7 @@ static int whiteheat_firmware_download (struct usb_serial *serial, const struct
 				(unsigned char *)record->data, record->data_size, 0xa0);
 				(unsigned char *)record->data, record->data_size, 0xa0);
 		if (response < 0) {
 		if (response < 0) {
 			err("%s - ezusb_writememory failed for loader (%d %04X %p %d)",
 			err("%s - ezusb_writememory failed for loader (%d %04X %p %d)",
-				__FUNCTION__, response, record->address, record->data, record->data_size);
+				__func__, response, record->address, record->data, record->data_size);
 			break;
 			break;
 		}
 		}
 		++record;
 		++record;
@@ -309,7 +309,7 @@ static int whiteheat_firmware_download (struct usb_serial *serial, const struct
 				(unsigned char *)record->data, record->data_size, 0xa3);
 				(unsigned char *)record->data, record->data_size, 0xa3);
 		if (response < 0) {
 		if (response < 0) {
 			err("%s - ezusb_writememory failed for first firmware step (%d %04X %p %d)", 
 			err("%s - ezusb_writememory failed for first firmware step (%d %04X %p %d)", 
-				__FUNCTION__, response, record->address, record->data, record->data_size);
+				__func__, response, record->address, record->data, record->data_size);
 			break;
 			break;
 		}
 		}
 		++record;
 		++record;
@@ -323,7 +323,7 @@ static int whiteheat_firmware_download (struct usb_serial *serial, const struct
 				(unsigned char *)record->data, record->data_size, 0xa0);
 				(unsigned char *)record->data, record->data_size, 0xa0);
 		if (response < 0) {
 		if (response < 0) {
 			err("%s - ezusb_writememory failed for second firmware step (%d %04X %p %d)", 
 			err("%s - ezusb_writememory failed for second firmware step (%d %04X %p %d)", 
-				__FUNCTION__, response, record->address, record->data, record->data_size);
+				__func__, response, record->address, record->data, record->data_size);
 			break;
 			break;
 		}
 		}
 		++record;
 		++record;
@@ -561,7 +561,7 @@ static void whiteheat_shutdown (struct usb_serial *serial)
 	struct list_head *tmp2;
 	struct list_head *tmp2;
 	int i;
 	int i;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	/* free up our private data for our command port */
 	/* free up our private data for our command port */
 	command_port = serial->port[COMMAND_PORT];
 	command_port = serial->port[COMMAND_PORT];
@@ -598,7 +598,7 @@ static int whiteheat_open (struct usb_serial_port *port, struct file *filp)
 	int		retval = 0;
 	int		retval = 0;
 	struct ktermios	old_term;
 	struct ktermios	old_term;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	retval = start_command_port(port->serial);
 	retval = start_command_port(port->serial);
 	if (retval)
 	if (retval)
@@ -631,14 +631,14 @@ static int whiteheat_open (struct usb_serial_port *port, struct file *filp)
 	/* Start reading from the device */
 	/* Start reading from the device */
 	retval = start_port_read(port);
 	retval = start_port_read(port);
 	if (retval) {
 	if (retval) {
-		err("%s - failed submitting read urb, error %d", __FUNCTION__, retval);
+		err("%s - failed submitting read urb, error %d", __func__, retval);
 		firm_close(port);
 		firm_close(port);
 		stop_command_port(port->serial);
 		stop_command_port(port->serial);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
 exit:
 exit:
-	dbg("%s - exit, retval = %d", __FUNCTION__, retval);
+	dbg("%s - exit, retval = %d", __func__, retval);
 	return retval;
 	return retval;
 }
 }
 
 
@@ -651,7 +651,7 @@ static void whiteheat_close(struct usb_serial_port *port, struct file * filp)
 	struct list_head *tmp;
 	struct list_head *tmp;
 	struct list_head *tmp2;
 	struct list_head *tmp2;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	mutex_lock(&port->serial->disc_mutex);
 	mutex_lock(&port->serial->disc_mutex);
 	/* filp is NULL when called from usb_serial_disconnect */
 	/* 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
 	unsigned long flags;
 	unsigned long flags;
 	struct list_head *tmp;
 	struct list_head *tmp;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (count == 0) {
 	if (count == 0) {
-		dbg("%s - write request of 0 bytes", __FUNCTION__);
+		dbg("%s - write request of 0 bytes", __func__);
 		return (0);
 		return (0);
 	}
 	}
 
 
@@ -748,13 +748,13 @@ static int whiteheat_write(struct usb_serial_port *port, const unsigned char *bu
 		bytes = (count > port->bulk_out_size) ? port->bulk_out_size : count;
 		bytes = (count > port->bulk_out_size) ? port->bulk_out_size : count;
 		memcpy (urb->transfer_buffer, buf + sent, bytes);
 		memcpy (urb->transfer_buffer, buf + sent, bytes);
 
 
-		usb_serial_debug_data(debug, &port->dev, __FUNCTION__, bytes, urb->transfer_buffer);
+		usb_serial_debug_data(debug, &port->dev, __func__, bytes, urb->transfer_buffer);
 
 
 		urb->dev = serial->dev;
 		urb->dev = serial->dev;
 		urb->transfer_buffer_length = bytes;
 		urb->transfer_buffer_length = bytes;
 		result = usb_submit_urb(urb, GFP_ATOMIC);
 		result = usb_submit_urb(urb, GFP_ATOMIC);
 		if (result) {
 		if (result) {
-			err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
+			err("%s - failed submitting write urb, error %d", __func__, result);
 			sent = result;
 			sent = result;
 			spin_lock_irqsave(&info->lock, flags);
 			spin_lock_irqsave(&info->lock, flags);
 			list_add(tmp, &info->tx_urbs_free);
 			list_add(tmp, &info->tx_urbs_free);
@@ -780,7 +780,7 @@ static int whiteheat_write_room(struct usb_serial_port *port)
 	int room = 0;
 	int room = 0;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 	
 	
 	spin_lock_irqsave(&info->lock, flags);
 	spin_lock_irqsave(&info->lock, flags);
 	list_for_each(tmp, &info->tx_urbs_free)
 	list_for_each(tmp, &info->tx_urbs_free)
@@ -788,7 +788,7 @@ static int whiteheat_write_room(struct usb_serial_port *port)
 	spin_unlock_irqrestore(&info->lock, flags);
 	spin_unlock_irqrestore(&info->lock, flags);
 	room *= port->bulk_out_size;
 	room *= port->bulk_out_size;
 
 
-	dbg("%s - returns %d", __FUNCTION__, room);
+	dbg("%s - returns %d", __func__, room);
 	return (room);
 	return (room);
 }
 }
 
 
@@ -798,7 +798,7 @@ static int whiteheat_tiocmget (struct usb_serial_port *port, struct file *file)
 	struct whiteheat_private *info = usb_get_serial_port_data(port);
 	struct whiteheat_private *info = usb_get_serial_port_data(port);
 	unsigned int modem_signals = 0;
 	unsigned int modem_signals = 0;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	firm_get_dtr_rts(port);
 	firm_get_dtr_rts(port);
 	if (info->mcr & UART_MCR_DTR)
 	if (info->mcr & UART_MCR_DTR)
@@ -815,7 +815,7 @@ static int whiteheat_tiocmset (struct usb_serial_port *port, struct file *file,
 {
 {
 	struct whiteheat_private *info = usb_get_serial_port_data(port);
 	struct whiteheat_private *info = usb_get_serial_port_data(port);
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	if (set & TIOCM_RTS)
 	if (set & TIOCM_RTS)
 		info->mcr |= UART_MCR_RTS;
 		info->mcr |= UART_MCR_RTS;
@@ -838,7 +838,7 @@ static int whiteheat_ioctl (struct usb_serial_port *port, struct file * file, un
 	struct serial_struct serstruct;
 	struct serial_struct serstruct;
 	void __user *user_arg = (void __user *)arg;
 	void __user *user_arg = (void __user *)arg;
 
 
-	dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
+	dbg("%s - port %d, cmd 0x%.4x", __func__, port->number, cmd);
 
 
 	switch (cmd) {
 	switch (cmd) {
 		case TIOCGSERIAL:
 		case TIOCGSERIAL:
@@ -880,7 +880,7 @@ static int whiteheat_ioctl (struct usb_serial_port *port, struct file * file, un
 
 
 static void whiteheat_set_termios(struct usb_serial_port *port, struct ktermios *old_termios)
 static void whiteheat_set_termios(struct usb_serial_port *port, struct ktermios *old_termios)
 {
 {
-	dbg("%s -port %d", __FUNCTION__, port->number);
+	dbg("%s -port %d", __func__, port->number);
 	firm_setup_port(port);
 	firm_setup_port(port);
 }
 }
 
 
@@ -898,7 +898,7 @@ static int whiteheat_chars_in_buffer(struct usb_serial_port *port)
 	int chars = 0;
 	int chars = 0;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&info->lock, flags);
 	spin_lock_irqsave(&info->lock, flags);
 	list_for_each(tmp, &info->tx_urbs_submitted) {
 	list_for_each(tmp, &info->tx_urbs_submitted) {
@@ -907,7 +907,7 @@ static int whiteheat_chars_in_buffer(struct usb_serial_port *port)
 	}
 	}
 	spin_unlock_irqrestore(&info->lock, flags);
 	spin_unlock_irqrestore(&info->lock, flags);
 
 
-	dbg ("%s - returns %d", __FUNCTION__, chars);
+	dbg ("%s - returns %d", __func__, chars);
 	return chars;
 	return chars;
 }
 }
 
 
@@ -917,7 +917,7 @@ static void whiteheat_throttle (struct usb_serial_port *port)
 	struct whiteheat_private *info = usb_get_serial_port_data(port);
 	struct whiteheat_private *info = usb_get_serial_port_data(port);
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&info->lock, flags);
 	spin_lock_irqsave(&info->lock, flags);
 	info->flags |= THROTTLED;
 	info->flags |= THROTTLED;
@@ -933,7 +933,7 @@ static void whiteheat_unthrottle (struct usb_serial_port *port)
 	int actually_throttled;
 	int actually_throttled;
 	unsigned long flags;
 	unsigned long flags;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock_irqsave(&info->lock, flags);
 	spin_lock_irqsave(&info->lock, flags);
 	actually_throttled = info->flags & ACTUALLY_THROTTLED;
 	actually_throttled = info->flags & ACTUALLY_THROTTLED;
@@ -954,7 +954,7 @@ static void command_port_write_callback(struct urb *urb)
 {
 {
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	if (status) {
 	if (status) {
 		dbg("nonzero urb status: %d", status);
 		dbg("nonzero urb status: %d", status);
@@ -971,22 +971,22 @@ static void command_port_read_callback(struct urb *urb)
 	unsigned char *data = urb->transfer_buffer;
 	unsigned char *data = urb->transfer_buffer;
 	int result;
 	int result;
 
 
-	dbg("%s", __FUNCTION__);
+	dbg("%s", __func__);
 
 
 	command_info = usb_get_serial_port_data(command_port);
 	command_info = usb_get_serial_port_data(command_port);
 	if (!command_info) {
 	if (!command_info) {
-		dbg ("%s - command_info is NULL, exiting.", __FUNCTION__);
+		dbg ("%s - command_info is NULL, exiting.", __func__);
 		return;
 		return;
 	}
 	}
 	if (status) {
 	if (status) {
-		dbg("%s - nonzero urb status: %d", __FUNCTION__, status);
+		dbg("%s - nonzero urb status: %d", __func__, status);
 		if (status != -ENOENT)
 		if (status != -ENOENT)
 			command_info->command_finished = WHITEHEAT_CMD_FAILURE;
 			command_info->command_finished = WHITEHEAT_CMD_FAILURE;
 		wake_up(&command_info->wait_command);
 		wake_up(&command_info->wait_command);
 		return;
 		return;
 	}
 	}
 
 
-	usb_serial_debug_data(debug, &command_port->dev, __FUNCTION__, urb->actual_length, data);
+	usb_serial_debug_data(debug, &command_port->dev, __func__, urb->actual_length, data);
 
 
 	if (data[0] == WHITEHEAT_CMD_COMPLETE) {
 	if (data[0] == WHITEHEAT_CMD_COMPLETE) {
 		command_info->command_finished = WHITEHEAT_CMD_COMPLETE;
 		command_info->command_finished = WHITEHEAT_CMD_COMPLETE;
@@ -996,20 +996,20 @@ static void command_port_read_callback(struct urb *urb)
 		wake_up(&command_info->wait_command);
 		wake_up(&command_info->wait_command);
 	} else if (data[0] == WHITEHEAT_EVENT) {
 	} else if (data[0] == WHITEHEAT_EVENT) {
 		/* These are unsolicited reports from the firmware, hence no waiting command to wakeup */
 		/* These are unsolicited reports from the firmware, hence no waiting command to wakeup */
-		dbg("%s - event received", __FUNCTION__);
+		dbg("%s - event received", __func__);
 	} else if (data[0] == WHITEHEAT_GET_DTR_RTS) {
 	} else if (data[0] == WHITEHEAT_GET_DTR_RTS) {
 		memcpy(command_info->result_buffer, &data[1], urb->actual_length - 1);
 		memcpy(command_info->result_buffer, &data[1], urb->actual_length - 1);
 		command_info->command_finished = WHITEHEAT_CMD_COMPLETE;
 		command_info->command_finished = WHITEHEAT_CMD_COMPLETE;
 		wake_up(&command_info->wait_command);
 		wake_up(&command_info->wait_command);
 	} else {
 	} else {
-		dbg("%s - bad reply from firmware", __FUNCTION__);
+		dbg("%s - bad reply from firmware", __func__);
 	}
 	}
 	
 	
 	/* Continue trying to always read */
 	/* Continue trying to always read */
 	command_port->read_urb->dev = command_port->serial->dev;
 	command_port->read_urb->dev = command_port->serial->dev;
 	result = usb_submit_urb(command_port->read_urb, GFP_ATOMIC);
 	result = usb_submit_urb(command_port->read_urb, GFP_ATOMIC);
 	if (result)
 	if (result)
-		dbg("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
+		dbg("%s - failed resubmitting read urb, error %d", __func__, result);
 }
 }
 
 
 
 
@@ -1021,13 +1021,13 @@ static void whiteheat_read_callback(struct urb *urb)
 	struct whiteheat_private *info = usb_get_serial_port_data(port);
 	struct whiteheat_private *info = usb_get_serial_port_data(port);
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock(&info->lock);
 	spin_lock(&info->lock);
 	wrap = urb_to_wrap(urb, &info->rx_urbs_submitted);
 	wrap = urb_to_wrap(urb, &info->rx_urbs_submitted);
 	if (!wrap) {
 	if (!wrap) {
 		spin_unlock(&info->lock);
 		spin_unlock(&info->lock);
-		err("%s - Not my urb!", __FUNCTION__);
+		err("%s - Not my urb!", __func__);
 		return;
 		return;
 	}
 	}
 	list_del(&wrap->list);
 	list_del(&wrap->list);
@@ -1035,14 +1035,14 @@ static void whiteheat_read_callback(struct urb *urb)
 
 
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero read bulk status received: %d",
 		dbg("%s - nonzero read bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		spin_lock(&info->lock);
 		spin_lock(&info->lock);
 		list_add(&wrap->list, &info->rx_urbs_free);
 		list_add(&wrap->list, &info->rx_urbs_free);
 		spin_unlock(&info->lock);
 		spin_unlock(&info->lock);
 		return;
 		return;
 	}
 	}
 
 
-	usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
+	usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
 
 
 	spin_lock(&info->lock);
 	spin_lock(&info->lock);
 	list_add_tail(&wrap->list, &info->rx_urb_q);
 	list_add_tail(&wrap->list, &info->rx_urb_q);
@@ -1064,13 +1064,13 @@ static void whiteheat_write_callback(struct urb *urb)
 	struct whiteheat_urb_wrap *wrap;
 	struct whiteheat_urb_wrap *wrap;
 	int status = urb->status;
 	int status = urb->status;
 
 
-	dbg("%s - port %d", __FUNCTION__, port->number);
+	dbg("%s - port %d", __func__, port->number);
 
 
 	spin_lock(&info->lock);
 	spin_lock(&info->lock);
 	wrap = urb_to_wrap(urb, &info->tx_urbs_submitted);
 	wrap = urb_to_wrap(urb, &info->tx_urbs_submitted);
 	if (!wrap) {
 	if (!wrap) {
 		spin_unlock(&info->lock);
 		spin_unlock(&info->lock);
-		err("%s - Not my urb!", __FUNCTION__);
+		err("%s - Not my urb!", __func__);
 		return;
 		return;
 	}
 	}
 	list_move(&wrap->list, &info->tx_urbs_free);
 	list_move(&wrap->list, &info->tx_urbs_free);
@@ -1078,7 +1078,7 @@ static void whiteheat_write_callback(struct urb *urb)
 
 
 	if (status) {
 	if (status) {
 		dbg("%s - nonzero write bulk status received: %d",
 		dbg("%s - nonzero write bulk status received: %d",
-		    __FUNCTION__, status);
+		    __func__, status);
 		return;
 		return;
 	}
 	}
 
 
@@ -1098,7 +1098,7 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command, __u8 *d
 	int retval = 0;
 	int retval = 0;
 	int t;
 	int t;
 
 
-	dbg("%s - command %d", __FUNCTION__, command);
+	dbg("%s - command %d", __func__, command);
 
 
 	command_port = port->serial->port[COMMAND_PORT];
 	command_port = port->serial->port[COMMAND_PORT];
 	command_info = usb_get_serial_port_data(command_port);
 	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
 	command_port->write_urb->dev = port->serial->dev;
 	command_port->write_urb->dev = port->serial->dev;
 	retval = usb_submit_urb (command_port->write_urb, GFP_NOIO);
 	retval = usb_submit_urb (command_port->write_urb, GFP_NOIO);
 	if (retval) {
 	if (retval) {
-		dbg("%s - submit urb failed", __FUNCTION__);
+		dbg("%s - submit urb failed", __func__);
 		goto exit;
 		goto exit;
 	}
 	}
 
 
@@ -1123,19 +1123,19 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command, __u8 *d
 		usb_kill_urb(command_port->write_urb);
 		usb_kill_urb(command_port->write_urb);
 
 
 	if (command_info->command_finished == false) {
 	if (command_info->command_finished == false) {
-		dbg("%s - command timed out.", __FUNCTION__);
+		dbg("%s - command timed out.", __func__);
 		retval = -ETIMEDOUT;
 		retval = -ETIMEDOUT;
 		goto exit;
 		goto exit;
 	}
 	}
 
 
 	if (command_info->command_finished == WHITEHEAT_CMD_FAILURE) {
 	if (command_info->command_finished == WHITEHEAT_CMD_FAILURE) {
-		dbg("%s - command failed.", __FUNCTION__);
+		dbg("%s - command failed.", __func__);
 		retval = -EIO;
 		retval = -EIO;
 		goto exit;
 		goto exit;
 	}
 	}
 
 
 	if (command_info->command_finished == WHITEHEAT_CMD_COMPLETE) {
 	if (command_info->command_finished == WHITEHEAT_CMD_COMPLETE) {
-		dbg("%s - command completed.", __FUNCTION__);
+		dbg("%s - command completed.", __func__);
 		switch (command) {
 		switch (command) {
 			case WHITEHEAT_GET_DTR_RTS:
 			case WHITEHEAT_GET_DTR_RTS:
 				info = usb_get_serial_port_data(port);
 				info = usb_get_serial_port_data(port);
@@ -1180,7 +1180,7 @@ static int firm_setup_port(struct usb_serial_port *port) {
 		default:
 		default:
 		case CS8:	port_settings.bits = 8;   break;
 		case CS8:	port_settings.bits = 8;   break;
 	}
 	}
-	dbg("%s - data bits = %d", __FUNCTION__, port_settings.bits);
+	dbg("%s - data bits = %d", __func__, port_settings.bits);
 	
 	
 	/* determine the parity */
 	/* determine the parity */
 	if (cflag & PARENB)
 	if (cflag & PARENB)
@@ -1196,21 +1196,21 @@ static int firm_setup_port(struct usb_serial_port *port) {
 				port_settings.parity = WHITEHEAT_PAR_EVEN;
 				port_settings.parity = WHITEHEAT_PAR_EVEN;
 	else
 	else
 		port_settings.parity = WHITEHEAT_PAR_NONE;
 		port_settings.parity = WHITEHEAT_PAR_NONE;
-	dbg("%s - parity = %c", __FUNCTION__, port_settings.parity);
+	dbg("%s - parity = %c", __func__, port_settings.parity);
 
 
 	/* figure out the stop bits requested */
 	/* figure out the stop bits requested */
 	if (cflag & CSTOPB)
 	if (cflag & CSTOPB)
 		port_settings.stop = 2;
 		port_settings.stop = 2;
 	else
 	else
 		port_settings.stop = 1;
 		port_settings.stop = 1;
-	dbg("%s - stop bits = %d", __FUNCTION__, port_settings.stop);
+	dbg("%s - stop bits = %d", __func__, port_settings.stop);
 
 
 	/* figure out the flow control settings */
 	/* figure out the flow control settings */
 	if (cflag & CRTSCTS)
 	if (cflag & CRTSCTS)
 		port_settings.hflow = (WHITEHEAT_HFLOW_CTS | WHITEHEAT_HFLOW_RTS);
 		port_settings.hflow = (WHITEHEAT_HFLOW_CTS | WHITEHEAT_HFLOW_RTS);
 	else
 	else
 		port_settings.hflow = WHITEHEAT_HFLOW_NONE;
 		port_settings.hflow = WHITEHEAT_HFLOW_NONE;
-	dbg("%s - hardware flow control = %s %s %s %s", __FUNCTION__,
+	dbg("%s - hardware flow control = %s %s %s %s", __func__,
 	    (port_settings.hflow & WHITEHEAT_HFLOW_CTS) ? "CTS" : "",
 	    (port_settings.hflow & WHITEHEAT_HFLOW_CTS) ? "CTS" : "",
 	    (port_settings.hflow & WHITEHEAT_HFLOW_RTS) ? "RTS" : "",
 	    (port_settings.hflow & WHITEHEAT_HFLOW_RTS) ? "RTS" : "",
 	    (port_settings.hflow & WHITEHEAT_HFLOW_DSR) ? "DSR" : "",
 	    (port_settings.hflow & WHITEHEAT_HFLOW_DSR) ? "DSR" : "",
@@ -1221,15 +1221,15 @@ static int firm_setup_port(struct usb_serial_port *port) {
 		port_settings.sflow = WHITEHEAT_SFLOW_RXTX;
 		port_settings.sflow = WHITEHEAT_SFLOW_RXTX;
 	else
 	else
 		port_settings.sflow = WHITEHEAT_SFLOW_NONE;
 		port_settings.sflow = WHITEHEAT_SFLOW_NONE;
-	dbg("%s - software flow control = %c", __FUNCTION__, port_settings.sflow);
+	dbg("%s - software flow control = %c", __func__, port_settings.sflow);
 	
 	
 	port_settings.xon = START_CHAR(port->tty);
 	port_settings.xon = START_CHAR(port->tty);
 	port_settings.xoff = STOP_CHAR(port->tty);
 	port_settings.xoff = STOP_CHAR(port->tty);
-	dbg("%s - XON = %2x, XOFF = %2x", __FUNCTION__, port_settings.xon, port_settings.xoff);
+	dbg("%s - XON = %2x, XOFF = %2x", __func__, port_settings.xon, port_settings.xoff);
 
 
 	/* get the baud rate wanted */
 	/* get the baud rate wanted */
 	port_settings.baud = tty_get_baud_rate(port->tty);
 	port_settings.baud = tty_get_baud_rate(port->tty);
-	dbg("%s - baud rate = %d", __FUNCTION__, port_settings.baud);
+	dbg("%s - baud rate = %d", __func__, port_settings.baud);
 
 
 	/* fixme: should set validated settings */
 	/* fixme: should set validated settings */
 	tty_encode_baud_rate(port->tty, port_settings.baud, port_settings.baud);
 	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)
 		command_port->read_urb->dev = serial->dev;
 		command_port->read_urb->dev = serial->dev;
 		retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL);
 		retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL);
 		if (retval) {
 		if (retval) {
-			err("%s - failed submitting read urb, error %d", __FUNCTION__, retval);
+			err("%s - failed submitting read urb, error %d", __func__, retval);
 			goto exit;
 			goto exit;
 		}
 		}
 	}
 	}
@@ -1448,7 +1448,7 @@ static void rx_data_softint(struct work_struct *work)
 		urb->dev = port->serial->dev;
 		urb->dev = port->serial->dev;
 		result = usb_submit_urb(urb, GFP_ATOMIC);
 		result = usb_submit_urb(urb, GFP_ATOMIC);
 		if (result) {
 		if (result) {
-			err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
+			err("%s - failed resubmitting read urb, error %d", __func__, result);
 			spin_lock_irqsave(&info->lock, flags);
 			spin_lock_irqsave(&info->lock, flags);
 			list_add(tmp, &info->rx_urbs_free);
 			list_add(tmp, &info->rx_urbs_free);
 			continue;
 			continue;

+ 5 - 5
drivers/usb/storage/scsiglue.c

@@ -228,12 +228,12 @@ static int queuecommand(struct scsi_cmnd *srb,
 {
 {
 	struct us_data *us = host_to_us(srb->device->host);
 	struct us_data *us = host_to_us(srb->device->host);
 
 
-	US_DEBUGP("%s called\n", __FUNCTION__);
+	US_DEBUGP("%s called\n", __func__);
 
 
 	/* check for state-transition errors */
 	/* check for state-transition errors */
 	if (us->srb != NULL) {
 	if (us->srb != NULL) {
 		printk(KERN_ERR USB_STORAGE "Error in %s: us->srb = %p\n",
 		printk(KERN_ERR USB_STORAGE "Error in %s: us->srb = %p\n",
-			__FUNCTION__, us->srb);
+			__func__, us->srb);
 		return SCSI_MLQUEUE_HOST_BUSY;
 		return SCSI_MLQUEUE_HOST_BUSY;
 	}
 	}
 
 
@@ -262,7 +262,7 @@ static int command_abort(struct scsi_cmnd *srb)
 {
 {
 	struct us_data *us = host_to_us(srb->device->host);
 	struct us_data *us = host_to_us(srb->device->host);
 
 
-	US_DEBUGP("%s called\n", __FUNCTION__);
+	US_DEBUGP("%s called\n", __func__);
 
 
 	/* us->srb together with the TIMED_OUT, RESETTING, and ABORTING
 	/* us->srb together with the TIMED_OUT, RESETTING, and ABORTING
 	 * bits are protected by the host lock. */
 	 * bits are protected by the host lock. */
@@ -299,7 +299,7 @@ static int device_reset(struct scsi_cmnd *srb)
 	struct us_data *us = host_to_us(srb->device->host);
 	struct us_data *us = host_to_us(srb->device->host);
 	int result;
 	int result;
 
 
-	US_DEBUGP("%s called\n", __FUNCTION__);
+	US_DEBUGP("%s called\n", __func__);
 
 
 	/* lock the device pointers and do the reset */
 	/* lock the device pointers and do the reset */
 	mutex_lock(&(us->dev_mutex));
 	mutex_lock(&(us->dev_mutex));
@@ -315,7 +315,7 @@ static int bus_reset(struct scsi_cmnd *srb)
 	struct us_data *us = host_to_us(srb->device->host);
 	struct us_data *us = host_to_us(srb->device->host);
 	int result;
 	int result;
 
 
-	US_DEBUGP("%s called\n", __FUNCTION__);
+	US_DEBUGP("%s called\n", __func__);
 	result = usb_stor_port_reset(us);
 	result = usb_stor_port_reset(us);
 	return result < 0 ? FAILED : SUCCESS;
 	return result < 0 ? FAILED : SUCCESS;
 }
 }

+ 9 - 9
drivers/usb/storage/transport.c

@@ -198,7 +198,7 @@ int usb_stor_control_msg(struct us_data *us, unsigned int pipe,
 	int status;
 	int status;
 
 
 	US_DEBUGP("%s: rq=%02x rqtype=%02x value=%04x index=%02x len=%u\n",
 	US_DEBUGP("%s: rq=%02x rqtype=%02x value=%04x index=%02x len=%u\n",
-			__FUNCTION__, request, requesttype,
+			__func__, request, requesttype,
 			value, index, size);
 			value, index, size);
 
 
 	/* fill in the devrequest structure */
 	/* fill in the devrequest structure */
@@ -250,7 +250,7 @@ int usb_stor_clear_halt(struct us_data *us, unsigned int pipe)
 		usb_settoggle(us->pusb_dev, usb_pipeendpoint(pipe),
 		usb_settoggle(us->pusb_dev, usb_pipeendpoint(pipe),
 				usb_pipeout(pipe), 0);
 				usb_pipeout(pipe), 0);
 
 
-	US_DEBUGP("%s: result = %d\n", __FUNCTION__, result);
+	US_DEBUGP("%s: result = %d\n", __func__, result);
 	return result;
 	return result;
 }
 }
 
 
@@ -332,7 +332,7 @@ int usb_stor_ctrl_transfer(struct us_data *us, unsigned int pipe,
 	int result;
 	int result;
 
 
 	US_DEBUGP("%s: rq=%02x rqtype=%02x value=%04x index=%02x len=%u\n",
 	US_DEBUGP("%s: rq=%02x rqtype=%02x value=%04x index=%02x len=%u\n",
-			__FUNCTION__, request, requesttype,
+			__func__, request, requesttype,
 			value, index, size);
 			value, index, size);
 
 
 	/* fill in the devrequest structure */
 	/* fill in the devrequest structure */
@@ -366,7 +366,7 @@ static int usb_stor_intr_transfer(struct us_data *us, void *buf,
 	unsigned int pipe = us->recv_intr_pipe;
 	unsigned int pipe = us->recv_intr_pipe;
 	unsigned int maxp;
 	unsigned int maxp;
 
 
-	US_DEBUGP("%s: xfer %u bytes\n", __FUNCTION__, length);
+	US_DEBUGP("%s: xfer %u bytes\n", __func__, length);
 
 
 	/* calculate the max packet size */
 	/* calculate the max packet size */
 	maxp = usb_maxpacket(us->pusb_dev, pipe, usb_pipeout(pipe));
 	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,
 {
 {
 	int result;
 	int result;
 
 
-	US_DEBUGP("%s: xfer %u bytes\n", __FUNCTION__, length);
+	US_DEBUGP("%s: xfer %u bytes\n", __func__, length);
 
 
 	/* fill and submit the URB */
 	/* fill and submit the URB */
 	usb_fill_bulk_urb(us->current_urb, us->pusb_dev, pipe, buf, length,
 	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,
 		return USB_STOR_XFER_ERROR;
 		return USB_STOR_XFER_ERROR;
 
 
 	/* initialize the scatter-gather request block */
 	/* initialize the scatter-gather request block */
-	US_DEBUGP("%s: xfer %u bytes, %d entries\n", __FUNCTION__,
+	US_DEBUGP("%s: xfer %u bytes, %d entries\n", __func__,
 			length, num_sg);
 			length, num_sg);
 	result = usb_sg_init(&us->current_sg, us->pusb_dev, pipe, 0,
 	result = usb_sg_init(&us->current_sg, us->pusb_dev, pipe, 0,
 			sg, num_sg, length, GFP_NOIO);
 			sg, num_sg, length, GFP_NOIO);
@@ -701,7 +701,7 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
 /* Stop the current URB transfer */
 /* Stop the current URB transfer */
 void usb_stor_stop_transport(struct us_data *us)
 void usb_stor_stop_transport(struct us_data *us)
 {
 {
-	US_DEBUGP("%s called\n", __FUNCTION__);
+	US_DEBUGP("%s called\n", __func__);
 
 
 	/* If the state machine is blocked waiting for an URB,
 	/* If the state machine is blocked waiting for an URB,
 	 * let's wake it up.  The test_and_clear_bit() call
 	 * 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,
 
 
 int usb_stor_CB_reset(struct us_data *us)
 int usb_stor_CB_reset(struct us_data *us)
 {
 {
-	US_DEBUGP("%s called\n", __FUNCTION__);
+	US_DEBUGP("%s called\n", __func__);
 
 
 	memset(us->iobuf, 0xFF, CB_RESET_CMD_SIZE);
 	memset(us->iobuf, 0xFF, CB_RESET_CMD_SIZE);
 	us->iobuf[0] = SEND_DIAGNOSTIC;
 	us->iobuf[0] = SEND_DIAGNOSTIC;
@@ -1150,7 +1150,7 @@ int usb_stor_CB_reset(struct us_data *us)
  */
  */
 int usb_stor_Bulk_reset(struct us_data *us)
 int usb_stor_Bulk_reset(struct us_data *us)
 {
 {
-	US_DEBUGP("%s called\n", __FUNCTION__);
+	US_DEBUGP("%s called\n", __func__);
 
 
 	return usb_stor_reset_common(us, US_BULK_RESET_REQUEST, 
 	return usb_stor_reset_common(us, US_BULK_RESET_REQUEST, 
 				 USB_TYPE_CLASS | USB_RECIP_INTERFACE,
 				 USB_TYPE_CLASS | USB_RECIP_INTERFACE,

+ 8 - 8
drivers/usb/storage/usb.c

@@ -190,7 +190,7 @@ static int storage_suspend(struct usb_interface *iface, pm_message_t message)
 	/* Wait until no command is running */
 	/* Wait until no command is running */
 	mutex_lock(&us->dev_mutex);
 	mutex_lock(&us->dev_mutex);
 
 
-	US_DEBUGP("%s\n", __FUNCTION__);
+	US_DEBUGP("%s\n", __func__);
 	if (us->suspend_resume_hook)
 	if (us->suspend_resume_hook)
 		(us->suspend_resume_hook)(us, US_SUSPEND);
 		(us->suspend_resume_hook)(us, US_SUSPEND);
 
 
@@ -207,7 +207,7 @@ static int storage_resume(struct usb_interface *iface)
 
 
 	mutex_lock(&us->dev_mutex);
 	mutex_lock(&us->dev_mutex);
 
 
-	US_DEBUGP("%s\n", __FUNCTION__);
+	US_DEBUGP("%s\n", __func__);
 	if (us->suspend_resume_hook)
 	if (us->suspend_resume_hook)
 		(us->suspend_resume_hook)(us, US_RESUME);
 		(us->suspend_resume_hook)(us, US_RESUME);
 
 
@@ -219,7 +219,7 @@ static int storage_reset_resume(struct usb_interface *iface)
 {
 {
 	struct us_data *us = usb_get_intfdata(iface);
 	struct us_data *us = usb_get_intfdata(iface);
 
 
-	US_DEBUGP("%s\n", __FUNCTION__);
+	US_DEBUGP("%s\n", __func__);
 
 
 	/* Report the reset to the SCSI core */
 	/* Report the reset to the SCSI core */
 	usb_stor_report_bus_reset(us);
 	usb_stor_report_bus_reset(us);
@@ -240,7 +240,7 @@ static int storage_pre_reset(struct usb_interface *iface)
 {
 {
 	struct us_data *us = usb_get_intfdata(iface);
 	struct us_data *us = usb_get_intfdata(iface);
 
 
-	US_DEBUGP("%s\n", __FUNCTION__);
+	US_DEBUGP("%s\n", __func__);
 
 
 	/* Make sure no command runs during the reset */
 	/* Make sure no command runs during the reset */
 	mutex_lock(&us->dev_mutex);
 	mutex_lock(&us->dev_mutex);
@@ -251,7 +251,7 @@ static int storage_post_reset(struct usb_interface *iface)
 {
 {
 	struct us_data *us = usb_get_intfdata(iface);
 	struct us_data *us = usb_get_intfdata(iface);
 
 
-	US_DEBUGP("%s\n", __FUNCTION__);
+	US_DEBUGP("%s\n", __func__);
 
 
 	/* Report the reset to the SCSI core */
 	/* Report the reset to the SCSI core */
 	usb_stor_report_bus_reset(us);
 	usb_stor_report_bus_reset(us);
@@ -437,7 +437,7 @@ SkipForAbort:
 /* Associate our private data with the USB device */
 /* Associate our private data with the USB device */
 static int associate_dev(struct us_data *us, struct usb_interface *intf)
 static int associate_dev(struct us_data *us, struct usb_interface *intf)
 {
 {
-	US_DEBUGP("-- %s\n", __FUNCTION__);
+	US_DEBUGP("-- %s\n", __func__);
 
 
 	/* Fill in the device-related fields */
 	/* Fill in the device-related fields */
 	us->pusb_dev = interface_to_usbdev(intf);
 	us->pusb_dev = interface_to_usbdev(intf);
@@ -816,7 +816,7 @@ static int usb_stor_acquire_resources(struct us_data *us)
 /* Release all our dynamic resources */
 /* Release all our dynamic resources */
 static void usb_stor_release_resources(struct us_data *us)
 static void usb_stor_release_resources(struct us_data *us)
 {
 {
-	US_DEBUGP("-- %s\n", __FUNCTION__);
+	US_DEBUGP("-- %s\n", __func__);
 
 
 	/* Tell the control thread to exit.  The SCSI host must
 	/* Tell the control thread to exit.  The SCSI host must
 	 * already have been removed so it won't try to queue
 	 * 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)
 /* Dissociate from the USB device */
 /* Dissociate from the USB device */
 static void dissociate_dev(struct us_data *us)
 static void dissociate_dev(struct us_data *us)
 {
 {
-	US_DEBUGP("-- %s\n", __FUNCTION__);
+	US_DEBUGP("-- %s\n", __func__);
 
 
 	kfree(us->sensebuf);
 	kfree(us->sensebuf);
 
 

+ 3 - 3
drivers/usb/usb-skeleton.c

@@ -88,7 +88,7 @@ static int skel_open(struct inode *inode, struct file *file)
 	interface = usb_find_interface(&skel_driver, subminor);
 	interface = usb_find_interface(&skel_driver, subminor);
 	if (!interface) {
 	if (!interface) {
 		err ("%s - error, can't find device for minor %d",
 		err ("%s - error, can't find device for minor %d",
-		     __FUNCTION__, subminor);
+		     __func__, subminor);
 		retval = -ENODEV;
 		retval = -ENODEV;
 		goto exit;
 		goto exit;
 	}
 	}
@@ -220,7 +220,7 @@ static void skel_write_bulk_callback(struct urb *urb)
 		    urb->status == -ECONNRESET ||
 		    urb->status == -ECONNRESET ||
 		    urb->status == -ESHUTDOWN))
 		    urb->status == -ESHUTDOWN))
 			err("%s - nonzero write bulk status received: %d",
 			err("%s - nonzero write bulk status received: %d",
-			    __FUNCTION__, urb->status);
+			    __func__, urb->status);
 
 
 		spin_lock(&dev->err_lock);
 		spin_lock(&dev->err_lock);
 		dev->errors = urb->status;
 		dev->errors = urb->status;
@@ -301,7 +301,7 @@ static ssize_t skel_write(struct file *file, const char *user_buffer, size_t cou
 	retval = usb_submit_urb(urb, GFP_KERNEL);
 	retval = usb_submit_urb(urb, GFP_KERNEL);
 	mutex_unlock(&dev->io_mutex);
 	mutex_unlock(&dev->io_mutex);
 	if (retval) {
 	if (retval) {
-		err("%s - failed submitting write urb, error %d", __FUNCTION__, retval);
+		err("%s - failed submitting write urb, error %d", __func__, retval);
 		goto error_unanchor;
 		goto error_unanchor;
 	}
 	}
 
 

部分文件因文件數量過多而無法顯示