diff options
author | Christoph Hellwig <hch@lst.de> | 2005-08-15 07:28:46 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-08-15 10:18:55 -0400 |
commit | 85a46523ff68aa0e4d2477c51075ffd9fc7e7a14 (patch) | |
tree | c465c274ffe0e4118ed46ad4e0e09dca975aeb1f /drivers/scsi/aic7xxx/aic79xx_proc.c | |
parent | d46b1d549e1414d673e0ec18219f4f5e30d5f3f5 (diff) |
[SCSI] aic79xx: sane pci probing
remove ahd_tailq and do sane pci probing. ported over from aic7xxx.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx_proc.c')
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_proc.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_proc.c b/drivers/scsi/aic7xxx/aic79xx_proc.c index cffdd104f9e4..32be1f55998c 100644 --- a/drivers/scsi/aic7xxx/aic79xx_proc.c +++ b/drivers/scsi/aic7xxx/aic79xx_proc.c | |||
@@ -285,21 +285,13 @@ int | |||
285 | ahd_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start, | 285 | ahd_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start, |
286 | off_t offset, int length, int inout) | 286 | off_t offset, int length, int inout) |
287 | { | 287 | { |
288 | struct ahd_softc *ahd; | 288 | struct ahd_softc *ahd = *(struct ahd_softc **)shost->hostdata; |
289 | struct info_str info; | 289 | struct info_str info; |
290 | char ahd_info[256]; | 290 | char ahd_info[256]; |
291 | u_long l; | ||
292 | u_int max_targ; | 291 | u_int max_targ; |
293 | u_int i; | 292 | u_int i; |
294 | int retval; | 293 | int retval; |
295 | 294 | ||
296 | retval = -EINVAL; | ||
297 | ahd_list_lock(&l); | ||
298 | ahd = ahd_find_softc(*(struct ahd_softc **)shost->hostdata); | ||
299 | |||
300 | if (ahd == NULL) | ||
301 | goto done; | ||
302 | |||
303 | /* Has data been written to the file? */ | 295 | /* Has data been written to the file? */ |
304 | if (inout == TRUE) { | 296 | if (inout == TRUE) { |
305 | retval = ahd_proc_write_seeprom(ahd, buffer, length); | 297 | retval = ahd_proc_write_seeprom(ahd, buffer, length); |
@@ -349,6 +341,5 @@ ahd_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start, | |||
349 | } | 341 | } |
350 | retval = info.pos > info.offset ? info.pos - info.offset : 0; | 342 | retval = info.pos > info.offset ? info.pos - info.offset : 0; |
351 | done: | 343 | done: |
352 | ahd_list_unlock(&l); | ||
353 | return (retval); | 344 | return (retval); |
354 | } | 345 | } |