[PATCH 5/7] mtd: raw: rename raw device
Sascha Hauer
s.hauer at pengutronix.de
Mon Oct 28 08:01:38 EDT 2013
The name of the raw device is mtdraw<num> which is inconsistent to other
mtd devices which are named mtd<num>.<partname>. Rename it to mtd<num>.raw.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/boards/mioa701/env/bin/barebox_update | 8 ++++----
arch/arm/boards/mioa701/env/bin/dps1_update | 6 +++---
drivers/mtd/mtdraw.c | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/arm/boards/mioa701/env/bin/barebox_update b/arch/arm/boards/mioa701/env/bin/barebox_update
index b544563..1023770 100644
--- a/arch/arm/boards/mioa701/env/bin/barebox_update
+++ b/arch/arm/boards/mioa701/env/bin/barebox_update
@@ -1,10 +1,10 @@
#!/bin/sh
# Page+OOB specific partitions
-addpart /dev/mtdraw0 1081344 at 3649536(msipl)
-addpart /dev/mtdraw0 270336 at 3649536(barebox)
+addpart /dev/mtd0.raw 1081344 at 3649536(msipl)
+addpart /dev/mtd0.raw 270336 at 3649536(barebox)
if [ -r /barebox.BIP0 ]; then
- erase /dev/mtdraw0.barebox
- cp -v /barebox.BIP0 /dev/mtdraw0.barebox
+ erase /dev/mtd0.raw.barebox
+ cp -v /barebox.BIP0 /dev/mtd0.raw.barebox
fi
diff --git a/arch/arm/boards/mioa701/env/bin/dps1_update b/arch/arm/boards/mioa701/env/bin/dps1_update
index a9d72da..e6535ed 100644
--- a/arch/arm/boards/mioa701/env/bin/dps1_update
+++ b/arch/arm/boards/mioa701/env/bin/dps1_update
@@ -1,12 +1,12 @@
#!/bin/sh
# Page+OOB specific partitions
-addpart /dev/mtdraw0 67584 at 202752(dps1)
+addpart /dev/mtd0.raw 67584 at 202752(dps1)
uncompress /env/data/dps1.raw.gz /dps1.raw
if [ -r /dps1.raw ]; then
dps1_unlock
- erase /dev/mtdraw0.dps1
- cp -v /dps1.raw /dev/mtdraw0.dps1
+ erase /dev/mtd0.raw.dps1
+ cp -v /dps1.raw /dev/mtd0.raw.dps1
dps1_unlock
fi
diff --git a/drivers/mtd/mtdraw.c b/drivers/mtd/mtdraw.c
index 1a4711e..2acd51f 100644
--- a/drivers/mtd/mtdraw.c
+++ b/drivers/mtd/mtdraw.c
@@ -293,7 +293,7 @@ static int add_mtdraw_device(struct mtd_info *mtd, char *devname, void **priv)
mtdraw->cdev.ops = (struct file_operations *)&mtd_raw_fops;
mtdraw->cdev.size = mtd->size / mtd->writesize *
(mtd->writesize + mtd->oobsize);
- mtdraw->cdev.name = asprintf("%sraw%d", devname, mtd->class_dev.id);
+ mtdraw->cdev.name = asprintf("%s.raw", mtd->cdev.name);
mtdraw->cdev.priv = mtdraw;
mtdraw->cdev.dev = &mtd->class_dev;
mtdraw->cdev.mtd = mtd;
--
1.8.4.rc3
More information about the barebox
mailing list