From: Vitaly Wool <vitalywool@gmail.com>
To: linux-mtd@lists.infradead.org
Subject: [patch/resend] nand: add containing structure for NAND platform data
Date: Mon, 30 Apr 2007 20:19:53 +0400 [thread overview]
Message-ID: <46361729.5050504@gmail.com> (raw)
In order to make it more convenient to pass platform-specific NAND stuff
to a generic driver which is hopefully to come out next, I've introduced
a container structure for chip-specific and controller-specific data.
I'd expect that use cases in platform code will be like
struct platform_nand_data nand_data = {
...
};
struct platform_device nand_device = {
...
.dev = {
.platform_data = &nand_data,
...
},
};
So, please find the patch below.
include/linux/mtd/nand.h | 10 ++++++++++
1 files changed, 10 insertions(+)
Index: linux-2.6/include/linux/mtd/nand.h
===================================================================
--- linux-2.6.orig/include/linux/mtd/nand.h
+++ linux-2.6/include/linux/mtd/nand.h
@@ -592,6 +592,16 @@ struct platform_nand_ctrl {
void *priv;
};
+/**
+ * struct platform_nand_data - container structure for platform-specific data
+ * @chip: chip level chip structure
+ * @ctrl: controller level device structure
+ */
+struct platform_nand_data {
+ struct platform_nand_chip chip;
+ struct platform_nand_ctrl ctrl;
+};
+
/* Some helpers to access the data structures */
static inline
struct platform_nand_chip *get_platform_nandchip(struct mtd_info *mtd)
next reply other threads:[~2007-04-30 16:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-30 16:19 Vitaly Wool [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-04-30 10:22 [patch/resend] nand: add containing structure for NAND platform data Vitaly
2007-04-30 15:50 ` Sergei Shtylyov
2007-04-30 16:10 ` Vitaly Wool
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=46361729.5050504@gmail.com \
--to=vitalywool@gmail.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.