···346346struct tags. Both can be still found in the SCSI subsystem, but347347the typedefs have been moved to a single file, scsi_typedefs.h to348348make their future removal easier, for example: 349349-"typedef struct scsi_host_template Scsi_Host_Template;"349349+"typedef struct scsi_cmnd Scsi_Cmnd;"350350351351Also, most C99 enhancements are encouraged to the extent they are supported352352by the relevant gcc compilers. So C99 style structure and array
+3-3
drivers/scsi/53c7xx.c
···343343/* Size of event list (per host adapter) */344344static int track_events = 0;345345static struct Scsi_Host *first_host = NULL; /* Head of list of NCR boards */346346-static Scsi_Host_Template *the_template = NULL; 346346+static struct scsi_host_template *the_template = NULL;347347348348/* NCR53c710 script handling code */349349···11031103}1104110411051105/* 11061106- * Function : int ncr53c7xx_init(Scsi_Host_Template *tpnt, int board, int chip,11061106+ * Function : int ncr53c7xx_init(struct scsi_host_template *tpnt, int board, int chip,11071107 * unsigned long base, int io_port, int irq, int dma, long long options,11081108 * int clock);11091109 *···11181118 */1119111911201120int 11211121-ncr53c7xx_init (Scsi_Host_Template *tpnt, int board, int chip,11211121+ncr53c7xx_init (struct scsi_host_template *tpnt, int board, int chip,11221122 unsigned long base, int io_port, int irq, int dma, 11231123 long long options, int clock)11241124{
+1-1
drivers/scsi/53c7xx.h
···16001600/* Paranoid people could use panic() here. */16011601#define FATAL(host) shutdown((host));1602160216031603-extern int ncr53c7xx_init(Scsi_Host_Template *tpnt, int board, int chip,16031603+extern int ncr53c7xx_init(struct scsi_host_template *tpnt, int board, int chip,16041604 unsigned long base, int io_port, int irq, int dma,16051605 long long options, int clock);16061606
+1-1
drivers/scsi/NCR53C9x.c
···529529/* Allocate structure and insert basic data such as SCSI chip frequency530530 * data and a pointer to the device531531 */532532-struct NCR_ESP* esp_allocate(Scsi_Host_Template *tpnt, void *esp_dev)532532+struct NCR_ESP* esp_allocate(struct scsi_host_template *tpnt, void *esp_dev)533533{534534 struct NCR_ESP *esp, *elink;535535 struct Scsi_Host *esp_host;
···114114 #include "advansys.h"115115 #endif116116117117- and after "static Scsi_Host_Template builtin_scsi_hosts[] =":117117+ and after "static struct scsi_host_template builtin_scsi_hosts[] =":118118119119 #ifdef CONFIG_SCSI_ADVANSYS120120 ADVANSYS,···160160 --- Driver Structures161161 --- Driver Data162162 --- Driver Function Prototypes163163- --- Linux 'Scsi_Host_Template' and advansys_setup() Functions163163+ --- Linux 'struct scsi_host_template' and advansys_setup() Functions164164 --- Loadable Driver Support165165 --- Miscellaneous Driver Functions166166 --- Functions Required by the Asc Library···406840684069406940704070/*40714071- * --- Linux 'Scsi_Host_Template' and advansys_setup() Functions40714071+ * --- Linux 'struct scsi_host_template' and advansys_setup() Functions40724072 */4073407340744074#ifdef CONFIG_PROC_FS
+1-1
drivers/scsi/advansys.h
···1919#define _ADVANSYS_H20202121/*2222- * Scsi_Host_Template function prototypes.2222+ * struct scsi_host_template function prototypes.2323 */2424int advansys_detect(struct scsi_host_template *);2525int advansys_release(struct Scsi_Host *);
···131131 /* REQUEST SENSE */132132};133133134134-static int aha1542_detect(Scsi_Host_Template *);134134+static int aha1542_detect(struct scsi_host_template *);135135static int aha1542_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));136136static int aha1542_bus_reset(Scsi_Cmnd * SCpnt);137137static int aha1542_dev_reset(Scsi_Cmnd * SCpnt);
···133133#include "scsi_module.c"134134135135/***************************************************************** Detection */136136-static int dec_esp_detect(Scsi_Host_Template * tpnt)136136+static int dec_esp_detect(struct scsi_host_template * tpnt)137137{138138 struct NCR_ESP *esp;139139 struct ConfigDev *esp_dev;
+1-1
drivers/scsi/dpti.h
···444445454646/*4747- * Scsi_Host_Template (see hosts.h) 4747+ * struct scsi_host_template (see hosts.h)4848 */49495050#define DPT_DRIVER_NAME "Adaptec I2O RAID"
+3-3
drivers/scsi/dtc.c
···199199#endif200200201201/* 202202- * Function : int dtc_detect(Scsi_Host_Template * tpnt)202202+ * Function : int dtc_detect(struct scsi_host_template * tpnt)203203 *204204 * Purpose : detects and initializes DTC 3180/3280 controllers205205 * that were autoprobed, overridden on the LILO command line, ···211211 *212212*/213213214214-static int __init dtc_detect(Scsi_Host_Template * tpnt)214214+static int __init dtc_detect(struct scsi_host_template * tpnt)215215{216216 static int current_override = 0, current_base = 0;217217 struct Scsi_Host *instance;···471471 return 0;472472}473473474474-static Scsi_Host_Template driver_template = {474474+static struct scsi_host_template driver_template = {475475 .name = "DTC 3180/3280 ",476476 .detect = dtc_detect,477477 .release = dtc_release,
+1-1
drivers/scsi/dtc.h
···3535static int dtc_abort(Scsi_Cmnd *);3636static int dtc_biosparam(struct scsi_device *, struct block_device *,3737 sector_t, int*);3838-static int dtc_detect(Scsi_Host_Template *);3838+static int dtc_detect(struct scsi_host_template *);3939static int dtc_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));4040static int dtc_bus_reset(Scsi_Cmnd *);4141
···45454646#ifndef ASM4747static int generic_NCR5380_abort(Scsi_Cmnd *);4848-static int generic_NCR5380_detect(Scsi_Host_Template *);4848+static int generic_NCR5380_detect(struct scsi_host_template *);4949static int generic_NCR5380_release_resources(struct Scsi_Host *);5050static int generic_NCR5380_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));5151static int generic_NCR5380_bus_reset(Scsi_Cmnd *);
···498498static int probe_display(int);499499static int probe_bus_mode(int);500500static int device_exists(int, int, int *, int *);501501-static struct Scsi_Host *ibmmca_register(Scsi_Host_Template *, int, int, int, char *);501501+static struct Scsi_Host *ibmmca_register(struct scsi_host_template *, int, int, int, char *);502502static int option_setup(char *);503503/* local functions needed for proc_info */504504static int ldn_access_load(int, int);···14891489 return len;14901490}1491149114921492-int ibmmca_detect(Scsi_Host_Template * scsi_template)14921492+int ibmmca_detect(struct scsi_host_template * scsi_template)14931493{14941494 struct Scsi_Host *shpnt;14951495 int port, id, i, j, k, list_size, slot;···17421742 return found; /* return the number of found SCSI hosts. Should be 1 or 0. */17431743}1744174417451745-static struct Scsi_Host *ibmmca_register(Scsi_Host_Template * scsi_template, int port, int id, int adaptertype, char *hostname)17451745+static struct Scsi_Host *ibmmca_register(struct scsi_host_template * scsi_template, int port, int id, int adaptertype, char *hostname)17461746{17471747 struct Scsi_Host *shpnt;17481748 int i, j;···2500250025012501__setup("ibmmcascsi=", option_setup);2502250225032503-static Scsi_Host_Template driver_template = {25032503+static struct scsi_host_template driver_template = {25042504 .proc_name = "ibmmca",25052505 .proc_info = ibmmca_proc_info,25062506 .name = "IBM SCSI-Subsystem",
+1-1
drivers/scsi/ibmmca.h
···1111/* Common forward declarations for all Linux-versions: */12121313/* Interfaces to the midlevel Linux SCSI driver */1414-static int ibmmca_detect (Scsi_Host_Template *);1414+static int ibmmca_detect (struct scsi_host_template *);1515static int ibmmca_release (struct Scsi_Host *);1616static int ibmmca_queuecommand (Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));1717static int ibmmca_abort (Scsi_Cmnd *);
···395395# define CLISPIN_UNLOCK(host,flags) spin_unlock_irqrestore(host->host_lock, \396396 flags)397397398398-static int in2000_detect(Scsi_Host_Template *) in2000__INIT;398398+static int in2000_detect(struct scsi_host_template *) in2000__INIT;399399static int in2000_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));400400static int in2000_abort(Scsi_Cmnd *);401401static void in2000_setup(char *, int *) in2000__INIT;
+3-3
drivers/scsi/ips.c
···248248/*249249 * Function prototypes250250 */251251-static int ips_detect(Scsi_Host_Template *);251251+static int ips_detect(struct scsi_host_template *);252252static int ips_release(struct Scsi_Host *);253253static int ips_eh_abort(Scsi_Cmnd *);254254static int ips_eh_reset(Scsi_Cmnd *);···377377static dma_addr_t ips_flashbusaddr;378378static long ips_FlashDataInUse; /* CD Boot - Flash Data In Use Flag */379379static uint32_t MaxLiteCmds = 32; /* Max Active Cmds for a Lite Adapter */380380-static Scsi_Host_Template ips_driver_template = {380380+static struct scsi_host_template ips_driver_template = {381381 .detect = ips_detect,382382 .release = ips_release,383383 .info = ips_info,···587587/* */588588/****************************************************************************/589589static int590590-ips_detect(Scsi_Host_Template * SHT)590590+ips_detect(struct scsi_host_template * SHT)591591{592592 int i;593593
···369369}370370371371/* 372372- * Function : int pas16_detect(Scsi_Host_Template * tpnt)372372+ * Function : int pas16_detect(struct scsi_host_template * tpnt)373373 *374374 * Purpose : detects and initializes PAS16 controllers375375 * that were autoprobed, overridden on the LILO command line, ···381381 *382382 */383383384384-int __init pas16_detect(Scsi_Host_Template * tpnt)384384+int __init pas16_detect(struct scsi_host_template * tpnt)385385{386386 static int current_override = 0;387387 static unsigned short current_base = 0;···615615 return 0;616616}617617618618-static Scsi_Host_Template driver_template = {618618+static struct scsi_host_template driver_template = {619619 .name = "Pro Audio Spectrum-16 SCSI",620620 .detect = pas16_detect,621621 .release = pas16_release,
+1-1
drivers/scsi/pas16.h
···117117static int pas16_abort(Scsi_Cmnd *);118118static int pas16_biosparam(struct scsi_device *, struct block_device *,119119 sector_t, int*);120120-static int pas16_detect(Scsi_Host_Template *);120120+static int pas16_detect(struct scsi_host_template *);121121static int pas16_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));122122static int pas16_bus_reset(Scsi_Cmnd *);123123
···90909191/* Detect all SSAs attached to the machine.9292 To be fast, do it on all online FC channels at the same time. */9393-int __init pluto_detect(Scsi_Host_Template *tpnt)9393+int __init pluto_detect(struct scsi_host_template *tpnt)9494{9595 int i, retry, nplutos;9696 fc_channel *fc;···339339 return 0;340340}341341342342-static Scsi_Host_Template driver_template = {342342+static struct scsi_host_template driver_template = {343343 .name = "Sparc Storage Array 100/200",344344 .detect = pluto_detect,345345 .release = pluto_release,
+1-1
drivers/scsi/pluto.h
···3838/* This is the max number of outstanding SCSI commands per pluto */3939#define PLUTO_CAN_QUEUE 25440404141-int pluto_detect(Scsi_Host_Template *);4141+int pluto_detect(struct scsi_host_template *);4242int pluto_release(struct Scsi_Host *);4343const char * pluto_info(struct Scsi_Host *);4444int pluto_slave_configure(Scsi_Device *);
+2-2
drivers/scsi/psi240i.c
···538538 * Returns: Number of adapters found.539539 *540540 ****************************************************************/541541-static int Psi240i_Detect (Scsi_Host_Template *tpnt)541541+static int Psi240i_Detect (struct scsi_host_template *tpnt)542542 {543543 int board;544544 int count = 0;···669669670670MODULE_LICENSE("GPL");671671672672-static Scsi_Host_Template driver_template = {672672+static struct scsi_host_template driver_template = {673673 .proc_name = "psi240i", 674674 .name = "PSI-240I EIDE Disk Controller",675675 .detect = Psi240i_Detect,
···99#ifndef _SEAGATE_H1010#define SEAGATE_H11111212-static int seagate_st0x_detect(Scsi_Host_Template *);1212+static int seagate_st0x_detect(struct scsi_host_template *);1313static int seagate_st0x_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));14141515static int seagate_st0x_abort(Scsi_Cmnd *);
+3-3
drivers/scsi/sgiwd93.c
···218218}219219220220static struct Scsi_Host * __init sgiwd93_setup_scsi(221221- Scsi_Host_Template *SGIblows, int unit, int irq,221221+ struct scsi_host_template *SGIblows, int unit, int irq,222222 struct hpc3_scsiregs *hregs, unsigned char *wdregs)223223{224224 struct ip22_hostdata *hdata;···266266 return NULL;267267}268268269269-int __init sgiwd93_detect(Scsi_Host_Template *SGIblows)269269+int __init sgiwd93_detect(struct scsi_host_template *SGIblows)270270{271271 int found = 0;272272···325325 * arguments not with pointers. So this is going to blow up beautyfully326326 * on 64-bit systems with memory outside the compat address spaces.327327 */328328-static Scsi_Host_Template driver_template = {328328+static struct scsi_host_template driver_template = {329329 .proc_name = "SGIWD93",330330 .name = "SGI WD93",331331 .detect = sgiwd93_detect,
···22222323#define SYM53C416_SCSI_ID 724242525-static int sym53c416_detect(Scsi_Host_Template *);2525+static int sym53c416_detect(struct scsi_host_template *);2626static const char *sym53c416_info(struct Scsi_Host *);2727static int sym53c416_release(struct Scsi_Host *);2828static int sym53c416_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
+3-3
drivers/scsi/t128.c
···183183}184184185185/* 186186- * Function : int t128_detect(Scsi_Host_Template * tpnt)186186+ * Function : int t128_detect(struct scsi_host_template * tpnt)187187 *188188 * Purpose : detects and initializes T128,T128F, or T228 controllers189189 * that were autoprobed, overridden on the LILO command line, ···195195 *196196 */197197198198-int __init t128_detect(Scsi_Host_Template * tpnt){198198+int __init t128_detect(struct scsi_host_template * tpnt){199199 static int current_override = 0, current_base = 0;200200 struct Scsi_Host *instance;201201 unsigned long base;···430430431431#include "NCR5380.c"432432433433-static Scsi_Host_Template driver_template = {433433+static struct scsi_host_template driver_template = {434434 .name = "Trantor T128/T128F/T228",435435 .detect = t128_detect,436436 .release = t128_release,
+1-1
drivers/scsi/t128.h
···9595static int t128_abort(Scsi_Cmnd *);9696static int t128_biosparam(struct scsi_device *, struct block_device *,9797 sector_t, int*);9898-static int t128_detect(Scsi_Host_Template *);9898+static int t128_detect(struct scsi_host_template *);9999static int t128_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));100100static int t128_bus_reset(Scsi_Cmnd *);101101
+1-1
drivers/scsi/u14-34f.c
···282282 * clustering is enabled. ENABLE_CLUSTERING provides a performance increase283283 * up to 50% on sequential access.284284 *285285- * Since the Scsi_Host_Template structure is shared among all 14F and 34F,285285+ * Since the struct scsi_host_template structure is shared among all 14F and 34F,286286 * the last setting of use_clustering is in effect for all of these boards.287287 *288288 * Here a sample configuration using two U14F boards: