Commit d59fdbc7 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Bartosz Golaszewski

gpiolib: of: Make use of device_match_of_node()

Make use of device_match_of_node() instead of open coding its
functionality.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
parent fbb19fe1
...@@ -85,7 +85,7 @@ static int of_gpiochip_match_node_and_xlate(struct gpio_chip *chip, void *data) ...@@ -85,7 +85,7 @@ static int of_gpiochip_match_node_and_xlate(struct gpio_chip *chip, void *data)
{ {
struct of_phandle_args *gpiospec = data; struct of_phandle_args *gpiospec = data;
return chip->gpiodev->dev.of_node == gpiospec->np && return device_match_of_node(&chip->gpiodev->dev, gpiospec->np) &&
chip->of_xlate && chip->of_xlate &&
chip->of_xlate(chip, gpiospec, NULL) >= 0; chip->of_xlate(chip, gpiospec, NULL) >= 0;
} }
......
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