mirror of https://gitee.com/openkylin/linux.git
gpiolib: assign chip owner to dev->driver->owner if not set
Assign GPIO chip owner field to chip->dev->driver->owner if it was not configured by GPIO driver. Cc: Johan Hovold <johan@kernel.org> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
5b76e79c77
commit
3726960edc
|
@ -287,6 +287,9 @@ int gpiochip_add(struct gpio_chip *chip)
|
|||
INIT_LIST_HEAD(&chip->pin_ranges);
|
||||
#endif
|
||||
|
||||
if (!chip->owner && chip->dev && chip->dev->driver)
|
||||
chip->owner = chip->dev->driver->owner;
|
||||
|
||||
of_gpiochip_add(chip);
|
||||
acpi_gpiochip_add(chip);
|
||||
|
||||
|
|
Loading…
Reference in New Issue