Merge tag 'gpio-v5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux...
[linux-2.6-microblaze.git] / drivers / gpio / gpio-pxa.c
index bcc6be4..26f77fd 100644 (file)
@@ -577,7 +577,7 @@ static int pxa_irq_domain_map(struct irq_domain *d, unsigned int irq,
        return 0;
 }
 
-const struct irq_domain_ops pxa_irq_domain_ops = {
+static const struct irq_domain_ops pxa_irq_domain_ops = {
        .map    = pxa_irq_domain_map,
        .xlate  = irq_domain_xlate_twocell,
 };
@@ -622,7 +622,6 @@ static int pxa_gpio_probe(struct platform_device *pdev)
 {
        struct pxa_gpio_chip *pchip;
        struct pxa_gpio_bank *c;
-       struct resource *res;
        struct clk *clk;
        struct pxa_gpio_platform_data *info;
        void __iomem *gpio_reg_base;
@@ -665,11 +664,8 @@ static int pxa_gpio_probe(struct platform_device *pdev)
 
        pchip->irq0 = irq0;
        pchip->irq1 = irq1;
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res)
-               return -EINVAL;
-       gpio_reg_base = devm_ioremap(&pdev->dev, res->start,
-                                    resource_size(res));
+
+       gpio_reg_base = devm_platform_ioremap_resource(pdev, 0);
        if (!gpio_reg_base)
                return -EINVAL;
 
@@ -816,7 +812,7 @@ static void pxa_gpio_resume(void)
 #define pxa_gpio_resume                NULL
 #endif
 
-struct syscore_ops pxa_gpio_syscore_ops = {
+static struct syscore_ops pxa_gpio_syscore_ops = {
        .suspend        = pxa_gpio_suspend,
        .resume         = pxa_gpio_resume,
 };