From: Boris Brezillon <boris.brezillon@collabora.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>,
linux-mtd@lists.infradead.org, Sekhar Nori <nsekhar@ti.com>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Richard Weinberger <richard@nod.at>,
Boris Brezillon <boris.brezillon@collabora.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <tudor.ambarus@microchip.com>
Subject: [PATCH 1/5] mtd: rawnand: davinci: Inherit from nand_controller
Date: Fri, 1 May 2020 12:07:25 +0200 [thread overview]
Message-ID: <20200501100729.1237040-2-boris.brezillon@collabora.com> (raw)
In-Reply-To: <20200501100729.1237040-1-boris.brezillon@collabora.com>
Let's not rely on the dummy_controller embedded in nand_chip.legacy
and explicitly inherit from nand_controller instead.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
drivers/mtd/nand/raw/davinci_nand.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c
index 25c185bea50c..0312c632d86a 100644
--- a/drivers/mtd/nand/raw/davinci_nand.c
+++ b/drivers/mtd/nand/raw/davinci_nand.c
@@ -38,6 +38,7 @@
* outputs in a "wire-AND" configuration, with no per-chip signals.
*/
struct davinci_nand_info {
+ struct nand_controller controller;
struct nand_chip chip;
struct platform_device *pdev;
@@ -788,7 +789,9 @@ static int nand_davinci_probe(struct platform_device *pdev)
spin_unlock_irq(&davinci_nand_lock);
/* Scan to find existence of the device(s) */
- info->chip.legacy.dummy_controller.ops = &davinci_nand_controller_ops;
+ nand_controller_init(&info->controller);
+ info->controller.ops = &davinci_nand_controller_ops;
+ info->chip.controller = &info->controller;
ret = nand_scan(&info->chip, pdata->mask_chipsel ? 2 : 1);
if (ret < 0) {
dev_dbg(&pdev->dev, "no NAND chip(s) found\n");
--
2.25.3
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2020-05-01 10:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-01 10:07 [PATCH 0/5] mtd: rawnand: davinci: Convert to exec_op() Boris Brezillon
2020-05-01 10:07 ` Boris Brezillon [this message]
2020-05-10 21:35 ` [PATCH 1/5] mtd: rawnand: davinci: Inherit from nand_controller Miquel Raynal
2020-05-01 10:07 ` [PATCH 2/5] mtd: rawnand: davinci: Stop using nand_chip.legacy.IO_ADDR_{R, W} Boris Brezillon
2020-05-10 21:37 ` [PATCH 2/5] mtd: rawnand: davinci: Stop using nand_chip.legacy.IO_ADDR_{R,W} Miquel Raynal
2020-05-01 10:07 ` [PATCH 3/5] mtd: rawnand: davinci: Implement exec_op() Boris Brezillon
2020-05-01 10:07 ` [PATCH 4/5] mtd: rawnand: davinci: Get rid of the legacy interface implementation Boris Brezillon
2020-05-10 21:38 ` Miquel Raynal
2020-05-01 10:07 ` [PATCH 5/5] mtd: rawnand: davinci: Change the {read, write}_buf prototypes Boris Brezillon
2020-05-10 21:39 ` [PATCH 5/5] mtd: rawnand: davinci: Change the {read,write}_buf prototypes Miquel Raynal
2020-05-04 16:34 ` [PATCH 0/5] mtd: rawnand: davinci: Convert to exec_op() Bartosz Golaszewski
2020-05-04 20:06 ` Boris Brezillon
2020-05-09 14:13 ` Boris Brezillon
2020-05-12 8:40 ` Bartosz Golaszewski
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=20200501100729.1237040-2-boris.brezillon@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=bgolaszewski@baylibre.com \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=nsekhar@ti.com \
--cc=richard@nod.at \
--cc=tudor.ambarus@microchip.com \
--cc=vigneshr@ti.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).