0a133f0ce139311d7fd1a8d5ac2bb79e74f19a71
[openwrt/staging/wigyori.git] / target / linux / ar71xx / patches-3.2 / 302-rb4xx_nand-3.2-fixes.patch
1 --- a/drivers/mtd/nand/rb4xx_nand.c
2 +++ b/drivers/mtd/nand/rb4xx_nand.c
3 @@ -12,6 +12,8 @@
4 * by the Free Software Foundation.
5 */
6
7 +#include <linux/kernel.h>
8 +#include <linux/module.h>
9 #include <linux/init.h>
10 #include <linux/mtd/nand.h>
11 #include <linux/mtd/mtd.h>
12 @@ -22,8 +24,8 @@
13 #include <linux/gpio.h>
14 #include <linux/slab.h>
15
16 -#include <asm/mach-ar71xx/ar71xx.h>
17 -#include <asm/mach-ar71xx/rb4xx_cpld.h>
18 +#include <asm/mach-ath79/ath79.h>
19 +#include <asm/mach-ath79/rb4xx_cpld.h>
20
21 #define DRV_NAME "rb4xx-nand"
22 #define DRV_VERSION "0.2.0"
23 @@ -238,12 +240,8 @@ static int __devinit rb4xx_nand_probe(st
24 goto err_set_drvdata;
25 }
26
27 -#ifdef CONFIG_MTD_PARTITIONS
28 - ret = add_mtd_partitions(&info->mtd, rb4xx_nand_partitions,
29 + mtd_device_register(&info->mtd, rb4xx_nand_partitions,
30 ARRAY_SIZE(rb4xx_nand_partitions));
31 -#else
32 - ret = add_mtd_device(&info->mtd);
33 -#endif
34 if (ret)
35 goto err_release_nand;
36