]> err.no Git - linux-2.6/blobdiff - drivers/scsi/a100u2w.c
Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer...
[linux-2.6] / drivers / scsi / a100u2w.c
index f608d4a1d6daeaa8b44ca46d25cb3fe2b3cc2276..ced3eebe252c17164c1b7fe1ab01d82251341f1f 100644 (file)
@@ -674,12 +674,13 @@ static struct orc_scb *__orc_alloc_scb(struct orc_host * host)
                for (index = 0; index < 32; index++) {
                        if ((host->allocation_map[channel][i] >> index) & 0x01) {
                                host->allocation_map[channel][i] &= ~(1 << index);
-                               break;
+                               idx = index + 32 * i;
+                               /*
+                                * Translate the index to a structure instance
+                                */
+                               return host->scb_virt + idx;
                        }
                }
-               idx = index + 32 * i;
-               /* Translate the index to a structure instance */
-               return (struct orc_scb *) ((unsigned long) host->scb_virt + (idx * sizeof(struct orc_scb)));
        }
        return NULL;
 }
@@ -894,7 +895,7 @@ static void inia100_build_scb(struct orc_host * host, struct orc_scb * scb, stru
        } else {
                scb->tag_msg = 0;       /* No tag support               */
        }
-       memcpy(&scb->cdb[0], &cmd->cmnd, scb->cdb_len);
+       memcpy(scb->cdb, cmd->cmnd, scb->cdb_len);
 }
 
 /**