mtd: fix the conversion from dev to mtd_info
authorSaeed Bishara <saeed@marvell.com>
Tue, 28 Jul 2009 11:56:43 +0000 (04:56 -0700)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 3 Aug 2009 13:16:01 +0000 (14:16 +0100)
The patch fixes a bug when converting dev to mtd_info by using the
drvdata of the dev, the previous code used
container_of(dev, struct mtd_info, dev), but won't work for the mtdXro
devices as they created without being contained inside mtd_info structure.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

No differences found