aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
author <bunk@stusta.de>2005-04-17 16:28:39 -0400
committerJames Bottomley <jejb@titanic>2005-04-18 14:50:23 -0400
commit8e8790415e91964096f862a58cacb55d2bc9a817 (patch)
treee9c21ddd53bea0eeeb514b7c2f8ed27b421e8ad5 /drivers/scsi
parentbe7db055dd7261522557046370f49160728e3847 (diff)
[PATCH] drivers/scsi/gdth.c: cleanups
This patch contains the following cleanups: - make some needlessly global functions static - remove one more kernel 2.2 #ifdef Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/gdth.c24
-rw-r--r--drivers/scsi/gdth.h41
2 files changed, 12 insertions, 53 deletions
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index cc0cb246b1e4..a9eaab9fbd5e 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -4034,7 +4034,7 @@ static void gdth_log_event(gdth_evt_data *dvr, char *buffer)
4034} 4034}
4035 4035
4036#ifdef GDTH_STATISTICS 4036#ifdef GDTH_STATISTICS
4037void gdth_timeout(ulong data) 4037static void gdth_timeout(ulong data)
4038{ 4038{
4039 ulong32 i; 4039 ulong32 i;
4040 Scsi_Cmnd *nscp; 4040 Scsi_Cmnd *nscp;
@@ -4062,7 +4062,7 @@ void gdth_timeout(ulong data)
4062} 4062}
4063#endif 4063#endif
4064 4064
4065void __init internal_setup(char *str,int *ints) 4065static void __init internal_setup(char *str,int *ints)
4066{ 4066{
4067 int i, argc; 4067 int i, argc;
4068 char *cur_str, *argv; 4068 char *cur_str, *argv;
@@ -4153,7 +4153,7 @@ int __init option_setup(char *str)
4153 return 1; 4153 return 1;
4154} 4154}
4155 4155
4156int __init gdth_detect(Scsi_Host_Template *shtp) 4156static int __init gdth_detect(Scsi_Host_Template *shtp)
4157{ 4157{
4158 struct Scsi_Host *shp; 4158 struct Scsi_Host *shp;
4159 gdth_pci_str pcistr[MAXHA]; 4159 gdth_pci_str pcistr[MAXHA];
@@ -4604,7 +4604,7 @@ int __init gdth_detect(Scsi_Host_Template *shtp)
4604} 4604}
4605 4605
4606 4606
4607int gdth_release(struct Scsi_Host *shp) 4607static int gdth_release(struct Scsi_Host *shp)
4608{ 4608{
4609 int hanum; 4609 int hanum;
4610 gdth_ha_str *ha; 4610 gdth_ha_str *ha;
@@ -4691,7 +4691,7 @@ static const char *gdth_ctr_name(int hanum)
4691 return(""); 4691 return("");
4692} 4692}
4693 4693
4694const char *gdth_info(struct Scsi_Host *shp) 4694static const char *gdth_info(struct Scsi_Host *shp)
4695{ 4695{
4696 int hanum; 4696 int hanum;
4697 gdth_ha_str *ha; 4697 gdth_ha_str *ha;
@@ -4704,19 +4704,19 @@ const char *gdth_info(struct Scsi_Host *shp)
4704} 4704}
4705 4705
4706/* new error handling */ 4706/* new error handling */
4707int gdth_eh_abort(Scsi_Cmnd *scp) 4707static int gdth_eh_abort(Scsi_Cmnd *scp)
4708{ 4708{
4709 TRACE2(("gdth_eh_abort()\n")); 4709 TRACE2(("gdth_eh_abort()\n"));
4710 return FAILED; 4710 return FAILED;
4711} 4711}
4712 4712
4713int gdth_eh_device_reset(Scsi_Cmnd *scp) 4713static int gdth_eh_device_reset(Scsi_Cmnd *scp)
4714{ 4714{
4715 TRACE2(("gdth_eh_device_reset()\n")); 4715 TRACE2(("gdth_eh_device_reset()\n"));
4716 return FAILED; 4716 return FAILED;
4717} 4717}
4718 4718
4719int gdth_eh_bus_reset(Scsi_Cmnd *scp) 4719static int gdth_eh_bus_reset(Scsi_Cmnd *scp)
4720{ 4720{
4721 int i, hanum; 4721 int i, hanum;
4722 gdth_ha_str *ha; 4722 gdth_ha_str *ha;
@@ -4770,7 +4770,7 @@ int gdth_eh_bus_reset(Scsi_Cmnd *scp)
4770 return SUCCESS; 4770 return SUCCESS;
4771} 4771}
4772 4772
4773int gdth_eh_host_reset(Scsi_Cmnd *scp) 4773static int gdth_eh_host_reset(Scsi_Cmnd *scp)
4774{ 4774{
4775 TRACE2(("gdth_eh_host_reset()\n")); 4775 TRACE2(("gdth_eh_host_reset()\n"));
4776 return FAILED; 4776 return FAILED;
@@ -4778,9 +4778,9 @@ int gdth_eh_host_reset(Scsi_Cmnd *scp)
4778 4778
4779 4779
4780#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) 4780#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
4781int gdth_bios_param(struct scsi_device *sdev,struct block_device *bdev,sector_t cap,int *ip) 4781static int gdth_bios_param(struct scsi_device *sdev,struct block_device *bdev,sector_t cap,int *ip)
4782#else 4782#else
4783int gdth_bios_param(Disk *disk,kdev_t dev,int *ip) 4783static int gdth_bios_param(Disk *disk,kdev_t dev,int *ip)
4784#endif 4784#endif
4785{ 4785{
4786 unchar b, t; 4786 unchar b, t;
@@ -4818,7 +4818,7 @@ int gdth_bios_param(Disk *disk,kdev_t dev,int *ip)
4818} 4818}
4819 4819
4820 4820
4821int gdth_queuecommand(Scsi_Cmnd *scp,void (*done)(Scsi_Cmnd *)) 4821static int gdth_queuecommand(Scsi_Cmnd *scp,void (*done)(Scsi_Cmnd *))
4822{ 4822{
4823 int hanum; 4823 int hanum;
4824 int priority; 4824 int priority;
diff --git a/drivers/scsi/gdth.h b/drivers/scsi/gdth.h
index bf269f05ea8e..c0f1e3411524 100644
--- a/drivers/scsi/gdth.h
+++ b/drivers/scsi/gdth.h
@@ -1029,51 +1029,10 @@ typedef struct {
1029 1029
1030/* function prototyping */ 1030/* function prototyping */
1031 1031
1032int gdth_detect(Scsi_Host_Template *);
1033int gdth_release(struct Scsi_Host *);
1034int gdth_queuecommand(Scsi_Cmnd *,void (*done)(Scsi_Cmnd *));
1035const char *gdth_info(struct Scsi_Host *);
1036
1037#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) 1032#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
1038int gdth_bios_param(struct scsi_device *,struct block_device *,sector_t,int *);
1039int gdth_proc_info(struct Scsi_Host *, char *,char **,off_t,int,int); 1033int gdth_proc_info(struct Scsi_Host *, char *,char **,off_t,int,int);
1040#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
1041int gdth_bios_param(Disk *,kdev_t,int *);
1042int gdth_proc_info(char *,char **,off_t,int,int,int);
1043#else 1034#else
1044int gdth_bios_param(Disk *,kdev_t,int *);
1045extern struct proc_dir_entry proc_scsi_gdth;
1046int gdth_proc_info(char *,char **,off_t,int,int,int); 1035int gdth_proc_info(char *,char **,off_t,int,int,int);
1047int gdth_abort(Scsi_Cmnd *);
1048int gdth_reset(Scsi_Cmnd *,unsigned int);
1049#define GDTH { proc_dir: &proc_scsi_gdth, \
1050 proc_info: gdth_proc_info, \
1051 name: "GDT SCSI Disk Array Controller",\
1052 detect: gdth_detect, \
1053 release: gdth_release, \
1054 info: gdth_info, \
1055 command: NULL, \
1056 queuecommand: gdth_queuecommand, \
1057 eh_abort_handler: gdth_eh_abort, \
1058 eh_device_reset_handler: gdth_eh_device_reset, \
1059 eh_bus_reset_handler: gdth_eh_bus_reset, \
1060 eh_host_reset_handler: gdth_eh_host_reset, \
1061 abort: gdth_abort, \
1062 reset: gdth_reset, \
1063 bios_param: gdth_bios_param, \
1064 can_queue: GDTH_MAXCMDS, \
1065 this_id: -1, \
1066 sg_tablesize: GDTH_MAXSG, \
1067 cmd_per_lun: GDTH_MAXC_P_L, \
1068 present: 0, \
1069 unchecked_isa_dma: 1, \
1070 use_clustering: ENABLE_CLUSTERING, \
1071 use_new_eh_code: 1 /* use new error code */ }
1072#endif 1036#endif
1073 1037
1074int gdth_eh_abort(Scsi_Cmnd *scp);
1075int gdth_eh_device_reset(Scsi_Cmnd *scp);
1076int gdth_eh_bus_reset(Scsi_Cmnd *scp);
1077int gdth_eh_host_reset(Scsi_Cmnd *scp);
1078
1079#endif 1038#endif