]> err.no Git - linux-2.6/blobdiff - drivers/scsi/gdth.c
[PATCH] irq-flags: isdn: Use the new IRQF_ constants
[linux-2.6] / drivers / scsi / gdth.c
index e720bb017c1ebac9ee72452fdab02ac75d4e200a..76071a15830646a8f34be9b219984ec53faa27ec 100644 (file)
@@ -569,8 +569,8 @@ static struct timer_list gdth_timer;
 #endif
 
 #define PTR2USHORT(a)   (ushort)(ulong)(a)
-#define GDTOFFSOF(a,b)  (size_t)&(((a*)0)->b)   
-#define INDEX_OK(i,t)   ((i)<sizeof(t)/sizeof((t)[0]))
+#define GDTOFFSOF(a,b)  (size_t)&(((a*)0)->b)
+#define INDEX_OK(i,t)   ((i)<ARRAY_SIZE(t))
 
 #define NUMDATA(a)      ( (gdth_num_str  *)((a)->hostdata))
 #define HADATA(a)       (&((gdth_ext_str *)((a)->hostdata))->haext)
@@ -716,8 +716,8 @@ static void gdth_scsi_done(struct scsi_cmnd *scp)
 {
     TRACE2(("gdth_scsi_done()\n"));
 
-    if (scp->sc_request)
-        complete((struct completion *)scp->sc_request);
+    if (scp->request)
+        complete((struct completion *)scp->request);
 }
 
 int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd,
@@ -732,8 +732,8 @@ int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd,
         return -ENOMEM;
     memset(scp, 0, sizeof(*scp));
     scp->device = sdev;
-    /* use sc_request field to save the ptr. to completion struct. */
-    scp->sc_request = (struct scsi_request *)&wait;
+    /* use request field to save the ptr. to completion struct. */
+    scp->request = (struct request *)&wait;
     scp->timeout_per_command = timeout*HZ;
     scp->request_buffer = gdtcmd;
     scp->cmd_len = 12;