mtd: spi-nor: intel-spi: use mtd_device_register()
authorRafał Miłecki <rafal@milecki.pl>
Sat, 21 Jul 2018 11:55:10 +0000 (13:55 +0200)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Wed, 1 Aug 2018 07:18:55 +0000 (09:18 +0200)
This driver doesn't specify parsers so 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/spi-nor/intel-spi.c

index d2cbfc27826ec654b7c78ae4e54edd08930a3a30..af0a220195163ceaf9382e78acf12926494258ba 100644 (file)
@@ -908,7 +908,7 @@ struct intel_spi *intel_spi_probe(struct device *dev,
        if (!ispi->writeable || !writeable)
                ispi->nor.mtd.flags &= ~MTD_WRITEABLE;
 
-       ret = mtd_device_parse_register(&ispi->nor.mtd, NULL, NULL, &part, 1);
+       ret = mtd_device_register(&ispi->nor.mtd, &part, 1);
        if (ret)
                return ERR_PTR(ret);