diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-21 11:18:25 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-21 11:18:25 -0700 |
commit | 28e4b224955cbe30275b2a7842e729023a4f4b03 (patch) | |
tree | ab4d28fecc06070fc2a2742f4b4550b29de44912 /drivers/scsi/aha1542.c | |
parent | 22ae813b85df7c0b0fc7c8d6f336d6a9f566ff97 (diff) | |
parent | 67d59dfdeb21df2c16dcd478b66177e91178ecd0 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (85 commits)
[SCSI] 53c700: remove reliance on deprecated cmnd fields
[SCSI] hptiop: don't use cmnd->bufflen
[SCSI] hptiop: HighPoint RocketRAID 3xxx controller driver
[SCSI] aacraid: small misc. cleanups
[SCSI] aacraid: Update supported product information
[SCSI] aacraid: Fix return code interpretation
[SCSI] scsi_transport_sas: fix panic in sas_free_rphy
[SCSI] remove RQ_SCSI_* flags
[SCSI] remove scsi_request infrastructure
[SCSI] mptfusion: change driver revision to 3.03.10
[SCSI] mptfc: abort of board reset leaves port dead requiring reboot
[SCSI] mptfc: fix fibre channel infinite request/response loop
[SCSI] mptfc: set fibre channel fw target missing timers to one second
[SCSI] mptfusion: move fc event/reset handling to mptfc
[SCSI] spi transport: don't allow dt to be set on SE or HVD buses
[SCSI] aic7xxx: expose the bus setting to sysfs
[SCSI] scsi: remove Documentation/scsi/cpqfc.txt
[SCSI] drivers/scsi: Use ARRAY_SIZE macro
[SCSI] Remove last page_address from dc395x.c
[SCSI] hptiop: HighPoint RocketRAID 3xxx controller driver
...
Fixed up conflicts in drivers/message/fusion/mptbase.c manually (due to
the sparc interrupt cleanups)
Diffstat (limited to 'drivers/scsi/aha1542.c')
-rw-r--r-- | drivers/scsi/aha1542.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c index 51bad7a1e77..86c6bd23459 100644 --- a/drivers/scsi/aha1542.c +++ b/drivers/scsi/aha1542.c @@ -1011,7 +1011,7 @@ static int __init do_setup(char *str) int count=setup_idx; - get_options(str, sizeof(ints)/sizeof(int), ints); + get_options(str, ARRAY_SIZE(ints), ints); aha1542_setup(str,ints); return count<setup_idx; @@ -1072,8 +1072,7 @@ static int __init aha1542_detect(struct scsi_host_template * tpnt) int slot = 0; int pos = 0; - for (indx = 0; (slot != MCA_NOTFOUND) && - (indx < sizeof(bases)/sizeof(bases[0])); indx++) { + for (indx = 0; (slot != MCA_NOTFOUND) && (indx < ARRAY_SIZE(bases)); indx++) { if (bases[indx]) continue; @@ -1083,10 +1082,9 @@ static int __init aha1542_detect(struct scsi_host_template * tpnt) if (slot == MCA_NOTFOUND) break; - /* Found one */ pos = mca_read_stored_pos(slot, 3); - + /* Decode address */ if (pos & 0x80) { if (pos & 0x02) { @@ -1118,23 +1116,22 @@ static int __init aha1542_detect(struct scsi_host_template * tpnt) mca_set_adapter_name(slot, "Adapter AHA-1640"); mca_set_adapter_procfn(slot, NULL, NULL); mca_mark_as_used(slot); - + /* Go on */ slot++; } - + } #endif /* * Hunt for ISA Plug'n'Pray Adaptecs (AHA1535) */ - + if(isapnp) { struct pnp_dev *pdev = NULL; - for(indx = 0; indx <sizeof(bases)/sizeof(bases[0]);indx++) - { + for(indx = 0; indx < ARRAY_SIZE(bases); indx++) { if(bases[indx]) continue; pdev = pnp_find_dev(NULL, ISAPNP_VENDOR('A', 'D', 'P'), @@ -1144,29 +1141,29 @@ static int __init aha1542_detect(struct scsi_host_template * tpnt) /* * Activate the PnP card */ - + if(pnp_device_attach(pdev)<0) continue; - + if(pnp_activate_dev(pdev)<0) { pnp_device_detach(pdev); continue; } - + if(!pnp_port_valid(pdev, 0)) { pnp_device_detach(pdev); continue; } - + bases[indx] = pnp_port_start(pdev, 0); - + /* The card can be queried for its DMA, we have the DMA set up that is enough */ - + printk(KERN_INFO "ISAPnP found an AHA1535 at I/O 0x%03X\n", bases[indx]); } } - for (indx = 0; indx < sizeof(bases) / sizeof(bases[0]); indx++) + for (indx = 0; indx < ARRAY_SIZE(bases); indx++) if (bases[indx] != 0 && request_region(bases[indx], 4, "aha1542")) { shpnt = scsi_register(tpnt, sizeof(struct aha1542_hostdata)); |