Message ID | 1552330521-4276-33-git-send-email-info@metux.net (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | [01/42] drivers: gpio: 74xx-mmio: use devm_platform_ioremap_resource() | expand |
On Mon, Mar 11, 2019 at 07:55:12PM +0100, Enrico Weigelt, metux IT consult wrote: > Use the new helper that wraps the calls to platform_get_resource() > and devm_ioremap_resource() together. > > Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> > --- > drivers/gpio/gpio-tegra.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Acked-by: Thierry Reding <treding@nvidia.com>
On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult <info@metux.net> wrote: > Use the new helper that wraps the calls to platform_get_resource() > and devm_ioremap_resource() together. > > Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Patch applied with Thierry's ACK. Yours, Linus Walleij
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index 1ececf2..6d9b690 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -569,7 +569,6 @@ static inline void tegra_gpio_debuginit(struct tegra_gpio_info *tgi) static int tegra_gpio_probe(struct platform_device *pdev) { struct tegra_gpio_info *tgi; - struct resource *res; struct tegra_gpio_bank *bank; unsigned int gpio, i, j; int ret; @@ -645,8 +644,7 @@ static int tegra_gpio_probe(struct platform_device *pdev) bank->tgi = tgi; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - tgi->regs = devm_ioremap_resource(&pdev->dev, res); + tgi->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(tgi->regs)) return PTR_ERR(tgi->regs);
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> --- drivers/gpio/gpio-tegra.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)