patch-2.4.19 linux-2.4.19/drivers/acorn/block/mfmhd.c
Next file: linux-2.4.19/drivers/acorn/char/mouse_ps2.c
Previous file: linux-2.4.19/drivers/acorn/block/fd1772.c
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Fri Aug 2 17:39:43 2002
- Orig file:
linux-2.4.18/drivers/acorn/block/mfmhd.c
- Orig date:
Thu Oct 25 13:58:35 2001
diff -urN linux-2.4.18/drivers/acorn/block/mfmhd.c linux-2.4.19/drivers/acorn/block/mfmhd.c
@@ -1369,9 +1369,6 @@
*/
static int mfm_probecontroller (unsigned int mfm_addr)
{
- if (check_region (mfm_addr, 10))
- return 0;
-
if (inw (MFM_STATUS) & STAT_BSY) {
outw (CMD_ABT, MFM_COMMAND);
udelay (50);
@@ -1429,15 +1426,19 @@
ecard_claim(ecs);
}
+ printk("mfm: found at address %08X, interrupt %d\n", mfm_addr, mfm_irq);
+ if (!request_region (mfm_addr, 10, "mfm")) {
+ ecard_release(ecs);
+ return -1;
+ }
+
if (register_blkdev(MAJOR_NR, "mfm", &mfm_fops)) {
printk("mfm_init: unable to get major number %d\n", MAJOR_NR);
ecard_release(ecs);
+ release_region(mfm_addr, 10);
return -1;
}
- printk("mfm: found at address %08X, interrupt %d\n", mfm_addr, mfm_irq);
- request_region (mfm_addr, 10, "mfm");
-
/* Stuff for the assembler routines to get to */
hdc63463_baseaddress = ioaddr(mfm_addr);
hdc63463_irqpolladdress = mfm_IRQPollLoc;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)