From: Helge Deller <deller@gmx.de>
To: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Cc: Richard Purdie <rpurdie@rpsys.net>
Subject: [PATCH] apm-power.c: Fix crash when unloading modules
Date: Mon, 24 Mar 2008 14:43:18 +0100 [thread overview]
Message-ID: <200803241443.19164.deller@gmx.de> (raw)
This patch fixes a crash in the apm-power driver when a input-device
(e.g. a keyboard driver module) is unloaded.
Fix is the same as it's used in the evbug driver.
I assume this patch went unnoticed, since most keyboard drivers
in PDAs are not compiled as modules.
Signed-off-by: Helge Deller <deller@gmx.de>
CC: Richard Purdie <rpurdie@rpsys.net>
--
apm-power.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
--
diff --git a/drivers/input/apm-power.c b/drivers/input/apm-power.c
index c36d110..7d61a96 100644
--- a/drivers/input/apm-power.c
+++ b/drivers/input/apm-power.c
@@ -63,8 +63,6 @@ static int apmpower_connect(struct input_handler *handler,
handle->handler = handler;
handle->name = "apm-power";
- handler->private = handle;
-
error = input_register_handle(handle);
if (error) {
printk(KERN_ERR
@@ -87,11 +85,10 @@ static int apmpower_connect(struct input_handler *handler,
return 0;
}
-static void apmpower_disconnect(struct input_handle *handler)
+static void apmpower_disconnect(struct input_handle *handle)
{
- struct input_handle *handle = handler->private;
-
input_close_device(handle);
+ input_unregister_handle(handle);
kfree(handle);
}
next reply other threads:[~2008-03-24 13:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-24 13:43 Helge Deller [this message]
2008-03-24 15:03 ` [PATCH] apm-power.c: Fix crash when unloading modules Dmitry Torokhov
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=200803241443.19164.deller@gmx.de \
--to=deller@gmx.de \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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).