diff mbox series

[2/3] usb: roles: Use the "compatible" property instead of a boolean property

Message ID 20190327164339.31205-3-heikki.krogerus@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series device property: fwnode_is_compatible() helper | expand

Commit Message

Heikki Krogerus March 27, 2019, 4:43 p.m. UTC
Instead of searching for a boolean property, matching
against the "compatible" property.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
 drivers/usb/roles/class.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/usb/roles/class.c b/drivers/usb/roles/class.c
index f45d8df5cfb8..3dc1e05959c1 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 (!fwnode_is_compatible(con->fwnode, con->id))
 			return NULL;
 
 		dev = class_find_device(role_class, NULL, con->fwnode,