* how to get mtd partitions info in chip->ecc.read_page
@ 2009-02-19 12:27 eq613
0 siblings, 0 replies; only message in thread
From: eq613 @ 2009-02-19 12:27 UTC (permalink / raw)
To: linux-mtd
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-19 12:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-19 12:27 how to get mtd partitions info in chip->ecc.read_page eq613
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox