X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Far71xx%2Ffiles%2Fdrivers%2Fmtd%2Fnand%2Frb4xx_nand.c;h=1cb8f82407d3afa2bba3b28a4dd32dafe643e5c7;hb=8940cbc303a16f2cb7dcbcf91d01401b5f14b742;hp=f73137d10519e6522b297247ba4f2977e7362021;hpb=d9077e15ae00813535ac3f226c7f74f3422df8c2;p=openwrt.git diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c b/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c index f73137d105..1cb8f82407 100644 --- a/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c +++ b/target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c @@ -12,6 +12,8 @@ * by the Free Software Foundation. */ +#include +#include #include #include #include @@ -22,8 +24,8 @@ #include #include -#include -#include +#include +#include #define DRV_NAME "rb4xx-nand" #define DRV_VERSION "0.2.0" @@ -238,12 +240,8 @@ static int __devinit rb4xx_nand_probe(struct platform_device *pdev) goto err_set_drvdata; } -#ifdef CONFIG_MTD_PARTITIONS - ret = add_mtd_partitions(&info->mtd, rb4xx_nand_partitions, + mtd_device_register(&info->mtd, rb4xx_nand_partitions, ARRAY_SIZE(rb4xx_nand_partitions)); -#else - ret = add_mtd_device(&info->mtd); -#endif if (ret) goto err_release_nand;