From: David Brownell <david-b@pacbell.net>
To: Kevin Cernekee <kpc.mtd@gmail.com>, dwmw2@infradead.org
Cc: Linux MTD <linux-mtd@lists.infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: [patch/rfc 2.6.29 1/2] MTD: driver model updates
Date: Sat, 4 Apr 2009 10:18:19 -0700 [thread overview]
Message-ID: <200904041018.19657.david-b@pacbell.net> (raw)
In-Reply-To: <a95a62fe0904031300i82bdf42h5bc854a002e0091e@mail.gmail.com>
On Friday 03 April 2009, Kevin Cernekee wrote:
> @@ -413,6 +590,12 @@ done:
>
> static int __init init_mtd(void)
> {
> + mtd_class = class_create(THIS_MODULE, "mtd");
> +
> + if (IS_ERR(mtd_class)) {
> + pr_err("Error creating mtd class.\n");
> + return PTR_ERR(mtd_class);
> + }
The reason I had the class creation code in its own initcall
is to ensure that it's there even when procfs isn't. This
init_mtd() stuff is only there if procfs is configured.
So I don't much like this part of Kevin's change ... unless
MTD becomes dependent on procfs. If there's an issue with
CONFIG_MTD=m then there's a better fix than this.
> if ((proc_mtd = create_proc_entry( "mtd", 0, NULL )))
> proc_mtd->read_proc = mtd_read_proc;
> return 0;
> @@ -422,6 +605,7 @@ static void __exit cleanup_mtd(void)
> {
> if (proc_mtd)
> remove_proc_entry( "mtd", NULL);
> + class_destroy(mtd_class);
> }
>
> module_init(init_mtd);
next prev parent reply other threads:[~2009-04-04 17:18 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-26 7:42 [patch/rfc 2.6.29 1/2] MTD: driver model updates David Brownell
2009-03-31 21:18 ` David Brownell
2009-03-31 23:51 ` Kay Sievers
2009-04-01 13:43 ` Juergen Beisert
2009-04-01 1:17 ` Kevin Cernekee
2009-04-01 3:21 ` David Brownell
2009-04-01 4:49 ` Kevin Cernekee
2009-04-01 6:36 ` David Brownell
2009-04-01 7:29 ` Ricard Wanderlof
2009-04-01 7:51 ` Artem Bityutskiy
2009-04-01 8:05 ` David Brownell
2009-04-01 8:25 ` Ricard Wanderlof
2009-04-01 8:28 ` Artem Bityutskiy
2009-04-02 23:41 ` Kevin Cernekee
2009-04-03 7:03 ` Artem Bityutskiy
2009-04-03 7:09 ` Artem Bityutskiy
2009-04-03 20:00 ` Kevin Cernekee
2009-04-04 14:36 ` David Woodhouse
2009-04-04 16:17 ` Kevin Cernekee
2009-04-04 16:20 ` David Brownell
2009-04-04 16:29 ` David Woodhouse
2009-04-04 17:18 ` David Brownell [this message]
2009-04-06 5:34 ` Greg KH
2009-04-03 10:04 ` David Woodhouse
2009-04-03 17:24 ` David Brownell
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=200904041018.19657.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=dwmw2@infradead.org \
--cc=kpc.mtd@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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