pinctrl: qcom: spmi-gpio: define an irqchip for each pinctrl device

Generate a new irqchip struct for each pinctrl device that is
registered to avoid sharing the same irqchip between devices.
This corrects the following error which is printed when
registering more than one pinctrl-spmi-gpio device:

  "detected irqchip that is shared with multiple gpiochips:
   please fix the driver."

Change-Id: I80ce67fc674b96f4386499f547395ceed7480583
Signed-off-by: David Collins <collinsd@codeaurora.org>
This commit is contained in:
David Collins 2019-12-09 16:17:19 -08:00
commit 5cc6a7c454

View file

@ -1083,7 +1083,12 @@ static int pmic_gpio_probe(struct platform_device *pdev)
return -ENXIO;
girq = &state->chip.irq;
girq->chip = &pmic_gpio_irq_chip;
girq->chip = devm_kmemdup(dev, &pmic_gpio_irq_chip,
sizeof(pmic_gpio_irq_chip), GFP_KERNEL);
if (!girq->chip)
return -ENOMEM;
girq->default_type = IRQ_TYPE_NONE;
girq->handler = handle_level_irq;
girq->fwnode = of_node_to_fwnode(state->dev->of_node);