gpiolib: of: Make use of device_match_of_node()
PATCH 1/1 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 <[email protected]>
--- drivers/gpio/gpiolib-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpiolib-of.c +1 -1
@@ -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 ; }
Signature · 1 line
2.35.1
Quoted 4 lines · Andy Shevchenko
Make use of
device_match_of_node()instead of open coding its functionality.Signed-off-by Andy Shevchenko <[email protected]>
Reviewed-by Dmitry Torokhov <[email protected]>
Quoted 20 lines
--- drivers/gpio/gpiolib-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpio/gpiolib-of.c +1
-1@@ -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 ; }Signature · 1 line
2.35.1
Thanks.
Signature · 1 line
Dmitry
Bartosz Golaszewski
AppliedQuoted 23 lines · Andy Shevchenko
Make use of
device_match_of_node()instead of open coding its functionality.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/gpio/gpiolib-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpio/gpiolib-of.c +1
-2@@ -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 ; } --
Quoted 2 lines
2.35.1
Applied, thanks!
Bartosz