Ataflop: fix breakage after recent cleanups
--- linux-2.5.x/drivers/block/ataflop.c Mon May 5 10:30:51 2003
+++ linux-m68k-2.5.x/drivers/block/ataflop.c Thu May 8 09:16:18 2003
@@ -1570,7 +1571,7 @@
*/
/* get the parameters from user space */
- if (p->ref != 1 && p->ref != -1)
+ if (floppy->ref != 1 && floppy->ref != -1)
return -EBUSY;
if (copy_from_user(&setprm, (void *) param, sizeof(setprm)))
return -EFAULT;
@@ -1617,7 +1618,7 @@
printk (KERN_INFO "floppy%d: setting %s %p!\n",
drive, dtp->name, dtp);
UDT = dtp;
- set_capacity(p->disk, UDT->blocks);
+ set_capacity(floppy->disk, UDT->blocks);
if (cmd == FDDEFPRM) {
/* save settings as permanent default type */
@@ -1663,7 +1664,7 @@
}
UDT = dtp;
- set_capacity(p->disk, UDT->blocks);
+ set_capacity(floppy->disk, UDT->blocks);
return 0;
case FDMSGON:
@@ -1677,7 +1678,7 @@
case FDFMTBEG:
return 0;
case FDFMTTRK:
- if (p->ref != 1 && p->ref != -1)
+ if (floppy->ref != 1 && floppy->ref != -1)
return -EBUSY;
if (copy_from_user(&fmt_desc, (void *) param, sizeof(fmt_desc)))
return -EFAULT;
@@ -1686,7 +1687,7 @@
UDT = NULL;
/* MSch: invalidate default_params */
default_params[drive].blocks = 0;
- set_capacity(p->disk, MAX_DISK_SIZE * 2);
+ set_capacity(floppy->disk, MAX_DISK_SIZE * 2);
case FDFMTEND:
case FDFLUSH:
/* invalidate the buffer track to force a reread */
Gr{oetje,eeting}s,
Geert
-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.orgIn personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu May 15 2003 - 22:00:36 EST