drivers: gpio: tegra: use devm_platform_ioremap_resource()
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> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
5b827ff598
commit
a0b81f1ca4
|
@ -569,7 +569,6 @@ static const struct dev_pm_ops tegra_gpio_pm_ops = {
|
||||||
static int tegra_gpio_probe(struct platform_device *pdev)
|
static int tegra_gpio_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct tegra_gpio_info *tgi;
|
struct tegra_gpio_info *tgi;
|
||||||
struct resource *res;
|
|
||||||
struct tegra_gpio_bank *bank;
|
struct tegra_gpio_bank *bank;
|
||||||
unsigned int gpio, i, j;
|
unsigned int gpio, i, j;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -645,8 +644,7 @@ static int tegra_gpio_probe(struct platform_device *pdev)
|
||||||
bank->tgi = tgi;
|
bank->tgi = tgi;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
tgi->regs = devm_platform_ioremap_resource(pdev, 0);
|
||||||
tgi->regs = devm_ioremap_resource(&pdev->dev, res);
|
|
||||||
if (IS_ERR(tgi->regs))
|
if (IS_ERR(tgi->regs))
|
||||||
return PTR_ERR(tgi->regs);
|
return PTR_ERR(tgi->regs);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue