Commit ede29a02 authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Boris Brezillon

mtd: nand: fsmc: kill {nr_, }partitions structure fields

The ->partitions and ->nr_partitions fields of struct
fsmc_nand_platform_data are never set anywhere, so they are always
NULL/0. The corresponding fields in 'struct fsmc_nand_data' are set to the
value of the same fields in fsmc_nand_platform_data, i.e NULL/0.

Therefore, we remove those two fields, and pass NULL/0 directly to
mtd_device_register(), like many other NAND drivers already do.

At the same time, we remove the comment about the fact that we pass
partition info, since we are no longer doing this.
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
parent feb1e57e
...@@ -146,8 +146,6 @@ enum access_mode { ...@@ -146,8 +146,6 @@ enum access_mode {
*/ */
struct fsmc_nand_platform_data { struct fsmc_nand_platform_data {
struct fsmc_nand_timings *nand_timings; struct fsmc_nand_timings *nand_timings;
struct mtd_partition *partitions;
unsigned int nr_partitions;
unsigned int options; unsigned int options;
unsigned int bank; unsigned int bank;
...@@ -179,8 +177,6 @@ struct fsmc_nand_platform_data { ...@@ -179,8 +177,6 @@ struct fsmc_nand_platform_data {
struct fsmc_nand_data { struct fsmc_nand_data {
u32 pid; u32 pid;
struct nand_chip nand; struct nand_chip nand;
struct mtd_partition *partitions;
unsigned int nr_partitions;
unsigned int bank; unsigned int bank;
struct device *dev; struct device *dev;
...@@ -923,8 +919,6 @@ static int __init fsmc_nand_probe(struct platform_device *pdev) ...@@ -923,8 +919,6 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
AMBA_REV_BITS(pid), AMBA_CONFIG_BITS(pid)); AMBA_REV_BITS(pid), AMBA_CONFIG_BITS(pid));
host->bank = pdata->bank; host->bank = pdata->bank;
host->partitions = pdata->partitions;
host->nr_partitions = pdata->nr_partitions;
host->dev = &pdev->dev; host->dev = &pdev->dev;
host->dev_timings = pdata->nand_timings; host->dev_timings = pdata->nand_timings;
host->mode = pdata->mode; host->mode = pdata->mode;
...@@ -1065,18 +1059,8 @@ static int __init fsmc_nand_probe(struct platform_device *pdev) ...@@ -1065,18 +1059,8 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
if (ret) if (ret)
goto err_probe; goto err_probe;
/*
* The partition information can is accessed by (in the same precedence)
*
* command line through Bootloader,
* platform data,
* default partition information present in driver.
*/
/*
* Check for partition info passed
*/
mtd->name = "nand"; mtd->name = "nand";
ret = mtd_device_register(mtd, host->partitions, host->nr_partitions); ret = mtd_device_register(mtd, NULL, 0);
if (ret) if (ret)
goto err_probe; goto err_probe;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment