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

Artem Bityutskiy dedekind1 at gmail.com
Sun Dec 18 06:49:02 EST 2011


On Sun, 2011-12-18 at 02:26 +0400, Ilya Yanok wrote:
> 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.

OK, then I'll ping David Woodhouse to merge this before 3.2 release.
Taken to l2-mtd-2.6.git so far, thanks!

-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20111218/8903a170/attachment.sig>


More information about the linux-mtd mailing list