diff options
Diffstat (limited to 'drivers/media/video/usbvideo/vicam.c')
-rw-r--r-- | drivers/media/video/usbvideo/vicam.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/media/video/usbvideo/vicam.c b/drivers/media/video/usbvideo/vicam.c index 1d06e53ec7c5..90d48e8510ba 100644 --- a/drivers/media/video/usbvideo/vicam.c +++ b/drivers/media/video/usbvideo/vicam.c | |||
@@ -69,10 +69,10 @@ | |||
69 | #define VICAM_HEADER_SIZE 64 | 69 | #define VICAM_HEADER_SIZE 64 |
70 | 70 | ||
71 | #define clamp( x, l, h ) max_t( __typeof__( x ), \ | 71 | #define clamp( x, l, h ) max_t( __typeof__( x ), \ |
72 | ( l ), \ | 72 | ( l ), \ |
73 | min_t( __typeof__( x ), \ | 73 | min_t( __typeof__( x ), \ |
74 | ( h ), \ | 74 | ( h ), \ |
75 | ( x ) ) ) | 75 | ( x ) ) ) |
76 | 76 | ||
77 | /* Not sure what all the bytes in these char | 77 | /* Not sure what all the bytes in these char |
78 | * arrays do, but they're necessary to make | 78 | * arrays do, but they're necessary to make |
@@ -357,7 +357,7 @@ static unsigned char setup5[] = { | |||
357 | * Not sure why these are not yet non-statics which I can reference through | 357 | * Not sure why these are not yet non-statics which I can reference through |
358 | * usbvideo.h the same as it is in 2.4.20. I bet this will get fixed sometime | 358 | * usbvideo.h the same as it is in 2.4.20. I bet this will get fixed sometime |
359 | * in the future. | 359 | * in the future. |
360 | * | 360 | * |
361 | */ | 361 | */ |
362 | static void *rvmalloc(unsigned long size) | 362 | static void *rvmalloc(unsigned long size) |
363 | { | 363 | { |
@@ -603,12 +603,12 @@ vicam_ioctl(struct inode *inode, struct file *file, unsigned int ioctlnr, unsign | |||
603 | case VIDIOCSPICT: | 603 | case VIDIOCSPICT: |
604 | { | 604 | { |
605 | struct video_picture vp; | 605 | struct video_picture vp; |
606 | 606 | ||
607 | if (copy_from_user(&vp, user_arg, sizeof(vp))) { | 607 | if (copy_from_user(&vp, user_arg, sizeof(vp))) { |
608 | retval = -EFAULT; | 608 | retval = -EFAULT; |
609 | break; | 609 | break; |
610 | } | 610 | } |
611 | 611 | ||
612 | DBG("VIDIOCSPICT depth = %d, pal = %d\n", vp.depth, | 612 | DBG("VIDIOCSPICT depth = %d, pal = %d\n", vp.depth, |
613 | vp.palette); | 613 | vp.palette); |
614 | 614 | ||
@@ -655,7 +655,7 @@ vicam_ioctl(struct inode *inode, struct file *file, unsigned int ioctlnr, unsign | |||
655 | } | 655 | } |
656 | 656 | ||
657 | DBG("VIDIOCSWIN %d x %d\n", vw.width, vw.height); | 657 | DBG("VIDIOCSWIN %d x %d\n", vw.width, vw.height); |
658 | 658 | ||
659 | if ( vw.width != 320 || vw.height != 240 ) | 659 | if ( vw.width != 320 || vw.height != 240 ) |
660 | retval = -EFAULT; | 660 | retval = -EFAULT; |
661 | 661 | ||
@@ -809,12 +809,12 @@ vicam_open(struct inode *inode, struct file *file) | |||
809 | cam->needsDummyRead = 1; | 809 | cam->needsDummyRead = 1; |
810 | cam->open_count++; | 810 | cam->open_count++; |
811 | 811 | ||
812 | file->private_data = cam; | 812 | file->private_data = cam; |
813 | 813 | ||
814 | return 0; | 814 | return 0; |
815 | } | 815 | } |
816 | 816 | ||
817 | static int | 817 | static int |
818 | vicam_close(struct inode *inode, struct file *file) | 818 | vicam_close(struct inode *inode, struct file *file) |
819 | { | 819 | { |
820 | struct vicam_camera *cam = file->private_data; | 820 | struct vicam_camera *cam = file->private_data; |
@@ -1187,7 +1187,7 @@ vicam_create_proc_entry(struct vicam_camera *cam) | |||
1187 | 1187 | ||
1188 | if ( !cam->proc_dir ) | 1188 | if ( !cam->proc_dir ) |
1189 | return; // FIXME: We should probably return an error here | 1189 | return; // FIXME: We should probably return an error here |
1190 | 1190 | ||
1191 | ent = create_proc_entry("shutter", S_IFREG | S_IRUGO | S_IWUSR, | 1191 | ent = create_proc_entry("shutter", S_IFREG | S_IRUGO | S_IWUSR, |
1192 | cam->proc_dir); | 1192 | cam->proc_dir); |
1193 | if (ent) { | 1193 | if (ent) { |
@@ -1282,7 +1282,7 @@ vicam_probe( struct usb_interface *intf, const struct usb_device_id *id) | |||
1282 | const struct usb_host_interface *interface; | 1282 | const struct usb_host_interface *interface; |
1283 | const struct usb_endpoint_descriptor *endpoint; | 1283 | const struct usb_endpoint_descriptor *endpoint; |
1284 | struct vicam_camera *cam; | 1284 | struct vicam_camera *cam; |
1285 | 1285 | ||
1286 | printk(KERN_INFO "ViCam based webcam connected\n"); | 1286 | printk(KERN_INFO "ViCam based webcam connected\n"); |
1287 | 1287 | ||
1288 | interface = intf->cur_altsetting; | 1288 | interface = intf->cur_altsetting; |
@@ -1331,7 +1331,7 @@ vicam_probe( struct usb_interface *intf, const struct usb_device_id *id) | |||
1331 | printk(KERN_INFO "ViCam webcam driver now controlling video device %d\n",cam->vdev.minor); | 1331 | printk(KERN_INFO "ViCam webcam driver now controlling video device %d\n",cam->vdev.minor); |
1332 | 1332 | ||
1333 | usb_set_intfdata (intf, cam); | 1333 | usb_set_intfdata (intf, cam); |
1334 | 1334 | ||
1335 | return 0; | 1335 | return 0; |
1336 | } | 1336 | } |
1337 | 1337 | ||