public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: John Crispin <blogic@openwrt.org>
To: dedekind1@gmail.com
Cc: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>,
	Ralph Hempel <ralph.hempel@lantiq.com>,
	linux-mtd@lists.infradead.org,
	Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH V7] MIPS: lantiq: add NOR flash support
Date: Tue, 05 Apr 2011 14:57:41 +0200	[thread overview]
Message-ID: <4D9B11C5.3030308@openwrt.org> (raw)
In-Reply-To: <1302006995.2760.120.camel@localhost>


>> +
>> +static int ltq_mtd_probing;
>>     
> ... I'm worried about this global variable. If you have multiple
> instances of such NOR flash, then you theoretically may have a situation
> when one of them is being probed, while another is being used for real.
> And this single global switch will break the one which is used for real.
>
> IOW, the right solution would be to have per-chip flag, not a global
> flag.
>
>   

Hi,

we could dynamically allocate the instance of struct map_info and then
use map_priv_1 to indicate whether the device is probing or not.

this would avoid using a global variable

John

  reply	other threads:[~2011-04-05 12:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05 12:33 [PATCH V7] MIPS: lantiq: add NOR flash support John Crispin
2011-04-05 12:36 ` Artem Bityutskiy
2011-04-05 12:57   ` John Crispin [this message]
2011-04-05 12:58     ` Artem Bityutskiy
2011-04-05 13:06       ` John Crispin

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=4D9B11C5.3030308@openwrt.org \
    --to=blogic@openwrt.org \
    --cc=daniel.schwierzeck@googlemail.com \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=ralf@linux-mips.org \
    --cc=ralph.hempel@lantiq.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