drivers: gpio: cadence: 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> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
72d8cb7154
commit
b2c09588f2
|
@ -148,7 +148,6 @@ static struct irq_chip cdns_gpio_irqchip = {
|
|||
static int cdns_gpio_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct cdns_gpio_chip *cgpio;
|
||||
struct resource *res;
|
||||
int ret, irq;
|
||||
u32 dir_prev;
|
||||
u32 num_gpios = 32;
|
||||
|
@ -157,8 +156,7 @@ static int cdns_gpio_probe(struct platform_device *pdev)
|
|||
if (!cgpio)
|
||||
return -ENOMEM;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
cgpio->regs = devm_ioremap_resource(&pdev->dev, res);
|
||||
cgpio->regs = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(cgpio->regs))
|
||||
return PTR_ERR(cgpio->regs);
|
||||
|
||||
|
|
Loading…
Reference in a new issue