All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>,
	Richard Weinberger <richard@nod.at>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Cyrille Pitchen <cyrille.pitchen@atmel.com>
Cc: linux-mtd@lists.infradead.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Stefan Roese <sr@denx.de>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Subject: [PATCH 08/13] mtd: nand: fsmc: kill {nr_, }partitions structure fields
Date: Tue, 21 Mar 2017 11:04:00 +0100	[thread overview]
Message-ID: <1490090645-8576-9-git-send-email-thomas.petazzoni@free-electrons.com> (raw)
In-Reply-To: <1490090645-8576-1-git-send-email-thomas.petazzoni@free-electrons.com>

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: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 drivers/mtd/nand/fsmc_nand.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 0d618ad..8342c39 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -146,8 +146,6 @@ enum access_mode {
  */
 struct fsmc_nand_platform_data {
 	struct fsmc_nand_timings *nand_timings;
-	struct mtd_partition	*partitions;
-	unsigned int		nr_partitions;
 	unsigned int		options;
 	unsigned int		bank;
 
@@ -179,8 +177,6 @@ struct fsmc_nand_platform_data {
 struct fsmc_nand_data {
 	u32			pid;
 	struct nand_chip	nand;
-	struct mtd_partition	*partitions;
-	unsigned int		nr_partitions;
 
 	unsigned int		bank;
 	struct device		*dev;
@@ -1000,8 +996,6 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 		 AMBA_REV_BITS(pid), AMBA_CONFIG_BITS(pid));
 
 	host->bank = pdata->bank;
-	host->partitions = pdata->partitions;
-	host->nr_partitions = pdata->nr_partitions;
 	host->dev = &pdev->dev;
 	host->dev_timings = pdata->nand_timings;
 	host->mode = pdata->mode;
@@ -1139,18 +1133,8 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 	if (ret)
 		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";
-	ret = mtd_device_register(mtd, host->partitions, host->nr_partitions);
+	ret = mtd_device_register(mtd, NULL, 0);
 	if (ret)
 		goto err_probe;
 
-- 
2.7.4

  parent reply	other threads:[~2017-03-21 10:05 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21 10:03 [PATCH 00/13] mtd: nand: fsmc: fixes, improvements and cleanups Thomas Petazzoni
2017-03-21 10:03 ` [PATCH 01/13] mtd: nand: fsmc: fix NAND width handling Thomas Petazzoni
2017-03-22 21:42   ` Boris Brezillon
2017-03-22 22:06     ` Thomas Petazzoni
2017-03-23  9:53   ` Linus Walleij
2017-03-21 10:03 ` [PATCH 02/13] mtd: nand: fsmc: rework fsmc_nand_setup() to use ->setup_data_interface() Thomas Petazzoni
2017-03-22 21:56   ` Boris Brezillon
2017-03-22 22:05     ` Thomas Petazzoni
2017-03-22 22:23       ` Boris Brezillon
2017-03-22 22:39         ` Thomas Petazzoni
2017-03-22 22:53           ` Boris Brezillon
2017-03-23  9:57   ` Linus Walleij
2017-03-21 10:03 ` [PATCH 03/13] mtd: nand: fsmc: add support to use NAND timings Thomas Petazzoni
2017-03-23  9:59   ` Linus Walleij
2017-03-21 10:03 ` [PATCH 04/13] mtd: nand: fsmc: move fsmc_nand_data definition Thomas Petazzoni
2017-03-23 10:00   ` Linus Walleij
2017-03-21 10:03 ` [PATCH 05/13] mtd: nand: fsmc: remove ->select_bank() from fsmc_nand_platform_data Thomas Petazzoni
2017-03-23 10:00   ` Linus Walleij
2017-03-21 10:03 ` [PATCH 06/13] mtd: nand: fsmc: remove fsmc_select_chip() Thomas Petazzoni
2017-03-23 10:01   ` Linus Walleij
2017-03-21 10:03 ` [PATCH 07/13] mtd: nand: fmsc: kill {read, write}_dma_priv from fsmc_nand_platform_data Thomas Petazzoni
2017-03-23 10:02   ` Linus Walleij
2017-03-21 10:04 ` Thomas Petazzoni [this message]
2017-03-23 10:03   ` [PATCH 08/13] mtd: nand: fsmc: kill {nr_, }partitions structure fields Linus Walleij
2017-03-21 10:04 ` [PATCH 09/13] mtd: nand: fsmc: remove duplicate nand_set_flash_node() Thomas Petazzoni
2017-03-23 10:04   ` Linus Walleij
2017-03-21 10:04 ` [PATCH 10/13] mtd: nand: fsmc: finally remove fsmc_nand_platform_data Thomas Petazzoni
2017-03-23 10:05   ` Linus Walleij
2017-03-21 10:04 ` [PATCH 11/13] mtd: nand: fsmc: use devm_clk_get() Thomas Petazzoni
2017-03-23 10:05   ` Linus Walleij
2017-03-21 10:04 ` [PATCH 12/13] mtd: nand: fsmc: remove unused definitions Thomas Petazzoni
2017-03-23 10:06   ` Linus Walleij
2017-03-21 10:04 ` [PATCH 13/13] mtd: nand: fsmc: remove CONFIG_OF conditional Thomas Petazzoni
2017-03-22 22:01   ` Boris Brezillon
2017-03-23 10:07   ` Linus Walleij
2017-03-23  9:50 ` [PATCH 00/13] mtd: nand: fsmc: fixes, improvements and cleanups Linus Walleij
2017-03-23  9:52   ` Thomas Petazzoni
2017-03-24  8:26 ` Boris Brezillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1490090645-8576-9-git-send-email-thomas.petazzoni@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@atmel.com \
    --cc=dwmw2@infradead.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    --cc=sr@denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.