patch-1.3.33 linux/drivers/block/gscd.c
Next file: linux/drivers/block/hd.c
Previous file: linux/drivers/block/genhd.c
Back to the patch index
Back to the overall index
- Lines: 100
- Date:
Tue Oct 10 11:04:33 1995
- Orig file:
v1.3.32/linux/drivers/block/gscd.c
- Orig date:
Mon Sep 18 14:53:49 1995
diff -u --recursive --new-file v1.3.32/linux/drivers/block/gscd.c linux/drivers/block/gscd.c
@@ -121,7 +121,7 @@
/* common GoldStar Initialization */
-static long my_gscd_init (unsigned long , unsigned long);
+static int my_gscd_init (void);
/* lo-level cmd-Funktionen */
@@ -969,12 +969,12 @@
long err;
- /* call the GoldStar-init with dummys */
- err = my_gscd_init ( 10, 20 );
+ /* call the GoldStar-init */
+ err = my_gscd_init ( );
if ( err < 0 )
{
- return -EIO;
+ return err;
}
else
{
@@ -1006,18 +1006,15 @@
/* Test for presence of drive and initialize it. Called only at boot time. */
-unsigned long gscd_init (unsigned long mem_start, unsigned long mem_end)
+int gscd_init (void)
{
-unsigned long err;
-
- err = my_gscd_init ( mem_start, mem_end );
- return ( labs(err));
+ return my_gscd_init ();
}
/* This is the common initalisation for the GoldStar drive. */
/* It is called at boot time AND for module init. */
-long my_gscd_init (unsigned long mem_start, unsigned long mem_end)
+int my_gscd_init (void)
{
int i;
int result;
@@ -1028,7 +1025,7 @@
if (check_region(gscd_port, 4))
{
printk("GSCD: Init failed, I/O port (%X) already in use.\n", gscd_port);
- return -mem_start;
+ return -EIO;
}
@@ -1037,7 +1034,7 @@
if ( result == 0x09 )
{
printk ("GSCD: DMA kann ich noch nicht!\n" );
- return -mem_start;
+ return -EIO;
}
if ( result == 0x0b )
@@ -1047,14 +1044,14 @@
if ( i == 0 )
{
printk ( "GSCD: GoldStar CD-ROM Drive is not found.\n" );
- return -mem_start;
+ return -EIO;
}
}
if ( (result != 0x0b) && (result != 0x09) )
{
printk ("GSCD: GoldStar Interface Adapter does not exist or H/W error\n" );
- return -mem_start;
+ return -EIO;
}
/* reset all drives */
@@ -1072,7 +1069,7 @@
{
printk("GSCD: Unable to get major %d for GoldStar CD-ROM\n",
MAJOR_NR);
- return -mem_start;
+ return -EIO;
}
blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST;
@@ -1084,7 +1081,7 @@
request_region(gscd_port, 4, "gscd");
printk ( "GSCD: GoldStar CD-ROM Drive found.\n" );
- return mem_start;
+ return 0;
}
static void gscd_hsg2msf (long hsg, struct msf *msf)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this