On Sun, May 20, 2018 at 07:53:08PM +1000, NeilBrown wrote: > On Sun, May 20 2018, Sergio Paracuellos wrote: > > > The data passed between irq related functions and the ones which have > > been retrieved where different. Also first data haven't properly > > set on irq_domain_add_linear call where it was passing NULL instead. > > > > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx> > > Reviewed-by: NeilBrown <neil@xxxxxxxxxx> > Tested-by: NeilBrown <neil@xxxxxxxxxx> > > :-) > > Thanks, > NeilBrown Thanks, Neil. So I'll send v5 of this series to make things easier. I'll join this PATCH with PATCH 5 and make TODO file empty. What is missing to make this driver out of staging after this changes? Should it be moved or you were thinking in move all the mt7621 together? Best regards, Sergio Paracuellos > > > > --- > > drivers/staging/mt7621-gpio/gpio-mt7621.c | 14 +++++--------- > > 1 file changed, 5 insertions(+), 9 deletions(-) > > > > diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c b/drivers/staging/mt7621-gpio/gpio-mt7621.c > > index 650286df..077a7c2 100644 > > --- a/drivers/staging/mt7621-gpio/gpio-mt7621.c > > +++ b/drivers/staging/mt7621-gpio/gpio-mt7621.c > > @@ -201,8 +201,7 @@ mediatek_gpio_bank_probe(struct platform_device *pdev, struct device_node *bank) > > static void > > mediatek_gpio_irq_handler(struct irq_desc *desc) > > { > > - struct gpio_chip *gc = irq_desc_get_handler_data(desc); > > - struct mtk_data *gpio_data = gpiochip_get_data(gc); > > + struct mtk_data *gpio_data = irq_desc_get_handler_data(desc); > > int i; > > > > for (i = 0; i < MTK_MAX_BANK; i++) { > > @@ -228,8 +227,7 @@ mediatek_gpio_irq_handler(struct irq_desc *desc) > > static void > > mediatek_gpio_irq_unmask(struct irq_data *d) > > { > > - struct gpio_chip *gc = irq_data_get_irq_chip_data(d); > > - struct mtk_data *gpio_data = gpiochip_get_data(gc); > > + struct mtk_data *gpio_data = irq_data_get_irq_chip_data(d); > > int pin = d->hwirq; > > int bank = pin / 32; > > struct mtk_gc *rg = gpio_data->gc_map[bank]; > > @@ -251,8 +249,7 @@ mediatek_gpio_irq_unmask(struct irq_data *d) > > static void > > mediatek_gpio_irq_mask(struct irq_data *d) > > { > > - struct gpio_chip *gc = irq_data_get_irq_chip_data(d); > > - struct mtk_data *gpio_data = gpiochip_get_data(gc); > > + struct mtk_data *gpio_data = irq_data_get_irq_chip_data(d); > > int pin = d->hwirq; > > int bank = pin / 32; > > struct mtk_gc *rg = gpio_data->gc_map[bank]; > > @@ -274,8 +271,7 @@ mediatek_gpio_irq_mask(struct irq_data *d) > > static int > > mediatek_gpio_irq_type(struct irq_data *d, unsigned int type) > > { > > - struct gpio_chip *gc = irq_data_get_irq_chip_data(d); > > - struct mtk_data *gpio_data = gpiochip_get_data(gc); > > + struct mtk_data *gpio_data = irq_data_get_irq_chip_data(d); > > int pin = d->hwirq; > > int bank = pin / 32; > > struct mtk_gc *rg = gpio_data->gc_map[bank]; > > @@ -352,7 +348,7 @@ mediatek_gpio_probe(struct platform_device *pdev) > > if (gpio_data->gpio_irq) { > > gpio_data->gpio_irq_domain = irq_domain_add_linear(np, > > MTK_MAX_BANK * MTK_BANK_WIDTH, > > - &irq_domain_ops, NULL); > > + &irq_domain_ops, gpio_data); > > if (!gpio_data->gpio_irq_domain) > > dev_err(&pdev->dev, "irq_domain_add_linear failed\n"); > > } > > -- > > 2.7.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel