Re: [PATCH v5 2/7] gpio: ep93xx: Fix single irqchip with multi gpiochips
From: Nikita Shubin <nikita.shubin@maquefel.me>
Date: 2021-02-09 12:55:48
Also in:
lkml
From: Nikita Shubin <nikita.shubin@maquefel.me>
Date: 2021-02-09 12:55:48
Also in:
lkml
On Tuesday, 9 February 2021 15:46:19 MSK Andy Shevchenko wrote:
On Tue, Feb 9, 2021 at 2:35 PM Nikita Shubin
[off-list ref] wrote:
quoted
On Monday, 8 February 2021 16:20:17 MSK Andy Shevchenko wrote:quoted
On Mon, Feb 8, 2021 at 11:00 AM Nikita Shubin[off-list ref] wrote:...quoted
quoted
quoted
+static void ep93xx_init_irq_chip(struct device *dev, struct irq_chip *ic, const char *label) +{ + ic->name = devm_kasprintf(dev, GFP_KERNEL, "gpio-irq-%s", label);Is the label being NULL okay?
You mean ENOMEM should be honored ? I think you are right about it.
quoted
The label is taken from ep93xx_gpio_banks[], so unless we explicitly pass zero to ep93xx_init_irq_chip(), we are ok.Maybe I was unclear, let me rephrase: Is the *resulting* label being NULL okay?quoted
quoted
quoted
+ ic->irq_ack = ep93xx_gpio_irq_ack; + ic->irq_mask_ack = ep93xx_gpio_irq_mask_ack; + ic->irq_mask = ep93xx_gpio_irq_mask; + ic->irq_unmask = ep93xx_gpio_irq_unmask; + ic->irq_set_type = ep93xx_gpio_irq_type; +}