summaryrefslogtreecommitdiff
path: root/target/linux/generic/patches-2.6.38/067-block2mtd_2.6.38_fix.patch
blob: 74e0a2f3e5a276186540630b54305a09705b9c97 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -330,7 +330,7 @@ static int block2mtd_refresh(struct mtd_
 	_close_bdev(dev);
 
 	/* open the whole disk, issue a partition rescan, then */
-	bdev = blkdev_get_by_dev(devt, FMODE_WRITE | FMODE_READ);
+	bdev = blkdev_get_by_dev(devt, FMODE_WRITE | FMODE_READ, mtd);
 	if (!bdev || !bdev->bd_disk)
 		err = -EINVAL;
 #ifndef CONFIG_MTD_BLOCK2MTD_MODULE