From: Pavel Roskin <proski@gnu.org>
To: Simon Kelley <simon@thekelleys.org.uk>, linux-kernel@vger.kernel.org
Subject: [PATCH] Crash in atmel_cs due to fake device
Date: Fri, 30 Apr 2004 14:26:41 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.58.0404301413440.4502@marabou.research.att.com> (raw)
Hi, Simon and everybody!
Since PCMCIA devices are not devices for the kernel, atmel_cs uses a fake
device for calling request_firmware(). The fake device has .bus_id
initialized, but it's not enough for Linux 2.6.6-rc3. The kernel would
oops while trying to create a link from /sys/class/firmware/pcmcia/device
to the location of the device in sysfs.
To work around this problem, .kobj.k_name should be defined in the fake
device. I know, it's ugly as hell, but I don't see a better solution
until PCMCIA device drivers are converted to the device model.
The patch has been compile tested only, but I have tested a similar patch
with another driver, which is not in the kernel yet (spectrum_cs). I'm
quite sure that atmel_cs is affected by this problem.
=============================
--- linux.orig/drivers/net/wireless/atmel_cs.c
+++ linux/drivers/net/wireless/atmel_cs.c
@@ -350,6 +350,9 @@ static struct {
/* This is strictly temporary, until PCMCIA devices get integrated into the device model. */
static struct device atmel_device = {
.bus_id = "pcmcia",
+ .kobj = {
+ .k_name = "atmel_cs"
+ }
};
static void atmel_config(dev_link_t *link)
=============================
--
Regards,
Pavel Roskin
next reply other threads:[~2004-04-30 18:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-30 18:26 Pavel Roskin [this message]
2004-04-30 21:50 ` Simon Kelley
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=Pine.LNX.4.58.0404301413440.4502@marabou.research.att.com \
--to=proski@gnu.org \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®