From 42b3b3916e5a11d9bcd72bae9c721cd4e40c0cb4 Mon Sep 17 00:00:00 2001 From: Todor Tomov Date: Mon, 11 Apr 2011 18:51:16 +0300 Subject: Reset file descriptor value after closing a subdev After a subdev is closed set entity->fd to -1. Signed-off-by: Todor Tomov --- src/subdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/subdev.c b/src/subdev.c index 3960d05..f8ccfe3 100644 --- a/src/subdev.c +++ b/src/subdev.c @@ -51,6 +51,7 @@ int v4l2_subdev_open(struct media_entity *entity) void v4l2_subdev_close(struct media_entity *entity) { close(entity->fd); + entity->fd = -1; } int v4l2_subdev_get_format(struct media_entity *entity, -- cgit v1.2.3