diff options
author | Sakari Ailus <sakari.ailus@iki.fi> | 2014-04-12 16:23:54 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-04-16 20:07:43 +0200 |
commit | 9c4c449917f98b6c7d87947fab72028f2946ded2 (patch) | |
tree | 061d264e2825c8d2369cb032a65b91ecb9344446 | |
parent | 37aa7537eedea07bc68d28b672fdc6803547f27a (diff) |
Provide functions for setting the buffer type and checking its validity
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
-rw-r--r-- | yavta.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -220,6 +220,16 @@ static const char *v4l2_format_name(unsigned int fourcc) return name; } +static void video_set_buf_type(struct device *dev, enum v4l2_buf_type type) +{ + dev->type = type; +} + +static bool video_has_valid_buf_type(struct device *dev) +{ + return (int)dev->type != -1; +} + static void video_init(struct device *dev) { memset(dev, 0, sizeof *dev); |