Commit 33e2f222 authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] devfs: swim3

parent 26deacb3
...@@ -971,15 +971,13 @@ static struct block_device_operations floppy_fops = { ...@@ -971,15 +971,13 @@ static struct block_device_operations floppy_fops = {
.revalidate_disk= floppy_revalidate, .revalidate_disk= floppy_revalidate,
}; };
static devfs_handle_t floppy_devfs_handle;
int swim3_init(void) int swim3_init(void)
{ {
struct device_node *swim; struct device_node *swim;
int err = -ENOMEM; int err = -ENOMEM;
int i; int i;
floppy_devfs_handle = devfs_mk_dir("floppy"); devfs_mk_dir("floppy");
swim = find_devices("floppy"); swim = find_devices("floppy");
while (swim && (floppy_count < MAX_FLOPPIES)) while (swim && (floppy_count < MAX_FLOPPIES))
...@@ -1034,7 +1032,6 @@ static int swim3_add_device(struct device_node *swim) ...@@ -1034,7 +1032,6 @@ static int swim3_add_device(struct device_node *swim)
struct device_node *mediabay; struct device_node *mediabay;
struct floppy_state *fs = &floppy_states[floppy_count]; struct floppy_state *fs = &floppy_states[floppy_count];
char floppy_name[16]; char floppy_name[16];
devfs_handle_t floppy_handle;
if (swim->n_addrs < 2) if (swim->n_addrs < 2)
{ {
...@@ -1097,7 +1094,7 @@ static int swim3_add_device(struct device_node *swim) ...@@ -1097,7 +1094,7 @@ static int swim3_add_device(struct device_node *swim)
mediabay ? "in media bay" : ""); mediabay ? "in media bay" : "");
sprintf(floppy_name, "floppy/%d", floppy_count); sprintf(floppy_name, "floppy/%d", floppy_count);
floppy_handle = devfs_register(NULL, floppy_name, devfs_register(NULL, floppy_name,
DEVFS_FL_DEFAULT, FLOPPY_MAJOR, floppy_count, DEVFS_FL_DEFAULT, FLOPPY_MAJOR, floppy_count,
S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP |S_IWGRP, S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP |S_IWGRP,
&floppy_fops, NULL); &floppy_fops, NULL);
......
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