summaryrefslogtreecommitdiffstats
path: root/drivers/block/xd.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-05-12 21:05:59 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-05-12 21:05:59 +0000
commitba2dacab305c598cd4c34a604f8e276bf5bab5ff (patch)
tree78670a0139bf4d5ace617b29b7eba82bbc74d602 /drivers/block/xd.c
parentb77bf69998121e689c5e86cc5630d39a0a9ee6ca (diff)
Merge with Linux 2.3.99-pre7 and various other bits.
Diffstat (limited to 'drivers/block/xd.c')
-rw-r--r--drivers/block/xd.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/block/xd.c b/drivers/block/xd.c
index 659e05c17..74df1096e 100644
--- a/drivers/block/xd.c
+++ b/drivers/block/xd.c
@@ -149,9 +149,7 @@ static int xd_geo[XD_MAXDRIVES*3] __initdata = { 0,0,0,0,0,0 };
static volatile int xdc_busy = 0;
static DECLARE_WAIT_QUEUE_HEAD(xdc_wait);
-typedef void (*timeout_fn)(unsigned long);
-static struct timer_list xd_timer = { NULL, NULL, 0, 0, (timeout_fn) xd_wakeup },
- xd_watchdog_int = { NULL, NULL, 0, 0, (timeout_fn) xd_watchdog };
+static struct timer_list xd_timer, xd_watchdog_int;
static volatile u_char xd_error;
static int nodma = XD_DONT_USE_DMA;
@@ -161,6 +159,9 @@ static devfs_handle_t devfs_handle = NULL;
/* xd_init: register the block device number and set up pointer tables */
int __init xd_init (void)
{
+ init_timer (&xd_timer); xd_timer.function = xd_wakeup;
+ init_timer (&xd_watchdog_int); xd_watchdog_int.function = xd_watchdog;
+
if (devfs_register_blkdev(MAJOR_NR,"xd",&xd_fops)) {
printk("xd: Unable to get major number %d\n",MAJOR_NR);
return -1;
@@ -551,13 +552,13 @@ static u_char *xd_build (u_char *cmdblk,u_char command,u_char drive,u_char head,
}
/* xd_wakeup is called from timer interrupt */
-static void xd_wakeup (void)
+static void xd_wakeup (unsigned long unused)
{
wake_up(&xdc_wait);
}
/* xd_wakeup is called from timer interrupt */
-static void xd_watchdog (void)
+static void xd_watchdog (unsigned long unused)
{
xd_error = 1;
wake_up(&xd_wait_int);
@@ -1136,8 +1137,8 @@ int init_module(void)
if((xd[0] = count))
do_xd_setup(xd);
- if (error = xd_init())
- return error;
+ error = xd_init();
+ if (error) return error;
printk(KERN_INFO "XD: Loaded as a module.\n");
if (!xd_drives) {