summaryrefslogtreecommitdiffstats
path: root/drivers/usb/roles
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/roles')
-rw-r--r--drivers/usb/roles/class.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/usb/roles/class.c b/drivers/usb/roles/class.c
index c8efe60e2465..0526efbc4922 100644
--- a/drivers/usb/roles/class.c
+++ b/drivers/usb/roles/class.c
@@ -85,11 +85,6 @@ enum usb_role usb_role_switch_get_role(struct usb_role_switch *sw)
}
EXPORT_SYMBOL_GPL(usb_role_switch_get_role);
-static int switch_fwnode_match(struct device *dev, const void *fwnode)
-{
- return dev_fwnode(dev) == fwnode;
-}
-
static void *usb_role_switch_match(struct device_connection *con, int ep,
void *data)
{
@@ -99,8 +94,7 @@ static void *usb_role_switch_match(struct device_connection *con, int ep,
if (con->id && !fwnode_property_present(con->fwnode, con->id))
return NULL;
- dev = class_find_device(role_class, NULL, con->fwnode,
- switch_fwnode_match);
+ dev = class_find_device_by_fwnode(role_class, con->fwnode);
} else {
dev = class_find_device_by_name(role_class, con->endpoint[ep]);
}