aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-01-30 03:50:43 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2007-02-09 10:27:12 -0500
commit64f60710568db5cec1a76c1d1e261b239f9ef809 (patch)
tree211872ced9ff58baf4480fc99a1d58743b001586 /drivers
parentd416085572eb6a44fd2cf29fd7aed83ffc95fd88 (diff)
[MTD] remove unused ecctype,eccsize fields from struct mtd_info
Remove unused and broken mtd->ecctype and mtd->eccsize fields from struct mtd_info. Do not remove them from userspace API data structures (don't want to breake userspace) but mark them as obsolete by a comment. Any userspace program which uses them should be half-broken anyway, so this is more about saving data structure size. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/devices/doc2000.c1
-rw-r--r--drivers/mtd/devices/doc2001.c1
-rw-r--r--drivers/mtd/devices/doc2001plus.c1
-rw-r--r--drivers/mtd/mtdchar.c5
-rw-r--r--drivers/mtd/mtdconcat.c4
-rw-r--r--drivers/mtd/mtdpart.c2
-rw-r--r--drivers/mtd/nand/nand_base.c1
-rw-r--r--drivers/mtd/onenand/onenand_base.c1
8 files changed, 3 insertions, 13 deletions
diff --git a/drivers/mtd/devices/doc2000.c b/drivers/mtd/devices/doc2000.c
index 603a7951ac9b..8a0c4dec6351 100644
--- a/drivers/mtd/devices/doc2000.c
+++ b/drivers/mtd/devices/doc2000.c
@@ -569,7 +569,6 @@ void DoC2k_init(struct mtd_info *mtd)
569 569
570 mtd->type = MTD_NANDFLASH; 570 mtd->type = MTD_NANDFLASH;
571 mtd->flags = MTD_CAP_NANDFLASH; 571 mtd->flags = MTD_CAP_NANDFLASH;
572 mtd->ecctype = MTD_ECC_RS_DiskOnChip;
573 mtd->size = 0; 572 mtd->size = 0;
574 mtd->erasesize = 0; 573 mtd->erasesize = 0;
575 mtd->writesize = 512; 574 mtd->writesize = 512;
diff --git a/drivers/mtd/devices/doc2001.c b/drivers/mtd/devices/doc2001.c
index 0e2a9326f717..22a3b9e6aaaf 100644
--- a/drivers/mtd/devices/doc2001.c
+++ b/drivers/mtd/devices/doc2001.c
@@ -349,7 +349,6 @@ void DoCMil_init(struct mtd_info *mtd)
349 349
350 mtd->type = MTD_NANDFLASH; 350 mtd->type = MTD_NANDFLASH;
351 mtd->flags = MTD_CAP_NANDFLASH; 351 mtd->flags = MTD_CAP_NANDFLASH;
352 mtd->ecctype = MTD_ECC_RS_DiskOnChip;
353 mtd->size = 0; 352 mtd->size = 0;
354 353
355 /* FIXME: erase size is not always 8KiB */ 354 /* FIXME: erase size is not always 8KiB */
diff --git a/drivers/mtd/devices/doc2001plus.c b/drivers/mtd/devices/doc2001plus.c
index 92dbb47f2ac3..01185593b2c2 100644
--- a/drivers/mtd/devices/doc2001plus.c
+++ b/drivers/mtd/devices/doc2001plus.c
@@ -473,7 +473,6 @@ void DoCMilPlus_init(struct mtd_info *mtd)
473 473
474 mtd->type = MTD_NANDFLASH; 474 mtd->type = MTD_NANDFLASH;
475 mtd->flags = MTD_CAP_NANDFLASH; 475 mtd->flags = MTD_CAP_NANDFLASH;
476 mtd->ecctype = MTD_ECC_RS_DiskOnChip;
477 mtd->size = 0; 476 mtd->size = 0;
478 477
479 mtd->erasesize = 0; 478 mtd->erasesize = 0;
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index 3013d0883b97..3731523ec11f 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -419,8 +419,9 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
419 info.erasesize = mtd->erasesize; 419 info.erasesize = mtd->erasesize;
420 info.writesize = mtd->writesize; 420 info.writesize = mtd->writesize;
421 info.oobsize = mtd->oobsize; 421 info.oobsize = mtd->oobsize;
422 info.ecctype = mtd->ecctype; 422 /* The below fields are obsolete */
423 info.eccsize = mtd->eccsize; 423 info.ecctype = -1;
424 info.eccsize = 0;
424 if (copy_to_user(argp, &info, sizeof(struct mtd_info_user))) 425 if (copy_to_user(argp, &info, sizeof(struct mtd_info_user)))
425 return -EFAULT; 426 return -EFAULT;
426 break; 427 break;
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index 06902683bc2a..880580c44e01 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -727,8 +727,6 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c
727 concat->mtd.erasesize = subdev[0]->erasesize; 727 concat->mtd.erasesize = subdev[0]->erasesize;
728 concat->mtd.writesize = subdev[0]->writesize; 728 concat->mtd.writesize = subdev[0]->writesize;
729 concat->mtd.oobsize = subdev[0]->oobsize; 729 concat->mtd.oobsize = subdev[0]->oobsize;
730 concat->mtd.ecctype = subdev[0]->ecctype;
731 concat->mtd.eccsize = subdev[0]->eccsize;
732 if (subdev[0]->writev) 730 if (subdev[0]->writev)
733 concat->mtd.writev = concat_writev; 731 concat->mtd.writev = concat_writev;
734 if (subdev[0]->read_oob) 732 if (subdev[0]->read_oob)
@@ -774,8 +772,6 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c
774 if (concat->mtd.writesize != subdev[i]->writesize || 772 if (concat->mtd.writesize != subdev[i]->writesize ||
775 concat->mtd.subpage_sft != subdev[i]->subpage_sft || 773 concat->mtd.subpage_sft != subdev[i]->subpage_sft ||
776 concat->mtd.oobsize != subdev[i]->oobsize || 774 concat->mtd.oobsize != subdev[i]->oobsize ||
777 concat->mtd.ecctype != subdev[i]->ecctype ||
778 concat->mtd.eccsize != subdev[i]->eccsize ||
779 !concat->mtd.read_oob != !subdev[i]->read_oob || 775 !concat->mtd.read_oob != !subdev[i]->read_oob ||
780 !concat->mtd.write_oob != !subdev[i]->write_oob) { 776 !concat->mtd.write_oob != !subdev[i]->write_oob) {
781 kfree(concat); 777 kfree(concat);
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index bafd2fba87bd..633def3fb087 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -338,8 +338,6 @@ int add_mtd_partitions(struct mtd_info *master,
338 slave->mtd.size = parts[i].size; 338 slave->mtd.size = parts[i].size;
339 slave->mtd.writesize = master->writesize; 339 slave->mtd.writesize = master->writesize;
340 slave->mtd.oobsize = master->oobsize; 340 slave->mtd.oobsize = master->oobsize;
341 slave->mtd.ecctype = master->ecctype;
342 slave->mtd.eccsize = master->eccsize;
343 slave->mtd.subpage_sft = master->subpage_sft; 341 slave->mtd.subpage_sft = master->subpage_sft;
344 342
345 slave->mtd.name = parts[i].name; 343 slave->mtd.name = parts[i].name;
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index c13d66426360..acaf97bc80d1 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2566,7 +2566,6 @@ int nand_scan_tail(struct mtd_info *mtd)
2566 /* Fill in remaining MTD driver data */ 2566 /* Fill in remaining MTD driver data */
2567 mtd->type = MTD_NANDFLASH; 2567 mtd->type = MTD_NANDFLASH;
2568 mtd->flags = MTD_CAP_NANDFLASH; 2568 mtd->flags = MTD_CAP_NANDFLASH;
2569 mtd->ecctype = MTD_ECC_SW;
2570 mtd->erase = nand_erase; 2569 mtd->erase = nand_erase;
2571 mtd->point = NULL; 2570 mtd->point = NULL;
2572 mtd->unpoint = NULL; 2571 mtd->unpoint = NULL;
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index a7645794364c..a2342ddc62e7 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -2373,7 +2373,6 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
2373 /* Fill in remaining MTD driver data */ 2373 /* Fill in remaining MTD driver data */
2374 mtd->type = MTD_NANDFLASH; 2374 mtd->type = MTD_NANDFLASH;
2375 mtd->flags = MTD_CAP_NANDFLASH; 2375 mtd->flags = MTD_CAP_NANDFLASH;
2376 mtd->ecctype = MTD_ECC_SW;
2377 mtd->erase = onenand_erase; 2376 mtd->erase = onenand_erase;
2378 mtd->point = NULL; 2377 mtd->point = NULL;
2379 mtd->unpoint = NULL; 2378 mtd->unpoint = NULL;