[PATCH] [MTD] MXC NAND driver fixes (v2)
Vladimir Barinov
vbarinov at embeddedalley.com
Mon Apr 6 05:11:36 EDT 2009
Sascha Hauer wrote:
> On Fri, Apr 03, 2009 at 12:43:15PM +0400, Vladimir Barinov wrote:
>
>> The following patch fixes:
>> - re-initialization of host->col_addr which is used as byte index
>> between the successive READID flash commands.
>> - compile error when CONFIG_PM is enabled
>> - pass on the error code from clk_get()
>> - return -ENOMEM in case of failed ioremap()
>> - pass on the return value of platform_driver_probe() directly
>> - remove excessive printk
>> - let command line partition table parsing with mxc_nand name.
>> The cmd_line parsing is done via <mtd-id> name that differs
>> from mxc_nand by default and looks like "NAND 256MiB 1,8V 8-bit"
>>
>> Signed-off-by: Vladimir Barinov <vbarinov at embeddedalley.com>
>> Signed-off-by: Lothar Wassmann <LW at KARO-electronics.de>
>> ---
>> drivers/mtd/nand/mxc_nand.c | 45 +++++++++++++++++++++++-------------------
>> 1 files changed, 25 insertions(+), 20 deletions(-)
>>
>>
>> /* Register the partitions */
>> #ifdef CONFIG_MTD_PARTITIONS
>> +#ifdef CONFIG_MTD_CMDLINE_PARTS
>> + mtd->name = "mxc_nand";
>> +#endif
>>
>
> Thinking about it I'm totally against this ifdef. The name should not
> depend on command line partition support being compiled into the kernel
> or not. Just because it's compiled in does not mean that the user
> actually wants to use it and it's quite confusing that the name changes
> when a totally unrelated option is changed. I think it should not even
> be inside CONFIG_MTD_PARTITIONS.
>
Actually I agree to make the name permanent and put out of any ifdef.
I've added cmdline dependency here just because of too long command line
name
needed to parse partition table and all other cases were useless.
> The rest of the patch seems ok to me.
>
Then I'll put the driver naming out of ifdefs and resend the v3.
> Sascha
>
More information about the linux-mtd
mailing list