diff options
Diffstat (limited to 'drivers/media/platform/exynos4-is/mipi-csis.c')
-rw-r--r-- | drivers/media/platform/exynos4-is/mipi-csis.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c index 2504aa89a6f4..d74e1bec3d86 100644 --- a/drivers/media/platform/exynos4-is/mipi-csis.c +++ b/drivers/media/platform/exynos4-is/mipi-csis.c | |||
@@ -540,7 +540,7 @@ unlock: | |||
540 | } | 540 | } |
541 | 541 | ||
542 | static int s5pcsis_enum_mbus_code(struct v4l2_subdev *sd, | 542 | static int s5pcsis_enum_mbus_code(struct v4l2_subdev *sd, |
543 | struct v4l2_subdev_fh *fh, | 543 | struct v4l2_subdev_pad_config *cfg, |
544 | struct v4l2_subdev_mbus_code_enum *code) | 544 | struct v4l2_subdev_mbus_code_enum *code) |
545 | { | 545 | { |
546 | if (code->index >= ARRAY_SIZE(s5pcsis_formats)) | 546 | if (code->index >= ARRAY_SIZE(s5pcsis_formats)) |
@@ -568,23 +568,23 @@ static struct csis_pix_format const *s5pcsis_try_format( | |||
568 | } | 568 | } |
569 | 569 | ||
570 | static struct v4l2_mbus_framefmt *__s5pcsis_get_format( | 570 | static struct v4l2_mbus_framefmt *__s5pcsis_get_format( |
571 | struct csis_state *state, struct v4l2_subdev_fh *fh, | 571 | struct csis_state *state, struct v4l2_subdev_pad_config *cfg, |
572 | enum v4l2_subdev_format_whence which) | 572 | enum v4l2_subdev_format_whence which) |
573 | { | 573 | { |
574 | if (which == V4L2_SUBDEV_FORMAT_TRY) | 574 | if (which == V4L2_SUBDEV_FORMAT_TRY) |
575 | return fh ? v4l2_subdev_get_try_format(fh, 0) : NULL; | 575 | return cfg ? v4l2_subdev_get_try_format(&state->sd, cfg, 0) : NULL; |
576 | 576 | ||
577 | return &state->format; | 577 | return &state->format; |
578 | } | 578 | } |
579 | 579 | ||
580 | static int s5pcsis_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, | 580 | static int s5pcsis_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, |
581 | struct v4l2_subdev_format *fmt) | 581 | struct v4l2_subdev_format *fmt) |
582 | { | 582 | { |
583 | struct csis_state *state = sd_to_csis_state(sd); | 583 | struct csis_state *state = sd_to_csis_state(sd); |
584 | struct csis_pix_format const *csis_fmt; | 584 | struct csis_pix_format const *csis_fmt; |
585 | struct v4l2_mbus_framefmt *mf; | 585 | struct v4l2_mbus_framefmt *mf; |
586 | 586 | ||
587 | mf = __s5pcsis_get_format(state, fh, fmt->which); | 587 | mf = __s5pcsis_get_format(state, cfg, fmt->which); |
588 | 588 | ||
589 | if (fmt->pad == CSIS_PAD_SOURCE) { | 589 | if (fmt->pad == CSIS_PAD_SOURCE) { |
590 | if (mf) { | 590 | if (mf) { |
@@ -605,13 +605,13 @@ static int s5pcsis_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, | |||
605 | return 0; | 605 | return 0; |
606 | } | 606 | } |
607 | 607 | ||
608 | static int s5pcsis_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, | 608 | static int s5pcsis_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, |
609 | struct v4l2_subdev_format *fmt) | 609 | struct v4l2_subdev_format *fmt) |
610 | { | 610 | { |
611 | struct csis_state *state = sd_to_csis_state(sd); | 611 | struct csis_state *state = sd_to_csis_state(sd); |
612 | struct v4l2_mbus_framefmt *mf; | 612 | struct v4l2_mbus_framefmt *mf; |
613 | 613 | ||
614 | mf = __s5pcsis_get_format(state, fh, fmt->which); | 614 | mf = __s5pcsis_get_format(state, cfg, fmt->which); |
615 | if (!mf) | 615 | if (!mf) |
616 | return -EINVAL; | 616 | return -EINVAL; |
617 | 617 | ||
@@ -651,7 +651,7 @@ static int s5pcsis_log_status(struct v4l2_subdev *sd) | |||
651 | 651 | ||
652 | static int s5pcsis_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) | 652 | static int s5pcsis_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) |
653 | { | 653 | { |
654 | struct v4l2_mbus_framefmt *format = v4l2_subdev_get_try_format(fh, 0); | 654 | struct v4l2_mbus_framefmt *format = v4l2_subdev_get_try_format(sd, fh->pad, 0); |
655 | 655 | ||
656 | format->colorspace = V4L2_COLORSPACE_JPEG; | 656 | format->colorspace = V4L2_COLORSPACE_JPEG; |
657 | format->code = s5pcsis_formats[0].code; | 657 | format->code = s5pcsis_formats[0].code; |