summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2015-09-21 10:14:34 +0200
committerFelipe Balbi <balbi@ti.com>2015-09-27 17:54:31 +0200
commit06e7114f0d8297278eb24f4e9bee3393a94bd8ce (patch)
tree9a4759e115df3f93c04bccc2fc4ef42fa172af02 /drivers/usb/dwc3
parentusb: dwc3: st: prepare the driver for generic usb_get_dr_mode function (diff)
downloadlinux-06e7114f0d8297278eb24f4e9bee3393a94bd8ce.tar.xz
linux-06e7114f0d8297278eb24f4e9bee3393a94bd8ce.zip
usb: common: of_usb_get_dr_mode to usb_get_dr_mode
By using the unified device property interface, the function can be made available for all platforms and not just the ones using DT. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/core.c2
-rw-r--r--drivers/usb/dwc3/dwc3-st.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 61a56357baf0..407151465645 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -871,6 +871,7 @@ static int dwc3_probe(struct platform_device *pdev)
hird_threshold = 12;
dwc->maximum_speed = usb_get_maximum_speed(dev);
+ dwc->dr_mode = usb_get_dr_mode(dev);
if (node) {
dwc->has_lpm_erratum = of_property_read_bool(node,
@@ -886,7 +887,6 @@ static int dwc3_probe(struct platform_device *pdev)
dwc->needs_fifo_resize = of_property_read_bool(node,
"tx-fifo-resize");
- dwc->dr_mode = of_usb_get_dr_mode(node);
dwc->disable_scramble_quirk = of_property_read_bool(node,
"snps,disable_scramble_quirk");
diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c
index 02d47d50905b..5c0adb9c6fb2 100644
--- a/drivers/usb/dwc3/dwc3-st.c
+++ b/drivers/usb/dwc3/dwc3-st.c
@@ -268,7 +268,7 @@ static int st_dwc3_probe(struct platform_device *pdev)
goto undo_softreset;
}
- dwc3_data->dr_mode = of_usb_get_dr_mode(child_pdev->dev.of_node);
+ dwc3_data->dr_mode = usb_get_dr_mode(&child_pdev->dev);
/*
* Configure the USB port as device or host according to the static