Commit d80bdabe authored by Heikki Krogerus's avatar Heikki Krogerus Committed by Greg Kroah-Hartman

usb: typec: mux: Drop support for device name matching

There are no more users for the old device connection
descriptions that used device names.
Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200211112531.86510-7-heikki.krogerus@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bbe80c9a
...@@ -17,11 +17,6 @@ ...@@ -17,11 +17,6 @@
#include "bus.h" #include "bus.h"
static int name_match(struct device *dev, const void *name)
{
return !strcmp((const char *)name, dev_name(dev));
}
static bool dev_name_ends_with(struct device *dev, const char *suffix) static bool dev_name_ends_with(struct device *dev, const char *suffix)
{ {
const char *name = dev_name(dev); const char *name = dev_name(dev);
...@@ -44,16 +39,11 @@ static void *typec_switch_match(struct device_connection *con, int ep, ...@@ -44,16 +39,11 @@ static void *typec_switch_match(struct device_connection *con, int ep,
{ {
struct device *dev; struct device *dev;
if (con->fwnode) {
if (con->id && !fwnode_property_present(con->fwnode, con->id)) if (con->id && !fwnode_property_present(con->fwnode, con->id))
return NULL; return NULL;
dev = class_find_device(&typec_mux_class, NULL, con->fwnode, dev = class_find_device(&typec_mux_class, NULL, con->fwnode,
switch_fwnode_match); switch_fwnode_match);
} else {
dev = class_find_device(&typec_mux_class, NULL,
con->endpoint[ep], name_match);
}
return dev ? to_typec_switch(dev) : ERR_PTR(-EPROBE_DEFER); return dev ? to_typec_switch(dev) : ERR_PTR(-EPROBE_DEFER);
} }
...@@ -191,13 +181,6 @@ static void *typec_mux_match(struct device_connection *con, int ep, void *data) ...@@ -191,13 +181,6 @@ static void *typec_mux_match(struct device_connection *con, int ep, void *data)
u16 *val; u16 *val;
int i; int i;
if (!con->fwnode) {
dev = class_find_device(&typec_mux_class, NULL,
con->endpoint[ep], name_match);
return dev ? to_typec_switch(dev) : ERR_PTR(-EPROBE_DEFER);
}
/* /*
* Check has the identifier already been "consumed". If it * Check has the identifier already been "consumed". If it
* has, no need to do any extra connection identification. * has, no need to do any extra connection identification.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment