diff options
Diffstat (limited to 'drivers/mtd/mtdchar.c')
-rw-r--r-- | drivers/mtd/mtdchar.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 129d429cd2da..aef9f4b687c9 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
@@ -28,10 +28,13 @@ static void mtd_notify_add(struct mtd_info* mtd) | |||
28 | if (!mtd) | 28 | if (!mtd) |
29 | return; | 29 | return; |
30 | 30 | ||
31 | device_create(mtd_class, NULL, MKDEV(MTD_CHAR_MAJOR, mtd->index*2), "mtd%d", mtd->index); | 31 | device_create_drvdata(mtd_class, NULL, |
32 | MKDEV(MTD_CHAR_MAJOR, mtd->index*2), | ||
33 | NULL, "mtd%d", mtd->index); | ||
32 | 34 | ||
33 | device_create(mtd_class, NULL, | 35 | device_create_drvdata(mtd_class, NULL, |
34 | MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1), "mtd%dro", mtd->index); | 36 | MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1), |
37 | NULL, "mtd%dro", mtd->index); | ||
35 | } | 38 | } |
36 | 39 | ||
37 | static void mtd_notify_remove(struct mtd_info* mtd) | 40 | static void mtd_notify_remove(struct mtd_info* mtd) |