diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2020-12-15 03:27:23 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2020-12-15 03:27:23 +0300 |
commit | 4b4193256c8d3bc3a5397b5cd9494c2ad386317d (patch) | |
tree | b6b070f8893384b5d563fc616018e7d5644b2ece /drivers/slimbus | |
parent | cffdd6d90482316e18d686060a4397902ea04bd2 (diff) | |
parent | 92f0a3a22c7a4c936277ece3a0215955a2d52238 (diff) | |
download | linux-4b4193256c8d3bc3a5397b5cd9494c2ad386317d.tar.xz |
Merge branch 'next' into for-linus
Prepare input updates for 5.11 merge window.
Diffstat (limited to 'drivers/slimbus')
-rw-r--r-- | drivers/slimbus/core.c | 6 | ||||
-rw-r--r-- | drivers/slimbus/qcom-ngd-ctrl.c | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c index 526e3215d8fe..ae1e248a8fb8 100644 --- a/drivers/slimbus/core.c +++ b/drivers/slimbus/core.c @@ -162,9 +162,8 @@ static int slim_add_device(struct slim_controller *ctrl, sbdev->ctrl = ctrl; INIT_LIST_HEAD(&sbdev->stream_list); spin_lock_init(&sbdev->stream_list_lock); - - if (node) - sbdev->dev.of_node = of_node_get(node); + sbdev->dev.of_node = of_node_get(node); + sbdev->dev.fwnode = of_fwnode_handle(node); dev_set_name(&sbdev->dev, "%x:%x:%x:%x", sbdev->e_addr.manf_id, @@ -283,6 +282,7 @@ EXPORT_SYMBOL_GPL(slim_register_controller); /* slim_remove_device: Remove the effect of slim_add_device() */ static void slim_remove_device(struct slim_device *sbdev) { + of_node_put(sbdev->dev.of_node); device_unregister(&sbdev->dev); } diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c index fc2575fef51b..743ee7b4e63f 100644 --- a/drivers/slimbus/qcom-ngd-ctrl.c +++ b/drivers/slimbus/qcom-ngd-ctrl.c @@ -1361,12 +1361,10 @@ static int of_qcom_slim_ngd_register(struct device *parent, ngd->pdev->driver_override = QCOM_SLIM_NGD_DRV_NAME; ngd->pdev->dev.of_node = node; ctrl->ngd = ngd; - platform_set_drvdata(ngd->pdev, ctrl); platform_device_add(ngd->pdev); ngd->base = ctrl->base + ngd->id * data->offset + (ngd->id - 1) * data->size; - ctrl->ngd = ngd; return 0; } @@ -1376,12 +1374,13 @@ static int of_qcom_slim_ngd_register(struct device *parent, static int qcom_slim_ngd_probe(struct platform_device *pdev) { - struct qcom_slim_ngd_ctrl *ctrl = platform_get_drvdata(pdev); struct device *dev = &pdev->dev; + struct qcom_slim_ngd_ctrl *ctrl = dev_get_drvdata(dev->parent); int ret; ctrl->ctrl.dev = dev; + platform_set_drvdata(pdev, ctrl); pm_runtime_use_autosuspend(dev); pm_runtime_set_autosuspend_delay(dev, QCOM_SLIM_NGD_AUTOSUSPEND); pm_runtime_set_suspended(dev); |