linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: David Brownell <david-b@pacbell.net>
Cc: 'Bernd Schmidt' <bernd.schmidt@analog.com>,
	Sudhakar Rajashekhara <sudhakar.raj@ti.com>,
	'Nicolas Pitre' <nico@fluxnic.net>,
	'Kevin Hilman' <khilman@deeprootsystems.com>,
	linux-kernel@vger.kernel.org,
	'David Howells' <dhowells@redhat.com>,
	'David Brownell' <dbrownell@users.sourceforge.net>,
	linux-mtd@lists.infradead.org,
	'Andrew Morton' <akpm@linux-foundation.org>
Subject: RE: [PATCH 1/2] mtdpart: memory accessor interface for MTD layer
Date: Wed, 04 Aug 2010 12:08:47 +0100	[thread overview]
Message-ID: <1280920127.19499.20.camel@localhost> (raw)
In-Reply-To: <350720.60481.qm@web180309.mail.gq1.yahoo.com>

On Wed, 2010-08-04 at 03:31 -0700, David Brownell wrote:
> Point is to ensure that enough of the right context
> information is available to initialize correctly.
> So the right data is extracted and passed on.

Forgive me if I'm being dim (and in particular, please forgive me if I'm
going over something that was already discussed; I know it's been a
while). But I don't see why it needs to be passed through the core MTD
code.

To take the simple case of an unpartitioned MTD device -- why can't the
map driver (or whatever) just call the maccessor setup function for
itself, directly, right after calling add_mtd_device() with its
newly-probed MTD device?

And for partitions, why can't it do the same, on the appropriate
partition.

OK, the answer to the latter question is that you don't actually *have*
the pointers to each partition you register. But that's easily fixed.

If we make add_mtd_partitions() take an extra 'struct mtd_info **'
argument and put pointers to the slave mtd 'devices' into that, it means
that your board driver *can* reliably get the mtd pointer for the fourth
partition, or whatever it needs. And can then just do the memory
accessor setup for itself.

Isn't that enough?

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation

  reply	other threads:[~2010-08-04 11:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-16 20:41 [PATCH 1/2] mtdpart: memory accessor interface for MTD layer Kevin Hilman
2010-04-08  8:10 ` Artem Bityutskiy
2010-05-13 23:50 ` David Woodhouse
2010-07-07 10:56   ` Sudhakar Rajashekhara
2010-07-07 11:08     ` David Brownell
2010-07-08 15:10       ` Sudhakar Rajashekhara
2010-07-08 16:00         ` David Brownell
2010-08-04 10:12       ` David Woodhouse
2010-08-04 10:31         ` David Brownell
2010-08-04 11:08           ` David Woodhouse [this message]
2010-08-04 11:27             ` David Brownell
2010-08-06  6:48             ` Sudhakar Rajashekhara
2010-08-08 12:23               ` David Woodhouse
2010-08-09 11:55                 ` Sudhakar Rajashekhara
  -- strict thread matches above, loose matches on Subject: below --
2010-10-01 21:16 [patch " akpm
2010-10-02 14:09 ` Artem Bityutskiy
2010-10-02 14:44   ` David Woodhouse
2010-10-04 14:28     ` Sudhakar Rajashekhara
2010-10-02 19:09   ` Andrew Morton
2010-10-20 22:59 akpm

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=1280920127.19499.20.camel@localhost \
    --to=dwmw2@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=bernd.schmidt@analog.com \
    --cc=david-b@pacbell.net \
    --cc=dbrownell@users.sourceforge.net \
    --cc=dhowells@redhat.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=nico@fluxnic.net \
    --cc=sudhakar.raj@ti.com \
    /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;
as well as URLs for NNTP newsgroup(s).