linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/5] Documentation: gpio: Fix IRQ mask and unmask examples
@ 2022-05-12 17:39 Andy Shevchenko
  2022-05-12 17:39 ` [PATCH v1 2/5] Documentation: gpio: Advertise irqd_to_hwirq() helper in the examples Andy Shevchenko
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Andy Shevchenko @ 2022-05-12 17:39 UTC (permalink / raw)
  To: Andy Shevchenko, Marc Zyngier, Hans de Goede, linux-gpio,
	linux-doc, linux-kernel
  Cc: Linus Walleij, Bartosz Golaszewski, Jonathan Corbet,
	Mika Westerberg, Andy Shevchenko

After switching to immutable IRQ chips for GPIO drivers the examples become
uncompilable due to wrong IRQ API, i.e. irq_desc_get_handler_data() in use.
Replace it with proper irq_data_get_irq_chip_data() call where it applies.

Fixes: 5644b66a9c63 ("Documentation: Update the recommended pattern for GPIO irqchips")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 Documentation/driver-api/gpio/driver.rst | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/driver-api/gpio/driver.rst b/Documentation/driver-api/gpio/driver.rst
index a1ddefa1f55f..964d09118d17 100644
--- a/Documentation/driver-api/gpio/driver.rst
+++ b/Documentation/driver-api/gpio/driver.rst
@@ -429,7 +429,7 @@ call into the core gpiolib code:
 
   static void my_gpio_mask_irq(struct irq_data *d)
   {
-      struct gpio_chip *gc = irq_desc_get_handler_data(d);
+      struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
 
       /*
        * Perform any necessary action to mask the interrupt,
@@ -442,7 +442,7 @@ call into the core gpiolib code:
 
   static void my_gpio_unmask_irq(struct irq_data *d)
   {
-      struct gpio_chip *gc = irq_desc_get_handler_data(d);
+      struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
 
       gpiochip_enable_irq(gc, d->hwirq);
 
@@ -501,7 +501,7 @@ the interrupt separately and go with it:
 
   static void my_gpio_mask_irq(struct irq_data *d)
   {
-      struct gpio_chip *gc = irq_desc_get_handler_data(d);
+      struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
 
       /*
        * Perform any necessary action to mask the interrupt,
@@ -514,7 +514,7 @@ the interrupt separately and go with it:
 
   static void my_gpio_unmask_irq(struct irq_data *d)
   {
-      struct gpio_chip *gc = irq_desc_get_handler_data(d);
+      struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
 
       gpiochip_enable_irq(gc, d->hwirq);
 
@@ -576,7 +576,7 @@ In this case the typical set-up will look like this:
 
   static void my_gpio_mask_irq(struct irq_data *d)
   {
-      struct gpio_chip *gc = irq_desc_get_handler_data(d);
+      struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
 
       /*
        * Perform any necessary action to mask the interrupt,
@@ -590,7 +590,7 @@ In this case the typical set-up will look like this:
 
   static void my_gpio_unmask_irq(struct irq_data *d)
   {
-      struct gpio_chip *gc = irq_desc_get_handler_data(d);
+      struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
 
       gpiochip_enable_irq(gc, d->hwirq);
 
-- 
2.35.1


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

end of thread, other threads:[~2022-05-16 17:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12 17:39 [PATCH v1 1/5] Documentation: gpio: Fix IRQ mask and unmask examples Andy Shevchenko
2022-05-12 17:39 ` [PATCH v1 2/5] Documentation: gpio: Advertise irqd_to_hwirq() helper in the examples Andy Shevchenko
2022-05-13 20:53   ` Linus Walleij
2022-05-12 17:39 ` [PATCH v1 3/5] pinctrl: baytrail: make irq_chip immutable Andy Shevchenko
2022-05-13  8:51   ` Mika Westerberg
2022-05-12 17:39 ` [PATCH v1 4/5] pinctrl: cherryview: " Andy Shevchenko
2022-05-13  8:52   ` Mika Westerberg
2022-05-12 17:39 ` [PATCH v1 5/5] pinctrl: lynxpoint: " Andy Shevchenko
2022-05-13  8:52   ` Mika Westerberg
2022-05-13 20:54 ` [PATCH v1 1/5] Documentation: gpio: Fix IRQ mask and unmask examples Linus Walleij
2022-05-16 17:22   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).