diff mbox series

[v4,01/17] media: entity: Pass entity to get_fwnode_pad operation

Message ID 20200303234256.8928-2-slongerbeam@gmail.com (mailing list archive)
State New, archived
Headers show
Series media: imx: Create media links in bound notifiers | expand

Commit Message

Steve Longerbeam March 3, 2020, 11:42 p.m. UTC
Add a missing pointer to the entity in the media_entity operation
get_fwnode_pad. There are no implementers of this op yet, but a future
entity that does so will almost certainly need a reference to itself
to carry out the work.

Fixes: ae45cd5efc120 ("[media] media: entity: Add get_fwnode_pad entity
operation")
Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
---
 drivers/media/mc/mc-entity.c | 2 +-
 include/media/media-entity.h | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Laurent Pinchart April 14, 2020, 10:58 p.m. UTC | #1
Hi Steve,

Thank you for the patch.

On Tue, Mar 03, 2020 at 03:42:40PM -0800, Steve Longerbeam wrote:
> Add a missing pointer to the entity in the media_entity operation
> get_fwnode_pad. There are no implementers of this op yet, but a future
> entity that does so will almost certainly need a reference to itself
> to carry out the work.
> 
> Fixes: ae45cd5efc120 ("[media] media: entity: Add get_fwnode_pad entity
> operation")
> Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/mc/mc-entity.c | 2 +-
>  include/media/media-entity.h | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/mc/mc-entity.c b/drivers/media/mc/mc-entity.c
> index 211279c5fd77..12b45e669bcc 100644
> --- a/drivers/media/mc/mc-entity.c
> +++ b/drivers/media/mc/mc-entity.c
> @@ -386,7 +386,7 @@ int media_entity_get_fwnode_pad(struct media_entity *entity,
>  	if (ret)
>  		return ret;
>  
> -	ret = entity->ops->get_fwnode_pad(&endpoint);
> +	ret = entity->ops->get_fwnode_pad(entity, &endpoint);
>  	if (ret < 0)
>  		return ret;
>  
> diff --git a/include/media/media-entity.h b/include/media/media-entity.h
> index 8cb2c504a05c..cde80ad029b7 100644
> --- a/include/media/media-entity.h
> +++ b/include/media/media-entity.h
> @@ -212,7 +212,8 @@ struct media_pad {
>   *    mutex held.
>   */
>  struct media_entity_operations {
> -	int (*get_fwnode_pad)(struct fwnode_endpoint *endpoint);
> +	int (*get_fwnode_pad)(struct media_entity *entity,
> +			      struct fwnode_endpoint *endpoint);
>  	int (*link_setup)(struct media_entity *entity,
>  			  const struct media_pad *local,
>  			  const struct media_pad *remote, u32 flags);
diff mbox series

Patch

diff --git a/drivers/media/mc/mc-entity.c b/drivers/media/mc/mc-entity.c
index 211279c5fd77..12b45e669bcc 100644
--- a/drivers/media/mc/mc-entity.c
+++ b/drivers/media/mc/mc-entity.c
@@ -386,7 +386,7 @@  int media_entity_get_fwnode_pad(struct media_entity *entity,
 	if (ret)
 		return ret;
 
-	ret = entity->ops->get_fwnode_pad(&endpoint);
+	ret = entity->ops->get_fwnode_pad(entity, &endpoint);
 	if (ret < 0)
 		return ret;
 
diff --git a/include/media/media-entity.h b/include/media/media-entity.h
index 8cb2c504a05c..cde80ad029b7 100644
--- a/include/media/media-entity.h
+++ b/include/media/media-entity.h
@@ -212,7 +212,8 @@  struct media_pad {
  *    mutex held.
  */
 struct media_entity_operations {
-	int (*get_fwnode_pad)(struct fwnode_endpoint *endpoint);
+	int (*get_fwnode_pad)(struct media_entity *entity,
+			      struct fwnode_endpoint *endpoint);
 	int (*link_setup)(struct media_entity *entity,
 			  const struct media_pad *local,
 			  const struct media_pad *remote, u32 flags);