mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[MTD] Allow variable block sizes in mtd_blkdevs
Currently, mtd_blkdevs enforces a block size of 512, even if the drivers can seemingly request a different size. This patch fixes mtd_blkdevs so block sizes other than 512 work correctly. Signed-off-by: Richard Purdie <rpurdie@openedhand.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
parent
90afffc8bd
commit
1918767299
8 changed files with 23 additions and 13 deletions
|
@ -24,7 +24,6 @@ struct mtd_blktrans_dev {
|
|||
struct mtd_info *mtd;
|
||||
struct mutex lock;
|
||||
int devnum;
|
||||
int blksize;
|
||||
unsigned long size;
|
||||
int readonly;
|
||||
void *blkcore_priv; /* gendisk in 2.5, devfs_handle in 2.4 */
|
||||
|
@ -36,6 +35,8 @@ struct mtd_blktrans_ops {
|
|||
char *name;
|
||||
int major;
|
||||
int part_bits;
|
||||
int blksize;
|
||||
int blkshift;
|
||||
|
||||
/* Access functions */
|
||||
int (*readsect)(struct mtd_blktrans_dev *dev,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue