提交 ef382374 编写于 作者: N Nikita Shubin 提交者: Bartosz Golaszewski

gpiolib: add a warning on gpiochip->to_irq defined

gpiochip->to_irq method is redefined in gpiochip_add_irqchip.

A lot of gpiod driver's still define ->to_irq method, let's give
a gentle warning that they can no longer rely on it, so they can remove
it on ocassion.

Fixes: e0d89728 ("gpio: Implement tighter IRQ chip integration")
Signed-off-by: NNikita Shubin <nikita.shubin@maquefel.me>
Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
上级 1fc7c1ef
......@@ -1489,6 +1489,9 @@ static int gpiochip_add_irqchip(struct gpio_chip *gc,
type = IRQ_TYPE_NONE;
}
if (gc->to_irq)
chip_warn(gc, "to_irq is redefined in %s and you shouldn't rely on it\n", __func__);
gc->to_irq = gpiochip_to_irq;
gc->irq.default_type = type;
gc->irq.lock_key = lock_key;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册