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>
#include "subdev.h"
#include "tools.h"
#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;
{
if (entity->fd != -1)
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)
int v4l2_subdev_get_format(struct media_entity *entity,
struct v4l2_mbus_framefmt *format, unsigned int pad,
enum v4l2_subdev_format_whence which)
+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,
int v4l2_subdev_get_format(struct media_entity *entity,
struct v4l2_mbus_framefmt *format, unsigned int pad,