|
@@ -253,6 +253,26 @@ static inline void media_request_object_get(struct media_request_object *obj)
|
|
|
*/
|
|
|
void media_request_object_put(struct media_request_object *obj);
|
|
|
|
|
|
+/**
|
|
|
+ * media_request_object_find - Find an object in a request
|
|
|
+ *
|
|
|
+ * @req: The media request
|
|
|
+ * @ops: Find an object with this ops value
|
|
|
+ * @priv: Find an object with this priv value
|
|
|
+ *
|
|
|
+ * Both @ops and @priv must be non-NULL.
|
|
|
+ *
|
|
|
+ * Returns the object pointer or NULL if not found. The caller must
|
|
|
+ * call media_request_object_put() once it finished using the object.
|
|
|
+ *
|
|
|
+ * Since this function needs to walk the list of objects it takes
|
|
|
+ * the @req->lock spin lock to make this safe.
|
|
|
+ */
|
|
|
+struct media_request_object *
|
|
|
+media_request_object_find(struct media_request *req,
|
|
|
+ const struct media_request_object_ops *ops,
|
|
|
+ void *priv);
|
|
|
+
|
|
|
/**
|
|
|
* media_request_object_init - Initialise a media request object
|
|
|
*
|
|
@@ -331,6 +351,14 @@ static inline void media_request_object_put(struct media_request_object *obj)
|
|
|
{
|
|
|
}
|
|
|
|
|
|
+static inline struct media_request_object *
|
|
|
+media_request_object_find(struct media_request *req,
|
|
|
+ const struct media_request_object_ops *ops,
|
|
|
+ void *priv)
|
|
|
+{
|
|
|
+ return NULL;
|
|
|
+}
|
|
|
+
|
|
|
static inline void media_request_object_init(struct media_request_object *obj)
|
|
|
{
|
|
|
obj->ops = NULL;
|