[PATCH] plat_ram: call mtd_device_register only if partition data exists

Ilya Yanok yanok at emcraft.com
Sat Dec 17 17:26:39 EST 2011


Hi Artem,

On 17.12.2011 19:31, Artem Bityutskiy wrote:
>> mtd_device_parse_register() registers the device as a whole if no
>> partition data is passed so there is no reason to call
>> mtd_device_register() after that.
>>
>> Signed-off-by: Ilya Yanok <yanok at emcraft.com>
> 
> This seems to be a bug-fix, right? What happens without this patch?

Right.

> We end up with 2 MTD equivalent MTD devices?

Yes (only second one shown in /proc/mtd) and a warning for kobject:

kobject (cf2c10e0): tried to init an initialized object, something is
seriously wrong.

Regards, Ilya.



More information about the linux-mtd mailing list