aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorGravatar Heikki Krogerus <heikki.krogerus@linux.intel.com> 2019-05-31 17:15:40 +0300
committerGravatar Rafael J. Wysocki <rafael.j.wysocki@intel.com> 2019-06-03 10:55:38 +0200
commitfde777791eb83f6c5845b81af89de6be60a2b2ce (patch)
tree6a5800a2ed670460a797d7a2f38cd1979a96e14e /drivers/usb
parentdevice property: Introduce fwnode_find_reference() (diff)
downloadlinux-fde777791eb83f6c5845b81af89de6be60a2b2ce.tar.gz
linux-fde777791eb83f6c5845b81af89de6be60a2b2ce.tar.bz2
linux-fde777791eb83f6c5845b81af89de6be60a2b2ce.zip
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')
-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,