[PATCH 041/104] mtd: prepare to convert of_mtd_parse_partitions to partition parser

Dmitry Eremin-Solenikov dbaryshkov at gmail.com
Mon Jun 6 06:10:03 EDT 2011


On 06.06.2011 12:19, Artem Bityutskiy wrote:
> On Mon, 2011-06-06 at 12:15 +0400, Dmitry Eremin-Solenikov wrote:
>> Answering both of your questions here:
>> My idea is to have an of node connected to mtd device, if there is
>> any.
>
> I just think the connection should be different. Probably the best would
> be to have an OF-specific object (some struct of_info) containing struct
> mtd_info inside, and then OF code can use container_of().

That will be agains current linux coding practices. E.g. check the gpio, 
i2c, etc. code. All add device_node field to existing structs.

>> It can be used by ofpart.c, ofoldpart.c (extract from physmap_of),
>> maybe some other parsers/drivers/etc.
>
> I'm still not convinced we need ofoldpart.c - that is a small piece of
> cade which can be put to ofpart.c.

Agreed.


-- 
With best wishes
Dmitry




More information about the linux-mtd mailing list