Commit 9d46f485 authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] devfs: floppy

The following patches switch the few drivers that have to register
devfs entries independand of gendisks to devfs_mk_bdev.
parent 36631a0c
...@@ -3965,21 +3965,19 @@ static int *table_sup[] = ...@@ -3965,21 +3965,19 @@ static int *table_sup[] =
static void __init register_devfs_entries (int drive) static void __init register_devfs_entries (int drive)
{ {
int base_minor, i; int base_minor = (drive < 4) ? drive : (124 + drive);
base_minor = (drive < 4) ? drive : (124 + drive); if (UDP->cmos < NUMBER(default_drive_params)) {
if (UDP->cmos < NUMBER(default_drive_params)) { int i = 0;
i = 0; do {
do { int minor = base_minor + (table_sup[UDP->cmos][i] << 2);
char name[16];
sprintf(name, "floppy/%d%s", drive, table[table_sup[UDP->cmos][i]]); devfs_mk_bdev(MKDEV(FLOPPY_MAJOR, minor),
devfs_register(NULL, name, DEVFS_FL_DEFAULT, FLOPPY_MAJOR, S_IFBLK|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP,
base_minor + (table_sup[UDP->cmos][i] << 2), "floppy/%d%s",
S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP |S_IWGRP, drive, table[table_sup[UDP->cmos][i]]);
&floppy_fops, NULL); } while (table_sup[UDP->cmos][i++]);
} while (table_sup[UDP->cmos][i++]); }
}
} }
/* /*
......
...@@ -4084,21 +4084,19 @@ static int *table_sup[] = ...@@ -4084,21 +4084,19 @@ static int *table_sup[] =
static void __init register_devfs_entries (int drive) static void __init register_devfs_entries (int drive)
{ {
int base_minor, i; int base_minor = (drive < 4) ? drive : (124 + drive);
base_minor = (drive < 4) ? drive : (124 + drive); if (UDP->cmos < NUMBER(default_drive_params)) {
if (UDP->cmos < NUMBER(default_drive_params)) { int i = 0;
i = 0; do {
do { int minor = base_minor + (table_sup[UDP->cmos][i] << 2);
char name[16];
sprintf(name, "floppy/%d%s", drive, table[table_sup[UDP->cmos][i]]); devfs_mk_bdev(MKDEV(FLOPPY_MAJOR, minor),
devfs_register(NULL, name, DEVFS_FL_DEFAULT, FLOPPY_MAJOR, S_IFBLK|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP,
base_minor + (table_sup[UDP->cmos][i] << 2), "floppy/%d%s",
S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP |S_IWGRP, drive, table[table_sup[UDP->cmos][i]]);
&floppy_fops, NULL); } while (table_sup[UDP->cmos][i++]);
} while (table_sup[UDP->cmos][i++]); }
}
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment