Skip to content

Commit

Permalink
[media] media: Improve documentation for link_setup/link_modify
Browse files Browse the repository at this point in the history
Those callbacks are called with the media_device.graph_mutex held.

Add a note about that, as the code called by those notifiers should
not be touching in the mutex.

Acked-by: Sakari Ailus <[email protected]>
Acked-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
mchehab committed Apr 20, 2016
1 parent e2c91d4 commit 5ed470f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/media/media-device.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ struct media_entity_notify {
* @enable_source: Enable Source Handler function pointer
* @disable_source: Disable Source Handler function pointer
*
* @link_notify: Link state change notification callback
* @link_notify: Link state change notification callback. This callback is
* called with the graph_mutex held.
*
* This structure represents an abstract high-level media device. It allows easy
* access to entities and provides basic media device-level support. The
Expand Down
3 changes: 3 additions & 0 deletions include/media/media-entity.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ struct media_pad {
* @link_validate: Return whether a link is valid from the entity point of
* view. The media_entity_pipeline_start() function
* validates all links by calling this operation. Optional.
*
* Note: Those these callbacks are called with struct media_device.@graph_mutex
* mutex held.
*/
struct media_entity_operations {
int (*link_setup)(struct media_entity *entity,
Expand Down

0 comments on commit 5ed470f

Please sign in to comment.