diff mbox series

[v1,2/4] usb: typec: tipd: Remove use of fw_devlink_purge_absent_suppliers()

Message ID 20230301214952.2190757-3-saravanak@google.com (mailing list archive)
State Handled Elsewhere, archived
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, we no longer need to call
fw_devlink_purge_absent_suppliers().

Signed-off-by: Saravana Kannan <saravanak@google.com>
Cc: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 drivers/usb/typec/tipd/core.c | 9 ---------
 1 file changed, 9 deletions(-)

Comments

Heikki Krogerus March 6, 2023, 9:39 a.m. UTC | #1
On Wed, Mar 01, 2023 at 01:49:49PM -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, we no longer need to call
> fw_devlink_purge_absent_suppliers().
> 
> Signed-off-by: Saravana Kannan <saravanak@google.com>
> Cc: Martin Kepplinger <martin.kepplinger@puri.sm>

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

> ---
>  drivers/usb/typec/tipd/core.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index 485b90c13078..92401622bc4e 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -764,16 +764,7 @@ static int tps6598x_probe(struct i2c_client *client)
>  	if (ret < 0)
>  		goto err_clear_mask;
>  
> -	/*
> -	 * This fwnode has a "compatible" property, but is never populated as a
> -	 * struct device. Instead we simply parse it to read the properties.
> -	 * This breaks fw_devlink=on. To maintain backward compatibility
> -	 * with existing DT files, we work around this by deleting any
> -	 * fwnode_links to/from this fwnode.
> -	 */
>  	fwnode = device_get_named_child_node(&client->dev, "connector");
> -	if (fwnode)
> -		fw_devlink_purge_absent_suppliers(fwnode);
>  
>  	tps->role_sw = fwnode_usb_role_switch_get(fwnode);
>  	if (IS_ERR(tps->role_sw)) {
> -- 
> 2.39.2.722.g9855ee24e9-goog
diff mbox series

Patch

diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index 485b90c13078..92401622bc4e 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -764,16 +764,7 @@  static int tps6598x_probe(struct i2c_client *client)
 	if (ret < 0)
 		goto err_clear_mask;
 
-	/*
-	 * This fwnode has a "compatible" property, but is never populated as a
-	 * struct device. Instead we simply parse it to read the properties.
-	 * This breaks fw_devlink=on. To maintain backward compatibility
-	 * with existing DT files, we work around this by deleting any
-	 * fwnode_links to/from this fwnode.
-	 */
 	fwnode = device_get_named_child_node(&client->dev, "connector");
-	if (fwnode)
-		fw_devlink_purge_absent_suppliers(fwnode);
 
 	tps->role_sw = fwnode_usb_role_switch_get(fwnode);
 	if (IS_ERR(tps->role_sw)) {