[v1,2/2] pinctrl: baytrail: Group GPIO IRQ chip initialization
diff mbox series

Message ID 20191024143343.17638-2-andriy.shevchenko@linux.intel.com
State New
Headers show
Series
  • Untitled series #138392
Related show

Commit Message

Andy Shevchenko Oct. 24, 2019, 2:33 p.m. UTC
After commit aee0f04d5f3b ("pinctrl: intel: 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>
---
 drivers/pinctrl/intel/pinctrl-baytrail.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mika Westerberg Oct. 25, 2019, 10:02 a.m. UTC | #1
On Thu, Oct 24, 2019 at 05:33:43PM +0300, Andy Shevchenko wrote:
> After commit aee0f04d5f3b ("pinctrl: intel: 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>

Patch
diff mbox series

diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c
index 9d0e32dbf970..beb26550c25f 100644
--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -1513,7 +1513,6 @@  static int byt_gpio_probe(struct byt_gpio *vg)
 	gc->can_sleep	= false;
 	gc->parent	= &vg->pdev->dev;
 	gc->ngpio	= vg->soc_data->npins;
-	gc->irq.init_valid_mask	= byt_init_irq_valid_mask;
 
 #ifdef CONFIG_PM_SLEEP
 	vg->saved_context = devm_kcalloc(&vg->pdev->dev, gc->ngpio,
@@ -1537,6 +1536,7 @@  static int byt_gpio_probe(struct byt_gpio *vg)
 		girq = &gc->irq;
 		girq->chip = &vg->irqchip;
 		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->num_parents = 1;
 		girq->parents = devm_kcalloc(&vg->pdev->dev, 1,