diff options
Diffstat (limited to 'drivers/mtd/maps/dc21285.c')
| -rw-r--r-- | drivers/mtd/maps/dc21285.c | 28 | 
1 files changed, 3 insertions, 25 deletions
diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c index b3cb3a18380..f8a7dd14cee 100644 --- a/drivers/mtd/maps/dc21285.c +++ b/drivers/mtd/maps/dc21285.c @@ -143,20 +143,11 @@ static struct map_info dc21285_map = {  	.copy_from = dc21285_copy_from,  }; -  /* Partition stuff */ -#ifdef CONFIG_MTD_PARTITIONS -static struct mtd_partition *dc21285_parts; -static const char *probes[] = { "RedBoot", "cmdlinepart", NULL }; -#endif +static const char * const probes[] = { "RedBoot", "cmdlinepart", NULL };  static int __init init_dc21285(void)  { - -#ifdef CONFIG_MTD_PARTITIONS -	int nrparts; -#endif -  	/* Determine bankwidth */  	switch (*CSR_SA110_CNTL & (3<<14)) {  		case SA110_CNTL_ROMWIDTH_8: @@ -204,13 +195,7 @@ static int __init init_dc21285(void)  	dc21285_mtd->owner = THIS_MODULE; -#ifdef CONFIG_MTD_PARTITIONS -	nrparts = parse_mtd_partitions(dc21285_mtd, probes, &dc21285_parts, 0); -	if (nrparts > 0) -		add_mtd_partitions(dc21285_mtd, dc21285_parts, nrparts); -	else -#endif -		add_mtd_device(dc21285_mtd); +	mtd_device_parse_register(dc21285_mtd, probes, NULL, NULL, 0);  	if(machine_is_ebsa285()) {  		/* @@ -232,14 +217,7 @@ static int __init init_dc21285(void)  static void __exit cleanup_dc21285(void)  { -#ifdef CONFIG_MTD_PARTITIONS -	if (dc21285_parts) { -		del_mtd_partitions(dc21285_mtd); -		kfree(dc21285_parts); -	} else -#endif -		del_mtd_device(dc21285_mtd); - +	mtd_device_unregister(dc21285_mtd);  	map_destroy(dc21285_mtd);  	iounmap(dc21285_map.virt);  }  | 
