From: Andy Shevchenko Date: Thu, 3 Nov 2022 20:30:05 +0000 (+0200) Subject: gpiolib: of: Make use of device_match_of_node() X-Git-Tag: v6.6.7~3894^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d59fdbc7164a6b2a0ed45c13387deac8efeed5a2;p=platform%2Fkernel%2Flinux-starfive.git 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 Reviewed-by: Dmitry Torokhov Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 5261684..4b91e19 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; }