[RFC 02/22] media: Add media device request state

Sakari Ailus
2016-05-06T10:56:39Z

include/media/media-device.h | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/include/media/media-device.h b/include/media/media-device.h
index 49c3367a..acb2481 100644
--- a/include/media/media-device.h
+++ b/include/media/media-device.h
@@ -265,6 +265,11 @@ struct ida;
struct device;
struct media_device;

+enum media_device_request_state {
+ MEDIA_DEVICE_REQUEST_STATE_IDLE,
+ MEDIA_DEVICE_REQUEST_STATE_QUEUED,
+};
+
/**
* struct media_device_request - Media device request
* @id: Request ID
@@ -272,6 +277,8 @@ struct media_device;
* @kref: Reference count
* @list: List entry in the media device requests list
* @fh_list: List entry in the media file handle requests list
+ * @state: The state of the request, MEDIA_DEVICE_REQUEST_STATE_*,
+ * access to state serialised by mdev->req_lock
*/
struct media_device_request {
u32 id;
@@ -279,6 +286,7 @@ struct media_device_request {
struct kref kref;
struct list_head list;
struct list_head fh_list;
+ enum media_device_request_state state;
};

/**
--
1.9.1