]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ARM: orion/gpio: Get rid of unused first parameter in orion_gpio_init()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 14 Dec 2021 14:06:56 +0000 (16:06 +0200)
committerGregory CLEMENT <gregory.clement@bootlin.com>
Thu, 3 Feb 2022 08:25:11 +0000 (09:25 +0100)
The OF node pointer is always NULL, get rid of unused parameter in
orion_gpio_init(). As a side effect it will allow to switch GPIO
library to the fwnode API, as well as in case of resurrecting it here
it should be fwnode_handle anyways.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
arch/arm/mach-dove/irq.c
arch/arm/mach-mv78xx0/irq.c
arch/arm/mach-orion5x/irq.c
arch/arm/plat-orion/gpio.c
arch/arm/plat-orion/include/plat/orion-gpio.h

index 31ccbcee262742f6003dfffffc05eab9f3c3c480..d36f6b8269c21c29b01d3042d11c44b669bfbb05 100644 (file)
@@ -73,12 +73,12 @@ void __init dove_init_irq(void)
        /*
         * Initialize gpiolib for GPIOs 0-71.
         */
-       orion_gpio_init(NULL, 0, 32, DOVE_GPIO_LO_VIRT_BASE, 0,
+       orion_gpio_init(0, 32, DOVE_GPIO_LO_VIRT_BASE, 0,
                        IRQ_DOVE_GPIO_START, gpio0_irqs);
 
-       orion_gpio_init(NULL, 32, 32, DOVE_GPIO_HI_VIRT_BASE, 0,
+       orion_gpio_init(32, 32, DOVE_GPIO_HI_VIRT_BASE, 0,
                        IRQ_DOVE_GPIO_START + 32, gpio1_irqs);
 
-       orion_gpio_init(NULL, 64, 8, DOVE_GPIO2_VIRT_BASE, 0,
+       orion_gpio_init(64, 8, DOVE_GPIO2_VIRT_BASE, 0,
                        IRQ_DOVE_GPIO_START + 64, gpio2_irqs);
 }
index 788569e960e15f6929f22228bf138b6699743fe7..0b5f055ca1c3d4ca0fdf4e6b612a8c53c5a91f02 100644 (file)
@@ -67,7 +67,6 @@ void __init mv78xx0_init_irq(void)
         * registers for core #1 are at an offset of 0x18 from those of
         * core #0.)
         */
-       orion_gpio_init(NULL, 0, 32, GPIO_VIRT_BASE,
-                       mv78xx0_core_index() ? 0x18 : 0,
+       orion_gpio_init(0, 32, GPIO_VIRT_BASE, mv78xx0_core_index() ? 0x18 : 0,
                        IRQ_MV78XX0_GPIO_START, gpio0_irqs);
 }
index ac4af2283bef9959b23601c666ee4bb6e724d3e0..1ae775d02d9021549e85b84486f5055e2e31f652 100644 (file)
@@ -49,6 +49,6 @@ void __init orion5x_init_irq(void)
        /*
         * Initialize gpiolib for GPIOs 0-31.
         */
-       orion_gpio_init(NULL, 0, 32, GPIO_VIRT_BASE, 0,
+       orion_gpio_init(0, 32, GPIO_VIRT_BASE, 0,
                        IRQ_ORION5X_GPIO_START, gpio0_irqs);
 }
index 734f0be4f14a67af011706c10d164cf14ed80493..3ef9ecdd6343fe6b6b2a3465704d7e7bae08fbf8 100644 (file)
@@ -516,8 +516,7 @@ static void orion_gpio_mask_irq(struct irq_data *d)
        irq_gc_unlock(gc);
 }
 
-void __init orion_gpio_init(struct device_node *np,
-                           int gpio_base, int ngpio,
+void __init orion_gpio_init(int gpio_base, int ngpio,
                            void __iomem *base, int mask_offset,
                            int secondary_irq_base,
                            int irqs[4])
@@ -545,9 +544,6 @@ void __init orion_gpio_init(struct device_node *np,
        ochip->chip.base = gpio_base;
        ochip->chip.ngpio = ngpio;
        ochip->chip.can_sleep = 0;
-#ifdef CONFIG_OF
-       ochip->chip.of_node = np;
-#endif
        ochip->chip.dbg_show = orion_gpio_dbg_show;
 
        spin_lock_init(&ochip->lock);
@@ -605,7 +601,7 @@ void __init orion_gpio_init(struct device_node *np,
                               IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE);
 
        /* Setup irq domain on top of the generic chip. */
-       ochip->domain = irq_domain_add_legacy(np,
+       ochip->domain = irq_domain_add_legacy(NULL,
                                              ochip->chip.ngpio,
                                              ochip->secondary_irq_base,
                                              ochip->secondary_irq_base,
index e856b073a9c82520557feed0771b329fbac3efe7..25a2963e0e0ff269a81d6c16d0aacba72ede9230 100644 (file)
@@ -30,8 +30,7 @@ int orion_gpio_led_blink_set(struct gpio_desc *desc, int state,
 void orion_gpio_set_valid(unsigned pin, int mode);
 
 /* Initialize gpiolib. */
-void __init orion_gpio_init(struct device_node *np,
-                           int gpio_base, int ngpio,
+void __init orion_gpio_init(int gpio_base, int ngpio,
                            void __iomem *base, int mask_offset,
                            int secondary_irq_base,
                            int irq[4]);