aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/usbvideo
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-04-08 22:20:00 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:07:59 -0400
commit4126a8f5c209ba8138619311c1c8e73d361d9700 (patch)
tree43716e434ca76c94e7d6057e26b36953094b8596 /drivers/media/video/usbvideo
parenta79d13b3aa0226630ee639e6a2e98a4bda1afd4d (diff)
V4L/DVB (7528): media/video/usbvideo replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/usbvideo')
-rw-r--r--drivers/media/video/usbvideo/konicawc.c2
-rw-r--r--drivers/media/video/usbvideo/quickcam_messenger.c2
-rw-r--r--drivers/media/video/usbvideo/usbvideo.c140
-rw-r--r--drivers/media/video/usbvideo/vicam.c2
4 files changed, 73 insertions, 73 deletions
diff --git a/drivers/media/video/usbvideo/konicawc.c b/drivers/media/video/usbvideo/konicawc.c
index 97479609f97d..1c180284ec6c 100644
--- a/drivers/media/video/usbvideo/konicawc.c
+++ b/drivers/media/video/usbvideo/konicawc.c
@@ -57,7 +57,7 @@ static struct usbvideo *cams;
57static int debug; 57static int debug;
58#define DEBUG(n, format, arg...) \ 58#define DEBUG(n, format, arg...) \
59 if (n <= debug) { \ 59 if (n <= debug) { \
60 printk(KERN_DEBUG __FILE__ ":%s(): " format "\n", __FUNCTION__ , ## arg); \ 60 printk(KERN_DEBUG __FILE__ ":%s(): " format "\n", __func__ , ## arg); \
61 } 61 }
62#else 62#else
63#define DEBUG(n, arg...) 63#define DEBUG(n, arg...)
diff --git a/drivers/media/video/usbvideo/quickcam_messenger.c b/drivers/media/video/usbvideo/quickcam_messenger.c
index e0ee6d8f2565..32e536edf09d 100644
--- a/drivers/media/video/usbvideo/quickcam_messenger.c
+++ b/drivers/media/video/usbvideo/quickcam_messenger.c
@@ -46,7 +46,7 @@
46static int debug; 46static int debug;
47#define DEBUG(n, format, arg...) \ 47#define DEBUG(n, format, arg...) \
48 if (n <= debug) { \ 48 if (n <= debug) { \
49 printk(KERN_DEBUG __FILE__ ":%s(): " format "\n", __FUNCTION__ , ## arg); \ 49 printk(KERN_DEBUG __FILE__ ":%s(): " format "\n", __func__ , ## arg); \
50 } 50 }
51#else 51#else
52#define DEBUG(n, arg...) 52#define DEBUG(n, arg...)
diff --git a/drivers/media/video/usbvideo/usbvideo.c b/drivers/media/video/usbvideo/usbvideo.c
index 300188097de6..4128ee20b64e 100644
--- a/drivers/media/video/usbvideo/usbvideo.c
+++ b/drivers/media/video/usbvideo/usbvideo.c
@@ -525,11 +525,11 @@ void usbvideo_TestPattern(struct uvd *uvd, int fullframe, int pmode)
525 static int num_pass; 525 static int num_pass;
526 526
527 if (uvd == NULL) { 527 if (uvd == NULL) {
528 err("%s: uvd == NULL", __FUNCTION__); 528 err("%s: uvd == NULL", __func__);
529 return; 529 return;
530 } 530 }
531 if ((uvd->curframe < 0) || (uvd->curframe >= USBVIDEO_NUMFRAMES)) { 531 if ((uvd->curframe < 0) || (uvd->curframe >= USBVIDEO_NUMFRAMES)) {
532 err("%s: uvd->curframe=%d.", __FUNCTION__, uvd->curframe); 532 err("%s: uvd->curframe=%d.", __func__, uvd->curframe);
533 return; 533 return;
534 } 534 }
535 535
@@ -630,15 +630,15 @@ EXPORT_SYMBOL(usbvideo_HexDump);
630static int usbvideo_ClientIncModCount(struct uvd *uvd) 630static int usbvideo_ClientIncModCount(struct uvd *uvd)
631{ 631{
632 if (uvd == NULL) { 632 if (uvd == NULL) {
633 err("%s: uvd == NULL", __FUNCTION__); 633 err("%s: uvd == NULL", __func__);
634 return -EINVAL; 634 return -EINVAL;
635 } 635 }
636 if (uvd->handle == NULL) { 636 if (uvd->handle == NULL) {
637 err("%s: uvd->handle == NULL", __FUNCTION__); 637 err("%s: uvd->handle == NULL", __func__);
638 return -EINVAL; 638 return -EINVAL;
639 } 639 }
640 if (!try_module_get(uvd->handle->md_module)) { 640 if (!try_module_get(uvd->handle->md_module)) {
641 err("%s: try_module_get() == 0", __FUNCTION__); 641 err("%s: try_module_get() == 0", __func__);
642 return -ENODEV; 642 return -ENODEV;
643 } 643 }
644 return 0; 644 return 0;
@@ -647,15 +647,15 @@ static int usbvideo_ClientIncModCount(struct uvd *uvd)
647static void usbvideo_ClientDecModCount(struct uvd *uvd) 647static void usbvideo_ClientDecModCount(struct uvd *uvd)
648{ 648{
649 if (uvd == NULL) { 649 if (uvd == NULL) {
650 err("%s: uvd == NULL", __FUNCTION__); 650 err("%s: uvd == NULL", __func__);
651 return; 651 return;
652 } 652 }
653 if (uvd->handle == NULL) { 653 if (uvd->handle == NULL) {
654 err("%s: uvd->handle == NULL", __FUNCTION__); 654 err("%s: uvd->handle == NULL", __func__);
655 return; 655 return;
656 } 656 }
657 if (uvd->handle->md_module == NULL) { 657 if (uvd->handle->md_module == NULL) {
658 err("%s: uvd->handle->md_module == NULL", __FUNCTION__); 658 err("%s: uvd->handle->md_module == NULL", __func__);
659 return; 659 return;
660 } 660 }
661 module_put(uvd->handle->md_module); 661 module_put(uvd->handle->md_module);
@@ -675,13 +675,13 @@ int usbvideo_register(
675 675
676 /* Check parameters for sanity */ 676 /* Check parameters for sanity */
677 if ((num_cams <= 0) || (pCams == NULL) || (cbTbl == NULL)) { 677 if ((num_cams <= 0) || (pCams == NULL) || (cbTbl == NULL)) {
678 err("%s: Illegal call", __FUNCTION__); 678 err("%s: Illegal call", __func__);
679 return -EINVAL; 679 return -EINVAL;
680 } 680 }
681 681
682 /* Check registration callback - must be set! */ 682 /* Check registration callback - must be set! */
683 if (cbTbl->probe == NULL) { 683 if (cbTbl->probe == NULL) {
684 err("%s: probe() is required!", __FUNCTION__); 684 err("%s: probe() is required!", __func__);
685 return -EINVAL; 685 return -EINVAL;
686 } 686 }
687 687
@@ -692,7 +692,7 @@ int usbvideo_register(
692 return -ENOMEM; 692 return -ENOMEM;
693 } 693 }
694 dbg("%s: Allocated $%p (%d. bytes) for %d. cameras", 694 dbg("%s: Allocated $%p (%d. bytes) for %d. cameras",
695 __FUNCTION__, cams, base_size, num_cams); 695 __func__, cams, base_size, num_cams);
696 696
697 /* Copy callbacks, apply defaults for those that are not set */ 697 /* Copy callbacks, apply defaults for those that are not set */
698 memmove(&cams->cb, cbTbl, sizeof(cams->cb)); 698 memmove(&cams->cb, cbTbl, sizeof(cams->cb));
@@ -721,7 +721,7 @@ int usbvideo_register(
721 up->user_data = kmalloc(up->user_size, GFP_KERNEL); 721 up->user_data = kmalloc(up->user_size, GFP_KERNEL);
722 if (up->user_data == NULL) { 722 if (up->user_data == NULL) {
723 err("%s: Failed to allocate user_data (%d. bytes)", 723 err("%s: Failed to allocate user_data (%d. bytes)",
724 __FUNCTION__, up->user_size); 724 __func__, up->user_size);
725 while (i) { 725 while (i) {
726 up = &cams->cam[--i]; 726 up = &cams->cam[--i];
727 kfree(up->user_data); 727 kfree(up->user_data);
@@ -730,7 +730,7 @@ int usbvideo_register(
730 return -ENOMEM; 730 return -ENOMEM;
731 } 731 }
732 dbg("%s: Allocated cams[%d].user_data=$%p (%d. bytes)", 732 dbg("%s: Allocated cams[%d].user_data=$%p (%d. bytes)",
733 __FUNCTION__, i, up->user_data, up->user_size); 733 __func__, i, up->user_data, up->user_size);
734 } 734 }
735 } 735 }
736 736
@@ -776,19 +776,19 @@ void usbvideo_Deregister(struct usbvideo **pCams)
776 int i; 776 int i;
777 777
778 if (pCams == NULL) { 778 if (pCams == NULL) {
779 err("%s: pCams == NULL", __FUNCTION__); 779 err("%s: pCams == NULL", __func__);
780 return; 780 return;
781 } 781 }
782 cams = *pCams; 782 cams = *pCams;
783 if (cams == NULL) { 783 if (cams == NULL) {
784 err("%s: cams == NULL", __FUNCTION__); 784 err("%s: cams == NULL", __func__);
785 return; 785 return;
786 } 786 }
787 787
788 dbg("%s: Deregistering %s driver.", __FUNCTION__, cams->drvName); 788 dbg("%s: Deregistering %s driver.", __func__, cams->drvName);
789 usb_deregister(&cams->usbdrv); 789 usb_deregister(&cams->usbdrv);
790 790
791 dbg("%s: Deallocating cams=$%p (%d. cameras)", __FUNCTION__, cams, cams->num_cameras); 791 dbg("%s: Deallocating cams=$%p (%d. cameras)", __func__, cams, cams->num_cameras);
792 for (i=0; i < cams->num_cameras; i++) { 792 for (i=0; i < cams->num_cameras; i++) {
793 struct uvd *up = &cams->cam[i]; 793 struct uvd *up = &cams->cam[i];
794 int warning = 0; 794 int warning = 0;
@@ -802,16 +802,16 @@ void usbvideo_Deregister(struct usbvideo **pCams)
802 } 802 }
803 if (warning) { 803 if (warning) {
804 err("%s: Warning: user_data=$%p user_size=%d.", 804 err("%s: Warning: user_data=$%p user_size=%d.",
805 __FUNCTION__, up->user_data, up->user_size); 805 __func__, up->user_data, up->user_size);
806 } else { 806 } else {
807 dbg("%s: Freeing %d. $%p->user_data=$%p", 807 dbg("%s: Freeing %d. $%p->user_data=$%p",
808 __FUNCTION__, i, up, up->user_data); 808 __func__, i, up, up->user_data);
809 kfree(up->user_data); 809 kfree(up->user_data);
810 } 810 }
811 } 811 }
812 /* Whole array was allocated in one chunk */ 812 /* Whole array was allocated in one chunk */
813 dbg("%s: Freed %d uvd structures", 813 dbg("%s: Freed %d uvd structures",
814 __FUNCTION__, cams->num_cameras); 814 __func__, cams->num_cameras);
815 kfree(cams); 815 kfree(cams);
816 *pCams = NULL; 816 *pCams = NULL;
817} 817}
@@ -846,7 +846,7 @@ static void usbvideo_Disconnect(struct usb_interface *intf)
846 int i; 846 int i;
847 847
848 if (uvd == NULL) { 848 if (uvd == NULL) {
849 err("%s($%p): Illegal call.", __FUNCTION__, intf); 849 err("%s($%p): Illegal call.", __func__, intf);
850 return; 850 return;
851 } 851 }
852 852
@@ -854,7 +854,7 @@ static void usbvideo_Disconnect(struct usb_interface *intf)
854 854
855 usbvideo_ClientIncModCount(uvd); 855 usbvideo_ClientIncModCount(uvd);
856 if (uvd->debug > 0) 856 if (uvd->debug > 0)
857 info("%s(%p.)", __FUNCTION__, intf); 857 info("%s(%p.)", __func__, intf);
858 858
859 mutex_lock(&uvd->lock); 859 mutex_lock(&uvd->lock);
860 uvd->remove_pending = 1; /* Now all ISO data will be ignored */ 860 uvd->remove_pending = 1; /* Now all ISO data will be ignored */
@@ -870,10 +870,10 @@ static void usbvideo_Disconnect(struct usb_interface *intf)
870 870
871 video_unregister_device(&uvd->vdev); 871 video_unregister_device(&uvd->vdev);
872 if (uvd->debug > 0) 872 if (uvd->debug > 0)
873 info("%s: Video unregistered.", __FUNCTION__); 873 info("%s: Video unregistered.", __func__);
874 874
875 if (uvd->user) 875 if (uvd->user)
876 info("%s: In use, disconnect pending.", __FUNCTION__); 876 info("%s: In use, disconnect pending.", __func__);
877 else 877 else
878 usbvideo_CameraRelease(uvd); 878 usbvideo_CameraRelease(uvd);
879 mutex_unlock(&uvd->lock); 879 mutex_unlock(&uvd->lock);
@@ -895,7 +895,7 @@ static void usbvideo_Disconnect(struct usb_interface *intf)
895static void usbvideo_CameraRelease(struct uvd *uvd) 895static void usbvideo_CameraRelease(struct uvd *uvd)
896{ 896{
897 if (uvd == NULL) { 897 if (uvd == NULL) {
898 err("%s: Illegal call", __FUNCTION__); 898 err("%s: Illegal call", __func__);
899 return; 899 return;
900 } 900 }
901 901
@@ -1013,18 +1013,18 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd)
1013 char tmp1[20], tmp2[20]; /* Buffers for printing */ 1013 char tmp1[20], tmp2[20]; /* Buffers for printing */
1014 1014
1015 if (uvd == NULL) { 1015 if (uvd == NULL) {
1016 err("%s: Illegal call.", __FUNCTION__); 1016 err("%s: Illegal call.", __func__);
1017 return -EINVAL; 1017 return -EINVAL;
1018 } 1018 }
1019 if (uvd->video_endp == 0) { 1019 if (uvd->video_endp == 0) {
1020 info("%s: No video endpoint specified; data pump disabled.", __FUNCTION__); 1020 info("%s: No video endpoint specified; data pump disabled.", __func__);
1021 } 1021 }
1022 if (uvd->paletteBits == 0) { 1022 if (uvd->paletteBits == 0) {
1023 err("%s: No palettes specified!", __FUNCTION__); 1023 err("%s: No palettes specified!", __func__);
1024 return -EINVAL; 1024 return -EINVAL;
1025 } 1025 }
1026 if (uvd->defaultPalette == 0) { 1026 if (uvd->defaultPalette == 0) {
1027 info("%s: No default palette!", __FUNCTION__); 1027 info("%s: No default palette!", __func__);
1028 } 1028 }
1029 1029
1030 uvd->max_frame_size = VIDEOSIZE_X(uvd->canvas) * 1030 uvd->max_frame_size = VIDEOSIZE_X(uvd->canvas) *
@@ -1034,7 +1034,7 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd)
1034 1034
1035 if (uvd->debug > 0) { 1035 if (uvd->debug > 0) {
1036 info("%s: iface=%d. endpoint=$%02x paletteBits=$%08lx", 1036 info("%s: iface=%d. endpoint=$%02x paletteBits=$%08lx",
1037 __FUNCTION__, uvd->iface, uvd->video_endp, uvd->paletteBits); 1037 __func__, uvd->iface, uvd->video_endp, uvd->paletteBits);
1038 } 1038 }
1039 if (uvd->dev == NULL) { 1039 if (uvd->dev == NULL) {
1040 err("%s: uvd->dev == NULL", __func__); 1040 err("%s: uvd->dev == NULL", __func__);
@@ -1042,11 +1042,11 @@ int usbvideo_RegisterVideoDevice(struct uvd *uvd)
1042 } 1042 }
1043 uvd->vdev.dev = &uvd->dev->dev; 1043 uvd->vdev.dev = &uvd->dev->dev;
1044 if (video_register_device(&uvd->vdev, VFL_TYPE_GRABBER, video_nr) == -1) { 1044 if (video_register_device(&uvd->vdev, VFL_TYPE_GRABBER, video_nr) == -1) {
1045 err("%s: video_register_device failed", __FUNCTION__); 1045 err("%s: video_register_device failed", __func__);
1046 return -EPIPE; 1046 return -EPIPE;
1047 } 1047 }
1048 if (uvd->debug > 1) { 1048 if (uvd->debug > 1) {
1049 info("%s: video_register_device() successful", __FUNCTION__); 1049 info("%s: video_register_device() successful", __func__);
1050 } 1050 }
1051 1051
1052 info("%s on /dev/video%d: canvas=%s videosize=%s", 1052 info("%s on /dev/video%d: canvas=%s videosize=%s",
@@ -1113,14 +1113,14 @@ static int usbvideo_v4l_open(struct inode *inode, struct file *file)
1113 int i, errCode = 0; 1113 int i, errCode = 0;
1114 1114
1115 if (uvd->debug > 1) 1115 if (uvd->debug > 1)
1116 info("%s($%p)", __FUNCTION__, dev); 1116 info("%s($%p)", __func__, dev);
1117 1117
1118 if (0 < usbvideo_ClientIncModCount(uvd)) 1118 if (0 < usbvideo_ClientIncModCount(uvd))
1119 return -ENODEV; 1119 return -ENODEV;
1120 mutex_lock(&uvd->lock); 1120 mutex_lock(&uvd->lock);
1121 1121
1122 if (uvd->user) { 1122 if (uvd->user) {
1123 err("%s: Someone tried to open an already opened device!", __FUNCTION__); 1123 err("%s: Someone tried to open an already opened device!", __func__);
1124 errCode = -EBUSY; 1124 errCode = -EBUSY;
1125 } else { 1125 } else {
1126 /* Clear statistics */ 1126 /* Clear statistics */
@@ -1136,7 +1136,7 @@ static int usbvideo_v4l_open(struct inode *inode, struct file *file)
1136 RingQueue_Allocate(&uvd->dp, RING_QUEUE_SIZE); 1136 RingQueue_Allocate(&uvd->dp, RING_QUEUE_SIZE);
1137 if ((uvd->fbuf == NULL) || 1137 if ((uvd->fbuf == NULL) ||
1138 (!RingQueue_IsAllocated(&uvd->dp))) { 1138 (!RingQueue_IsAllocated(&uvd->dp))) {
1139 err("%s: Failed to allocate fbuf or dp", __FUNCTION__); 1139 err("%s: Failed to allocate fbuf or dp", __func__);
1140 errCode = -ENOMEM; 1140 errCode = -ENOMEM;
1141 } else { 1141 } else {
1142 /* Allocate all buffers */ 1142 /* Allocate all buffers */
@@ -1180,19 +1180,19 @@ static int usbvideo_v4l_open(struct inode *inode, struct file *file)
1180 if (errCode == 0) { 1180 if (errCode == 0) {
1181 if (VALID_CALLBACK(uvd, setupOnOpen)) { 1181 if (VALID_CALLBACK(uvd, setupOnOpen)) {
1182 if (uvd->debug > 1) 1182 if (uvd->debug > 1)
1183 info("%s: setupOnOpen callback", __FUNCTION__); 1183 info("%s: setupOnOpen callback", __func__);
1184 errCode = GET_CALLBACK(uvd, setupOnOpen)(uvd); 1184 errCode = GET_CALLBACK(uvd, setupOnOpen)(uvd);
1185 if (errCode < 0) { 1185 if (errCode < 0) {
1186 err("%s: setupOnOpen callback failed (%d.).", 1186 err("%s: setupOnOpen callback failed (%d.).",
1187 __FUNCTION__, errCode); 1187 __func__, errCode);
1188 } else if (uvd->debug > 1) { 1188 } else if (uvd->debug > 1) {
1189 info("%s: setupOnOpen callback successful", __FUNCTION__); 1189 info("%s: setupOnOpen callback successful", __func__);
1190 } 1190 }
1191 } 1191 }
1192 if (errCode == 0) { 1192 if (errCode == 0) {
1193 uvd->settingsAdjusted = 0; 1193 uvd->settingsAdjusted = 0;
1194 if (uvd->debug > 1) 1194 if (uvd->debug > 1)
1195 info("%s: Open succeeded.", __FUNCTION__); 1195 info("%s: Open succeeded.", __func__);
1196 uvd->user++; 1196 uvd->user++;
1197 file->private_data = uvd; 1197 file->private_data = uvd;
1198 } 1198 }
@@ -1202,7 +1202,7 @@ static int usbvideo_v4l_open(struct inode *inode, struct file *file)
1202 if (errCode != 0) 1202 if (errCode != 0)
1203 usbvideo_ClientDecModCount(uvd); 1203 usbvideo_ClientDecModCount(uvd);
1204 if (uvd->debug > 0) 1204 if (uvd->debug > 0)
1205 info("%s: Returning %d.", __FUNCTION__, errCode); 1205 info("%s: Returning %d.", __func__, errCode);
1206 return errCode; 1206 return errCode;
1207} 1207}
1208 1208
@@ -1225,7 +1225,7 @@ static int usbvideo_v4l_close(struct inode *inode, struct file *file)
1225 int i; 1225 int i;
1226 1226
1227 if (uvd->debug > 1) 1227 if (uvd->debug > 1)
1228 info("%s($%p)", __FUNCTION__, dev); 1228 info("%s($%p)", __func__, dev);
1229 1229
1230 mutex_lock(&uvd->lock); 1230 mutex_lock(&uvd->lock);
1231 GET_CALLBACK(uvd, stopDataPump)(uvd); 1231 GET_CALLBACK(uvd, stopDataPump)(uvd);
@@ -1252,7 +1252,7 @@ static int usbvideo_v4l_close(struct inode *inode, struct file *file)
1252 usbvideo_ClientDecModCount(uvd); 1252 usbvideo_ClientDecModCount(uvd);
1253 1253
1254 if (uvd->debug > 1) 1254 if (uvd->debug > 1)
1255 info("%s: Completed.", __FUNCTION__); 1255 info("%s: Completed.", __func__);
1256 file->private_data = NULL; 1256 file->private_data = NULL;
1257 return 0; 1257 return 0;
1258} 1258}
@@ -1506,7 +1506,7 @@ static ssize_t usbvideo_v4l_read(struct file *file, char __user *buf,
1506 return -EFAULT; 1506 return -EFAULT;
1507 1507
1508 if (uvd->debug >= 1) 1508 if (uvd->debug >= 1)
1509 info("%s: %Zd. bytes, noblock=%d.", __FUNCTION__, count, noblock); 1509 info("%s: %Zd. bytes, noblock=%d.", __func__, count, noblock);
1510 1510
1511 mutex_lock(&uvd->lock); 1511 mutex_lock(&uvd->lock);
1512 1512
@@ -1553,7 +1553,7 @@ static ssize_t usbvideo_v4l_read(struct file *file, char __user *buf,
1553 */ 1553 */
1554 if (frmx == -1) { 1554 if (frmx == -1) {
1555 if (uvd->defaultPalette == 0) { 1555 if (uvd->defaultPalette == 0) {
1556 err("%s: No default palette; don't know what to do!", __FUNCTION__); 1556 err("%s: No default palette; don't know what to do!", __func__);
1557 count = -EFAULT; 1557 count = -EFAULT;
1558 goto read_done; 1558 goto read_done;
1559 } 1559 }
@@ -1625,7 +1625,7 @@ static ssize_t usbvideo_v4l_read(struct file *file, char __user *buf,
1625 frame->seqRead_Index += count; 1625 frame->seqRead_Index += count;
1626 if (uvd->debug >= 1) { 1626 if (uvd->debug >= 1) {
1627 err("%s: {copy} count used=%Zd, new seqRead_Index=%ld", 1627 err("%s: {copy} count used=%Zd, new seqRead_Index=%ld",
1628 __FUNCTION__, count, frame->seqRead_Index); 1628 __func__, count, frame->seqRead_Index);
1629 } 1629 }
1630 1630
1631 /* Finally check if the frame is done with and "release" it */ 1631 /* Finally check if the frame is done with and "release" it */
@@ -1636,7 +1636,7 @@ static ssize_t usbvideo_v4l_read(struct file *file, char __user *buf,
1636 /* Mark it as available to be used again. */ 1636 /* Mark it as available to be used again. */
1637 uvd->frame[frmx].frameState = FrameState_Unused; 1637 uvd->frame[frmx].frameState = FrameState_Unused;
1638 if (usbvideo_NewFrame(uvd, (frmx + 1) % USBVIDEO_NUMFRAMES)) { 1638 if (usbvideo_NewFrame(uvd, (frmx + 1) % USBVIDEO_NUMFRAMES)) {
1639 err("%s: usbvideo_NewFrame failed.", __FUNCTION__); 1639 err("%s: usbvideo_NewFrame failed.", __func__);
1640 } 1640 }
1641 } 1641 }
1642read_done: 1642read_done:
@@ -1743,10 +1743,10 @@ static int usbvideo_StartDataPump(struct uvd *uvd)
1743 int i, errFlag; 1743 int i, errFlag;
1744 1744
1745 if (uvd->debug > 1) 1745 if (uvd->debug > 1)
1746 info("%s($%p)", __FUNCTION__, uvd); 1746 info("%s($%p)", __func__, uvd);
1747 1747
1748 if (!CAMERA_IS_OPERATIONAL(uvd)) { 1748 if (!CAMERA_IS_OPERATIONAL(uvd)) {
1749 err("%s: Camera is not operational", __FUNCTION__); 1749 err("%s: Camera is not operational", __func__);
1750 return -EFAULT; 1750 return -EFAULT;
1751 } 1751 }
1752 uvd->curframe = -1; 1752 uvd->curframe = -1;
@@ -1754,14 +1754,14 @@ static int usbvideo_StartDataPump(struct uvd *uvd)
1754 /* Alternate interface 1 is is the biggest frame size */ 1754 /* Alternate interface 1 is is the biggest frame size */
1755 i = usb_set_interface(dev, uvd->iface, uvd->ifaceAltActive); 1755 i = usb_set_interface(dev, uvd->iface, uvd->ifaceAltActive);
1756 if (i < 0) { 1756 if (i < 0) {
1757 err("%s: usb_set_interface error", __FUNCTION__); 1757 err("%s: usb_set_interface error", __func__);
1758 uvd->last_error = i; 1758 uvd->last_error = i;
1759 return -EBUSY; 1759 return -EBUSY;
1760 } 1760 }
1761 if (VALID_CALLBACK(uvd, videoStart)) 1761 if (VALID_CALLBACK(uvd, videoStart))
1762 GET_CALLBACK(uvd, videoStart)(uvd); 1762 GET_CALLBACK(uvd, videoStart)(uvd);
1763 else 1763 else
1764 err("%s: videoStart not set", __FUNCTION__); 1764 err("%s: videoStart not set", __func__);
1765 1765
1766 /* We double buffer the Iso lists */ 1766 /* We double buffer the Iso lists */
1767 for (i=0; i < USBVIDEO_NUMSBUF; i++) { 1767 for (i=0; i < USBVIDEO_NUMSBUF; i++) {
@@ -1786,12 +1786,12 @@ static int usbvideo_StartDataPump(struct uvd *uvd)
1786 for (i=0; i < USBVIDEO_NUMSBUF; i++) { 1786 for (i=0; i < USBVIDEO_NUMSBUF; i++) {
1787 errFlag = usb_submit_urb(uvd->sbuf[i].urb, GFP_KERNEL); 1787 errFlag = usb_submit_urb(uvd->sbuf[i].urb, GFP_KERNEL);
1788 if (errFlag) 1788 if (errFlag)
1789 err("%s: usb_submit_isoc(%d) ret %d", __FUNCTION__, i, errFlag); 1789 err("%s: usb_submit_isoc(%d) ret %d", __func__, i, errFlag);
1790 } 1790 }
1791 1791
1792 uvd->streaming = 1; 1792 uvd->streaming = 1;
1793 if (uvd->debug > 1) 1793 if (uvd->debug > 1)
1794 info("%s: streaming=1 video_endp=$%02x", __FUNCTION__, uvd->video_endp); 1794 info("%s: streaming=1 video_endp=$%02x", __func__, uvd->video_endp);
1795 return 0; 1795 return 0;
1796} 1796}
1797 1797
@@ -1813,14 +1813,14 @@ static void usbvideo_StopDataPump(struct uvd *uvd)
1813 return; 1813 return;
1814 1814
1815 if (uvd->debug > 1) 1815 if (uvd->debug > 1)
1816 info("%s($%p)", __FUNCTION__, uvd); 1816 info("%s($%p)", __func__, uvd);
1817 1817
1818 /* Unschedule all of the iso td's */ 1818 /* Unschedule all of the iso td's */
1819 for (i=0; i < USBVIDEO_NUMSBUF; i++) { 1819 for (i=0; i < USBVIDEO_NUMSBUF; i++) {
1820 usb_kill_urb(uvd->sbuf[i].urb); 1820 usb_kill_urb(uvd->sbuf[i].urb);
1821 } 1821 }
1822 if (uvd->debug > 1) 1822 if (uvd->debug > 1)
1823 info("%s: streaming=0", __FUNCTION__); 1823 info("%s: streaming=0", __func__);
1824 uvd->streaming = 0; 1824 uvd->streaming = 0;
1825 1825
1826 if (!uvd->remove_pending) { 1826 if (!uvd->remove_pending) {
@@ -1828,12 +1828,12 @@ static void usbvideo_StopDataPump(struct uvd *uvd)
1828 if (VALID_CALLBACK(uvd, videoStop)) 1828 if (VALID_CALLBACK(uvd, videoStop))
1829 GET_CALLBACK(uvd, videoStop)(uvd); 1829 GET_CALLBACK(uvd, videoStop)(uvd);
1830 else 1830 else
1831 err("%s: videoStop not set", __FUNCTION__); 1831 err("%s: videoStop not set", __func__);
1832 1832
1833 /* Set packet size to 0 */ 1833 /* Set packet size to 0 */
1834 j = usb_set_interface(uvd->dev, uvd->iface, uvd->ifaceAltInactive); 1834 j = usb_set_interface(uvd->dev, uvd->iface, uvd->ifaceAltInactive);
1835 if (j < 0) { 1835 if (j < 0) {
1836 err("%s: usb_set_interface() error %d.", __FUNCTION__, j); 1836 err("%s: usb_set_interface() error %d.", __func__, j);
1837 uvd->last_error = j; 1837 uvd->last_error = j;
1838 } 1838 }
1839 } 1839 }
@@ -1957,12 +1957,12 @@ static int usbvideo_GetFrame(struct uvd *uvd, int frameNum)
1957 struct usbvideo_frame *frame = &uvd->frame[frameNum]; 1957 struct usbvideo_frame *frame = &uvd->frame[frameNum];
1958 1958
1959 if (uvd->debug >= 2) 1959 if (uvd->debug >= 2)
1960 info("%s($%p,%d.)", __FUNCTION__, uvd, frameNum); 1960 info("%s($%p,%d.)", __func__, uvd, frameNum);
1961 1961
1962 switch (frame->frameState) { 1962 switch (frame->frameState) {
1963 case FrameState_Unused: 1963 case FrameState_Unused:
1964 if (uvd->debug >= 2) 1964 if (uvd->debug >= 2)
1965 info("%s: FrameState_Unused", __FUNCTION__); 1965 info("%s: FrameState_Unused", __func__);
1966 return -EINVAL; 1966 return -EINVAL;
1967 case FrameState_Ready: 1967 case FrameState_Ready:
1968 case FrameState_Grabbing: 1968 case FrameState_Grabbing:
@@ -1972,7 +1972,7 @@ static int usbvideo_GetFrame(struct uvd *uvd, int frameNum)
1972 redo: 1972 redo:
1973 if (!CAMERA_IS_OPERATIONAL(uvd)) { 1973 if (!CAMERA_IS_OPERATIONAL(uvd)) {
1974 if (uvd->debug >= 2) 1974 if (uvd->debug >= 2)
1975 info("%s: Camera is not operational (1)", __FUNCTION__); 1975 info("%s: Camera is not operational (1)", __func__);
1976 return -EIO; 1976 return -EIO;
1977 } 1977 }
1978 ntries = 0; 1978 ntries = 0;
@@ -1981,24 +1981,24 @@ static int usbvideo_GetFrame(struct uvd *uvd, int frameNum)
1981 signalPending = signal_pending(current); 1981 signalPending = signal_pending(current);
1982 if (!CAMERA_IS_OPERATIONAL(uvd)) { 1982 if (!CAMERA_IS_OPERATIONAL(uvd)) {
1983 if (uvd->debug >= 2) 1983 if (uvd->debug >= 2)
1984 info("%s: Camera is not operational (2)", __FUNCTION__); 1984 info("%s: Camera is not operational (2)", __func__);
1985 return -EIO; 1985 return -EIO;
1986 } 1986 }
1987 assert(uvd->fbuf != NULL); 1987 assert(uvd->fbuf != NULL);
1988 if (signalPending) { 1988 if (signalPending) {
1989 if (uvd->debug >= 2) 1989 if (uvd->debug >= 2)
1990 info("%s: Signal=$%08x", __FUNCTION__, signalPending); 1990 info("%s: Signal=$%08x", __func__, signalPending);
1991 if (uvd->flags & FLAGS_RETRY_VIDIOCSYNC) { 1991 if (uvd->flags & FLAGS_RETRY_VIDIOCSYNC) {
1992 usbvideo_TestPattern(uvd, 1, 0); 1992 usbvideo_TestPattern(uvd, 1, 0);
1993 uvd->curframe = -1; 1993 uvd->curframe = -1;
1994 uvd->stats.frame_num++; 1994 uvd->stats.frame_num++;
1995 if (uvd->debug >= 2) 1995 if (uvd->debug >= 2)
1996 info("%s: Forced test pattern screen", __FUNCTION__); 1996 info("%s: Forced test pattern screen", __func__);
1997 return 0; 1997 return 0;
1998 } else { 1998 } else {
1999 /* Standard answer: Interrupted! */ 1999 /* Standard answer: Interrupted! */
2000 if (uvd->debug >= 2) 2000 if (uvd->debug >= 2)
2001 info("%s: Interrupted!", __FUNCTION__); 2001 info("%s: Interrupted!", __func__);
2002 return -EINTR; 2002 return -EINTR;
2003 } 2003 }
2004 } else { 2004 } else {
@@ -2008,17 +2008,17 @@ static int usbvideo_GetFrame(struct uvd *uvd, int frameNum)
2008 else if (VALID_CALLBACK(uvd, processData)) 2008 else if (VALID_CALLBACK(uvd, processData))
2009 GET_CALLBACK(uvd, processData)(uvd, frame); 2009 GET_CALLBACK(uvd, processData)(uvd, frame);
2010 else 2010 else
2011 err("%s: processData not set", __FUNCTION__); 2011 err("%s: processData not set", __func__);
2012 } 2012 }
2013 } while (frame->frameState == FrameState_Grabbing); 2013 } while (frame->frameState == FrameState_Grabbing);
2014 if (uvd->debug >= 2) { 2014 if (uvd->debug >= 2) {
2015 info("%s: Grabbing done; state=%d. (%lu. bytes)", 2015 info("%s: Grabbing done; state=%d. (%lu. bytes)",
2016 __FUNCTION__, frame->frameState, frame->seqRead_Length); 2016 __func__, frame->frameState, frame->seqRead_Length);
2017 } 2017 }
2018 if (frame->frameState == FrameState_Error) { 2018 if (frame->frameState == FrameState_Error) {
2019 int ret = usbvideo_NewFrame(uvd, frameNum); 2019 int ret = usbvideo_NewFrame(uvd, frameNum);
2020 if (ret < 0) { 2020 if (ret < 0) {
2021 err("%s: usbvideo_NewFrame() failed (%d.)", __FUNCTION__, ret); 2021 err("%s: usbvideo_NewFrame() failed (%d.)", __func__, ret);
2022 return ret; 2022 return ret;
2023 } 2023 }
2024 goto redo; 2024 goto redo;
@@ -2050,7 +2050,7 @@ static int usbvideo_GetFrame(struct uvd *uvd, int frameNum)
2050 } 2050 }
2051 frame->frameState = FrameState_Done_Hold; 2051 frame->frameState = FrameState_Done_Hold;
2052 if (uvd->debug >= 2) 2052 if (uvd->debug >= 2)
2053 info("%s: Entered FrameState_Done_Hold state.", __FUNCTION__); 2053 info("%s: Entered FrameState_Done_Hold state.", __func__);
2054 return 0; 2054 return 0;
2055 2055
2056 case FrameState_Done_Hold: 2056 case FrameState_Done_Hold:
@@ -2061,12 +2061,12 @@ static int usbvideo_GetFrame(struct uvd *uvd, int frameNum)
2061 * it will be released back into the wild to roam freely. 2061 * it will be released back into the wild to roam freely.
2062 */ 2062 */
2063 if (uvd->debug >= 2) 2063 if (uvd->debug >= 2)
2064 info("%s: FrameState_Done_Hold state.", __FUNCTION__); 2064 info("%s: FrameState_Done_Hold state.", __func__);
2065 return 0; 2065 return 0;
2066 } 2066 }
2067 2067
2068 /* Catch-all for other cases. We shall not be here. */ 2068 /* Catch-all for other cases. We shall not be here. */
2069 err("%s: Invalid state %d.", __FUNCTION__, frame->frameState); 2069 err("%s: Invalid state %d.", __func__, frame->frameState);
2070 frame->frameState = FrameState_Unused; 2070 frame->frameState = FrameState_Unused;
2071 return 0; 2071 return 0;
2072} 2072}
@@ -2162,7 +2162,7 @@ static void usbvideo_SoftwareContrastAdjustment(struct uvd *uvd,
2162 const int ccm = 128; /* Color correction median - see below */ 2162 const int ccm = 128; /* Color correction median - see below */
2163 2163
2164 if ((uvd == NULL) || (frame == NULL)) { 2164 if ((uvd == NULL) || (frame == NULL)) {
2165 err("%s: Illegal call.", __FUNCTION__); 2165 err("%s: Illegal call.", __func__);
2166 return; 2166 return;
2167 } 2167 }
2168 adj = (uvd->vpic.contrast - 0x8000) >> 8; /* -128..+127 = -ccm..+(ccm-1)*/ 2168 adj = (uvd->vpic.contrast - 0x8000) >> 8; /* -128..+127 = -ccm..+(ccm-1)*/
diff --git a/drivers/media/video/usbvideo/vicam.c b/drivers/media/video/usbvideo/vicam.c
index 4d4795ae3bc7..64819353276a 100644
--- a/drivers/media/video/usbvideo/vicam.c
+++ b/drivers/media/video/usbvideo/vicam.c
@@ -48,7 +48,7 @@
48// #define VICAM_DEBUG 48// #define VICAM_DEBUG
49 49
50#ifdef VICAM_DEBUG 50#ifdef VICAM_DEBUG
51#define ADBG(lineno,fmt,args...) printk(fmt, jiffies, __FUNCTION__, lineno, ##args) 51#define ADBG(lineno,fmt,args...) printk(fmt, jiffies, __func__, lineno, ##args)
52#define DBG(fmt,args...) ADBG((__LINE__),KERN_DEBUG __FILE__"(%ld):%s (%d):"fmt,##args) 52#define DBG(fmt,args...) ADBG((__LINE__),KERN_DEBUG __FILE__"(%ld):%s (%d):"fmt,##args)
53#else 53#else
54#define DBG(fmn,args...) do {} while(0) 54#define DBG(fmn,args...) do {} while(0)