diff options
-rw-r--r-- | subdev.c | 7 | ||||
-rw-r--r-- | subdev.h | 3 |
2 files changed, 9 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) @@ -24,6 +24,9 @@ struct media_entity; +int v4l2_subdev_open(struct media_entity *entity); + +void v4l2_subdev_close(struct media_entity *entity); int v4l2_subdev_get_format(struct media_entity *entity, struct v4l2_mbus_framefmt *format, unsigned int pad, |