]> git.baikalelectronics.ru Git - kernel.git/commitdiff
irq/generic-chip: Export irq_init_generic_chip() locally
authorBartosz Golaszewski <brgl@bgdev.pl>
Wed, 31 May 2017 16:06:58 +0000 (18:06 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 21 Jun 2017 13:53:11 +0000 (15:53 +0200)
This function will be used in the devres variant of
irq_alloc_generic_chip().

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-doc@vger.kernel.org
Cc: Jonathan Corbet <corbet@lwn.net>
Link: http://lkml.kernel.org/r/1496246820-13250-4-git-send-email-brgl@bgdev.pl
kernel/irq/generic-chip.c
kernel/irq/internals.h

index ee32870079c9c9a414f4cb7a72efba1743d73cf9..f7086b78ad6e1e1bcb3995537b024d7ed057ef0e 100644 (file)
@@ -201,10 +201,9 @@ static void irq_writel_be(u32 val, void __iomem *addr)
        iowrite32be(val, addr);
 }
 
-static void
-irq_init_generic_chip(struct irq_chip_generic *gc, const char *name,
-                     int num_ct, unsigned int irq_base,
-                     void __iomem *reg_base, irq_flow_handler_t handler)
+void irq_init_generic_chip(struct irq_chip_generic *gc, const char *name,
+                          int num_ct, unsigned int irq_base,
+                          void __iomem *reg_base, irq_flow_handler_t handler)
 {
        raw_spin_lock_init(&gc->lock);
        gc->num_ct = num_ct;
index bc226e783bd236b1e1a98a523deef673b7d56635..921a2419720ccac2889916166557ead5abb57ec5 100644 (file)
@@ -226,3 +226,14 @@ irq_pm_install_action(struct irq_desc *desc, struct irqaction *action) { }
 static inline void
 irq_pm_remove_action(struct irq_desc *desc, struct irqaction *action) { }
 #endif
+
+#ifdef CONFIG_GENERIC_IRQ_CHIP
+void irq_init_generic_chip(struct irq_chip_generic *gc, const char *name,
+                          int num_ct, unsigned int irq_base,
+                          void __iomem *reg_base, irq_flow_handler_t handler);
+#else
+static inline void
+irq_init_generic_chip(struct irq_chip_generic *gc, const char *name,
+                     int num_ct, unsigned int irq_base,
+                     void __iomem *reg_base, irq_flow_handler_t handler) { }
+#endif /* CONFIG_GENERIC_IRQ_CHIP */