mtd: sst25l: 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
4897015d2f
commit
39675caa06
|
@ -394,9 +394,8 @@ static int sst25l_probe(struct spi_device *spi)
|
|||
flash->mtd.numeraseregions);
|
||||
|
||||
|
||||
ret = mtd_device_parse_register(&flash->mtd, NULL, NULL,
|
||||
data ? data->parts : NULL,
|
||||
data ? data->nr_parts : 0);
|
||||
ret = mtd_device_register(&flash->mtd, data ? data->parts : NULL,
|
||||
data ? data->nr_parts : 0);
|
||||
if (ret)
|
||||
return -ENODEV;
|
||||
|
||||
|
|
Loading…
Reference in New Issue