aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pcmcia
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-24 18:05:09 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-10-28 22:10:16 -0400
commit422c0d61d591cbfb70f029e13505fb437e169d68 (patch)
treeebafa14e1c1564ddf263868c3b6907642a8fdf1e /drivers/scsi/pcmcia
parent017560fca496f72ed9dd734ffde63ce39dfe0411 (diff)
[SCSI] use scmd_id(), scmd_channel() throughout code
Wrap a highly common idiom. Makes the code easier to read, helps pave the way for sdev->{id,channel} removal, and adds a token that can easily by grepped-for in the future. There are a couple sdev_id() and scmd_printk() updates thrown in as well. Rejections fixed up and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/pcmcia')
-rw-r--r--drivers/scsi/pcmcia/nsp_cs.c10
-rw-r--r--drivers/scsi/pcmcia/sym53c500_cs.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index 3cd3b40b1a4c..3d2f71051fe5 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -201,7 +201,7 @@ static int nsp_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
201#ifdef NSP_DEBUG 201#ifdef NSP_DEBUG
202 /*unsigned int host_id = SCpnt->device->host->this_id;*/ 202 /*unsigned int host_id = SCpnt->device->host->this_id;*/
203 /*unsigned int base = SCpnt->device->host->io_port;*/ 203 /*unsigned int base = SCpnt->device->host->io_port;*/
204 unsigned char target = SCpnt->device->id; 204 unsigned char target = scmd_id(SCpnt);
205#endif 205#endif
206 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; 206 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
207 207
@@ -373,7 +373,7 @@ static int nsphw_start_selection(Scsi_Cmnd *SCpnt)
373{ 373{
374 unsigned int host_id = SCpnt->device->host->this_id; 374 unsigned int host_id = SCpnt->device->host->this_id;
375 unsigned int base = SCpnt->device->host->io_port; 375 unsigned int base = SCpnt->device->host->io_port;
376 unsigned char target = SCpnt->device->id; 376 unsigned char target = scmd_id(SCpnt);
377 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; 377 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
378 int time_out; 378 int time_out;
379 unsigned char phase, arbit; 379 unsigned char phase, arbit;
@@ -452,7 +452,7 @@ static struct nsp_sync_table nsp_sync_table_20M[] = {
452 */ 452 */
453static int nsp_analyze_sdtr(Scsi_Cmnd *SCpnt) 453static int nsp_analyze_sdtr(Scsi_Cmnd *SCpnt)
454{ 454{
455 unsigned char target = SCpnt->device->id; 455 unsigned char target = scmd_id(SCpnt);
456// unsigned char lun = SCpnt->device->lun; 456// unsigned char lun = SCpnt->device->lun;
457 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; 457 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
458 sync_data *sync = &(data->Sync[target]); 458 sync_data *sync = &(data->Sync[target]);
@@ -677,7 +677,7 @@ static int nsp_reselected(Scsi_Cmnd *SCpnt)
677 target++; 677 target++;
678 } 678 }
679 679
680 if (SCpnt->device->id != target) { 680 if (scmd_id(SCpnt) != target) {
681 nsp_msg(KERN_ERR, "XXX: reselect ID must be %d in this implementation.", target); 681 nsp_msg(KERN_ERR, "XXX: reselect ID must be %d in this implementation.", target);
682 } 682 }
683 683
@@ -912,7 +912,7 @@ static void nsp_pio_write(Scsi_Cmnd *SCpnt)
912static int nsp_nexus(Scsi_Cmnd *SCpnt) 912static int nsp_nexus(Scsi_Cmnd *SCpnt)
913{ 913{
914 unsigned int base = SCpnt->device->host->io_port; 914 unsigned int base = SCpnt->device->host->io_port;
915 unsigned char target = SCpnt->device->id; 915 unsigned char target = scmd_id(SCpnt);
916// unsigned char lun = SCpnt->device->lun; 916// unsigned char lun = SCpnt->device->lun;
917 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata; 917 nsp_hw_data *data = (nsp_hw_data *)SCpnt->device->host->hostdata;
918 sync_data *sync = &(data->Sync[target]); 918 sync_data *sync = &(data->Sync[target]);
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c
index b4b3a1a8a0c7..98b64b2aa8ee 100644
--- a/drivers/scsi/pcmcia/sym53c500_cs.c
+++ b/drivers/scsi/pcmcia/sym53c500_cs.c
@@ -610,7 +610,7 @@ SYM53C500_queue(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
610 610
611 /* We are locked here already by the mid layer */ 611 /* We are locked here already by the mid layer */
612 REG0(port_base); 612 REG0(port_base);
613 outb(SCpnt->device->id, port_base + DEST_ID); /* set destination */ 613 outb(scmd_id(SCpnt), port_base + DEST_ID); /* set destination */
614 outb(FLUSH_FIFO, port_base + CMD_REG); /* reset the fifos */ 614 outb(FLUSH_FIFO, port_base + CMD_REG); /* reset the fifos */
615 615
616 for (i = 0; i < SCpnt->cmd_len; i++) { 616 for (i = 0; i < SCpnt->cmd_len; i++) {