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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> +
>> +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




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux