mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]>
Fixes: cac089f902 ('gpio: omap: Allow building as a loadable module')
Signed-off-by: Grygorii Strashko <[email protected]>
Acked-by: Alexandre Courbot <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
34ab54edbe
commit
c23837ce73
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue