Adding a function pointer to mtd_info struct
Justin Treon
justin_treon at yahoo.com
Wed Jan 23 12:28:13 EST 2008
I am trying to add some new features in my kernel to cfi_cmd_0001.c for a test chip.
I added a new field to the mtd_info struct in mtd.h and inserted the function
pointer into the mtd->overwrite field I added in cfi_cmd_0001.c, but when I try to
use mtd->overwrite in mtdblock.c the pointer is set to NULL.
In the mtd_info struct in include/mtd/mtd.h I addded:
int (*overwrite) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,
const u_char *buf);
In cfi_cmd_0001.c I added:
mtd->overwrite = cfi_intelext_overwrite_buffers;
What file or field do I need to modify to make new function accessible from
mtdblock.c?
Justin Treon
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
More information about the linux-mtd
mailing list