]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mtd: maps: use mtd_device_register() where applicable
authorRafał Miłecki <rafal@milecki.pl>
Fri, 13 Jul 2018 09:27:33 +0000 (11:27 +0200)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Wed, 18 Jul 2018 14:32:36 +0000 (16:32 +0200)
If driver doesn't specify parsers it can use that little helper.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/maps/impa7.c
drivers/mtd/maps/intel_vr_nor.c
drivers/mtd/maps/latch-addr-flash.c
drivers/mtd/maps/rbtx4939-flash.c

index a0b8fa7849a956c31250fd6946638f3423a9b58e..815e2db87955448f4b3b3f375b4d613fee7ac925 100644 (file)
@@ -88,9 +88,8 @@ static int __init init_impa7(void)
                if (impa7_mtd[i]) {
                        impa7_mtd[i]->owner = THIS_MODULE;
                        devicesfound++;
-                       mtd_device_parse_register(impa7_mtd[i], NULL, NULL,
-                                                 partitions,
-                                                 ARRAY_SIZE(partitions));
+                       mtd_device_register(impa7_mtd[i], partitions,
+                                           ARRAY_SIZE(partitions));
                } else {
                        iounmap((void __iomem *)impa7_map[i].virt);
                }
index dd5d6855f5432083e4745974dbf19213d4a5d690..69503aef981e6f9e059463d25cb958b6f35fd2e8 100644 (file)
@@ -71,7 +71,7 @@ static int vr_nor_init_partitions(struct vr_nor_mtd *p)
 {
        /* register the flash bank */
        /* partition the flash bank */
-       return mtd_device_parse_register(p->info, NULL, NULL, NULL, 0);
+       return mtd_device_register(p->info, NULL, 0);
 }
 
 static void vr_nor_destroy_mtd_setup(struct vr_nor_mtd *p)
index 6dc97aa667dc553cc44033b34394374b3c8b36d1..51db24b7f88de56d1e945ffa6590bef8f450f0fe 100644 (file)
@@ -197,9 +197,8 @@ static int latch_addr_flash_probe(struct platform_device *dev)
        }
        info->mtd->dev.parent = &dev->dev;
 
-       mtd_device_parse_register(info->mtd, NULL, NULL,
-                                 latch_addr_data->parts,
-                                 latch_addr_data->nr_parts);
+       mtd_device_register(info->mtd, latch_addr_data->parts,
+                           latch_addr_data->nr_parts);
        return 0;
 
 iounmap:
index 3a06ecfc55ff6baf9782cfc78118b2feff564744..80a187167c924b645c363cdbc0ea817289ddfc25 100644 (file)
@@ -97,8 +97,7 @@ static int rbtx4939_flash_probe(struct platform_device *dev)
                goto err_out;
        }
        info->mtd->dev.parent = &dev->dev;
-       err = mtd_device_parse_register(info->mtd, NULL, NULL, pdata->parts,
-                                       pdata->nr_parts);
+       err = mtd_device_register(info->mtd, pdata->parts, pdata->nr_parts);
 
        if (err)
                goto err_out;