[PATCH][MTD] CORE: sysfs support for mtd

Siddharth Choudhuri sid at egor.ics.uci.edu
Fri Jul 27 19:05:23 EDT 2007


> I have applied this patch to my tree and tried to compile it, but I get
> lots of compile errors. Maybe you created it on an outdated kernel?!
>
> /home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:112: error: (Each undeclared identifier is reported only once
> /home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:112: error: for each function it appears in.)
> /home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:113: error: `MTD_ECC_RS_DiskOnChip' undeclared (first use in this function)
> /home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:114: error: `MTD_ECC_SW' undeclared (first use in this function)
> /home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:116: error: structure has no member named `ecctype'
> /home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c: In function `mtd_sysfs_rd_eccsize':
> /home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:122: error: structure has no member named `eccsize'
> /home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c: In function `add_mtd_partitions':
> /home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:510: warning: assignment from incompatible pointer type
> /home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:511: error: invalid use of undefined type `struct subsystem'
>
Thanks for the error log. You're right, I patched it against 2.6.18. With 
the latest kernel from git, I got the exact same errors. I guess the 
reason is 1) mtd_info struct no longer has ecctype, eccsize as members 
which means these fields cannot be exported 2) Looks like there have been 
some changes to the devices subsystem from 2.6.18 to the current version. 
There's also a new file under Documentation/sysfs-rules.txt. I'll post a 
patch as soon as I figure out how to add mtd to /sys hierarchy in the 
latest kernel.

regards,
-siddharth



More information about the linux-mtd mailing list