Commit adf32eaa authored by Axel Lin's avatar Axel Lin Committed by Linus Walleij

gpio: mpc8xxx: Slightly update the code for better readability

Setting gc->direction_output to gc->direction_output looks strange.
I think this change makes the intention more clear.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent cd0d3f58
...@@ -339,8 +339,11 @@ static int mpc8xxx_probe(struct platform_device *pdev) ...@@ -339,8 +339,11 @@ static int mpc8xxx_probe(struct platform_device *pdev)
*/ */
mpc8xxx_irq_chip.irq_set_type = devtype->irq_set_type; mpc8xxx_irq_chip.irq_set_type = devtype->irq_set_type;
gc->direction_output = devtype->gpio_dir_out ?: gc->direction_output; if (devtype->gpio_dir_out)
gc->get = devtype->gpio_get ?: gc->get; gc->direction_output = devtype->gpio_dir_out;
if (devtype->gpio_get)
gc->get = devtype->gpio_get;
gc->to_irq = mpc8xxx_gpio_to_irq; gc->to_irq = mpc8xxx_gpio_to_irq;
ret = gpiochip_add_data(gc, mpc8xxx_gc); ret = gpiochip_add_data(gc, mpc8xxx_gc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment