diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/devices/block2mtd.c | 3 | ||||
-rw-r--r-- | drivers/mtd/mtdchar.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index 6d917a4daa9..f9f2ce7806b 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c @@ -278,7 +278,8 @@ static void block2mtd_free_device(struct block2mtd_dev *dev) kfree(dev->mtd.name); if (dev->blkdev) { - invalidate_inode_pages(dev->blkdev->bd_inode->i_mapping); + invalidate_mapping_pages(dev->blkdev->bd_inode->i_mapping, + 0, -1); close_bdev_excl(dev->blkdev); } diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 3013d0883b9..61a994ea8af 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c @@ -759,7 +759,7 @@ static int mtd_ioctl(struct inode *inode, struct file *file, return ret; } /* memory_ioctl */ -static struct file_operations mtd_fops = { +static const struct file_operations mtd_fops = { .owner = THIS_MODULE, .llseek = mtd_lseek, .read = mtd_read, |