summaryrefslogtreecommitdiffstats
path: root/drivers/block/ps2esdi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/ps2esdi.c')
-rw-r--r--drivers/block/ps2esdi.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/block/ps2esdi.c b/drivers/block/ps2esdi.c
index 9f68ebbfc..305c89a00 100644
--- a/drivers/block/ps2esdi.c
+++ b/drivers/block/ps2esdi.c
@@ -41,6 +41,7 @@
#include <linux/kernel.h>
#include <linux/genhd.h>
#include <linux/ps2esdi.h>
+#include <linux/devfs_fs_kernel.h>
#include <linux/blk.h>
#include <linux/blkpg.h>
#include <linux/mca.h>
@@ -164,7 +165,8 @@ static struct gendisk ps2esdi_gendisk =
ps2esdi_sizes, /* block sizes */
0, /* number */
(void *) ps2esdi_info, /* internal */
- NULL /* next */
+ NULL, /* next */
+ &ps2esdi_fops, /* file operations */
};
/* initialization routine called by ll_rw_blk.c */
@@ -173,7 +175,7 @@ int __init ps2esdi_init(void)
/* register the device - pass the name, major number and operations
vector . */
- if (register_blkdev(MAJOR_NR, "ed", &ps2esdi_fops)) {
+ if (devfs_register_blkdev(MAJOR_NR, "ed", &ps2esdi_fops)) {
printk("%s: Unable to get major number %d\n", DEVICE_NAME, MAJOR_NR);
return -1;
}
@@ -229,7 +231,7 @@ cleanup_module(void)
release_region(io_base, 4);
free_dma(dma_arb_level);
free_irq(PS2ESDI_IRQ, NULL)
- unregister_blkdev(MAJOR_NR, "ed");
+ devfs_unregister_blkdev(MAJOR_NR, "ed");
}
#endif /* MODULE */
@@ -476,7 +478,7 @@ static void do_ps2esdi_request(request_queue_t * q)
if (virt_to_bus(CURRENT->buffer + CURRENT->nr_sectors * 512) > 16 * MB) {
printk("%s: DMA above 16MB not supported\n", DEVICE_NAME);
end_request(FAIL);
- if (CURRENT)
+ if (!QUEUE_EMPTY)
do_ps2esdi_request(q);
return;
} /* check for above 16Mb dmas */
@@ -510,7 +512,7 @@ static void do_ps2esdi_request(request_queue_t * q)
default:
printk("%s: Unknown command\n", DEVICE_NAME);
end_request(FAIL);
- if (CURRENT)
+ if (!QUEUE_EMPTY)
do_ps2esdi_request(q);
break;
} /* handle different commands */
@@ -520,7 +522,7 @@ static void do_ps2esdi_request(request_queue_t * q)
printk("Grrr. error. ps2esdi_drives: %d, %lu %lu\n", ps2esdi_drives,
CURRENT->sector, ps2esdi[MINOR(CURRENT->rq_dev)].nr_sects);
end_request(FAIL);
- if (CURRENT)
+ if (!QUEUE_EMPTY)
do_ps2esdi_request(q);
}
@@ -591,7 +593,7 @@ static void ps2esdi_readwrite(int cmd, u_char drive, u_int block, u_int count)
return do_ps2esdi_request(NULL);
else {
end_request(FAIL);
- if (CURRENT)
+ if (!QUEUE_EMPTY)
do_ps2esdi_request(NULL);
}
}
@@ -894,7 +896,7 @@ static void ps2esdi_normal_interrupt_handler(u_int int_ret_code)
do_ps2esdi_request(NULL);
else {
end_request(FAIL);
- if (CURRENT)
+ if (!QUEUE_EMPTY)
do_ps2esdi_request(NULL);
}
break;
@@ -940,7 +942,7 @@ static void ps2esdi_normal_interrupt_handler(u_int int_ret_code)
do_ps2esdi_request(NULL);
else {
end_request(FAIL);
- if (CURRENT)
+ if (!QUEUE_EMPTY)
do_ps2esdi_request(NULL);
}
break;
@@ -950,7 +952,7 @@ static void ps2esdi_normal_interrupt_handler(u_int int_ret_code)
outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
outb(CTRL_ENABLE_INTR, ESDI_CONTROL);
end_request(FAIL);
- if (CURRENT)
+ if (!QUEUE_EMPTY)
do_ps2esdi_request(NULL);
break;
@@ -986,7 +988,7 @@ static void ps2esdi_continue_request(void)
do_ps2esdi_request(NULL);
} else {
end_request(SUCCES);
- if (CURRENT)
+ if (!QUEUE_EMPTY)
do_ps2esdi_request(NULL);
}
}