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

From: Heikki Krogerus
Date: Wed Mar 27 2019 - 12:43:54 EST


Instead of searching for a boolean property, matching
against the "compatible" property.

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

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,
--
2.20.1