linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: rawnand: pl353: Set the nand chip node as the flash node
@ 2022-02-08 12:57 Amit Kumar Mahapatra
  2022-02-08 13:05 ` Miquel Raynal
  0 siblings, 1 reply; 2+ messages in thread
From: Amit Kumar Mahapatra @ 2022-02-08 12:57 UTC (permalink / raw)
  To: miquel.raynal, vigneshr
  Cc: richard, linux-mtd, linux-kernel, git, Amit Kumar Mahapatra

In devicetree the flash information is embedded within nand chip node,
so during nand chip initialization the nand chip node should be passed
to nand_set_flash_node() api, instead of nand controller node.

Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>
---
BRANCH: nand/next
---
 drivers/mtd/nand/raw/pl35x-nand-controller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/raw/pl35x-nand-controller.c b/drivers/mtd/nand/raw/pl35x-nand-controller.c
index 8a91e069ee2e..3c6f6aff649f 100644
--- a/drivers/mtd/nand/raw/pl35x-nand-controller.c
+++ b/drivers/mtd/nand/raw/pl35x-nand-controller.c
@@ -1062,7 +1062,7 @@ static int pl35x_nand_chip_init(struct pl35x_nandc *nfc,
 	chip->controller = &nfc->controller;
 	mtd = nand_to_mtd(chip);
 	mtd->dev.parent = nfc->dev;
-	nand_set_flash_node(chip, nfc->dev->of_node);
+	nand_set_flash_node(chip, np);
 	if (!mtd->name) {
 		mtd->name = devm_kasprintf(nfc->dev, GFP_KERNEL,
 					   "%s", PL35X_NANDC_DRIVER_NAME);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: rawnand: pl353: Set the nand chip node as the flash node
  2022-02-08 12:57 [PATCH] mtd: rawnand: pl353: Set the nand chip node as the flash node Amit Kumar Mahapatra
@ 2022-02-08 13:05 ` Miquel Raynal
  0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2022-02-08 13:05 UTC (permalink / raw)
  To: Amit Kumar Mahapatra; +Cc: vigneshr, richard, linux-mtd, linux-kernel, git

Hi Amit,

amit.kumar-mahapatra@xilinx.com wrote on Tue, 8 Feb 2022 18:27:38 +0530:

> In devicetree the flash information is embedded within nand chip node,
> so during nand chip initialization the nand chip node should be passed
> to nand_set_flash_node() api, instead of nand controller node.
> 
> Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>

Can you please add Fixes tag?

> ---
> BRANCH: nand/next
> ---
>  drivers/mtd/nand/raw/pl35x-nand-controller.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/raw/pl35x-nand-controller.c b/drivers/mtd/nand/raw/pl35x-nand-controller.c
> index 8a91e069ee2e..3c6f6aff649f 100644
> --- a/drivers/mtd/nand/raw/pl35x-nand-controller.c
> +++ b/drivers/mtd/nand/raw/pl35x-nand-controller.c
> @@ -1062,7 +1062,7 @@ static int pl35x_nand_chip_init(struct pl35x_nandc *nfc,
>  	chip->controller = &nfc->controller;
>  	mtd = nand_to_mtd(chip);
>  	mtd->dev.parent = nfc->dev;
> -	nand_set_flash_node(chip, nfc->dev->of_node);
> +	nand_set_flash_node(chip, np);
>  	if (!mtd->name) {
>  		mtd->name = devm_kasprintf(nfc->dev, GFP_KERNEL,
>  					   "%s", PL35X_NANDC_DRIVER_NAME);

yup, that was wrong.

Thanks,
Miquèl

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-08 13:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08 12:57 [PATCH] mtd: rawnand: pl353: Set the nand chip node as the flash node Amit Kumar Mahapatra
2022-02-08 13:05 ` Miquel Raynal

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).