mirror of https://gitee.com/openkylin/linux.git
mtd: spi-nor: intel-spi: use mtd_device_register()
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>
This commit is contained in:
parent
5f0d02270d
commit
11edc1133e
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue