* [PATCH] input: touchscreen: fix wm97xx-ts exit path
@ 2018-10-13 17:06 Randy Dunlap
2018-10-15 18:17 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2018-10-13 17:06 UTC (permalink / raw)
To: LKML, linux-input
Cc: Robert Jarzmik, Charles Keepax, Dmitry Torokhov, Mark Brown, patches
From: Randy Dunlap <rdunlap@infradead.org>
Loading then unloading wm97xx-ts.ko when CONFIG_AC97_BUS=m
causes a WARNING: from drivers/base/driver.c:
Unexpected driver unregister!
WARNING: CPU: 0 PID: 1709 at ../drivers/base/driver.c:193 driver_unregister+0x30/0x40
Fix this by only calling driver_unregister() with the same
condition that driver_register() is called.
Fixes: ae9d1b5fbd7b ("Input: wm97xx: add new AC97 bus support")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: patches@opensource.cirrus.com
Cc: linux-input@vger.kernel.org
---
drivers/input/touchscreen/wm97xx-core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- lnx-419-rc7.orig/drivers/input/touchscreen/wm97xx-core.c
+++ lnx-419-rc7/drivers/input/touchscreen/wm97xx-core.c
@@ -929,7 +929,8 @@ static int __init wm97xx_init(void)
static void __exit wm97xx_exit(void)
{
- driver_unregister(&wm97xx_driver);
+ if (IS_BUILTIN(CONFIG_AC97_BUS))
+ driver_unregister(&wm97xx_driver);
platform_driver_unregister(&wm97xx_mfd_driver);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] input: touchscreen: fix wm97xx-ts exit path
2018-10-13 17:06 [PATCH] input: touchscreen: fix wm97xx-ts exit path Randy Dunlap
@ 2018-10-15 18:17 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2018-10-15 18:17 UTC (permalink / raw)
To: Randy Dunlap
Cc: LKML, linux-input, Robert Jarzmik, Charles Keepax, Mark Brown, patches
On Sat, Oct 13, 2018 at 10:06:18AM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Loading then unloading wm97xx-ts.ko when CONFIG_AC97_BUS=m
> causes a WARNING: from drivers/base/driver.c:
>
> Unexpected driver unregister!
> WARNING: CPU: 0 PID: 1709 at ../drivers/base/driver.c:193 driver_unregister+0x30/0x40
>
> Fix this by only calling driver_unregister() with the same
> condition that driver_register() is called.
>
> Fixes: ae9d1b5fbd7b ("Input: wm97xx: add new AC97 bus support")
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Robert Jarzmik <robert.jarzmik@free.fr>
> Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: patches@opensource.cirrus.com
> Cc: linux-input@vger.kernel.org
Applied, thank you.
> ---
> drivers/input/touchscreen/wm97xx-core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> --- lnx-419-rc7.orig/drivers/input/touchscreen/wm97xx-core.c
> +++ lnx-419-rc7/drivers/input/touchscreen/wm97xx-core.c
> @@ -929,7 +929,8 @@ static int __init wm97xx_init(void)
>
> static void __exit wm97xx_exit(void)
> {
> - driver_unregister(&wm97xx_driver);
> + if (IS_BUILTIN(CONFIG_AC97_BUS))
> + driver_unregister(&wm97xx_driver);
> platform_driver_unregister(&wm97xx_mfd_driver);
> }
>
>
>
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-15 18:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-13 17:06 [PATCH] input: touchscreen: fix wm97xx-ts exit path Randy Dunlap
2018-10-15 18:17 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).