aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/chips/Kconfig5
-rw-r--r--drivers/mtd/maps/dilnetpc.c8
-rw-r--r--drivers/mtd/mtd_blkdevs.c3
-rw-r--r--drivers/mtd/mtdconcat.c6
4 files changed, 9 insertions, 13 deletions
diff --git a/drivers/mtd/chips/Kconfig b/drivers/mtd/chips/Kconfig
index 205bb7083335..0f6bb2e625d8 100644
--- a/drivers/mtd/chips/Kconfig
+++ b/drivers/mtd/chips/Kconfig
@@ -25,9 +25,8 @@ config MTD_JEDECPROBE
25 compatible with the Common Flash Interface, but will use the common 25 compatible with the Common Flash Interface, but will use the common
26 CFI-targetted flash drivers for any chips which are identified which 26 CFI-targetted flash drivers for any chips which are identified which
27 are in fact compatible in all but the probe method. This actually 27 are in fact compatible in all but the probe method. This actually
28 covers most AMD/Fujitsu-compatible chips, and will shortly cover also 28 covers most AMD/Fujitsu-compatible chips and also non-CFI
29 non-CFI Intel chips (that code is in MTD CVS and should shortly be sent 29 Intel chips.
30 for inclusion in Linus' tree)
31 30
32config MTD_GEN_PROBE 31config MTD_GEN_PROBE
33 tristate 32 tristate
diff --git a/drivers/mtd/maps/dilnetpc.c b/drivers/mtd/maps/dilnetpc.c
index b51c757817d8..efb221692641 100644
--- a/drivers/mtd/maps/dilnetpc.c
+++ b/drivers/mtd/maps/dilnetpc.c
@@ -218,8 +218,8 @@ static void dnp_set_vpp(struct map_info *not_used, int on)
218 { 218 {
219 if(--vpp_counter == 0) 219 if(--vpp_counter == 0)
220 setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x4); 220 setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x4);
221 else if(vpp_counter < 0) 221 else
222 BUG(); 222 BUG_ON(vpp_counter < 0);
223 } 223 }
224 spin_unlock_irq(&dnpc_spin); 224 spin_unlock_irq(&dnpc_spin);
225} 225}
@@ -240,8 +240,8 @@ static void adnp_set_vpp(struct map_info *not_used, int on)
240 { 240 {
241 if(--vpp_counter == 0) 241 if(--vpp_counter == 0)
242 setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x8); 242 setcsc(CSC_RBWR, getcsc(CSC_RBWR) | 0x8);
243 else if(vpp_counter < 0) 243 else
244 BUG(); 244 BUG_ON(vpp_counter < 0);
245 } 245 }
246 spin_unlock_irq(&dnpc_spin); 246 spin_unlock_irq(&dnpc_spin);
247} 247}
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index 7f3ff500b68e..840dd66ce2dc 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -450,8 +450,7 @@ int deregister_mtd_blktrans(struct mtd_blktrans_ops *tr)
450 450
451 kfree(tr->blkcore_priv); 451 kfree(tr->blkcore_priv);
452 452
453 if (!list_empty(&tr->devs)) 453 BUG_ON(!list_empty(&tr->devs));
454 BUG();
455 return 0; 454 return 0;
456} 455}
457 456
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index b1bf8c411de7..9af840364a74 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -477,8 +477,7 @@ static int concat_erase(struct mtd_info *mtd, struct erase_info *instr)
477 } 477 }
478 478
479 /* must never happen since size limit has been verified above */ 479 /* must never happen since size limit has been verified above */
480 if (i >= concat->num_subdev) 480 BUG_ON(i >= concat->num_subdev);
481 BUG();
482 481
483 /* now do the erase: */ 482 /* now do the erase: */
484 err = 0; 483 err = 0;
@@ -500,8 +499,7 @@ static int concat_erase(struct mtd_info *mtd, struct erase_info *instr)
500 if ((err = concat_dev_erase(subdev, erase))) { 499 if ((err = concat_dev_erase(subdev, erase))) {
501 /* sanity check: should never happen since 500 /* sanity check: should never happen since
502 * block alignment has been checked above */ 501 * block alignment has been checked above */
503 if (err == -EINVAL) 502 BUG_ON(err == -EINVAL);
504 BUG();
505 if (erase->fail_addr != 0xffffffff) 503 if (erase->fail_addr != 0xffffffff)
506 instr->fail_addr = erase->fail_addr + offset; 504 instr->fail_addr = erase->fail_addr + offset;
507 break; 505 break;