mtd_blkdev.c: Why is .blksize a member of mtd_blktrans_ops instead of mtd_blktrans_dev?
Thilo Fromm
fromm at dresearch-fe.de
Wed May 9 04:24:57 EDT 2012
Hello list,
I really don't see why .blksize (and .blkshift for that matter) is a
member of struct mtd_blktrans_ops. I feel like it should be in
mtd_blktrans_dev.
I'm asking because in our FTL I'd like to set blksize to the page size
of the underlying flash. I understand I could manipulate tr->blksize
and tr->blkshift in my add_mtd() callback implementation (because
these fields do not seem to be used beforehand by mtd_blkdevs.c
anyway), but it feels kind of hacky.
So why are blksize and blkshift members of the struct providing
callback functions of a device instead of the struct providing device
data?
Regards,
Thilo
--
Dipl.-Ing (FH) Thilo Fromm, MSc., Embedded Systems Architect
DResearch Fahrzeugelektronik GmbH
Otto-Schmirgal-Str. 3, D-10319 Berlin, Germany
Tel: +49 (30) 515 932 228 mailto:fromm at dresearch-fe.de
Fax: +49 (30) 515 932 77 http://www.dresearch.de
Amtsgericht: Berlin Charlottenburg, HRB 130120 B
Ust.-IDNr. DE273952058
Geschäftsführer: Dr. M. Weber, W. Mögle
More information about the linux-mtd
mailing list