summaryrefslogtreecommitdiff
path: root/drivers/usb/common/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/common/common.c')
-rw-r--r--drivers/usb/common/common.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c
index b91ba3332d8f..552ff7ac5a6b 100644
--- a/drivers/usb/common/common.c
+++ b/drivers/usb/common/common.c
@@ -190,10 +190,7 @@ EXPORT_SYMBOL_GPL(of_usb_get_dr_mode_by_phy);
*/
bool of_usb_host_tpl_support(struct device_node *np)
{
- if (of_find_property(np, "tpl-support", NULL))
- return true;
-
- return false;
+ return of_property_read_bool(np, "tpl-support");
}
EXPORT_SYMBOL_GPL(of_usb_host_tpl_support);
@@ -240,11 +237,11 @@ int of_usb_update_otg_caps(struct device_node *np,
otg_caps->otg_rev = 0;
}
- if (of_find_property(np, "hnp-disable", NULL))
+ if (of_property_read_bool(np, "hnp-disable"))
otg_caps->hnp_support = false;
- if (of_find_property(np, "srp-disable", NULL))
+ if (of_property_read_bool(np, "srp-disable"))
otg_caps->srp_support = false;
- if (of_find_property(np, "adp-disable", NULL) ||
+ if (of_property_read_bool(np, "adp-disable") ||
(otg_caps->otg_rev < 0x0200))
otg_caps->adp_support = false;