From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Charles Keepax <ckeepax@opensource.wolfsonmicro.com>,
Mark Brown <broonie@kernel.org>,
patches@opensource.cirrus.com
Subject: Re: [PATCH] input: touchscreen: fix wm97xx-ts exit path
Date: Mon, 15 Oct 2018 11:17:46 -0700 [thread overview]
Message-ID: <20181015181746.GA127224@dtor-ws> (raw)
In-Reply-To: <c522fb84-20cd-39e6-bd2d-79ed8709fd5d@infradead.org>
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
prev parent reply other threads:[~2018-10-15 18:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-13 17:06 [PATCH] input: touchscreen: fix wm97xx-ts exit path Randy Dunlap
2018-10-15 18:17 ` Dmitry Torokhov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181015181746.GA127224@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.wolfsonmicro.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=rdunlap@infradead.org \
--cc=robert.jarzmik@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).