UBI: fix mtd device string parsing
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 25 Dec 2007 17:17:00 +0000 (19:17 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Mon, 25 May 2009 14:08:28 +0000 (17:08 +0300)
commit544331de2d1e5cb2936e6634f8a1461b67f18d1d
tree59ee6f232a3c201a7490d323490993023e94691a
parentcc85904cb68e6d8ae6a1fad490a6d0930914e7a1
UBI: fix mtd device string parsing

UBI allows to specify MTD device name or number when the module is being
loaded. When parsing MTD device identity string, it first tries to treat
it as device NAME, and if that fails, it treats it as device number.

Make it vice-versa as this is more logical and makes less troubles when
you have an MTD device named "1" and try to load mtd1 which has different
name. This is especially easy to hit when gluebi is enabled.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/build.c