[PATCHv4] mtd: gpio-nand: add device tree bindings

Artem Bityutskiy dedekind1 at gmail.com
Fri Aug 19 15:51:46 EDT 2011


On Mon, 2011-08-15 at 16:24 +0100, Jamie Iles wrote:
> @@ -178,7 +249,7 @@ static int __devexit gpio_nand_remove(struct platform_device *dev)
>  
>  	nand_release(&gpiomtd->mtd_info);
>  
> -	res = platform_get_resource(dev, IORESOURCE_MEM, 1);
> +	res = gpio_nand_get_io_sync(dev);

Why do you call 'gpio_nand_get_io_sync(dev)' here, in
'gpio_nand_remove()' function? You should have it in gpiomtd->io_sync.
Right?

If this is the case, then you do not need a separate
'gpio_nand_get_io_sync()' function at all, you can make
'gpio_nand_get_config()' to fetch the io_sync information from the DT.
And then you will have one single function which gets data from DT, not
2 -> simpler code.

Do I miss something?

-- 
Best Regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list