diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-06 15:20:40 +0800 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2023-07-21 17:27:33 +0200 |
commit | df823d210395341c58e8d346dfc37d6e67e9f2c6 (patch) | |
tree | 08234197b372145b7969cf493731bae62e751fb2 /drivers/bus | |
parent | 6674c9808048f28f979fc4c57994d936d477d3ed (diff) | |
download | lwn-df823d210395341c58e8d346dfc37d6e67e9f2c6.tar.gz lwn-df823d210395341c58e8d346dfc37d6e67e9f2c6.zip |
bus: tegra-gmi: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/tegra-gmi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/bus/tegra-gmi.c b/drivers/bus/tegra-gmi.c index e3506ef37051..59919e99f7cc 100644 --- a/drivers/bus/tegra-gmi.c +++ b/drivers/bus/tegra-gmi.c @@ -211,7 +211,6 @@ static int tegra_gmi_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct tegra_gmi *gmi; - struct resource *res; int err; gmi = devm_kzalloc(dev, sizeof(*gmi), GFP_KERNEL); @@ -221,8 +220,7 @@ static int tegra_gmi_probe(struct platform_device *pdev) platform_set_drvdata(pdev, gmi); gmi->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - gmi->base = devm_ioremap_resource(dev, res); + gmi->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(gmi->base)) return PTR_ERR(gmi->base); |