Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306127
b: refs/heads/master
c: 5e6ff7c
h: refs/heads/master
i:
  306125: 1b59782
  306123: b2800be
  306119: 6f57cde
  306111: a355205
v: v3
  • Loading branch information
Sakari Ailus authored and Mauro Carvalho Chehab committed Apr 10, 2012
1 parent dbe81df commit f55fb22
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c5a766ceb497078459115fcbd1412917083aa4a5
refs/heads/master: 5e6ff7c17bf468b8bc012e49174771e5f718e72c
30 changes: 13 additions & 17 deletions trunk/include/media/v4l2-subdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -565,23 +565,19 @@ struct v4l2_subdev_fh {
container_of(fh, struct v4l2_subdev_fh, vfh)

#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)
static inline struct v4l2_mbus_framefmt *
v4l2_subdev_get_try_format(struct v4l2_subdev_fh *fh, unsigned int pad)
{
return &fh->pad[pad].try_fmt;
}

static inline struct v4l2_rect *
v4l2_subdev_get_try_crop(struct v4l2_subdev_fh *fh, unsigned int pad)
{
return &fh->pad[pad].try_crop;
}

static inline struct v4l2_rect *
v4l2_subdev_get_try_compose(struct v4l2_subdev_fh *fh, unsigned int pad)
{
return &fh->pad[pad].try_compose;
}
#define __V4L2_SUBDEV_MK_GET_TRY(rtype, fun_name, field_name) \
static inline struct rtype * \
v4l2_subdev_get_try_##fun_name(struct v4l2_subdev_fh *fh, \
unsigned int pad) \
{ \
BUG_ON(unlikely(pad >= vdev_to_v4l2_subdev( \
fh->vfh.vdev)->entity.num_pads)); \
return &fh->pad[pad].field_name; \
}

__V4L2_SUBDEV_MK_GET_TRY(v4l2_mbus_framefmt, format, try_fmt)
__V4L2_SUBDEV_MK_GET_TRY(v4l2_rect, crop, try_compose)
__V4L2_SUBDEV_MK_GET_TRY(v4l2_rect, compose, try_compose)
#endif

extern const struct v4l2_file_operations v4l2_subdev_fops;
Expand Down

0 comments on commit f55fb22

Please sign in to comment.