diff options
author | Todor Tomov <ttomov@mm-sol.com> | 2011-01-25 17:46:44 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-02-07 15:37:55 +0100 |
commit | 1305b42c68587e5e96b662bc8694a3f821e51e0d (patch) | |
tree | f97586bfe452a493c0f7af9ce63b0a9fb717cdb1 /subdev.c | |
parent | 6f30903cd6aeda5d61b3fa2a0e2e11e7bfb50c1e (diff) |
Add v4l2_subdev_open() and v4l2_subdev_close() to subdev.h
Add v4l2_subdev_close() function and declare both in subdev.h.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Todor Tomov <ttomov@mm-sol.com>
Diffstat (limited to 'subdev.c')
-rw-r--r-- | subdev.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -33,7 +33,7 @@ #include "subdev.h" #include "tools.h" -static int v4l2_subdev_open(struct media_entity *entity) +int v4l2_subdev_open(struct media_entity *entity) { if (entity->fd != -1) return 0; @@ -48,6 +48,11 @@ static int v4l2_subdev_open(struct media_entity *entity) return 0; } +void v4l2_subdev_close(struct media_entity *entity) +{ + close(entity->fd); +} + int v4l2_subdev_get_format(struct media_entity *entity, struct v4l2_mbus_framefmt *format, unsigned int pad, enum v4l2_subdev_format_whence which) |