1 --- a/drivers/mtd/maps/bcm47xx-flash.c
2 +++ b/drivers/mtd/maps/bcm47xx-flash.c
4 #include <linux/wait.h>
5 #include <linux/mtd/mtd.h>
6 #include <linux/mtd/map.h>
7 -#ifdef CONFIG_MTD_PARTITIONS
8 #include <linux/mtd/partitions.h>
10 #include <linux/crc32.h>
12 #include <linux/ssb/ssb.h>
13 @@ -120,7 +118,6 @@ static struct map_info bcm47xx_map = {
17 -#ifdef CONFIG_MTD_PARTITIONS
19 static struct mtd_partition bcm47xx_parts[] = {
20 { name: "cfe", offset: 0, size: 0, mask_flags: MTD_WRITEABLE, },
21 @@ -552,7 +549,6 @@ init_mtd_partitions(struct mtd_info *mtd
27 int __init init_bcm47xx_map(void)
29 @@ -561,10 +557,8 @@ int __init init_bcm47xx_map(void)
33 -#ifdef CONFIG_MTD_PARTITIONS
34 struct mtd_partition *parts;
39 u32 window = mcore->flash_window;
40 @@ -602,15 +596,13 @@ int __init init_bcm47xx_map(void)
42 printk(KERN_NOTICE "Flash device: 0x%x at 0x%x\n", size, WINDOW_ADDR);
44 -#ifdef CONFIG_MTD_PARTITIONS
45 parts = init_mtd_partitions(bcm47xx_mtd, size);
46 for (i = 0; parts[i].name; i++);
47 - ret = add_mtd_partitions(bcm47xx_mtd, parts, i);
48 + ret = mtd_device_register(bcm47xx_mtd, parts, i);
50 - printk(KERN_ERR "Flash: add_mtd_partitions failed\n");
51 + printk(KERN_ERR "Flash: mtd_device_register failed\n");
58 @@ -624,9 +616,7 @@ int __init init_bcm47xx_map(void)
60 void __exit cleanup_bcm47xx_map(void)
62 -#ifdef CONFIG_MTD_PARTITIONS
63 - del_mtd_partitions(bcm47xx_mtd);
65 + mtd_device_unregister(bcm47xx_mtd);
66 map_destroy(bcm47xx_mtd);
67 iounmap((void *)bcm47xx_map.virt);