From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Manuel Estrada Sainz <ranty@ranty.pantax.net>
Cc: Andrew Morton <akpm@osdl.org>,
LKML <linux-kernel@vger.kernel.org>,
jt@hpl.hp.com, Simon Kelley <simon@thekelleys.org.uk>
Subject: [PATCH 1/2] Pin firmware module (was Re: [PATCH] request_firmware(): fixes and polishing.)
Date: Sun, 29 Feb 2004 01:32:55 -0500 [thread overview]
Message-ID: <200402290132.57431.dtor_core@ameritech.net> (raw)
In-Reply-To: <200402290130.47960.dtor_core@ameritech.net>
===================================================================
ChangeSet@1.1694, 2004-02-29 00:06:09-05:00, dtor_core@ameritech.net
Firmware loader:
We need to pin the firmware loader module until the last reference
to the firmware class device is dropped and the class device is
destroyed.
firmware_class.c | 6 ++++++
1 files changed, 6 insertions(+)
===================================================================
diff -Nru a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
--- a/drivers/base/firmware_class.c Sun Feb 29 01:20:57 2004
+++ b/drivers/base/firmware_class.c Sun Feb 29 01:20:57 2004
@@ -263,6 +263,8 @@
kfree(fw_priv);
kfree(class_dev);
+
+ module_put(THIS_MODULE);
}
static void
@@ -325,6 +327,7 @@
kfree(class_dev);
return retval;
}
+
static int
fw_setup_class_device(struct firmware *fw, struct class_device **class_dev_p,
const char *fw_name, struct device *device)
@@ -337,6 +340,9 @@
retval = fw_register_class_device(&class_dev, fw_name, device);
if (retval)
goto out;
+
+ /* Need to pin this module until class device is destroyed */
+ __module_get(THIS_MODULE);
fw_priv = class_get_devdata(class_dev);
next prev parent reply other threads:[~2004-02-29 6:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ranty@debian.org>
2004-02-25 1:34 ` [PATCH] request_firmware(): fixes and polishing Manuel Estrada Sainz
2004-02-25 1:34 ` Manuel Estrada Sainz
2004-02-25 1:34 ` Manuel Estrada Sainz
2004-02-25 1:34 ` Manuel Estrada Sainz
2004-02-25 1:34 ` Manuel Estrada Sainz
2004-02-25 1:34 ` Manuel Estrada Sainz
2004-02-25 1:34 ` Manuel Estrada Sainz
2004-02-25 1:34 ` Manuel Estrada Sainz
2004-02-25 19:47 ` Jean Tourrilhes
2004-02-25 23:40 ` Manuel Estrada Sainz
2004-02-29 6:30 ` Dmitry Torokhov
2004-02-29 6:32 ` Dmitry Torokhov [this message]
2004-02-29 6:34 ` [PATCH 2/2] Delay firmware hotplug event (was Re: [PATCH] request_firmware(): fixes and polishing.) 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=200402290132.57431.dtor_core@ameritech.net \
--to=dtor_core@ameritech.net \
--cc=akpm@osdl.org \
--cc=jt@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ranty@ranty.pantax.net \
--cc=simon@thekelleys.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.