Commit 9874abd5 authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by Greg Kroah-Hartman

slimbus: ngd: register ngd driver only once.

[ Upstream commit 1830dad3 ]

Move ngd platform driver out of loop so that it registers only once.
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 614744f4
...@@ -1346,7 +1346,6 @@ static int of_qcom_slim_ngd_register(struct device *parent, ...@@ -1346,7 +1346,6 @@ static int of_qcom_slim_ngd_register(struct device *parent,
ngd->base = ctrl->base + ngd->id * data->offset + ngd->base = ctrl->base + ngd->id * data->offset +
(ngd->id - 1) * data->size; (ngd->id - 1) * data->size;
ctrl->ngd = ngd; ctrl->ngd = ngd;
platform_driver_register(&qcom_slim_ngd_driver);
return 0; return 0;
} }
...@@ -1445,6 +1444,7 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev) ...@@ -1445,6 +1444,7 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev)
init_completion(&ctrl->reconf); init_completion(&ctrl->reconf);
init_completion(&ctrl->qmi.qmi_comp); init_completion(&ctrl->qmi.qmi_comp);
platform_driver_register(&qcom_slim_ngd_driver);
return of_qcom_slim_ngd_register(dev, ctrl); return of_qcom_slim_ngd_register(dev, ctrl);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment