diff options
author | Sakari Ailus <sakari.ailus@iki.fi> | 2012-05-18 08:31:18 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-07-06 19:15:48 -0400 |
commit | 5689b28890f4a7c4e12290dbf2c29a9d23047335 (patch) | |
tree | a7df462fdb85c8d59dd1713a184a9d3f39e53e7e /drivers/media/video/s5p-fimc/fimc-capture.c | |
parent | 1ec0ed083988ae433305d7f4158fda8c3a1a23b9 (diff) |
[media] v4l: Unify selection targets across V4L2 and V4L2 subdev interfaces
Change the users of V4L2_SUBDEV_SEL_TGT_* targets to use V4L2_SEL_TGT_*
instead. The common definitions are moved to a new header file,
include/linux/v4l2-common.h.
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/s5p-fimc/fimc-capture.c')
-rw-r--r-- | drivers/media/video/s5p-fimc/fimc-capture.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index a3cd78d33913..521e3715b9ee 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c | |||
@@ -1429,9 +1429,9 @@ static int fimc_subdev_get_selection(struct v4l2_subdev *sd, | |||
1429 | mutex_lock(&fimc->lock); | 1429 | mutex_lock(&fimc->lock); |
1430 | 1430 | ||
1431 | switch (sel->target) { | 1431 | switch (sel->target) { |
1432 | case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS: | 1432 | case V4L2_SEL_TGT_COMPOSE_BOUNDS: |
1433 | f = &ctx->d_frame; | 1433 | f = &ctx->d_frame; |
1434 | case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS: | 1434 | case V4L2_SEL_TGT_CROP_BOUNDS: |
1435 | r->width = f->o_width; | 1435 | r->width = f->o_width; |
1436 | r->height = f->o_height; | 1436 | r->height = f->o_height; |
1437 | r->left = 0; | 1437 | r->left = 0; |
@@ -1439,10 +1439,10 @@ static int fimc_subdev_get_selection(struct v4l2_subdev *sd, | |||
1439 | mutex_unlock(&fimc->lock); | 1439 | mutex_unlock(&fimc->lock); |
1440 | return 0; | 1440 | return 0; |
1441 | 1441 | ||
1442 | case V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL: | 1442 | case V4L2_SEL_TGT_CROP: |
1443 | try_sel = v4l2_subdev_get_try_crop(fh, sel->pad); | 1443 | try_sel = v4l2_subdev_get_try_crop(fh, sel->pad); |
1444 | break; | 1444 | break; |
1445 | case V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL: | 1445 | case V4L2_SEL_TGT_COMPOSE: |
1446 | try_sel = v4l2_subdev_get_try_compose(fh, sel->pad); | 1446 | try_sel = v4l2_subdev_get_try_compose(fh, sel->pad); |
1447 | f = &ctx->d_frame; | 1447 | f = &ctx->d_frame; |
1448 | break; | 1448 | break; |
@@ -1486,9 +1486,9 @@ static int fimc_subdev_set_selection(struct v4l2_subdev *sd, | |||
1486 | fimc_capture_try_selection(ctx, r, V4L2_SEL_TGT_CROP); | 1486 | fimc_capture_try_selection(ctx, r, V4L2_SEL_TGT_CROP); |
1487 | 1487 | ||
1488 | switch (sel->target) { | 1488 | switch (sel->target) { |
1489 | case V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS: | 1489 | case V4L2_SEL_TGT_COMPOSE_BOUNDS: |
1490 | f = &ctx->d_frame; | 1490 | f = &ctx->d_frame; |
1491 | case V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS: | 1491 | case V4L2_SEL_TGT_CROP_BOUNDS: |
1492 | r->width = f->o_width; | 1492 | r->width = f->o_width; |
1493 | r->height = f->o_height; | 1493 | r->height = f->o_height; |
1494 | r->left = 0; | 1494 | r->left = 0; |
@@ -1496,10 +1496,10 @@ static int fimc_subdev_set_selection(struct v4l2_subdev *sd, | |||
1496 | mutex_unlock(&fimc->lock); | 1496 | mutex_unlock(&fimc->lock); |
1497 | return 0; | 1497 | return 0; |
1498 | 1498 | ||
1499 | case V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL: | 1499 | case V4L2_SEL_TGT_CROP: |
1500 | try_sel = v4l2_subdev_get_try_crop(fh, sel->pad); | 1500 | try_sel = v4l2_subdev_get_try_crop(fh, sel->pad); |
1501 | break; | 1501 | break; |
1502 | case V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL: | 1502 | case V4L2_SEL_TGT_COMPOSE: |
1503 | try_sel = v4l2_subdev_get_try_compose(fh, sel->pad); | 1503 | try_sel = v4l2_subdev_get_try_compose(fh, sel->pad); |
1504 | f = &ctx->d_frame; | 1504 | f = &ctx->d_frame; |
1505 | break; | 1505 | break; |
@@ -1515,7 +1515,7 @@ static int fimc_subdev_set_selection(struct v4l2_subdev *sd, | |||
1515 | set_frame_crop(f, r->left, r->top, r->width, r->height); | 1515 | set_frame_crop(f, r->left, r->top, r->width, r->height); |
1516 | set_bit(ST_CAPT_APPLY_CFG, &fimc->state); | 1516 | set_bit(ST_CAPT_APPLY_CFG, &fimc->state); |
1517 | spin_unlock_irqrestore(&fimc->slock, flags); | 1517 | spin_unlock_irqrestore(&fimc->slock, flags); |
1518 | if (sel->target == V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL) | 1518 | if (sel->target == V4L2_SEL_TGT_COMPOSE) |
1519 | ctx->state |= FIMC_COMPOSE; | 1519 | ctx->state |= FIMC_COMPOSE; |
1520 | } | 1520 | } |
1521 | 1521 | ||