diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-11-03 21:30:05 +0100 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2022-11-04 16:10:56 +0100 |
commit | d59fdbc7164a6b2a0ed45c13387deac8efeed5a2 (patch) | |
tree | 91db33b392c86aff175cdb02f18242c542ddb544 /drivers/gpio/gpiolib-of.c | |
parent | gpio: pca9570: add slg7xl45106 support (diff) | |
download | linux-d59fdbc7164a6b2a0ed45c13387deac8efeed5a2.tar.xz linux-d59fdbc7164a6b2a0ed45c13387deac8efeed5a2.zip |
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 '')
-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; } |