aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-09-17 04:02:26 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-26 08:38:15 -0400
commit633c98e52a64ac8548b5d27dca1497cd4f0a6d4c (patch)
tree140cfba2c7ea9ddeb02e7e31fbb4b0de3946a1f0 /drivers/media
parent72c2af6ec1485604c6aa068cca2932d48d8a5f7a (diff)
[media] v4l2-core: deprecate V4L2_BUF_TYPE_PRIVATE
This buffer type isn't used at all, and since it is effectively undefined what it should do it is deprecated. The define still exists, but any internal support for such buffers is removed. The decisions to deprecate this was taken during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/v4l2-core/v4l2-compat-ioctl32.c8
-rw-r--r--drivers/media/v4l2-core/v4l2-dev.c12
-rw-r--r--drivers/media/v4l2-core/v4l2-ioctl.c26
3 files changed, 6 insertions, 40 deletions
diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
index e8437051d3ef..83ffb6436baf 100644
--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
@@ -195,10 +195,6 @@ static int __get_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __us
195 case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: 195 case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
196 case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: 196 case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
197 return get_v4l2_sliced_vbi_format(&kp->fmt.sliced, &up->fmt.sliced); 197 return get_v4l2_sliced_vbi_format(&kp->fmt.sliced, &up->fmt.sliced);
198 case V4L2_BUF_TYPE_PRIVATE:
199 if (copy_from_user(kp, up, sizeof(kp->fmt.raw_data)))
200 return -EFAULT;
201 return 0;
202 default: 198 default:
203 printk(KERN_INFO "compat_ioctl32: unexpected VIDIOC_FMT type %d\n", 199 printk(KERN_INFO "compat_ioctl32: unexpected VIDIOC_FMT type %d\n",
204 kp->type); 200 kp->type);
@@ -241,10 +237,6 @@ static int __put_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __us
241 case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: 237 case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
242 case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: 238 case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
243 return put_v4l2_sliced_vbi_format(&kp->fmt.sliced, &up->fmt.sliced); 239 return put_v4l2_sliced_vbi_format(&kp->fmt.sliced, &up->fmt.sliced);
244 case V4L2_BUF_TYPE_PRIVATE:
245 if (copy_to_user(up, kp, sizeof(up->fmt.raw_data)))
246 return -EFAULT;
247 return 0;
248 default: 240 default:
249 printk(KERN_INFO "compat_ioctl32: unexpected VIDIOC_FMT type %d\n", 241 printk(KERN_INFO "compat_ioctl32: unexpected VIDIOC_FMT type %d\n",
250 kp->type); 242 kp->type);
diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c
index 71237f5f85f4..95f92ea4dbd5 100644
--- a/drivers/media/v4l2-core/v4l2-dev.c
+++ b/drivers/media/v4l2-core/v4l2-dev.c
@@ -565,8 +565,7 @@ static void determine_valid_ioctls(struct video_device *vdev)
565 ops->vidioc_enum_fmt_vid_out || 565 ops->vidioc_enum_fmt_vid_out ||
566 ops->vidioc_enum_fmt_vid_cap_mplane || 566 ops->vidioc_enum_fmt_vid_cap_mplane ||
567 ops->vidioc_enum_fmt_vid_out_mplane || 567 ops->vidioc_enum_fmt_vid_out_mplane ||
568 ops->vidioc_enum_fmt_vid_overlay || 568 ops->vidioc_enum_fmt_vid_overlay)
569 ops->vidioc_enum_fmt_type_private)
570 set_bit(_IOC_NR(VIDIOC_ENUM_FMT), valid_ioctls); 569 set_bit(_IOC_NR(VIDIOC_ENUM_FMT), valid_ioctls);
571 if (ops->vidioc_g_fmt_vid_cap || 570 if (ops->vidioc_g_fmt_vid_cap ||
572 ops->vidioc_g_fmt_vid_out || 571 ops->vidioc_g_fmt_vid_out ||
@@ -577,8 +576,7 @@ static void determine_valid_ioctls(struct video_device *vdev)
577 ops->vidioc_g_fmt_vid_out_overlay || 576 ops->vidioc_g_fmt_vid_out_overlay ||
578 ops->vidioc_g_fmt_vbi_out || 577 ops->vidioc_g_fmt_vbi_out ||
579 ops->vidioc_g_fmt_sliced_vbi_cap || 578 ops->vidioc_g_fmt_sliced_vbi_cap ||
580 ops->vidioc_g_fmt_sliced_vbi_out || 579 ops->vidioc_g_fmt_sliced_vbi_out)
581 ops->vidioc_g_fmt_type_private)
582 set_bit(_IOC_NR(VIDIOC_G_FMT), valid_ioctls); 580 set_bit(_IOC_NR(VIDIOC_G_FMT), valid_ioctls);
583 if (ops->vidioc_s_fmt_vid_cap || 581 if (ops->vidioc_s_fmt_vid_cap ||
584 ops->vidioc_s_fmt_vid_out || 582 ops->vidioc_s_fmt_vid_out ||
@@ -589,8 +587,7 @@ static void determine_valid_ioctls(struct video_device *vdev)
589 ops->vidioc_s_fmt_vid_out_overlay || 587 ops->vidioc_s_fmt_vid_out_overlay ||
590 ops->vidioc_s_fmt_vbi_out || 588 ops->vidioc_s_fmt_vbi_out ||
591 ops->vidioc_s_fmt_sliced_vbi_cap || 589 ops->vidioc_s_fmt_sliced_vbi_cap ||
592 ops->vidioc_s_fmt_sliced_vbi_out || 590 ops->vidioc_s_fmt_sliced_vbi_out)
593 ops->vidioc_s_fmt_type_private)
594 set_bit(_IOC_NR(VIDIOC_S_FMT), valid_ioctls); 591 set_bit(_IOC_NR(VIDIOC_S_FMT), valid_ioctls);
595 if (ops->vidioc_try_fmt_vid_cap || 592 if (ops->vidioc_try_fmt_vid_cap ||
596 ops->vidioc_try_fmt_vid_out || 593 ops->vidioc_try_fmt_vid_out ||
@@ -601,8 +598,7 @@ static void determine_valid_ioctls(struct video_device *vdev)
601 ops->vidioc_try_fmt_vid_out_overlay || 598 ops->vidioc_try_fmt_vid_out_overlay ||
602 ops->vidioc_try_fmt_vbi_out || 599 ops->vidioc_try_fmt_vbi_out ||
603 ops->vidioc_try_fmt_sliced_vbi_cap || 600 ops->vidioc_try_fmt_sliced_vbi_cap ||
604 ops->vidioc_try_fmt_sliced_vbi_out || 601 ops->vidioc_try_fmt_sliced_vbi_out)
605 ops->vidioc_try_fmt_type_private)
606 set_bit(_IOC_NR(VIDIOC_TRY_FMT), valid_ioctls); 602 set_bit(_IOC_NR(VIDIOC_TRY_FMT), valid_ioctls);
607 SET_VALID_IOCTL(ops, VIDIOC_REQBUFS, vidioc_reqbufs); 603 SET_VALID_IOCTL(ops, VIDIOC_REQBUFS, vidioc_reqbufs);
608 SET_VALID_IOCTL(ops, VIDIOC_QUERYBUF, vidioc_querybuf); 604 SET_VALID_IOCTL(ops, VIDIOC_QUERYBUF, vidioc_querybuf);
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 932d9bf5990a..2f26e9496a3b 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -316,9 +316,6 @@ static void v4l_print_format(const void *arg, bool write_only)
316 sliced->service_lines[0][i], 316 sliced->service_lines[0][i],
317 sliced->service_lines[1][i]); 317 sliced->service_lines[1][i]);
318 break; 318 break;
319 case V4L2_BUF_TYPE_PRIVATE:
320 pr_cont("\n");
321 break;
322 } 319 }
323} 320}
324 321
@@ -927,9 +924,7 @@ static int check_fmt(const struct v4l2_ioctl_ops *ops, enum v4l2_buf_type type)
927 if (ops->vidioc_g_fmt_sliced_vbi_out) 924 if (ops->vidioc_g_fmt_sliced_vbi_out)
928 return 0; 925 return 0;
929 break; 926 break;
930 case V4L2_BUF_TYPE_PRIVATE: 927 default:
931 if (ops->vidioc_g_fmt_type_private)
932 return 0;
933 break; 928 break;
934 } 929 }
935 return -EINVAL; 930 return -EINVAL;
@@ -1051,10 +1046,6 @@ static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops,
1051 if (unlikely(!ops->vidioc_enum_fmt_vid_out_mplane)) 1046 if (unlikely(!ops->vidioc_enum_fmt_vid_out_mplane))
1052 break; 1047 break;
1053 return ops->vidioc_enum_fmt_vid_out_mplane(file, fh, arg); 1048 return ops->vidioc_enum_fmt_vid_out_mplane(file, fh, arg);
1054 case V4L2_BUF_TYPE_PRIVATE:
1055 if (unlikely(!ops->vidioc_enum_fmt_type_private))
1056 break;
1057 return ops->vidioc_enum_fmt_type_private(file, fh, arg);
1058 } 1049 }
1059 return -EINVAL; 1050 return -EINVAL;
1060} 1051}
@@ -1105,10 +1096,6 @@ static int v4l_g_fmt(const struct v4l2_ioctl_ops *ops,
1105 if (unlikely(!ops->vidioc_g_fmt_sliced_vbi_out)) 1096 if (unlikely(!ops->vidioc_g_fmt_sliced_vbi_out))
1106 break; 1097 break;
1107 return ops->vidioc_g_fmt_sliced_vbi_out(file, fh, arg); 1098 return ops->vidioc_g_fmt_sliced_vbi_out(file, fh, arg);
1108 case V4L2_BUF_TYPE_PRIVATE:
1109 if (unlikely(!ops->vidioc_g_fmt_type_private))
1110 break;
1111 return ops->vidioc_g_fmt_type_private(file, fh, arg);
1112 } 1099 }
1113 return -EINVAL; 1100 return -EINVAL;
1114} 1101}
@@ -1169,10 +1156,6 @@ static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops,
1169 break; 1156 break;
1170 CLEAR_AFTER_FIELD(p, fmt.sliced); 1157 CLEAR_AFTER_FIELD(p, fmt.sliced);
1171 return ops->vidioc_s_fmt_sliced_vbi_out(file, fh, arg); 1158 return ops->vidioc_s_fmt_sliced_vbi_out(file, fh, arg);
1172 case V4L2_BUF_TYPE_PRIVATE:
1173 if (unlikely(!ops->vidioc_s_fmt_type_private))
1174 break;
1175 return ops->vidioc_s_fmt_type_private(file, fh, arg);
1176 } 1159 }
1177 return -EINVAL; 1160 return -EINVAL;
1178} 1161}
@@ -1233,10 +1216,6 @@ static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops,
1233 break; 1216 break;
1234 CLEAR_AFTER_FIELD(p, fmt.sliced); 1217 CLEAR_AFTER_FIELD(p, fmt.sliced);
1235 return ops->vidioc_try_fmt_sliced_vbi_out(file, fh, arg); 1218 return ops->vidioc_try_fmt_sliced_vbi_out(file, fh, arg);
1236 case V4L2_BUF_TYPE_PRIVATE:
1237 if (unlikely(!ops->vidioc_try_fmt_type_private))
1238 break;
1239 return ops->vidioc_try_fmt_type_private(file, fh, arg);
1240 } 1219 }
1241 return -EINVAL; 1220 return -EINVAL;
1242} 1221}
@@ -1425,8 +1404,7 @@ static int v4l_reqbufs(const struct v4l2_ioctl_ops *ops,
1425 if (ret) 1404 if (ret)
1426 return ret; 1405 return ret;
1427 1406
1428 if (p->type < V4L2_BUF_TYPE_PRIVATE) 1407 CLEAR_AFTER_FIELD(p, memory);
1429 CLEAR_AFTER_FIELD(p, memory);
1430 1408
1431 return ops->vidioc_reqbufs(file, fh, p); 1409 return ops->vidioc_reqbufs(file, fh, p);
1432} 1410}