summaryrefslogtreecommitdiff
path: root/drivers/usb/roles
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2019-05-31 17:15:40 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-06-03 11:55:38 +0300
commitfde777791eb83f6c5845b81af89de6be60a2b2ce (patch)
tree6a5800a2ed670460a797d7a2f38cd1979a96e14e /drivers/usb/roles
parent83b34afb6b79c69f5478a7249451cab858af97d6 (diff)
downloadlinux-fde777791eb83f6c5845b81af89de6be60a2b2ce.tar.xz
device connection: Find connections also by checking the references
We can also use this API to find named references that the device nodes have by using fwnode_property_get_reference_args() function. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/usb/roles')
-rw-r--r--drivers/usb/roles/class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/roles/class.c b/drivers/usb/roles/class.c
index f45d8df5cfb8..86defca6623e 100644
--- a/drivers/usb/roles/class.c
+++ b/drivers/usb/roles/class.c
@@ -101,7 +101,7 @@ static void *usb_role_switch_match(struct device_connection *con, int ep,
struct device *dev;
if (con->fwnode) {
- if (!fwnode_property_present(con->fwnode, con->id))
+ if (con->id && !fwnode_property_present(con->fwnode, con->id))
return NULL;
dev = class_find_device(role_class, NULL, con->fwnode,