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>
This commit is contained in:
parent
fbb19fe17e
commit
d59fdbc716
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue