diff options
author | Bob Liu <lliubbo@gmail.com> | 2011-04-29 06:11:35 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 11:16:45 -0400 |
commit | 7296944759c41001122fc95110468a1a572352cd (patch) | |
tree | 94fe97dd4f5d00d332e77fec0974ebee8e59f377 /drivers/media/video/uvc/uvc_v4l2.c | |
parent | ecc6517d947e91f02eb5a3a055f524122846f84e (diff) |
[media] uvcvideo: Add support for NOMMU arch
Add support to uvc driver for NOMMU arch including add function
uvc_queue_get_unmapped_area() and make some changes in uvc_queue_mmap().
So that uvc camera can be used on nommu arch like blackfin.
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/uvc/uvc_v4l2.c')
-rw-r--r-- | drivers/media/video/uvc/uvc_v4l2.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c index 6e8aad44c4bd..543a80395b7f 100644 --- a/drivers/media/video/uvc/uvc_v4l2.c +++ b/drivers/media/video/uvc/uvc_v4l2.c | |||
@@ -1114,6 +1114,20 @@ static unsigned int uvc_v4l2_poll(struct file *file, poll_table *wait) | |||
1114 | return uvc_queue_poll(&stream->queue, file, wait); | 1114 | return uvc_queue_poll(&stream->queue, file, wait); |
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | #ifndef CONFIG_MMU | ||
1118 | static unsigned long uvc_v4l2_get_unmapped_area(struct file *file, | ||
1119 | unsigned long addr, unsigned long len, unsigned long pgoff, | ||
1120 | unsigned long flags) | ||
1121 | { | ||
1122 | struct uvc_fh *handle = file->private_data; | ||
1123 | struct uvc_streaming *stream = handle->stream; | ||
1124 | |||
1125 | uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_get_unmapped_area\n"); | ||
1126 | |||
1127 | return uvc_queue_get_unmapped_area(&stream->queue, pgoff); | ||
1128 | } | ||
1129 | #endif | ||
1130 | |||
1117 | const struct v4l2_file_operations uvc_fops = { | 1131 | const struct v4l2_file_operations uvc_fops = { |
1118 | .owner = THIS_MODULE, | 1132 | .owner = THIS_MODULE, |
1119 | .open = uvc_v4l2_open, | 1133 | .open = uvc_v4l2_open, |
@@ -1122,5 +1136,8 @@ const struct v4l2_file_operations uvc_fops = { | |||
1122 | .read = uvc_v4l2_read, | 1136 | .read = uvc_v4l2_read, |
1123 | .mmap = uvc_v4l2_mmap, | 1137 | .mmap = uvc_v4l2_mmap, |
1124 | .poll = uvc_v4l2_poll, | 1138 | .poll = uvc_v4l2_poll, |
1139 | #ifndef CONFIG_MMU | ||
1140 | .get_unmapped_area = uvc_v4l2_get_unmapped_area, | ||
1141 | #endif | ||
1125 | }; | 1142 | }; |
1126 | 1143 | ||