Skip to content

Commit b87d8d0

Browse files
Heikki Krogerusgregkh
authored andcommitted
usb: typec: tipd: Remove dependency on "connector" child fwnode
There is no "connector" child node available on every platform, so the driver can't fail to probe when it's missing. Fixes: 57560ee ("usb: typec: tipd: Don't block probing of consumer of "connector" nodes") Cc: [email protected] # 5.14+ Reported-by: "Regupathy, Rajaram" <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4d1aa91 commit b87d8d0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/usb/typec/tipd/core.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -625,18 +625,16 @@ static int tps6598x_probe(struct i2c_client *client)
625625
if (ret < 0)
626626
return ret;
627627

628-
fwnode = device_get_named_child_node(&client->dev, "connector");
629-
if (!fwnode)
630-
return -ENODEV;
631-
632628
/*
633629
* This fwnode has a "compatible" property, but is never populated as a
634630
* struct device. Instead we simply parse it to read the properties.
635631
* This breaks fw_devlink=on. To maintain backward compatibility
636632
* with existing DT files, we work around this by deleting any
637633
* fwnode_links to/from this fwnode.
638634
*/
639-
fw_devlink_purge_absent_suppliers(fwnode);
635+
fwnode = device_get_named_child_node(&client->dev, "connector");
636+
if (fwnode)
637+
fw_devlink_purge_absent_suppliers(fwnode);
640638

641639
tps->role_sw = fwnode_usb_role_switch_get(fwnode);
642640
if (IS_ERR(tps->role_sw)) {

0 commit comments

Comments
 (0)