diff mbox series

[v1,4/4] driver core: Delete fw_devlink_purge_absent_suppliers()

Message ID 20230301214952.2190757-5-saravanak@google.com
State New
Headers show
Series Remove use of fw_devlink_purge_absent_suppliers() | expand

Commit Message

Saravana Kannan March 1, 2023, 9:49 p.m. UTC
After recent changes to fw_devlink that ended with commit 4a032827daa8
("of: property: Simplify of_link_to_phandle()"), fw_devlink no longer
cares about the "compatible" property and figures out the correct struct
device at runtime.

So, there's no need for any driver or framework to call
fw_devlink_purge_absent_suppliers() anymore and we can delete it.

Signed-off-by: Saravana Kannan <saravanak@google.com>
---
 drivers/base/core.c    | 16 ----------------
 include/linux/fwnode.h |  1 -
 2 files changed, 17 deletions(-)

Comments

Heikki Krogerus March 6, 2023, 9:40 a.m. UTC | #1
On Wed, Mar 01, 2023 at 01:49:51PM -0800, Saravana Kannan wrote:
> After recent changes to fw_devlink that ended with commit 4a032827daa8
> ("of: property: Simplify of_link_to_phandle()"), fw_devlink no longer
> cares about the "compatible" property and figures out the correct struct
> device at runtime.
> 
> So, there's no need for any driver or framework to call
> fw_devlink_purge_absent_suppliers() anymore and we can delete it.
> 
> Signed-off-by: Saravana Kannan <saravanak@google.com>

FWIW:

Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/base/core.c    | 16 ----------------
>  include/linux/fwnode.h |  1 -
>  2 files changed, 17 deletions(-)
> 
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 6878dfcbf0d6..46364c4d1983 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -186,22 +186,6 @@ void fwnode_links_purge(struct fwnode_handle *fwnode)
>  	fwnode_links_purge_consumers(fwnode);
>  }
>  
> -void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode)
> -{
> -	struct fwnode_handle *child;
> -
> -	/* Don't purge consumer links of an added child */
> -	if (fwnode->dev)
> -		return;
> -
> -	fwnode->flags |= FWNODE_FLAG_NOT_DEVICE;
> -	fwnode_links_purge_consumers(fwnode);
> -
> -	fwnode_for_each_available_child_node(fwnode, child)
> -		fw_devlink_purge_absent_suppliers(child);
> -}
> -EXPORT_SYMBOL_GPL(fw_devlink_purge_absent_suppliers);
> -
>  /**
>   * __fwnode_links_move_consumers - Move consumer from @from to @to fwnode_handle
>   * @from: move consumers away from this fwnode
> diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h
> index 5700451b300f..63972c863fcd 100644
> --- a/include/linux/fwnode.h
> +++ b/include/linux/fwnode.h
> @@ -210,6 +210,5 @@ static inline void fwnode_dev_initialized(struct fwnode_handle *fwnode,
>  extern bool fw_devlink_is_strict(void);
>  int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup);
>  void fwnode_links_purge(struct fwnode_handle *fwnode);
> -void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode);
>  
>  #endif
> -- 
> 2.39.2.722.g9855ee24e9-goog
diff mbox series

Patch

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 6878dfcbf0d6..46364c4d1983 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -186,22 +186,6 @@  void fwnode_links_purge(struct fwnode_handle *fwnode)
 	fwnode_links_purge_consumers(fwnode);
 }
 
-void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode)
-{
-	struct fwnode_handle *child;
-
-	/* Don't purge consumer links of an added child */
-	if (fwnode->dev)
-		return;
-
-	fwnode->flags |= FWNODE_FLAG_NOT_DEVICE;
-	fwnode_links_purge_consumers(fwnode);
-
-	fwnode_for_each_available_child_node(fwnode, child)
-		fw_devlink_purge_absent_suppliers(child);
-}
-EXPORT_SYMBOL_GPL(fw_devlink_purge_absent_suppliers);
-
 /**
  * __fwnode_links_move_consumers - Move consumer from @from to @to fwnode_handle
  * @from: move consumers away from this fwnode
diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h
index 5700451b300f..63972c863fcd 100644
--- a/include/linux/fwnode.h
+++ b/include/linux/fwnode.h
@@ -210,6 +210,5 @@  static inline void fwnode_dev_initialized(struct fwnode_handle *fwnode,
 extern bool fw_devlink_is_strict(void);
 int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup);
 void fwnode_links_purge(struct fwnode_handle *fwnode);
-void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode);
 
 #endif