diff options
author | Grygorii Strashko <grygorii.strashko@ti.com> | 2015-06-25 17:13:33 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-07-16 14:26:03 +0200 |
commit | c23837ce73a0cb84ab046a6c0aace30fdd1e26f0 (patch) | |
tree | 309e33543c8bde9af9739b68614344a4f5973407 /drivers/gpio/gpio-omap.c | |
parent | gpio: max732x: Add missing dev reference to gpiochip (diff) | |
download | linux-c23837ce73a0cb84ab046a6c0aace30fdd1e26f0.tar.xz linux-c23837ce73a0cb84ab046a6c0aace30fdd1e26f0.zip |
gpio: omap: prevent module from being unloaded while in use
OMAP GPIO driver allowed to be built as loadable module, but it
doesn't set owner field in GPIO chip structure. As result,
module_get/put() API is not working and it's possible to unload
OMAP driver while in use:
omap_gpio 48051000.gpio: REMOVING GPIOCHIP WITH GPIOS STILL REQUESTED
Hence, add missing configuration.
Cc: Tony Lindgren <tony@atomide.com>
Fixes: cac089f9026e ('gpio: omap: Allow building as a loadable module')
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>
Diffstat (limited to '')
-rw-r--r-- | drivers/gpio/gpio-omap.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index a0ad8030a7ef..61a731ff9a07 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1187,6 +1187,7 @@ static int omap_gpio_probe(struct platform_device *pdev) bank->irq = res->start; bank->dev = dev; bank->chip.dev = dev; + bank->chip.owner = THIS_MODULE; bank->dbck_flag = pdata->dbck_flag; bank->stride = pdata->bank_stride; bank->width = pdata->bank_width; |