Commit bdfe6862 authored by Andrew Morton's avatar Andrew Morton Committed by Jaroslav Kysela

[PATCH] floppy oops fix

From: Zwane Mwaikambo <zwane@linuxpower.ca>

It looks like a block request snuck through before we had initialised the
motor_off_timer timers.  So I pushed the timer init earlier.
parent 1ec55db5
......@@ -4242,6 +4242,15 @@ int __init floppy_init(void)
disks[i] = alloc_disk(1);
if (!disks[i])
goto Enomem;
disks[i]->major = FLOPPY_MAJOR;
disks[i]->first_minor = TOMINOR(i);
disks[i]->fops = &floppy_fops;
sprintf(disks[i]->disk_name, "fd%d", i);
init_timer(&motor_off_timer[i]);
motor_off_timer[i].data = i;
motor_off_timer[i].function = motor_off_callback;
}
devfs_mk_dir ("floppy");
......@@ -4255,13 +4264,6 @@ int __init floppy_init(void)
goto fail_queue;
}
for (i=0; i<N_DRIVE; i++) {
disks[i]->major = FLOPPY_MAJOR;
disks[i]->first_minor = TOMINOR(i);
disks[i]->fops = &floppy_fops;
sprintf(disks[i]->disk_name, "fd%d", i);
}
blk_register_region(MKDEV(FLOPPY_MAJOR, 0), 256, THIS_MODULE,
floppy_find, NULL, NULL);
......@@ -4366,9 +4368,6 @@ int __init floppy_init(void)
}
for (drive = 0; drive < N_DRIVE; drive++) {
init_timer(&motor_off_timer[drive]);
motor_off_timer[drive].data = drive;
motor_off_timer[drive].function = motor_off_callback;
if (!(allowed_drive_mask & (1 << drive)))
continue;
if (fdc_state[FDC(drive)].version == FDC_NONE)
......
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