diff options
author | Guennadi Liakhovetski <lyakh@axis700.grange> | 2008-12-01 07:45:21 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:38:23 -0500 |
commit | d8fac217c58f0101a351b9c8c80f1665bd9efef9 (patch) | |
tree | 5b6b71e7f7cacf81620c046b5944134db2d70734 | |
parent | 25c4d74ea6f07f2aaa3df537619680ba967043f5 (diff) |
V4L/DVB (9788): soc-camera: simplify naming
We anyway don't follow the s_fmt_vid_cap / g_fmt_vid_cap / try_fmt_vid_cap
naming, and soc-camera is so far only about video capture, let's simplify
operation names a bit further. set_fmt_cap / try_fmt_cap wasn't a very good
choice too.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/mt9m001.c | 14 | ||||
-rw-r--r-- | drivers/media/video/mt9m111.c | 12 | ||||
-rw-r--r-- | drivers/media/video/mt9v022.c | 14 | ||||
-rw-r--r-- | drivers/media/video/ov772x.c | 14 | ||||
-rw-r--r-- | drivers/media/video/pxa_camera.c | 16 | ||||
-rw-r--r-- | drivers/media/video/sh_mobile_ceu_camera.c | 16 | ||||
-rw-r--r-- | drivers/media/video/soc_camera.c | 6 | ||||
-rw-r--r-- | drivers/media/video/soc_camera_platform.c | 12 | ||||
-rw-r--r-- | include/media/soc_camera.h | 10 |
9 files changed, 56 insertions, 58 deletions
diff --git a/drivers/media/video/mt9m001.c b/drivers/media/video/mt9m001.c index 0c524376b67e..0bcfef7b1c17 100644 --- a/drivers/media/video/mt9m001.c +++ b/drivers/media/video/mt9m001.c | |||
@@ -285,8 +285,8 @@ static unsigned long mt9m001_query_bus_param(struct soc_camera_device *icd) | |||
285 | width_flag; | 285 | width_flag; |
286 | } | 286 | } |
287 | 287 | ||
288 | static int mt9m001_set_fmt_cap(struct soc_camera_device *icd, | 288 | static int mt9m001_set_fmt(struct soc_camera_device *icd, |
289 | __u32 pixfmt, struct v4l2_rect *rect) | 289 | __u32 pixfmt, struct v4l2_rect *rect) |
290 | { | 290 | { |
291 | struct mt9m001 *mt9m001 = container_of(icd, struct mt9m001, icd); | 291 | struct mt9m001 *mt9m001 = container_of(icd, struct mt9m001, icd); |
292 | int ret; | 292 | int ret; |
@@ -298,7 +298,7 @@ static int mt9m001_set_fmt_cap(struct soc_camera_device *icd, | |||
298 | ret = reg_write(icd, MT9M001_VERTICAL_BLANKING, vblank); | 298 | ret = reg_write(icd, MT9M001_VERTICAL_BLANKING, vblank); |
299 | 299 | ||
300 | /* The caller provides a supported format, as verified per | 300 | /* The caller provides a supported format, as verified per |
301 | * call to icd->try_fmt_cap() */ | 301 | * call to icd->try_fmt() */ |
302 | if (!ret) | 302 | if (!ret) |
303 | ret = reg_write(icd, MT9M001_COLUMN_START, rect->left); | 303 | ret = reg_write(icd, MT9M001_COLUMN_START, rect->left); |
304 | if (!ret) | 304 | if (!ret) |
@@ -325,8 +325,8 @@ static int mt9m001_set_fmt_cap(struct soc_camera_device *icd, | |||
325 | return ret; | 325 | return ret; |
326 | } | 326 | } |
327 | 327 | ||
328 | static int mt9m001_try_fmt_cap(struct soc_camera_device *icd, | 328 | static int mt9m001_try_fmt(struct soc_camera_device *icd, |
329 | struct v4l2_format *f) | 329 | struct v4l2_format *f) |
330 | { | 330 | { |
331 | if (f->fmt.pix.height < 32 + icd->y_skip_top) | 331 | if (f->fmt.pix.height < 32 + icd->y_skip_top) |
332 | f->fmt.pix.height = 32 + icd->y_skip_top; | 332 | f->fmt.pix.height = 32 + icd->y_skip_top; |
@@ -447,8 +447,8 @@ static struct soc_camera_ops mt9m001_ops = { | |||
447 | .release = mt9m001_release, | 447 | .release = mt9m001_release, |
448 | .start_capture = mt9m001_start_capture, | 448 | .start_capture = mt9m001_start_capture, |
449 | .stop_capture = mt9m001_stop_capture, | 449 | .stop_capture = mt9m001_stop_capture, |
450 | .set_fmt_cap = mt9m001_set_fmt_cap, | 450 | .set_fmt = mt9m001_set_fmt, |
451 | .try_fmt_cap = mt9m001_try_fmt_cap, | 451 | .try_fmt = mt9m001_try_fmt, |
452 | .set_bus_param = mt9m001_set_bus_param, | 452 | .set_bus_param = mt9m001_set_bus_param, |
453 | .query_bus_param = mt9m001_query_bus_param, | 453 | .query_bus_param = mt9m001_query_bus_param, |
454 | .controls = mt9m001_controls, | 454 | .controls = mt9m001_controls, |
diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c index da0b2d553fd0..63c52c0b3e72 100644 --- a/drivers/media/video/mt9m111.c +++ b/drivers/media/video/mt9m111.c | |||
@@ -452,8 +452,8 @@ static int mt9m111_set_pixfmt(struct soc_camera_device *icd, u32 pixfmt) | |||
452 | return ret; | 452 | return ret; |
453 | } | 453 | } |
454 | 454 | ||
455 | static int mt9m111_set_fmt_cap(struct soc_camera_device *icd, | 455 | static int mt9m111_set_fmt(struct soc_camera_device *icd, |
456 | __u32 pixfmt, struct v4l2_rect *rect) | 456 | __u32 pixfmt, struct v4l2_rect *rect) |
457 | { | 457 | { |
458 | struct mt9m111 *mt9m111 = container_of(icd, struct mt9m111, icd); | 458 | struct mt9m111 *mt9m111 = container_of(icd, struct mt9m111, icd); |
459 | int ret; | 459 | int ret; |
@@ -473,8 +473,8 @@ static int mt9m111_set_fmt_cap(struct soc_camera_device *icd, | |||
473 | return ret; | 473 | return ret; |
474 | } | 474 | } |
475 | 475 | ||
476 | static int mt9m111_try_fmt_cap(struct soc_camera_device *icd, | 476 | static int mt9m111_try_fmt(struct soc_camera_device *icd, |
477 | struct v4l2_format *f) | 477 | struct v4l2_format *f) |
478 | { | 478 | { |
479 | if (f->fmt.pix.height > MT9M111_MAX_HEIGHT) | 479 | if (f->fmt.pix.height > MT9M111_MAX_HEIGHT) |
480 | f->fmt.pix.height = MT9M111_MAX_HEIGHT; | 480 | f->fmt.pix.height = MT9M111_MAX_HEIGHT; |
@@ -597,8 +597,8 @@ static struct soc_camera_ops mt9m111_ops = { | |||
597 | .release = mt9m111_release, | 597 | .release = mt9m111_release, |
598 | .start_capture = mt9m111_start_capture, | 598 | .start_capture = mt9m111_start_capture, |
599 | .stop_capture = mt9m111_stop_capture, | 599 | .stop_capture = mt9m111_stop_capture, |
600 | .set_fmt_cap = mt9m111_set_fmt_cap, | 600 | .set_fmt = mt9m111_set_fmt, |
601 | .try_fmt_cap = mt9m111_try_fmt_cap, | 601 | .try_fmt = mt9m111_try_fmt, |
602 | .query_bus_param = mt9m111_query_bus_param, | 602 | .query_bus_param = mt9m111_query_bus_param, |
603 | .set_bus_param = mt9m111_set_bus_param, | 603 | .set_bus_param = mt9m111_set_bus_param, |
604 | .controls = mt9m111_controls, | 604 | .controls = mt9m111_controls, |
diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c index 2584201059d8..3a39f0288599 100644 --- a/drivers/media/video/mt9v022.c +++ b/drivers/media/video/mt9v022.c | |||
@@ -337,14 +337,14 @@ static unsigned long mt9v022_query_bus_param(struct soc_camera_device *icd) | |||
337 | width_flag; | 337 | width_flag; |
338 | } | 338 | } |
339 | 339 | ||
340 | static int mt9v022_set_fmt_cap(struct soc_camera_device *icd, | 340 | static int mt9v022_set_fmt(struct soc_camera_device *icd, |
341 | __u32 pixfmt, struct v4l2_rect *rect) | 341 | __u32 pixfmt, struct v4l2_rect *rect) |
342 | { | 342 | { |
343 | struct mt9v022 *mt9v022 = container_of(icd, struct mt9v022, icd); | 343 | struct mt9v022 *mt9v022 = container_of(icd, struct mt9v022, icd); |
344 | int ret; | 344 | int ret; |
345 | 345 | ||
346 | /* The caller provides a supported format, as verified per call to | 346 | /* The caller provides a supported format, as verified per call to |
347 | * icd->try_fmt_cap(), datawidth is from our supported format list */ | 347 | * icd->try_fmt(), datawidth is from our supported format list */ |
348 | switch (pixfmt) { | 348 | switch (pixfmt) { |
349 | case V4L2_PIX_FMT_GREY: | 349 | case V4L2_PIX_FMT_GREY: |
350 | case V4L2_PIX_FMT_Y16: | 350 | case V4L2_PIX_FMT_Y16: |
@@ -400,8 +400,8 @@ static int mt9v022_set_fmt_cap(struct soc_camera_device *icd, | |||
400 | return 0; | 400 | return 0; |
401 | } | 401 | } |
402 | 402 | ||
403 | static int mt9v022_try_fmt_cap(struct soc_camera_device *icd, | 403 | static int mt9v022_try_fmt(struct soc_camera_device *icd, |
404 | struct v4l2_format *f) | 404 | struct v4l2_format *f) |
405 | { | 405 | { |
406 | if (f->fmt.pix.height < 32 + icd->y_skip_top) | 406 | if (f->fmt.pix.height < 32 + icd->y_skip_top) |
407 | f->fmt.pix.height = 32 + icd->y_skip_top; | 407 | f->fmt.pix.height = 32 + icd->y_skip_top; |
@@ -538,8 +538,8 @@ static struct soc_camera_ops mt9v022_ops = { | |||
538 | .release = mt9v022_release, | 538 | .release = mt9v022_release, |
539 | .start_capture = mt9v022_start_capture, | 539 | .start_capture = mt9v022_start_capture, |
540 | .stop_capture = mt9v022_stop_capture, | 540 | .stop_capture = mt9v022_stop_capture, |
541 | .set_fmt_cap = mt9v022_set_fmt_cap, | 541 | .set_fmt = mt9v022_set_fmt, |
542 | .try_fmt_cap = mt9v022_try_fmt_cap, | 542 | .try_fmt = mt9v022_try_fmt, |
543 | .set_bus_param = mt9v022_set_bus_param, | 543 | .set_bus_param = mt9v022_set_bus_param, |
544 | .query_bus_param = mt9v022_query_bus_param, | 544 | .query_bus_param = mt9v022_query_bus_param, |
545 | .controls = mt9v022_controls, | 545 | .controls = mt9v022_controls, |
diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c index 96964b79afac..76f296642db6 100644 --- a/drivers/media/video/ov772x.c +++ b/drivers/media/video/ov772x.c | |||
@@ -755,9 +755,9 @@ static int ov772x_set_register(struct soc_camera_device *icd, | |||
755 | } | 755 | } |
756 | #endif | 756 | #endif |
757 | 757 | ||
758 | static int ov772x_set_fmt_cap(struct soc_camera_device *icd, | 758 | static int ov772x_set_fmt(struct soc_camera_device *icd, |
759 | __u32 pixfmt, | 759 | __u32 pixfmt, |
760 | struct v4l2_rect *rect) | 760 | struct v4l2_rect *rect) |
761 | { | 761 | { |
762 | struct ov772x_priv *priv = container_of(icd, struct ov772x_priv, icd); | 762 | struct ov772x_priv *priv = container_of(icd, struct ov772x_priv, icd); |
763 | int ret = -EINVAL; | 763 | int ret = -EINVAL; |
@@ -778,8 +778,8 @@ static int ov772x_set_fmt_cap(struct soc_camera_device *icd, | |||
778 | return ret; | 778 | return ret; |
779 | } | 779 | } |
780 | 780 | ||
781 | static int ov772x_try_fmt_cap(struct soc_camera_device *icd, | 781 | static int ov772x_try_fmt(struct soc_camera_device *icd, |
782 | struct v4l2_format *f) | 782 | struct v4l2_format *f) |
783 | { | 783 | { |
784 | struct v4l2_pix_format *pix = &f->fmt.pix; | 784 | struct v4l2_pix_format *pix = &f->fmt.pix; |
785 | struct ov772x_priv *priv; | 785 | struct ov772x_priv *priv; |
@@ -868,8 +868,8 @@ static struct soc_camera_ops ov772x_ops = { | |||
868 | .release = ov772x_release, | 868 | .release = ov772x_release, |
869 | .start_capture = ov772x_start_capture, | 869 | .start_capture = ov772x_start_capture, |
870 | .stop_capture = ov772x_stop_capture, | 870 | .stop_capture = ov772x_stop_capture, |
871 | .set_fmt_cap = ov772x_set_fmt_cap, | 871 | .set_fmt = ov772x_set_fmt, |
872 | .try_fmt_cap = ov772x_try_fmt_cap, | 872 | .try_fmt = ov772x_try_fmt, |
873 | .set_bus_param = ov772x_set_bus_param, | 873 | .set_bus_param = ov772x_set_bus_param, |
874 | .query_bus_param = ov772x_query_bus_param, | 874 | .query_bus_param = ov772x_query_bus_param, |
875 | .get_chip_id = ov772x_get_chip_id, | 875 | .get_chip_id = ov772x_get_chip_id, |
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index a375872b1342..665eef236f5b 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -904,8 +904,8 @@ static int pxa_camera_try_bus_param(struct soc_camera_device *icd, __u32 pixfmt) | |||
904 | return soc_camera_bus_param_compatible(camera_flags, bus_flags) ? 0 : -EINVAL; | 904 | return soc_camera_bus_param_compatible(camera_flags, bus_flags) ? 0 : -EINVAL; |
905 | } | 905 | } |
906 | 906 | ||
907 | static int pxa_camera_set_fmt_cap(struct soc_camera_device *icd, | 907 | static int pxa_camera_set_fmt(struct soc_camera_device *icd, |
908 | __u32 pixfmt, struct v4l2_rect *rect) | 908 | __u32 pixfmt, struct v4l2_rect *rect) |
909 | { | 909 | { |
910 | const struct soc_camera_data_format *cam_fmt; | 910 | const struct soc_camera_data_format *cam_fmt; |
911 | int ret; | 911 | int ret; |
@@ -920,15 +920,15 @@ static int pxa_camera_set_fmt_cap(struct soc_camera_device *icd, | |||
920 | return -EINVAL; | 920 | return -EINVAL; |
921 | } | 921 | } |
922 | 922 | ||
923 | ret = icd->ops->set_fmt_cap(icd, pixfmt, rect); | 923 | ret = icd->ops->set_fmt(icd, pixfmt, rect); |
924 | if (pixfmt && !ret) | 924 | if (pixfmt && !ret) |
925 | icd->current_fmt = cam_fmt; | 925 | icd->current_fmt = cam_fmt; |
926 | 926 | ||
927 | return ret; | 927 | return ret; |
928 | } | 928 | } |
929 | 929 | ||
930 | static int pxa_camera_try_fmt_cap(struct soc_camera_device *icd, | 930 | static int pxa_camera_try_fmt(struct soc_camera_device *icd, |
931 | struct v4l2_format *f) | 931 | struct v4l2_format *f) |
932 | { | 932 | { |
933 | const struct soc_camera_data_format *cam_fmt; | 933 | const struct soc_camera_data_format *cam_fmt; |
934 | int ret = pxa_camera_try_bus_param(icd, f->fmt.pix.pixelformat); | 934 | int ret = pxa_camera_try_bus_param(icd, f->fmt.pix.pixelformat); |
@@ -960,7 +960,7 @@ static int pxa_camera_try_fmt_cap(struct soc_camera_device *icd, | |||
960 | f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline; | 960 | f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline; |
961 | 961 | ||
962 | /* limit to sensor capabilities */ | 962 | /* limit to sensor capabilities */ |
963 | return icd->ops->try_fmt_cap(icd, f); | 963 | return icd->ops->try_fmt(icd, f); |
964 | } | 964 | } |
965 | 965 | ||
966 | static int pxa_camera_reqbufs(struct soc_camera_file *icf, | 966 | static int pxa_camera_reqbufs(struct soc_camera_file *icf, |
@@ -1068,8 +1068,8 @@ static struct soc_camera_host_ops pxa_soc_camera_host_ops = { | |||
1068 | .remove = pxa_camera_remove_device, | 1068 | .remove = pxa_camera_remove_device, |
1069 | .suspend = pxa_camera_suspend, | 1069 | .suspend = pxa_camera_suspend, |
1070 | .resume = pxa_camera_resume, | 1070 | .resume = pxa_camera_resume, |
1071 | .set_fmt_cap = pxa_camera_set_fmt_cap, | 1071 | .set_fmt = pxa_camera_set_fmt, |
1072 | .try_fmt_cap = pxa_camera_try_fmt_cap, | 1072 | .try_fmt = pxa_camera_try_fmt, |
1073 | .init_videobuf = pxa_camera_init_videobuf, | 1073 | .init_videobuf = pxa_camera_init_videobuf, |
1074 | .reqbufs = pxa_camera_reqbufs, | 1074 | .reqbufs = pxa_camera_reqbufs, |
1075 | .poll = pxa_camera_poll, | 1075 | .poll = pxa_camera_poll, |
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 02f846d1908b..d284d5d1dd01 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c | |||
@@ -450,8 +450,8 @@ static int sh_mobile_ceu_try_bus_param(struct soc_camera_device *icd, | |||
450 | return 0; | 450 | return 0; |
451 | } | 451 | } |
452 | 452 | ||
453 | static int sh_mobile_ceu_set_fmt_cap(struct soc_camera_device *icd, | 453 | static int sh_mobile_ceu_set_fmt(struct soc_camera_device *icd, |
454 | __u32 pixfmt, struct v4l2_rect *rect) | 454 | __u32 pixfmt, struct v4l2_rect *rect) |
455 | { | 455 | { |
456 | const struct soc_camera_data_format *cam_fmt; | 456 | const struct soc_camera_data_format *cam_fmt; |
457 | int ret; | 457 | int ret; |
@@ -466,15 +466,15 @@ static int sh_mobile_ceu_set_fmt_cap(struct soc_camera_device *icd, | |||
466 | return -EINVAL; | 466 | return -EINVAL; |
467 | } | 467 | } |
468 | 468 | ||
469 | ret = icd->ops->set_fmt_cap(icd, pixfmt, rect); | 469 | ret = icd->ops->set_fmt(icd, pixfmt, rect); |
470 | if (pixfmt && !ret) | 470 | if (pixfmt && !ret) |
471 | icd->current_fmt = cam_fmt; | 471 | icd->current_fmt = cam_fmt; |
472 | 472 | ||
473 | return ret; | 473 | return ret; |
474 | } | 474 | } |
475 | 475 | ||
476 | static int sh_mobile_ceu_try_fmt_cap(struct soc_camera_device *icd, | 476 | static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd, |
477 | struct v4l2_format *f) | 477 | struct v4l2_format *f) |
478 | { | 478 | { |
479 | const struct soc_camera_data_format *cam_fmt; | 479 | const struct soc_camera_data_format *cam_fmt; |
480 | int ret = sh_mobile_ceu_try_bus_param(icd, f->fmt.pix.pixelformat); | 480 | int ret = sh_mobile_ceu_try_bus_param(icd, f->fmt.pix.pixelformat); |
@@ -508,7 +508,7 @@ static int sh_mobile_ceu_try_fmt_cap(struct soc_camera_device *icd, | |||
508 | f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline; | 508 | f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline; |
509 | 509 | ||
510 | /* limit to sensor capabilities */ | 510 | /* limit to sensor capabilities */ |
511 | return icd->ops->try_fmt_cap(icd, f); | 511 | return icd->ops->try_fmt(icd, f); |
512 | } | 512 | } |
513 | 513 | ||
514 | static int sh_mobile_ceu_reqbufs(struct soc_camera_file *icf, | 514 | static int sh_mobile_ceu_reqbufs(struct soc_camera_file *icf, |
@@ -576,8 +576,8 @@ static struct soc_camera_host_ops sh_mobile_ceu_host_ops = { | |||
576 | .owner = THIS_MODULE, | 576 | .owner = THIS_MODULE, |
577 | .add = sh_mobile_ceu_add_device, | 577 | .add = sh_mobile_ceu_add_device, |
578 | .remove = sh_mobile_ceu_remove_device, | 578 | .remove = sh_mobile_ceu_remove_device, |
579 | .set_fmt_cap = sh_mobile_ceu_set_fmt_cap, | 579 | .set_fmt = sh_mobile_ceu_set_fmt, |
580 | .try_fmt_cap = sh_mobile_ceu_try_fmt_cap, | 580 | .try_fmt = sh_mobile_ceu_try_fmt, |
581 | .reqbufs = sh_mobile_ceu_reqbufs, | 581 | .reqbufs = sh_mobile_ceu_reqbufs, |
582 | .poll = sh_mobile_ceu_poll, | 582 | .poll = sh_mobile_ceu_poll, |
583 | .querycap = sh_mobile_ceu_querycap, | 583 | .querycap = sh_mobile_ceu_querycap, |
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c index 01c33841d1c6..9db66a4fd1a3 100644 --- a/drivers/media/video/soc_camera.c +++ b/drivers/media/video/soc_camera.c | |||
@@ -73,7 +73,7 @@ static int soc_camera_try_fmt_vid_cap(struct file *file, void *priv, | |||
73 | } | 73 | } |
74 | 74 | ||
75 | /* limit format to hardware capabilities */ | 75 | /* limit format to hardware capabilities */ |
76 | ret = ici->ops->try_fmt_cap(icd, f); | 76 | ret = ici->ops->try_fmt(icd, f); |
77 | 77 | ||
78 | return ret; | 78 | return ret; |
79 | } | 79 | } |
@@ -324,7 +324,7 @@ static int soc_camera_s_fmt_vid_cap(struct file *file, void *priv, | |||
324 | rect.top = icd->y_current; | 324 | rect.top = icd->y_current; |
325 | rect.width = f->fmt.pix.width; | 325 | rect.width = f->fmt.pix.width; |
326 | rect.height = f->fmt.pix.height; | 326 | rect.height = f->fmt.pix.height; |
327 | ret = ici->ops->set_fmt_cap(icd, f->fmt.pix.pixelformat, &rect); | 327 | ret = ici->ops->set_fmt(icd, f->fmt.pix.pixelformat, &rect); |
328 | if (ret < 0) { | 328 | if (ret < 0) { |
329 | return ret; | 329 | return ret; |
330 | } else if (!icd->current_fmt || | 330 | } else if (!icd->current_fmt || |
@@ -553,7 +553,7 @@ static int soc_camera_s_crop(struct file *file, void *fh, | |||
553 | if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) | 553 | if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) |
554 | return -EINVAL; | 554 | return -EINVAL; |
555 | 555 | ||
556 | ret = ici->ops->set_fmt_cap(icd, 0, &a->c); | 556 | ret = ici->ops->set_fmt(icd, 0, &a->c); |
557 | if (!ret) { | 557 | if (!ret) { |
558 | icd->width = a->c.width; | 558 | icd->width = a->c.width; |
559 | icd->height = a->c.height; | 559 | icd->height = a->c.height; |
diff --git a/drivers/media/video/soc_camera_platform.c b/drivers/media/video/soc_camera_platform.c index bb7a9d480e8f..c23871e4c1e6 100644 --- a/drivers/media/video/soc_camera_platform.c +++ b/drivers/media/video/soc_camera_platform.c | |||
@@ -79,14 +79,14 @@ soc_camera_platform_query_bus_param(struct soc_camera_device *icd) | |||
79 | return p->bus_param; | 79 | return p->bus_param; |
80 | } | 80 | } |
81 | 81 | ||
82 | static int soc_camera_platform_set_fmt_cap(struct soc_camera_device *icd, | 82 | static int soc_camera_platform_set_fmt(struct soc_camera_device *icd, |
83 | __u32 pixfmt, struct v4l2_rect *rect) | 83 | __u32 pixfmt, struct v4l2_rect *rect) |
84 | { | 84 | { |
85 | return 0; | 85 | return 0; |
86 | } | 86 | } |
87 | 87 | ||
88 | static int soc_camera_platform_try_fmt_cap(struct soc_camera_device *icd, | 88 | static int soc_camera_platform_try_fmt(struct soc_camera_device *icd, |
89 | struct v4l2_format *f) | 89 | struct v4l2_format *f) |
90 | { | 90 | { |
91 | struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd); | 91 | struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd); |
92 | 92 | ||
@@ -124,8 +124,8 @@ static struct soc_camera_ops soc_camera_platform_ops = { | |||
124 | .release = soc_camera_platform_release, | 124 | .release = soc_camera_platform_release, |
125 | .start_capture = soc_camera_platform_start_capture, | 125 | .start_capture = soc_camera_platform_start_capture, |
126 | .stop_capture = soc_camera_platform_stop_capture, | 126 | .stop_capture = soc_camera_platform_stop_capture, |
127 | .set_fmt_cap = soc_camera_platform_set_fmt_cap, | 127 | .set_fmt = soc_camera_platform_set_fmt, |
128 | .try_fmt_cap = soc_camera_platform_try_fmt_cap, | 128 | .try_fmt = soc_camera_platform_try_fmt, |
129 | .set_bus_param = soc_camera_platform_set_bus_param, | 129 | .set_bus_param = soc_camera_platform_set_bus_param, |
130 | .query_bus_param = soc_camera_platform_query_bus_param, | 130 | .query_bus_param = soc_camera_platform_query_bus_param, |
131 | }; | 131 | }; |
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index 8e8fcb75dacb..b14f6ddc9e18 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h | |||
@@ -66,9 +66,8 @@ struct soc_camera_host_ops { | |||
66 | void (*remove)(struct soc_camera_device *); | 66 | void (*remove)(struct soc_camera_device *); |
67 | int (*suspend)(struct soc_camera_device *, pm_message_t state); | 67 | int (*suspend)(struct soc_camera_device *, pm_message_t state); |
68 | int (*resume)(struct soc_camera_device *); | 68 | int (*resume)(struct soc_camera_device *); |
69 | int (*set_fmt_cap)(struct soc_camera_device *, __u32, | 69 | int (*set_fmt)(struct soc_camera_device *, __u32, struct v4l2_rect *); |
70 | struct v4l2_rect *); | 70 | int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *); |
71 | int (*try_fmt_cap)(struct soc_camera_device *, struct v4l2_format *); | ||
72 | void (*init_videobuf)(struct videobuf_queue *, | 71 | void (*init_videobuf)(struct videobuf_queue *, |
73 | struct soc_camera_device *); | 72 | struct soc_camera_device *); |
74 | int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *); | 73 | int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *); |
@@ -125,9 +124,8 @@ struct soc_camera_ops { | |||
125 | int (*release)(struct soc_camera_device *); | 124 | int (*release)(struct soc_camera_device *); |
126 | int (*start_capture)(struct soc_camera_device *); | 125 | int (*start_capture)(struct soc_camera_device *); |
127 | int (*stop_capture)(struct soc_camera_device *); | 126 | int (*stop_capture)(struct soc_camera_device *); |
128 | int (*set_fmt_cap)(struct soc_camera_device *, __u32, | 127 | int (*set_fmt)(struct soc_camera_device *, __u32, struct v4l2_rect *); |
129 | struct v4l2_rect *); | 128 | int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *); |
130 | int (*try_fmt_cap)(struct soc_camera_device *, struct v4l2_format *); | ||
131 | unsigned long (*query_bus_param)(struct soc_camera_device *); | 129 | unsigned long (*query_bus_param)(struct soc_camera_device *); |
132 | int (*set_bus_param)(struct soc_camera_device *, unsigned long); | 130 | int (*set_bus_param)(struct soc_camera_device *, unsigned long); |
133 | int (*get_chip_id)(struct soc_camera_device *, | 131 | int (*get_chip_id)(struct soc_camera_device *, |