Skip to content

Commit bdb6528

Browse files
committed
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: 5644b66 ("Documentation: Update the recommended pattern for GPIO irqchips") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
1 parent f68cd35 commit bdb6528

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Documentation/driver-api/gpio/driver.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ call into the core gpiolib code:
429429
430430
static void my_gpio_mask_irq(struct irq_data *d)
431431
{
432-
struct gpio_chip *gc = irq_desc_get_handler_data(d);
432+
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
433433
434434
/*
435435
* Perform any necessary action to mask the interrupt,
@@ -442,7 +442,7 @@ call into the core gpiolib code:
442442
443443
static void my_gpio_unmask_irq(struct irq_data *d)
444444
{
445-
struct gpio_chip *gc = irq_desc_get_handler_data(d);
445+
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
446446
447447
gpiochip_enable_irq(gc, d->hwirq);
448448
@@ -501,7 +501,7 @@ the interrupt separately and go with it:
501501
502502
static void my_gpio_mask_irq(struct irq_data *d)
503503
{
504-
struct gpio_chip *gc = irq_desc_get_handler_data(d);
504+
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
505505
506506
/*
507507
* Perform any necessary action to mask the interrupt,
@@ -514,7 +514,7 @@ the interrupt separately and go with it:
514514
515515
static void my_gpio_unmask_irq(struct irq_data *d)
516516
{
517-
struct gpio_chip *gc = irq_desc_get_handler_data(d);
517+
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
518518
519519
gpiochip_enable_irq(gc, d->hwirq);
520520
@@ -576,7 +576,7 @@ In this case the typical set-up will look like this:
576576
577577
static void my_gpio_mask_irq(struct irq_data *d)
578578
{
579-
struct gpio_chip *gc = irq_desc_get_handler_data(d);
579+
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
580580
581581
/*
582582
* Perform any necessary action to mask the interrupt,
@@ -590,7 +590,7 @@ In this case the typical set-up will look like this:
590590
591591
static void my_gpio_unmask_irq(struct irq_data *d)
592592
{
593-
struct gpio_chip *gc = irq_desc_get_handler_data(d);
593+
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
594594
595595
gpiochip_enable_irq(gc, d->hwirq);
596596

0 commit comments

Comments
 (0)