[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211011134518.148420921@linuxfoundation.org>
Date: Mon, 11 Oct 2021 15:44:41 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
"Regupathy, Rajaram" <rajaram.regupathy@...el.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Subject: [PATCH 5.14 009/151] usb: typec: tipd: Remove dependency on "connector" child fwnode
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
commit b87d8d0d4c43c29ccdc57d15b2ebc1df886a34b4 upstream.
There is no "connector" child node available on every
platform, so the driver can't fail to probe when it's
missing.
Fixes: 57560ee95cb7 ("usb: typec: tipd: Don't block probing of consumer of "connector" nodes")
Cc: stable@...r.kernel.org # 5.14+
Reported-by: "Regupathy, Rajaram" <rajaram.regupathy@...el.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Link: https://lore.kernel.org/r/20210930124758.23233-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/usb/typec/tipd/core.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -625,10 +625,6 @@ static int tps6598x_probe(struct i2c_cli
if (ret < 0)
return ret;
- fwnode = device_get_named_child_node(&client->dev, "connector");
- if (!fwnode)
- return -ENODEV;
-
/*
* This fwnode has a "compatible" property, but is never populated as a
* struct device. Instead we simply parse it to read the properties.
@@ -636,7 +632,9 @@ static int tps6598x_probe(struct i2c_cli
* with existing DT files, we work around this by deleting any
* fwnode_links to/from this fwnode.
*/
- fw_devlink_purge_absent_suppliers(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)) {
Powered by blists - more mailing lists