@@ -570,10 +570,6 @@ static const struct property_entry dwc3_qcom_acpi_properties[] = {
{}
};
-static const struct software_node dwc3_qcom_swnode = {
- .properties = dwc3_qcom_acpi_properties,
-};
-
static int dwc3_qcom_acpi_register_core(struct platform_device *pdev)
{
struct dwc3_qcom *qcom = platform_get_drvdata(pdev);
@@ -620,17 +616,16 @@ static int dwc3_qcom_acpi_register_core(struct platform_device *pdev)
goto out;
}
- ret = device_add_software_node(&qcom->dwc3->dev, &dwc3_qcom_swnode);
+ ret = platform_device_add_properties(qcom->dwc3,
+ dwc3_qcom_acpi_properties);
if (ret < 0) {
dev_err(&pdev->dev, "failed to add properties\n");
goto out;
}
ret = platform_device_add(qcom->dwc3);
- if (ret) {
+ if (ret)
dev_err(&pdev->dev, "failed to add device\n");
- device_remove_software_node(&qcom->dwc3->dev);
- }
out:
kfree(child_res);
@@ -845,7 +840,6 @@ static int dwc3_qcom_remove(struct platform_device *pdev)
struct device *dev = &pdev->dev;
int i;
- device_remove_software_node(&qcom->dwc3->dev);
of_platform_depopulate(dev);
for (i = qcom->num_clocks - 1; i >= 0; i--) {
This reverts commit 8dc6e6dd1bee39cd65a232a17d51240fc65a0f4a. The commit causes an regression for ACPI probe on Lenovo Yoga C630 laptop. platform_device_add_properties() will fail with -EEXIST for the second USB instance, because of the software_node_to_swnode() check in function software_node_register(). Signed-off-by: Shawn Guo <shawn.guo@linaro.org> --- drivers/usb/dwc3/dwc3-qcom.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)