From: "Artem B. Bityutskiy" <dedekind@yandex.ru>
To: Linux MTD <linux-mtd@lists.infradead.org>
Subject: [PATCH] MTD + 2.6.13/2.6.14 OOPS in class_device_create() fix
Date: Fri, 09 Dec 2005 18:46:29 +0300 [thread overview]
Message-ID: <4399A6D5.9050304@yandex.ru> (raw)
Hello,
Current MTD CVS head oopses in class_device_create().
This are because there is 2 calls in mtdchar.c which look like this:
class_device_create(mtd_class, NULL, MKDEV(MTD_CHAR_MAJOR,
mtd->index*2), NULL, "mtd%d", mtd->index);
This is perfectly fine with 2.6.15-rc5, where class_device_create() has
the following prototype:
struct class_device *class_device_create(struct class *cls, struct
class_device *parent, dev_t devt, struct device *device, char *fmt, ...)
But it causes oops in 2.6.14.3, where class_device_create() has the
following (different) prototype:
struct class_device *class_device_create(struct class *cls, dev_t devt,
struct device *device, char *fmt, ...)
I.e., one more argument 'parent' was introduced in 2.6.15-rc5. And since
the function accepts any number of arguments, it compiles well, but
doesn't work.
Usually problems like this are solved by means of
include/linux/mtd/compatmac.h, but in this case I have no idea how to
solve this gracefully there.
As 2.6.15 is not yet out and 2.6.14 is still used, I offer the attached
hotfix for now.
--
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.
next reply other threads:[~2005-12-09 15:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-09 15:46 Artem B. Bityutskiy [this message]
2005-12-09 15:53 ` [PATCH] MTD + 2.6.13/2.6.14 OOPS in class_device_create() fix Artem B. Bityutskiy
[not found] <520AB2AD990DC04082102F77CA17263801F612A9@dlee03.ent.ti.com>
2005-12-11 11:49 ` Artem B. Bityutskiy
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=4399A6D5.9050304@yandex.ru \
--to=dedekind@yandex.ru \
--cc=linux-mtd@lists.infradead.org \
/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