patch-1.3.15 linux/drivers/scsi/seagate.c

Next file: linux/drivers/scsi/sg.c
Previous file: linux/drivers/scsi/scsi.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.14/linux/drivers/scsi/seagate.c linux/drivers/scsi/seagate.c
@@ -95,7 +95,7 @@
 						in some command phase.
 					*/
 
-static void *base_address = NULL;	/*
+static const void *base_address = NULL;	/*
 						Where the card ROM starts,
 						used to calculate memory mapped
 						register location.
@@ -153,7 +153,7 @@
 };
 
 typedef struct {
-	char *signature ;
+	const char *signature ;
 	unsigned offset;
 	unsigned length;
 	unsigned char type;
@@ -327,10 +327,10 @@
 
 	for (i = 0; i < (sizeof (seagate_bases) / sizeof (char  * )); ++i)
 		for (j = 0; !base_address && j < NUM_SIGNATURES; ++j)
-		if (!memcmp ((void *) (seagate_bases[i] +
-		    signatures[j].offset), (void *) signatures[j].signature,
+		if (!memcmp ((const void *) (seagate_bases[i] +
+		    signatures[j].offset), (const void *) signatures[j].signature,
 		    signatures[j].length)) {
-			base_address = (void *) seagate_bases[i];
+			base_address = (const void *) seagate_bases[i];
 			controller_type = signatures[j].type;
 		}
 #endif /* OVERRIDE */
@@ -341,8 +341,8 @@
 
 	if (base_address)
 		{
-		st0x_cr_sr =(void *) (((unsigned char *) base_address) + (controller_type == SEAGATE ? 0x1a00 : 0x1c00)); 
-		st0x_dr = (void *) (((unsigned char *) base_address ) + (controller_type == SEAGATE ? 0x1c00 : 0x1e00));
+		st0x_cr_sr =(void *) (((const unsigned char *) base_address) + (controller_type == SEAGATE ? 0x1a00 : 0x1c00)); 
+		st0x_dr = (void *) (((const unsigned char *) base_address ) + (controller_type == SEAGATE ? 0x1c00 : 0x1e00));
 #ifdef DEBUG
 		printk("%s detected. Base address = %x, cr = %x, dr = %x\n", tpnt->name, base_address, st0x_cr_sr, st0x_dr);
 #endif
@@ -1307,8 +1307,8 @@
 			while (((status_read = STATUS) & STAT_BSY) && 
 			       ((status_read & REQ_MASK) == REQ_CMDOUT))
 				if (status_read & STAT_REQ) {
-					DATA = *(unsigned char *) cmnd;
-					cmnd = 1+(unsigned char *) cmnd;
+					DATA = *(const unsigned char *) cmnd;
+					cmnd = 1+(const unsigned char *) cmnd;
 #ifdef SLOW_HANDSHAKE
 					if (borken) 
 						borken_wait();

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