[Top] [All Lists]

Re: [PATCH V7] MIPS: lantiq: add NOR flash support

Subject: Re: [PATCH V7] MIPS: lantiq: add NOR flash support
From: John Crispin <>
Date: Tue, 05 Apr 2011 14:57:41 +0200
Cc: Ralf Baechle <>,, Ralph Hempel <>,, Daniel Schwierzeck <>, David Woodhouse <>
In-reply-to: <1302006995.2760.120.camel@localhost>
Original-recipient: rfc822;
References: <> <1302006995.2760.120.camel@localhost>
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100913 Icedove/3.0.7
>> +
>> +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.


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


<Prev in Thread] Current Thread [Next in Thread>