Commit bdb6528e authored by Andy Shevchenko's avatar Andy Shevchenko
Browse files

Documentation: gpio: Fix IRQ mask and unmask examples



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: 5644b66a ("Documentation: Update the recommended pattern for GPIO irqchips")
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent f68cd356
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -429,7 +429,7 @@ call into the core gpiolib code:


  static void my_gpio_mask_irq(struct irq_data *d)
  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,
       * 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)
  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);
      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)
  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,
       * 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)
  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);
      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)
  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,
       * 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)
  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);
      gpiochip_enable_irq(gc, d->hwirq);