Hi, Axel, Yes you are right. Maybe we can make the change just like this: + mpc8xxx_gc->direction_output = gc->direction_output; gc->direction_output = devtype->gpio_dir_out ?: gc->direction_output; gc->get = devtype->gpio_get ?: gc->get; gc->to_irq = mpc8xxx_gpio_to_irq; - mpc8xxx_gc->direction_output = gc->direction_output; Best Regards, Liu Gang -----Original Message----- --- Hi, I don't have this h/w, please review and test if this patch works. Thank, Axel drivers/gpio/gpio-mpc8xxx.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index ecdb27a..0ed279a 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -344,11 +344,14 @@ static int mpc8xxx_probe(struct platform_device *pdev) */ mpc8xxx_irq_chip.irq_set_type = devtype->irq_set_type; - gc->direction_output = devtype->gpio_dir_out ?: gc->direction_output; - gc->get = devtype->gpio_get ?: gc->get; - gc->to_irq = mpc8xxx_gpio_to_irq; - mpc8xxx_gc->direction_output = gc->direction_output; + if (devtype->gpio_dir_out) + gc->direction_output = devtype->gpio_dir_out; + + if (devtype->gpio_get) + gc->get = devtype->gpio_get; + + gc->to_irq = mpc8xxx_gpio_to_irq; ret = gpiochip_add_data(gc, mpc8xxx_gc); if (ret) { -- 2.1.4 ��.n��������+%������w��{.n�����{�� b���ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f