From: "Mike Frysinger" <vapier.adi@gmail.com>
To: "Atsushi Nemoto" <anemo@mba.ocn.ne.jp>
Cc: vapier@gentoo.org, linux-mtd@lists.infradead.org,
dwmw2@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: unify mtd partition/device registration
Date: Thu, 13 Nov 2008 09:51:01 -0500 [thread overview]
Message-ID: <8bd0f97a0811130651k11c52a53j91c80cf196e9f66a@mail.gmail.com> (raw)
In-Reply-To: <20081113.232823.125897716.anemo@mba.ocn.ne.jp>
On Thu, Nov 13, 2008 at 09:28, Atsushi Nemoto wrote:
> On Thu, 13 Nov 2008 22:43:50 +0900 (JST), Atsushi Nemoto wrote:
>> On Wed, 12 Nov 2008 18:38:53 -0500, Mike Frysinger wrote:
>> > Rather than having every map/mtd driver doing the same sequence of
>> > registering partitions and/or devices, implement common parse_mtd().
>> >
>> > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
>> > ---
>> > drivers/mtd/mtdcore.c | 37 +++++++++++++++++++++++++++++++++++++
>> > include/linux/mtd/mtd.h | 3 +++
>> > 2 files changed, 40 insertions(+), 0 deletions(-)
>>
>> I like this idea.
>
> Some drivers call both add_mtd_device() and add_mtd_partitions(). The
> mtd_device is used to access whole flash area (like /dev/hda). How do
> you think of these usage patterns?
>
> maps/edb7312.c
> maps/mbx860.c
> maps/plat-ram.c
> nand/cafe_nand.c
> nand/diskonchip.c
> nand/ndfc.c
>
> Automatic fallback to mtd_device in parse_mtd() is convenient but
> somewhat unflexible...
we could just have it do it all the time. i dont see a problem with
exposing the entire block device the whole time ? i know for the
driver or two of mine, i'm fine with it.
...
ret = parse_mtd_partitions(mtd, probe_types, &parts, 0);
if (ret > 0) {
ret = add_mtd_partitions(mtd, parts, ret);
kfree(parts);
} else if (nr_parts)
ret = add_mtd_partitions(mtd, parts, nr_parts);
if (ret)
return ret;
#endif
return add_mtd_device(mtd);
-mike
next prev parent reply other threads:[~2008-11-13 14:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-12 23:38 Mike Frysinger
2008-11-12 23:39 ` [PATCH] mtd/physmap: use parse_mtd() Mike Frysinger
2008-11-13 13:51 ` Atsushi Nemoto
2008-11-13 14:44 ` Mike Frysinger
2008-11-14 21:41 ` Andrew Morton
2008-11-14 22:07 ` Mike Frysinger
2008-11-12 23:39 ` [PATCH] mtd/bfin-async-flash: " Mike Frysinger
2008-11-13 13:43 ` [PATCH] mtd: unify mtd partition/device registration Atsushi Nemoto
2008-11-13 14:28 ` Atsushi Nemoto
2008-11-13 14:51 ` Mike Frysinger [this message]
2008-11-13 15:51 ` Atsushi Nemoto
2008-11-13 15:55 ` Mike Frysinger
2008-11-13 14:47 ` Mike Frysinger
2008-11-14 21:39 ` Andrew Morton
2008-11-16 17:34 ` Jörn Engel
2008-11-16 17:55 ` Mike Frysinger
2008-11-16 18:02 ` Jörn Engel
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=8bd0f97a0811130651k11c52a53j91c80cf196e9f66a@mail.gmail.com \
--to=vapier.adi@gmail.com \
--cc=anemo@mba.ocn.ne.jp \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=vapier@gentoo.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
all inboxes | Powered by JetHome®