summaryrefslogtreecommitdiffstats
path: root/drivers/acorn
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-08 00:53:00 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-08 00:53:00 +0000
commitb8553086288629b4efb77e97f5582e08bc50ad65 (patch)
tree0a19bd1c21e148f35c7a0f76baa4f7a056b966b0 /drivers/acorn
parent75b6d92f2dd5112b02f4e78cf9f35f9825946ef0 (diff)
Merge with 2.4.0-test3-pre4.
Diffstat (limited to 'drivers/acorn')
-rw-r--r--drivers/acorn/block/fd1772.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/acorn/block/fd1772.c b/drivers/acorn/block/fd1772.c
index e2e7d96df..980add976 100644
--- a/drivers/acorn/block/fd1772.c
+++ b/drivers/acorn/block/fd1772.c
@@ -289,6 +289,7 @@ static unsigned int changed_floppies = 0xff, fake_change = 0;
#define MAX_ERRORS 8 /* After this many errors the driver
* will give up. */
+static struct timer_list fd_timer;
#define START_MOTOR_OFF_TIMER(delay) \
do { \
@@ -299,8 +300,7 @@ static unsigned int changed_floppies = 0xff, fake_change = 0;
#define START_CHECK_CHANGE_TIMER(delay) \
do { \
- timer_table[FLOPPY_TIMER].expires = jiffies + (delay); \
- timer_active |= (1 << FLOPPY_TIMER); \
+ mod_timer(&fd_timer, jiffies + (delay)); \
} while(0)
#define START_TIMEOUT() \
@@ -340,7 +340,7 @@ static void fd_select_side(int side);
static void fd_select_drive(int drive);
static void fd_deselect(void);
static void fd_motor_off_timer(unsigned long dummy);
-static void check_change(void);
+static void check_change(unsigned long dummy);
static __inline__ void set_head_settle_flag(void);
static __inline__ int get_head_settle_flag(void);
static void floppy_irqconsequencehandler(void);
@@ -501,7 +501,7 @@ static void fd_motor_off_timer(unsigned long dummy)
* as possible) and keep track of the current state of the write protection.
*/
-static void check_change(void)
+static void check_change(unsigned long dummy)
{
static int drive = 0;
@@ -1093,12 +1093,12 @@ static void finish_fdc_done(int dummy)
STOP_TIMEOUT();
NeedSeek = 0;
- if ((timer_active & (1 << FLOPPY_TIMER)) &&
- time_after(jiffies + 5, timer_table[FLOPPY_TIMER].expires))
+ if (timer_pending(&fd_timer) &&
+ time_after(jiffies + 5, fd_timer.expires))
/* If the check for a disk change is done too early after this
* last seek command, the WP bit still reads wrong :-((
*/
- timer_table[FLOPPY_TIMER].expires = jiffies + 5;
+ mod_timer(&fd_timer, jiffies + 5);
else {
/* START_CHECK_CHANGE_TIMER( CHECK_CHANGE_DELAY ); */
};
@@ -1602,9 +1602,9 @@ int fd1772_init(void)
#endif
/* initialize check_change timer */
- timer_table[FLOPPY_TIMER].fn = check_change;
- timer_active &= ~(1 << FLOPPY_TIMER);
-
+ init_timer(&fd_timer);
+ fd_timer.function = check_change;
+}
#ifdef TRACKBUFFER
DMABuffer = (char *)kmalloc((MAX_SECTORS+1)*512,GFP_KERNEL); /* Atari uses 512 - I want to eventually cope with 1K sectors */