diff options
Diffstat (limited to 'drivers/mtd/mtd_blkdevs.c')
-rw-r--r-- | drivers/mtd/mtd_blkdevs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index c82e09bbc5fd..85a52b3c7698 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c | |||
@@ -335,7 +335,8 @@ static struct mtd_notifier blktrans_notifier = { | |||
335 | 335 | ||
336 | int register_mtd_blktrans(struct mtd_blktrans_ops *tr) | 336 | int register_mtd_blktrans(struct mtd_blktrans_ops *tr) |
337 | { | 337 | { |
338 | int ret, i; | 338 | struct mtd_info *mtd; |
339 | int ret; | ||
339 | 340 | ||
340 | /* Register the notifier if/when the first device type is | 341 | /* Register the notifier if/when the first device type is |
341 | registered, to prevent the link/init ordering from fucking | 342 | registered, to prevent the link/init ordering from fucking |
@@ -389,10 +390,9 @@ int register_mtd_blktrans(struct mtd_blktrans_ops *tr) | |||
389 | INIT_LIST_HEAD(&tr->devs); | 390 | INIT_LIST_HEAD(&tr->devs); |
390 | list_add(&tr->list, &blktrans_majors); | 391 | list_add(&tr->list, &blktrans_majors); |
391 | 392 | ||
392 | for (i=0; i<MAX_MTD_DEVICES; i++) { | 393 | mtd_for_each_device(mtd) |
393 | if (mtd_table[i] && mtd_table[i]->type != MTD_ABSENT) | 394 | if (mtd->type != MTD_ABSENT) |
394 | tr->add_mtd(tr, mtd_table[i]); | 395 | tr->add_mtd(tr, mtd); |
395 | } | ||
396 | 396 | ||
397 | mutex_unlock(&mtd_table_mutex); | 397 | mutex_unlock(&mtd_table_mutex); |
398 | 398 | ||