aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7xxx_proc.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-06-10 18:14:30 -0400
committerJames Bottomley <jejb@titanic.(none)>2005-06-11 19:43:48 -0400
commit3d65692aed727c7fb4105f03795781ace437a84e (patch)
treeadbbd860235025d102a2aeeec130f0687d180d1e /drivers/scsi/aic7xxx/aic7xxx_proc.c
parent6bc9dace767f1fffdf975b3398b3c4e37cd5ae18 (diff)
[SCSI] aic7xxx: remove ahc_find_softc
there's absolutely no reason not to trust the driver private data Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_proc.c')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_proc.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_proc.c b/drivers/scsi/aic7xxx/aic7xxx_proc.c
index 9c7f1056710d..ab4469d83fb1 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_proc.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_proc.c
@@ -297,20 +297,13 @@ int
297ahc_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start, 297ahc_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start,
298 off_t offset, int length, int inout) 298 off_t offset, int length, int inout)
299{ 299{
300 struct ahc_softc *ahc; 300 struct ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata;
301 struct info_str info; 301 struct info_str info;
302 char ahc_info[256]; 302 char ahc_info[256];
303 u_long s;
304 u_int max_targ; 303 u_int max_targ;
305 u_int i; 304 u_int i;
306 int retval; 305 int retval;
307 306
308 retval = -EINVAL;
309 ahc_list_lock(&s);
310 ahc = ahc_find_softc(*(struct ahc_softc **)shost->hostdata);
311 if (ahc == NULL)
312 goto done;
313
314 /* Has data been written to the file? */ 307 /* Has data been written to the file? */
315 if (inout == TRUE) { 308 if (inout == TRUE) {
316 retval = ahc_proc_write_seeprom(ahc, buffer, length); 309 retval = ahc_proc_write_seeprom(ahc, buffer, length);
@@ -372,6 +365,5 @@ ahc_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start,
372 } 365 }
373 retval = info.pos > info.offset ? info.pos - info.offset : 0; 366 retval = info.pos > info.offset ? info.pos - info.offset : 0;
374done: 367done:
375 ahc_list_unlock(&s);
376 return (retval); 368 return (retval);
377} 369}