summaryrefslogtreecommitdiff
path: root/drivers/gpu/host1x
diff options
context:
space:
mode:
authorYe Xingchen <ye.xingchen@zte.com.cn>2023-02-08 10:41:56 +0300
committerThierry Reding <treding@nvidia.com>2023-04-04 15:24:24 +0300
commit791b5ecece5e6c22aa9aa55b7a9ee827a971a799 (patch)
treefa26af94ea821a8ce31401d64aad014c72374db8 /drivers/gpu/host1x
parentc1aaee94380874fd40f7bb8417c597aba3f72c75 (diff)
downloadlinux-791b5ecece5e6c22aa9aa55b7a9ee827a971a799.tar.xz
gpu: host1x: mipi: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x')
-rw-r--r--drivers/gpu/host1x/mipi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/host1x/mipi.c b/drivers/gpu/host1x/mipi.c
index 2efe12dde8bc..4dcec535ec21 100644
--- a/drivers/gpu/host1x/mipi.c
+++ b/drivers/gpu/host1x/mipi.c
@@ -501,7 +501,6 @@ static int tegra_mipi_probe(struct platform_device *pdev)
{
const struct of_device_id *match;
struct tegra_mipi *mipi;
- struct resource *res;
int err;
match = of_match_node(tegra_mipi_of_match, pdev->dev.of_node);
@@ -515,8 +514,7 @@ static int tegra_mipi_probe(struct platform_device *pdev)
mipi->soc = match->data;
mipi->dev = &pdev->dev;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- mipi->regs = devm_ioremap_resource(&pdev->dev, res);
+ mipi->regs = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
if (IS_ERR(mipi->regs))
return PTR_ERR(mipi->regs);