From: Semih Hazar <semih.hazar@indefia.com>
To: linux-mtd@lists.infradead.org
Subject: Generic Platform NAND Driver
Date: Fri, 18 May 2007 15:15:27 +0300 [thread overview]
Message-ID: <464D98DF.5020004@indefia.com> (raw)
Hi,
In the new generic platforn NAND driver, line 54;
data->chip.priv = &data;
data->mtd.priv = &data->chip;
mtd->priv->priv points to struct plat_nand_data which is defined in the
plat_nand.c and never used by it.
Can we change it so that this priv points to a host specific data, and
the helper functions (board specific) can make use of it.
Below is a suggested patch:
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index d2365c8..256957b 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -599,10 +599,12 @@ struct platform_nand_ctrl {
* struct platform_nand_data - container structure for platform-specific data
* @chip: chip level chip structure
* @ctrl: controller level device structure
+ * @host: pointer to host specific data structure
*/
struct platform_nand_data {
struct platform_nand_chip chip;
struct platform_nand_ctrl ctrl;
+ void *host;
};
/* Some helpers to access the data structures */
diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c
index cd725fc..1e47ad3 100644
--- a/drivers/mtd/nand/plat_nand.c
+++ b/drivers/mtd/nand/plat_nand.c
@@ -51,7 +51,7 @@ static int __init plat_nand_probe(struct platform_device *pdev)
return -EIO;
}
- data->chip.priv = &data;
+ data->chip.priv = pdata->host;
data->mtd.priv = &data->chip;
data->mtd.owner = THIS_MODULE;
next reply other threads:[~2007-05-18 12:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-18 12:15 Semih Hazar [this message]
2007-05-22 9:08 ` Generic Platform NAND Driver Semih Hazar
2007-05-22 9:48 ` Vladimir A. Barinov
2007-05-22 10:28 ` Semih Hazar
2007-05-22 11:19 ` Vladimir A. Barinov
2007-05-22 11:53 ` Semih Hazar
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=464D98DF.5020004@indefia.com \
--to=semih.hazar@indefia.com \
--cc=linux-mtd@lists.infradead.org \
/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.