All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] genirq: allow irq_set_chip_handler_name_locked() to take a const irq_chip
@ 2022-07-06 15:15 Michael Walle
  2022-07-06 15:15 ` [PATCH 2/2] pinctrl: ocelot: make irq_chip immutable Michael Walle
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Michael Walle @ 2022-07-06 15:15 UTC (permalink / raw)
  To: Linus Walleij, Marc Zyngier, Thomas Gleixner
  Cc: linux-gpio, linux-kernel, Michael Walle

Similar to commit 393e1280f765 ("genirq: Allow irq_chip registration
functions to take a const irq_chip"), allow the
irq_set_chip_handler_name_locked() function to take a const irq_chip
argument.

Signed-off-by: Michael Walle <michael@walle.cc>
---
Given this is the correct approach, can this go through the pinctrl tree?
Of not, do we need an immutable tag?

 include/linux/irqdesc.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index a77584593f7d..1cd4e36890fb 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -209,14 +209,15 @@ static inline void irq_set_handler_locked(struct irq_data *data,
  * Must be called with irq_desc locked and valid parameters.
  */
 static inline void
-irq_set_chip_handler_name_locked(struct irq_data *data, struct irq_chip *chip,
+irq_set_chip_handler_name_locked(struct irq_data *data,
+				 const struct irq_chip *chip,
 				 irq_flow_handler_t handler, const char *name)
 {
 	struct irq_desc *desc = irq_data_to_desc(data);
 
 	desc->handle_irq = handler;
 	desc->name = name;
-	data->chip = chip;
+	data->chip = (struct irq_chip *)chip;
 }
 
 bool irq_check_status_bit(unsigned int irq, unsigned int bitmask);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-07-16 10:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-06 15:15 [PATCH 1/2] genirq: allow irq_set_chip_handler_name_locked() to take a const irq_chip Michael Walle
2022-07-06 15:15 ` [PATCH 2/2] pinctrl: ocelot: make irq_chip immutable Michael Walle
2022-07-11 12:13   ` Linus Walleij
2022-07-16 10:51   ` [irqchip: irq/irqchip-next] pinctrl: ocelot: Make " irqchip-bot for Michael Walle
2022-07-11  9:11 ` [PATCH 1/2] genirq: allow irq_set_chip_handler_name_locked() to take a const irq_chip Marc Zyngier
2022-07-11 12:14   ` Linus Walleij
2022-07-11  9:19 ` [irqchip: irq/irqchip-next] genirq: Allow " irqchip-bot for Michael Walle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.