diff options
author | Stefan Schweizer <genstef@gentoo.org> | 2006-09-15 13:56:40 +0000 |
---|---|---|
committer | Stefan Schweizer <genstef@gentoo.org> | 2006-09-15 13:56:40 +0000 |
commit | bb849a9a858519f68eb9315c51046936879265df (patch) | |
tree | 0d17a21bf99696f5257628b47d176b3a2f6000f1 /media-video | |
parent | minor ebuild cleanup, adding optional mplayer support (solving bug #119756 an... (diff) | |
download | gentoo-2-bb849a9a858519f68eb9315c51046936879265df.tar.gz gentoo-2-bb849a9a858519f68eb9315c51046936879265df.tar.bz2 gentoo-2-bb849a9a858519f68eb9315c51046936879265df.zip |
add 2.6.18 patch by me
(Portage version: 2.1.1)
Diffstat (limited to 'media-video')
-rw-r--r-- | media-video/linux-uvc/ChangeLog | 6 | ||||
-rw-r--r-- | media-video/linux-uvc/files/uvc-2.6.18.diff | 113 | ||||
-rw-r--r-- | media-video/linux-uvc/linux-uvc-0.0.1_pre51.ebuild | 5 |
3 files changed, 121 insertions, 3 deletions
diff --git a/media-video/linux-uvc/ChangeLog b/media-video/linux-uvc/ChangeLog index 605f3909177e..01ae5bc1e659 100644 --- a/media-video/linux-uvc/ChangeLog +++ b/media-video/linux-uvc/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-video/linux-uvc # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/linux-uvc/ChangeLog,v 1.2 2006/09/01 09:36:21 genstef Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/linux-uvc/ChangeLog,v 1.3 2006/09/15 13:56:40 genstef Exp $ + + 15 Sep 2006; Stefan Schweizer <genstef@gentoo.org> +files/uvc-2.6.18.diff, + linux-uvc-0.0.1_pre51.ebuild: + add 2.6.18 patch by me *linux-uvc-0.0.1_pre51 (01 Sep 2006) diff --git a/media-video/linux-uvc/files/uvc-2.6.18.diff b/media-video/linux-uvc/files/uvc-2.6.18.diff new file mode 100644 index 000000000000..57e6b56369b7 --- /dev/null +++ b/media-video/linux-uvc/files/uvc-2.6.18.diff @@ -0,0 +1,113 @@ +--- linux-uvc-0.0.1_pre51.orig/uvcvideo.c 2006-09-15 15:16:15.000000000 +0200 ++++ linux-uvc-0.0.1_pre51/uvcvideo.c 2006-09-15 15:29:36.000000000 +0200 +@@ -330,6 +330,7 @@ + struct uvc_video_queue queue; + + struct uvc_streaming *streaming; ++ struct list_head devlist; + + struct urb *urb[UVC_URBS]; + char *iso_buffer[UVC_URBS]; +@@ -636,6 +637,8 @@ + } + #endif + ++static LIST_HEAD(uvc_devlist); ++ + /* ------------------------------------------------------------------------ + * Utility functions + */ +@@ -2356,13 +2359,21 @@ + + static int uvc_v4l2_open(struct inode *inode, struct file *file) + { +- struct video_device *vdev; +- struct uvc_video_device *video; ++ struct uvc_video_device *h,*video = NULL; ++ struct list_head *list; ++ int minor = iminor(inode); + + uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_open\n"); + down(&dev_sem); +- vdev = video_devdata(file); +- video = video_get_drvdata(vdev); ++ ++ list_for_each(list,&uvc_devlist) { ++ h = list_entry(list, struct uvc_video_device, devlist); ++ if (h->vdev->minor == minor) { ++ video = h; ++ } ++ } ++ ++ file->private_data=video; + + if (video->dev->state & UVC_DEV_DISCONNECTED) { + up(&dev_sem); +@@ -2383,8 +2394,16 @@ + + static int uvc_v4l2_release(struct inode *inode, struct file *file) + { +- struct video_device *vdev = video_devdata(file); +- struct uvc_video_device *video = video_get_drvdata(vdev); ++ int minor = iminor(inode); ++ struct uvc_video_device *h,*video = NULL; ++ struct list_head *list; ++ ++ list_for_each(list,&uvc_devlist) { ++ h = list_entry(list, struct uvc_video_device, devlist); ++ if (h->vdev->minor == minor) { ++ video = h; ++ } ++ } + + uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_release\n"); + uvc_video_enable(video, 0); +@@ -2402,9 +2421,17 @@ + static int uvc_v4l2_do_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, void *arg) + { +- struct video_device *vdev = video_devdata(file); +- struct uvc_video_device *video = video_get_drvdata(vdev); + int ret; ++ int minor = iminor(inode); ++ struct uvc_video_device *h,*video = NULL; ++ struct list_head *list; ++ ++ list_for_each(list,&uvc_devlist) { ++ h = list_entry(list, struct uvc_video_device, devlist); ++ if (h->vdev->minor == minor) { ++ video = h; ++ } ++ } + + if (trace & UVC_TRACE_IOCTL) { + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16) +@@ -2732,8 +2759,7 @@ + + static int uvc_v4l2_mmap(struct file *file, struct vm_area_struct *vma) + { +- struct video_device *vdev = video_devdata(file); +- struct uvc_video_device *video = video_get_drvdata(vdev); ++ struct uvc_video_device *video = file->private_data; + struct uvc_buffer *buffer = NULL; + struct page *page; + unsigned long addr, start, size; +@@ -2799,8 +2825,7 @@ + + static unsigned int uvc_v4l2_poll(struct file *file, poll_table *wait) + { +- struct video_device *vdev = video_devdata(file); +- struct uvc_video_device *video = video_get_drvdata(vdev); ++ struct uvc_video_device *video = file->private_data; + struct uvc_buffer *buf; + unsigned int mask = 0; + +@@ -3697,7 +3722,7 @@ + * a pointer to the usb_interface ? + */ + dev->video.vdev = vdev; +- video_set_drvdata(vdev, &dev->video); ++ list_add_tail(&dev->video.devlist,&uvc_devlist); + + if (video_register_device(vdev, VFL_TYPE_GRABBER, -1) < 0) { + dev->video.vdev = NULL; diff --git a/media-video/linux-uvc/linux-uvc-0.0.1_pre51.ebuild b/media-video/linux-uvc/linux-uvc-0.0.1_pre51.ebuild index 0935242507ac..479f1cd78fc1 100644 --- a/media-video/linux-uvc/linux-uvc-0.0.1_pre51.ebuild +++ b/media-video/linux-uvc/linux-uvc-0.0.1_pre51.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/linux-uvc/linux-uvc-0.0.1_pre51.ebuild,v 1.1 2006/09/01 09:36:21 genstef Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/linux-uvc/linux-uvc-0.0.1_pre51.ebuild,v 1.2 2006/09/15 13:56:40 genstef Exp $ inherit eutils linux-mod @@ -21,7 +21,7 @@ DEPEND=">=dev-libs/libusb-0.1.12" MODULE_NAMES="uvcvideo(usb/media)" BUILD_TARGETS="uvcvideo" -CONFIG_CHECK="VIDEO_DEV" +#CONFIG_CHECK="VIDEO_DEV" pkg_setup() { linux-mod_pkg_setup @@ -37,6 +37,7 @@ src_unpack() { unpack ${A} cd ${S} use isight && epatch ${FILESDIR}/41-001-isight.patch + kernel_is ge 2 6 18 && epatch ${FILESDIR}/uvc-2.6.18.diff } src_compile() { |