usb: dwc3: qcom: clean up icc init
Clean up the interconnect-initialisation helper by increasing indentation of (or merging) continuation lines and adding brackets around multi-line blocks in order to improve readability. Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20220805074500.21469-3-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b89bffa2ef
commit
d75807ab95
|
@ -254,7 +254,7 @@ static int dwc3_qcom_interconnect_init(struct dwc3_qcom *qcom)
|
||||||
qcom->icc_path_ddr = of_icc_get(dev, "usb-ddr");
|
qcom->icc_path_ddr = of_icc_get(dev, "usb-ddr");
|
||||||
if (IS_ERR(qcom->icc_path_ddr)) {
|
if (IS_ERR(qcom->icc_path_ddr)) {
|
||||||
dev_err(dev, "failed to get usb-ddr path: %ld\n",
|
dev_err(dev, "failed to get usb-ddr path: %ld\n",
|
||||||
PTR_ERR(qcom->icc_path_ddr));
|
PTR_ERR(qcom->icc_path_ddr));
|
||||||
return PTR_ERR(qcom->icc_path_ddr);
|
return PTR_ERR(qcom->icc_path_ddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,20 +266,19 @@ static int dwc3_qcom_interconnect_init(struct dwc3_qcom *qcom)
|
||||||
}
|
}
|
||||||
|
|
||||||
max_speed = usb_get_maximum_speed(&qcom->dwc3->dev);
|
max_speed = usb_get_maximum_speed(&qcom->dwc3->dev);
|
||||||
if (max_speed >= USB_SPEED_SUPER || max_speed == USB_SPEED_UNKNOWN)
|
if (max_speed >= USB_SPEED_SUPER || max_speed == USB_SPEED_UNKNOWN) {
|
||||||
ret = icc_set_bw(qcom->icc_path_ddr,
|
ret = icc_set_bw(qcom->icc_path_ddr,
|
||||||
USB_MEMORY_AVG_SS_BW, USB_MEMORY_PEAK_SS_BW);
|
USB_MEMORY_AVG_SS_BW, USB_MEMORY_PEAK_SS_BW);
|
||||||
else
|
} else {
|
||||||
ret = icc_set_bw(qcom->icc_path_ddr,
|
ret = icc_set_bw(qcom->icc_path_ddr,
|
||||||
USB_MEMORY_AVG_HS_BW, USB_MEMORY_PEAK_HS_BW);
|
USB_MEMORY_AVG_HS_BW, USB_MEMORY_PEAK_HS_BW);
|
||||||
|
}
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "failed to set bandwidth for usb-ddr path: %d\n", ret);
|
dev_err(dev, "failed to set bandwidth for usb-ddr path: %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = icc_set_bw(qcom->icc_path_apps,
|
ret = icc_set_bw(qcom->icc_path_apps, APPS_USB_AVG_BW, APPS_USB_PEAK_BW);
|
||||||
APPS_USB_AVG_BW, APPS_USB_PEAK_BW);
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "failed to set bandwidth for apps-usb path: %d\n", ret);
|
dev_err(dev, "failed to set bandwidth for apps-usb path: %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue