diff options
author | bde <bde@FreeBSD.org> | 1997-04-20 18:02:40 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-04-20 18:02:40 +0000 |
commit | f55a1139513b0b5ce6edaebc1ee3967507b23490 (patch) | |
tree | c3a4940233e41e5113ca35eb4cd104ed8a6700e9 /sys/i386/isa/matcd | |
parent | 1dcbd56e345d19ec4e660f395d5698569b8bdc6e (diff) | |
download | FreeBSD-src-f55a1139513b0b5ce6edaebc1ee3967507b23490.zip FreeBSD-src-f55a1139513b0b5ce6edaebc1ee3967507b23490.tar.gz |
Fixed the type of a timeout function and removed casts that hid the
type mismatches. There was no problem in practice (at least on 386's).
The timeout args still get bogusly cast from int to `void *' via
caddr_t and back to int.
Diffstat (limited to 'sys/i386/isa/matcd')
-rw-r--r-- | sys/i386/isa/matcd/matcd.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/i386/isa/matcd/matcd.c b/sys/i386/isa/matcd/matcd.c index c374748..945152a 100644 --- a/sys/i386/isa/matcd/matcd.c +++ b/sys/i386/isa/matcd/matcd.c @@ -337,7 +337,7 @@ static char MATCDVERSION[]="Version 1(26) 18-Oct-95"; static char MATCDCOPYRIGHT[] = "Matsushita CD-ROM driver, Copr. 1994,1995 Frank Durda IV"; /* The proceeding strings may not be changed*/ -/* $Id: matcd.c,v 1.23 1997/03/23 03:35:32 bde Exp $ */ +/* $Id: matcd.c,v 1.24 1997/03/24 11:24:22 bde Exp $ */ /*--------------------------------------------------------------------------- Include declarations @@ -538,6 +538,7 @@ static int matcd_fastcmd(int port,int ldrive,int cdrive, unsigned char * cp); static void matcd_slowcmd(int port,int ldrive,int cdrive, unsigned char * cp); +static timeout_t matcd_timeout; static void matcd_blockread(int state); static void selectdrive(int port,int drive); static void doreset(int port,int cdrive); @@ -1827,6 +1828,10 @@ static int msf_to_blk(unsigned char * cd) +cd[2]-150); /*seconds*/ } +static void matcd_timeout(void *arg) +{ + matcd_blockread((int)arg); +} /*--------------------------------------------------------------------------- matcd_blockread - Performs actual background disc I/O operations @@ -1937,7 +1942,7 @@ nextblock: #ifdef DEBUGIO printf("matcd%d: Sleeping\n",ldrive); #endif /*DEBUGIO*/ - timeout((timeout_func_t)matcd_blockread, + timeout(matcd_timeout, (caddr_t)MATCD_READ_2+ldrive,hz/100); return; |