mtd: rawnand: use mtd_device_register() where applicable
If driver doesn't specify parsers it can use that little helper. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: Xiaolei Li <xiaolei.li@mediatek.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:

committed by
Miquel Raynal

parent
c2204734bb
commit
29597ca14d
@@ -466,9 +466,8 @@ static int jz_nand_probe(struct platform_device *pdev)
|
||||
goto err_unclaim_banks;
|
||||
}
|
||||
|
||||
ret = mtd_device_parse_register(mtd, NULL, NULL,
|
||||
pdata ? pdata->partitions : NULL,
|
||||
pdata ? pdata->num_partitions : 0);
|
||||
ret = mtd_device_register(mtd, pdata ? pdata->partitions : NULL,
|
||||
pdata ? pdata->num_partitions : 0);
|
||||
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to add mtd device\n");
|
||||
|
Reference in New Issue
Block a user