On Fri, 2018-07-13 at 11:27 +0200, Rafa? Mi?ecki wrote: > From: Rafa? Mi?ecki <rafal at milecki.pl> > > If driver doesn't specify parsers it can use that little helper. > > Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl> > --- > drivers/mtd/nand/raw/cmx270_nand.c | 4 ++-- > drivers/mtd/nand/raw/cs553x_nand.c | 3 +-- > drivers/mtd/nand/raw/davinci_nand.c | 3 +-- > drivers/mtd/nand/raw/jz4740_nand.c | 5 ++--- > drivers/mtd/nand/raw/mtk_nand.c | 2 +- > drivers/mtd/nand/raw/s3c2410.c | 4 ++-- > drivers/mtd/nand/raw/txx9ndfmc.c | 2 +- > 7 files changed, 10 insertions(+), 13 deletions(-) > > diff --git a/drivers/mtd/nand/raw/cmx270_nand.c b/drivers/mtd/nand/raw/cmx270_nand.c > index 02d6751e9efe..b66e254b6802 100644 > --- a/drivers/mtd/nand/raw/cmx270_nand.c > +++ b/drivers/mtd/nand/raw/cmx270_nand.c > @@ -200,8 +200,8 @@ static int __init cmx270_init(void) > } > > /* Register the partitions */ > - ret = mtd_device_parse_register(cmx270_nand_mtd, NULL, NULL, > - partition_info, NUM_PARTITIONS); > + ret = mtd_device_register(cmx270_nand_mtd, partition_info, > + NUM_PARTITIONS); > if (ret) > goto err_scan; > > diff --git a/drivers/mtd/nand/raw/cs553x_nand.c b/drivers/mtd/nand/raw/cs553x_nand.c > index 82269fde9e66..beafad62e7d5 100644 > --- a/drivers/mtd/nand/raw/cs553x_nand.c > +++ b/drivers/mtd/nand/raw/cs553x_nand.c > @@ -310,8 +310,7 @@ static int __init cs553x_init(void) > for (i = 0; i < NR_CS553X_CONTROLLERS; i++) { > if (cs553x_mtd[i]) { > /* If any devices registered, return success. Else the last error. */ > - mtd_device_parse_register(cs553x_mtd[i], NULL, NULL, > - NULL, 0); > + mtd_device_register(cs553x_mtd[i], NULL, 0); > err = 0; > } > } > diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c > index cd12e5abafde..451abe3ad749 100644 > --- a/drivers/mtd/nand/raw/davinci_nand.c > +++ b/drivers/mtd/nand/raw/davinci_nand.c > @@ -803,8 +803,7 @@ static int nand_davinci_probe(struct platform_device *pdev) > goto err; > > if (pdata->parts) > - ret = mtd_device_parse_register(mtd, NULL, NULL, > - pdata->parts, pdata->nr_parts); > + ret = mtd_device_register(mtd, pdata->parts, pdata->nr_parts); > else > ret = mtd_device_register(mtd, NULL, 0); > if (ret < 0) > diff --git a/drivers/mtd/nand/raw/jz4740_nand.c b/drivers/mtd/nand/raw/jz4740_nand.c > index 613b00a9604b..e04597a764a8 100644 > --- a/drivers/mtd/nand/raw/jz4740_nand.c > +++ b/drivers/mtd/nand/raw/jz4740_nand.c > @@ -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"); > diff --git a/drivers/mtd/nand/raw/mtk_nand.c b/drivers/mtd/nand/raw/mtk_nand.c > index 75c845adb050..e6b14b79c8a8 100644 > --- a/drivers/mtd/nand/raw/mtk_nand.c > +++ b/drivers/mtd/nand/raw/mtk_nand.c > @@ -1357,7 +1357,7 @@ static int mtk_nfc_nand_chip_init(struct device *dev, struct mtk_nfc *nfc, > if (ret) > return ret; > > - ret = mtd_device_parse_register(mtd, NULL, NULL, NULL, 0); > + ret = mtd_device_register(mtd, NULL, 0); > if (ret) { > dev_err(dev, "mtd parse partition error\n"); > nand_release(mtd); Acked-by: Xiaolei Li <xiaolei.li at mediatek.com> Thanks very much! Xiaolei > diff --git a/drivers/mtd/nand/raw/s3c2410.c b/drivers/mtd/nand/raw/s3c2410.c > index 19661c5d3220..10d81f367d26 100644 > --- a/drivers/mtd/nand/raw/s3c2410.c > +++ b/drivers/mtd/nand/raw/s3c2410.c > @@ -802,8 +802,8 @@ static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info, > > mtdinfo->name = set->name; > > - return mtd_device_parse_register(mtdinfo, NULL, NULL, > - set->partitions, set->nr_partitions); > + return mtd_device_register(mtdinfo, set->partitions, > + set->nr_partitions); > } > > return -ENODEV; > diff --git a/drivers/mtd/nand/raw/txx9ndfmc.c b/drivers/mtd/nand/raw/txx9ndfmc.c > index b567d212fe7d..fe954e2222f5 100644 > --- a/drivers/mtd/nand/raw/txx9ndfmc.c > +++ b/drivers/mtd/nand/raw/txx9ndfmc.c > @@ -366,7 +366,7 @@ static int __init txx9ndfmc_probe(struct platform_device *dev) > } > mtd->name = txx9_priv->mtdname; > > - mtd_device_parse_register(mtd, NULL, NULL, NULL, 0); > + mtd_device_register(mtd, NULL, 0); > drvdata->mtds[i] = mtd; > } >