pinctrl: baytrail: Group GPIO IRQ chip initialization

After commit 5ea422750a9f ("pinctrl: baytrail: Pass irqchip when
adding gpiochip") the GPIO IRQ chip structure is being initialized
under conditional when IRQ resource has been discovered. But that
commit left aside the assignment of ->init_valid_mask() callback
that is done unconditionally.

For sake of consistency and preventing some garbage in GPIO IRQ chip
structure group initialization together.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
This commit is contained in:
Andy Shevchenko 2019-10-24 17:33:43 +03:00
Родитель 539d8bde72
Коммит ab68b220e8
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1529,7 +1529,6 @@ static int byt_gpio_probe(struct byt_gpio *vg)
gc->add_pin_ranges = byt_gpio_add_pin_ranges; gc->add_pin_ranges = byt_gpio_add_pin_ranges;
gc->parent = &vg->pdev->dev; gc->parent = &vg->pdev->dev;
gc->ngpio = vg->soc_data->npins; gc->ngpio = vg->soc_data->npins;
gc->irq.init_valid_mask = byt_init_irq_valid_mask;
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
vg->saved_context = devm_kcalloc(&vg->pdev->dev, gc->ngpio, vg->saved_context = devm_kcalloc(&vg->pdev->dev, gc->ngpio,
@ -1553,6 +1552,7 @@ static int byt_gpio_probe(struct byt_gpio *vg)
girq = &gc->irq; girq = &gc->irq;
girq->chip = &vg->irqchip; girq->chip = &vg->irqchip;
girq->init_hw = byt_gpio_irq_init_hw; girq->init_hw = byt_gpio_irq_init_hw;
girq->init_valid_mask = byt_init_irq_valid_mask;
girq->parent_handler = byt_gpio_irq_handler; girq->parent_handler = byt_gpio_irq_handler;
girq->num_parents = 1; girq->num_parents = 1;
girq->parents = devm_kcalloc(&vg->pdev->dev, girq->num_parents, girq->parents = devm_kcalloc(&vg->pdev->dev, girq->num_parents,