summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-11-10 19:11:00 +0100
committerFelipe Balbi <felipe.balbi@linux.intel.com>2018-11-26 08:06:31 +0100
commit85383756ae34db2ee46daa779f869598a3443651 (patch)
treeb54f86bab564f4a7cfcbc1b244757f794ea776da /drivers
parentusb: dwc3: don't log probe deferrals; but do log other error codes (diff)
downloadlinux-85383756ae34db2ee46daa779f869598a3443651.tar.xz
linux-85383756ae34db2ee46daa779f869598a3443651.zip
usb: dwc3: drd: Switch to device property for 'extcon' handling
Switch to device property for 'extcon' handling. No functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/dwc3/drd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/drd.c b/drivers/usb/dwc3/drd.c
index 218371f985ca..2401bd504891 100644
--- a/drivers/usb/dwc3/drd.c
+++ b/drivers/usb/dwc3/drd.c
@@ -10,6 +10,7 @@
#include <linux/extcon.h>
#include <linux/of_graph.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
#include "debug.h"
#include "core.h"
@@ -446,8 +447,8 @@ static struct extcon_dev *dwc3_get_extcon(struct dwc3 *dwc)
struct device_node *np_phy, *np_conn;
struct extcon_dev *edev;
- if (of_property_read_bool(dev->of_node, "extcon"))
- return extcon_get_edev_by_phandle(dwc->dev, 0);
+ if (device_property_read_bool(dev, "extcon"))
+ return extcon_get_edev_by_phandle(dev, 0);
np_phy = of_parse_phandle(dev->of_node, "phys", 0);
np_conn = of_graph_get_remote_node(np_phy, -1, -1);