From 65966c81500b2f56e190ea3eb80f8aacc6059e83 Mon Sep 17 00:00:00 2001 From: Jamie Iles Date: Mon, 23 May 2011 10:22:54 +0100 Subject: [PATCH] --- yaml --- r: 252518 b: refs/heads/master c: 5851becb5bae13ca6525fd0d97116043fcb0e20e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/mips/cavium-octeon/flash_setup.c | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 1ff3e229de3e..a318468f2f4d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 36cda05b375ad0fbaba3879047b62d270d214376 +refs/heads/master: 5851becb5bae13ca6525fd0d97116043fcb0e20e diff --git a/trunk/arch/mips/cavium-octeon/flash_setup.c b/trunk/arch/mips/cavium-octeon/flash_setup.c index 008f657116eb..0ee02f5e51cc 100644 --- a/trunk/arch/mips/cavium-octeon/flash_setup.c +++ b/trunk/arch/mips/cavium-octeon/flash_setup.c @@ -16,7 +16,6 @@ static struct map_info flash_map; static struct mtd_info *mymtd; -#ifdef CONFIG_MTD_PARTITIONS static int nr_parts; static struct mtd_partition *parts; static const char *part_probe_types[] = { @@ -26,7 +25,6 @@ static const char *part_probe_types[] = { #endif NULL }; -#endif /** * Module/ driver initialization. @@ -63,17 +61,10 @@ static int __init flash_init(void) if (mymtd) { mymtd->owner = THIS_MODULE; -#ifdef CONFIG_MTD_PARTITIONS nr_parts = parse_mtd_partitions(mymtd, part_probe_types, &parts, 0); - if (nr_parts > 0) - add_mtd_partitions(mymtd, parts, nr_parts); - else - add_mtd_device(mymtd); -#else - add_mtd_device(mymtd); -#endif + mtd_device_register(mymtd, parts, nr_parts); } else { pr_err("Failed to register MTD device for flash\n"); }