diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2022-11-18 06:52:42 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-23 19:45:33 +0100 |
commit | 1d01bcb4659cfca87d92075b87cdadb0a9897d14 (patch) | |
tree | 05828869e2b813f090a86fb0d8c7ffbe866a2758 /drivers/slimbus | |
parent | 3d58b933c9eb2da5745c485bc7008d29c0eaddac (diff) | |
download | lwn-1d01bcb4659cfca87d92075b87cdadb0a9897d14.tar.gz lwn-1d01bcb4659cfca87d92075b87cdadb0a9897d14.zip |
slimbus: qcom-ngd-ctrl: use devm_platform_get_and_ioremap_resource()
Simplify the code with devm_platform_get_and_ioremap_resource().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221118065246.6835-9-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/slimbus')
-rw-r--r-- | drivers/slimbus/qcom-ngd-ctrl.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c index 22720ad4c22d..a6f3b6860d8f 100644 --- a/drivers/slimbus/qcom-ngd-ctrl.c +++ b/drivers/slimbus/qcom-ngd-ctrl.c @@ -1597,7 +1597,6 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct qcom_slim_ngd_ctrl *ctrl; - struct resource *res; int ret; struct pdr_service *pds; @@ -1607,8 +1606,7 @@ static int qcom_slim_ngd_ctrl_probe(struct platform_device *pdev) dev_set_drvdata(dev, ctrl); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ctrl->base = devm_ioremap_resource(dev, res); + ctrl->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(ctrl->base)) return PTR_ERR(ctrl->base); |