usb: Use of_property_read_bool() for boolean properties
[linux-2.6-microblaze.git] / drivers / usb / dwc2 / params.c
index 9ed9fd9..21d1653 100644 (file)
@@ -508,8 +508,7 @@ static void dwc2_get_device_properties(struct dwc2_hsotg *hsotg)
                of_usb_update_otg_caps(hsotg->dev->of_node, &p->otg_caps);
        }
 
-       if (of_find_property(hsotg->dev->of_node, "disable-over-current", NULL))
-               p->oc_disable = true;
+       p->oc_disable = of_property_read_bool(hsotg->dev->of_node, "disable-over-current");
 }
 
 static void dwc2_check_param_otg_cap(struct dwc2_hsotg *hsotg)