summaryrefslogtreecommitdiff
path: root/drivers/slimbus
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2022-11-18 06:52:41 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-23 19:45:33 +0100
commit3d58b933c9eb2da5745c485bc7008d29c0eaddac (patch)
tree49440678e8df4deb545676ff1c703a2f6e63fda9 /drivers/slimbus
parent8c8112d7c442579cca821836bbcc46b747ceca74 (diff)
slimbus: qcom-ctrl: use devm_platform_ioremap_resource_byname()
Simplify the code with devm_platform_ioremap_resource_byname(). 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-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/slimbus')
-rw-r--r--drivers/slimbus/qcom-ctrl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c
index bb106eab8ae2..400b7b385a44 100644
--- a/drivers/slimbus/qcom-ctrl.c
+++ b/drivers/slimbus/qcom-ctrl.c
@@ -488,7 +488,6 @@ static int qcom_slim_probe(struct platform_device *pdev)
{
struct qcom_slim_ctrl *ctrl;
struct slim_controller *sctrl;
- struct resource *slim_mem;
int ret, ver;
ctrl = devm_kzalloc(&pdev->dev, sizeof(*ctrl), GFP_KERNEL);
@@ -519,8 +518,7 @@ static int qcom_slim_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, ctrl);
dev_set_drvdata(ctrl->dev, ctrl);
- slim_mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl");
- ctrl->base = devm_ioremap_resource(ctrl->dev, slim_mem);
+ ctrl->base = devm_platform_ioremap_resource_byname(pdev, "ctrl");
if (IS_ERR(ctrl->base))
return PTR_ERR(ctrl->base);