diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-11-03 23:30:05 +0300 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2022-11-04 18:10:56 +0300 |
commit | d59fdbc7164a6b2a0ed45c13387deac8efeed5a2 (patch) | |
tree | 91db33b392c86aff175cdb02f18242c542ddb544 /drivers/gpio/gpiolib-of.c | |
parent | fbb19fe17eaef7b6ba2e68dbf0600a97060f2909 (diff) | |
download | linux-d59fdbc7164a6b2a0ed45c13387deac8efeed5a2.tar.xz |
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib-of.c')
-rw-r--r-- | drivers/gpio/gpiolib-of.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 52616848a37c..4b91e19366a8 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -85,7 +85,7 @@ static int of_gpiochip_match_node_and_xlate(struct gpio_chip *chip, void *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, gpiospec, NULL) >= 0; } |