From: eq613 <eq613@qq.com>
To: linux-mtd <linux-mtd@lists.infradead.org>
Subject: how to get mtd partitions info in chip->ecc.read_page
Date: Thu, 19 Feb 2009 20:27:15 +0800 [thread overview]
Message-ID: <tencent_775DAF1410FC6C15664A8A35@qq.com> (raw)
in the read_page function, I want to do some special for different nand partition, but the
chip->ecc.read_page(mtd, chip, bufpoi); //mtd=slave->master, but i want get the mtd_info of slave
is there some methord ?
struct mtd_part {
struct mtd_info mtd; //want this
struct mtd_info *master; // but get this
u_int32_t offset;
int index;
struct list_head list;
int registered;
};
the container_of does not work:
struct mtd_part * mtdmaster_to_mtd_part( struct mtd_info **mtd){
return container_of(mtd,struct mtd_part,master);
}
struct mtd_part * mtd_part=mtdmaster_to_mtd_part(&mtd);
struct mtd_info * slavepart=(struct mtd_info*)(mtd_part);
reply other threads:[~2009-02-19 12:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=tencent_775DAF1410FC6C15664A8A35@qq.com \
--to=eq613@qq.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox