Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75712
b: refs/heads/master
c: a98894a
h: refs/heads/master
v: v3
  • Loading branch information
Tony Jones authored and Greg Kroah-Hartman committed Jan 25, 2008
1 parent 0e421ea commit f70365c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0c55445f201841bfd6c658c47df8311b6722f002
refs/heads/master: a98894ab02bc9a3e2dc8cccab55d7ed200d3b05f
12 changes: 5 additions & 7 deletions trunk/drivers/mtd/mtdchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,19 @@ static void mtd_notify_add(struct mtd_info* mtd)
if (!mtd)
return;

class_device_create(mtd_class, NULL, MKDEV(MTD_CHAR_MAJOR, mtd->index*2),
NULL, "mtd%d", mtd->index);
device_create(mtd_class, NULL, MKDEV(MTD_CHAR_MAJOR, mtd->index*2), "mtd%d", mtd->index);

class_device_create(mtd_class, NULL,
MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1),
NULL, "mtd%dro", mtd->index);
device_create(mtd_class, NULL,
MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1), "mtd%dro", mtd->index);
}

static void mtd_notify_remove(struct mtd_info* mtd)
{
if (!mtd)
return;

class_device_destroy(mtd_class, MKDEV(MTD_CHAR_MAJOR, mtd->index*2));
class_device_destroy(mtd_class, MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1));
device_destroy(mtd_class, MKDEV(MTD_CHAR_MAJOR, mtd->index*2));
device_destroy(mtd_class, MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1));
}

static struct mtd_notifier notifier = {
Expand Down

0 comments on commit f70365c

Please sign in to comment.