Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3726960e authored by Grygorii Strashko's avatar Grygorii Strashko Committed by Linus Walleij
Browse files

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: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
Acked-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 5b76e79c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);