diff options
author | Axel Lin <axel.lin@ingics.com> | 2016-02-22 10:24:54 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-03-09 06:44:13 +0300 |
commit | adf32eaa05323449b74b36f25b918583e2bdb6f1 (patch) | |
tree | ebd4528743de4175796182928dfa417fbbac39f0 /drivers/gpio/gpio-mpc8xxx.c | |
parent | cd0d3f58a0ca05773c29b5e5b82f075b607777ba (diff) | |
download | linux-adf32eaa05323449b74b36f25b918583e2bdb6f1.tar.xz |
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: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-mpc8xxx.c')
-rw-r--r-- | drivers/gpio/gpio-mpc8xxx.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index bc042ad62cfb..425501c39527 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -339,8 +339,11 @@ 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; + 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); |