Skip to content

Commit

Permalink
usb: dwc3: drd: Switch to device property for 'extcon' handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko authored and Felipe Balbi committed Nov 26, 2018
1 parent 408d3ba commit 8538375
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/usb/dwc3/drd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8538375

Please sign in to comment.