Skip to content

Commit

Permalink
[SCSI] remove Scsi_Host_Template typedef
Browse files Browse the repository at this point in the history
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Christoph Hellwig authored and James Bottomley committed Nov 9, 2005
1 parent c0ed79a commit d0be4a7
Show file tree
Hide file tree
Showing 110 changed files with 185 additions and 186 deletions.
2 changes: 1 addition & 1 deletion Documentation/scsi/scsi_mid_low_api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ Next, there is a movement to "outlaw" typedefs introducing synonyms for
struct tags. Both can be still found in the SCSI subsystem, but
the typedefs have been moved to a single file, scsi_typedefs.h to
make their future removal easier, for example:
"typedef struct scsi_host_template Scsi_Host_Template;"
"typedef struct scsi_cmnd Scsi_Cmnd;"

Also, most C99 enhancements are encouraged to the extent they are supported
by the relevant gcc compilers. So C99 style structure and array
Expand Down
6 changes: 3 additions & 3 deletions drivers/scsi/53c7xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ static void NCR53c7x0_soft_reset (struct Scsi_Host *host);
/* Size of event list (per host adapter) */
static int track_events = 0;
static struct Scsi_Host *first_host = NULL; /* Head of list of NCR boards */
static Scsi_Host_Template *the_template = NULL;
static struct scsi_host_template *the_template = NULL;

/* NCR53c710 script handling code */

Expand Down Expand Up @@ -1103,7 +1103,7 @@ NCR53c7x0_init (struct Scsi_Host *host) {
}

/*
* Function : int ncr53c7xx_init(Scsi_Host_Template *tpnt, int board, int chip,
* Function : int ncr53c7xx_init(struct scsi_host_template *tpnt, int board, int chip,
* unsigned long base, int io_port, int irq, int dma, long long options,
* int clock);
*
Expand All @@ -1118,7 +1118,7 @@ NCR53c7x0_init (struct Scsi_Host *host) {
*/

int
ncr53c7xx_init (Scsi_Host_Template *tpnt, int board, int chip,
ncr53c7xx_init (struct scsi_host_template *tpnt, int board, int chip,
unsigned long base, int io_port, int irq, int dma,
long long options, int clock)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/53c7xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,7 @@ struct NCR53c7x0_hostdata {
/* Paranoid people could use panic() here. */
#define FATAL(host) shutdown((host));

extern int ncr53c7xx_init(Scsi_Host_Template *tpnt, int board, int chip,
extern int ncr53c7xx_init(struct scsi_host_template *tpnt, int board, int chip,
unsigned long base, int io_port, int irq, int dma,
long long options, int clock);

Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/NCR53C9x.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs)
/* Allocate structure and insert basic data such as SCSI chip frequency
* data and a pointer to the device
*/
struct NCR_ESP* esp_allocate(Scsi_Host_Template *tpnt, void *esp_dev)
struct NCR_ESP* esp_allocate(struct scsi_host_template *tpnt, void *esp_dev)
{
struct NCR_ESP *esp, *elink;
struct Scsi_Host *esp_host;
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/NCR53C9x.h
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ extern int nesps, esps_in_use, esps_running;

/* External functions */
extern void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs);
extern struct NCR_ESP *esp_allocate(Scsi_Host_Template *, void *);
extern struct NCR_ESP *esp_allocate(struct scsi_host_template *, void *);
extern void esp_deallocate(struct NCR_ESP *);
extern void esp_release(void);
extern void esp_initialize(struct NCR_ESP *);
Expand Down
4 changes: 2 additions & 2 deletions drivers/scsi/NCR53c406a.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ static __inline__ int NCR53c406a_pio_write(unsigned char *request, unsigned int
}
#endif /* USE_PIO */

static int __init NCR53c406a_detect(Scsi_Host_Template * tpnt)
static int __init NCR53c406a_detect(struct scsi_host_template * tpnt)
{
int present = 0;
struct Scsi_Host *shpnt = NULL;
Expand Down Expand Up @@ -1057,7 +1057,7 @@ MODULE_LICENSE("GPL");
* Use SG_NONE if DMA mode is enabled!
*/

static Scsi_Host_Template driver_template =
static struct scsi_host_template driver_template =
{
.proc_name = "NCR53c406a" /* proc_name */,
.name = "NCR53c406a" /* name */,
Expand Down
4 changes: 2 additions & 2 deletions drivers/scsi/a2091.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static void dma_stop (struct Scsi_Host *instance, Scsi_Cmnd *SCpnt,
}
}

int __init a2091_detect(Scsi_Host_Template *tpnt)
int __init a2091_detect(struct scsi_host_template *tpnt)
{
static unsigned char called = 0;
struct Scsi_Host *instance;
Expand Down Expand Up @@ -234,7 +234,7 @@ static int a2091_bus_reset(Scsi_Cmnd *cmd)

#define HOSTS_C

static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "A2901",
.name = "Commodore A2091/A590 SCSI",
.detect = a2091_detect,
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/a2091.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <linux/types.h>

int a2091_detect(Scsi_Host_Template *);
int a2091_detect(struct scsi_host_template *);
int a2091_release(struct Scsi_Host *);
const char *wd33c93_info(void);
int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
Expand Down
4 changes: 2 additions & 2 deletions drivers/scsi/a3000.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static void dma_stop (struct Scsi_Host *instance, Scsi_Cmnd *SCpnt,
}
}

int __init a3000_detect(Scsi_Host_Template *tpnt)
int __init a3000_detect(struct scsi_host_template *tpnt)
{
wd33c93_regs regs;

Expand Down Expand Up @@ -221,7 +221,7 @@ static int a3000_bus_reset(Scsi_Cmnd *cmd)

#define HOSTS_C

static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "A3000",
.name = "Amiga 3000 built-in SCSI",
.detect = a3000_detect,
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/a3000.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <linux/types.h>

int a3000_detect(Scsi_Host_Template *);
int a3000_detect(struct scsi_host_template *);
int a3000_release(struct Scsi_Host *);
const char *wd33c93_info(void);
int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
Expand Down
6 changes: 3 additions & 3 deletions drivers/scsi/advansys.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
#include "advansys.h"
#endif

and after "static Scsi_Host_Template builtin_scsi_hosts[] =":
and after "static struct scsi_host_template builtin_scsi_hosts[] =":

#ifdef CONFIG_SCSI_ADVANSYS
ADVANSYS,
Expand Down Expand Up @@ -160,7 +160,7 @@
--- Driver Structures
--- Driver Data
--- Driver Function Prototypes
--- Linux 'Scsi_Host_Template' and advansys_setup() Functions
--- Linux 'struct scsi_host_template' and advansys_setup() Functions
--- Loadable Driver Support
--- Miscellaneous Driver Functions
--- Functions Required by the Asc Library
Expand Down Expand Up @@ -4068,7 +4068,7 @@ STATIC void asc_prt_hex(char *f, uchar *, int);


/*
* --- Linux 'Scsi_Host_Template' and advansys_setup() Functions
* --- Linux 'struct scsi_host_template' and advansys_setup() Functions
*/

#ifdef CONFIG_PROC_FS
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/advansys.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define _ADVANSYS_H

/*
* Scsi_Host_Template function prototypes.
* struct scsi_host_template function prototypes.
*/
int advansys_detect(struct scsi_host_template *);
int advansys_release(struct Scsi_Host *);
Expand Down
4 changes: 2 additions & 2 deletions drivers/scsi/aha152x.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ MODULE_DEVICE_TABLE(isapnp, id_table);

static int registered_count=0;
static struct Scsi_Host *aha152x_host[2];
static Scsi_Host_Template aha152x_driver_template;
static struct scsi_host_template aha152x_driver_template;

/*
* internal states of the host
Expand Down Expand Up @@ -3464,7 +3464,7 @@ static int aha152x_proc_info(struct Scsi_Host *shpnt, char *buffer, char **start
return thislength < length ? thislength : length;
}

static Scsi_Host_Template aha152x_driver_template = {
static struct scsi_host_template aha152x_driver_template = {
.module = THIS_MODULE,
.name = AHA152X_REVID,
.proc_name = "aha152x",
Expand Down
4 changes: 2 additions & 2 deletions drivers/scsi/aha1542.c
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ __setup("aha1542=",do_setup);
#endif

/* return non-zero on detection */
static int __init aha1542_detect(Scsi_Host_Template * tpnt)
static int __init aha1542_detect(struct scsi_host_template * tpnt)
{
unsigned char dma_chan;
unsigned char irq_level;
Expand Down Expand Up @@ -1789,7 +1789,7 @@ static int aha1542_biosparam(struct scsi_device *sdev,
MODULE_LICENSE("GPL");


static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_name = "aha1542",
.name = "Adaptec 1542",
.detect = aha1542_detect,
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/aha1542.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ struct ccb { /* Command Control Block 5.3 */
/* REQUEST SENSE */
};

static int aha1542_detect(Scsi_Host_Template *);
static int aha1542_detect(struct scsi_host_template *);
static int aha1542_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
static int aha1542_bus_reset(Scsi_Cmnd * SCpnt);
static int aha1542_dev_reset(Scsi_Cmnd * SCpnt);
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/aha1740.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ static int aha1740_eh_abort_handler (Scsi_Cmnd *dummy)
return 0;
}

static Scsi_Host_Template aha1740_template = {
static struct scsi_host_template aha1740_template = {
.module = THIS_MODULE,
.proc_name = "aha1740",
.proc_info = aha1740_proc_info,
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static u8 ahci_check_status(struct ata_port *ap);
static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc);
static void ahci_remove_one (struct pci_dev *pdev);

static Scsi_Host_Template ahci_sht = {
static struct scsi_host_template ahci_sht = {
.module = THIS_MODULE,
.name = DRV_NAME,
.ioctl = ata_scsi_ioctl,
Expand Down
8 changes: 4 additions & 4 deletions drivers/scsi/aic7xxx_old.c
Original file line number Diff line number Diff line change
Expand Up @@ -7865,7 +7865,7 @@ detect_maxscb(struct aic7xxx_host *p)
* Register a Adaptec aic7xxx chip SCSI controller with the kernel.
*-F*************************************************************************/
static int
aic7xxx_register(Scsi_Host_Template *template, struct aic7xxx_host *p,
aic7xxx_register(struct scsi_host_template *template, struct aic7xxx_host *p,
int reset_delay)
{
int i, result;
Expand Down Expand Up @@ -8412,7 +8412,7 @@ aic7xxx_chip_reset(struct aic7xxx_host *p)
* and a pointer to a aic7xxx_host struct upon success.
*-F*************************************************************************/
static struct aic7xxx_host *
aic7xxx_alloc(Scsi_Host_Template *sht, struct aic7xxx_host *temp)
aic7xxx_alloc(struct scsi_host_template *sht, struct aic7xxx_host *temp)
{
struct aic7xxx_host *p = NULL;
struct Scsi_Host *host;
Expand Down Expand Up @@ -8991,7 +8991,7 @@ aic7xxx_configure_bugs(struct aic7xxx_host *p)
* mid-level SCSI code is overhauled.
*-F*************************************************************************/
static int
aic7xxx_detect(Scsi_Host_Template *template)
aic7xxx_detect(struct scsi_host_template *template)
{
struct aic7xxx_host *temp_p = NULL;
struct aic7xxx_host *current_p = NULL;
Expand Down Expand Up @@ -11161,7 +11161,7 @@ MODULE_LICENSE("Dual BSD/GPL");
MODULE_VERSION(AIC7XXX_H_VERSION);


static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.proc_info = aic7xxx_proc_info,
.detect = aic7xxx_detect,
.release = aic7xxx_release,
Expand Down
8 changes: 4 additions & 4 deletions drivers/scsi/amiga7xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "amiga7xx.h"


static int amiga7xx_register_one(Scsi_Host_Template *tpnt,
static int amiga7xx_register_one(struct scsi_host_template *tpnt,
unsigned long address)
{
long long options;
Expand Down Expand Up @@ -66,7 +66,7 @@ static struct {
{ 0 }
};

static int __init amiga7xx_zorro_detect(Scsi_Host_Template *tpnt)
static int __init amiga7xx_zorro_detect(struct scsi_host_template *tpnt)
{
int num = 0, i;
struct zorro_dev *z = NULL;
Expand All @@ -90,7 +90,7 @@ static int __init amiga7xx_zorro_detect(Scsi_Host_Template *tpnt)
#endif /* CONFIG_ZORRO */


int __init amiga7xx_detect(Scsi_Host_Template *tpnt)
int __init amiga7xx_detect(struct scsi_host_template *tpnt)
{
static unsigned char called = 0;
int num = 0;
Expand Down Expand Up @@ -123,7 +123,7 @@ static int amiga7xx_release(struct Scsi_Host *shost)
return 0;
}

static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.name = "Amiga NCR53c710 SCSI",
.detect = amiga7xx_detect,
.release = amiga7xx_release,
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/amiga7xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <linux/types.h>

int amiga7xx_detect(Scsi_Host_Template *);
int amiga7xx_detect(struct scsi_host_template *);
const char *NCR53c7x0_info(void);
int NCR53c7xx_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int NCR53c7xx_abort(Scsi_Cmnd *);
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/arm/acornscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2971,7 +2971,7 @@ int acornscsi_proc_info(struct Scsi_Host *instance, char *buffer, char **start,
return pos;
}

static Scsi_Host_Template acornscsi_template = {
static struct scsi_host_template acornscsi_template = {
.module = THIS_MODULE,
.proc_info = acornscsi_proc_info,
.name = "AcornSCSI",
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/arm/arxescsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ arxescsi_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t off
return pos;
}

static Scsi_Host_Template arxescsi_template = {
static struct scsi_host_template arxescsi_template = {
.proc_info = arxescsi_proc_info,
.name = "ARXE SCSI card",
.info = arxescsi_info,
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/arm/cumana_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static void cumanascsi_write(struct Scsi_Host *instance, int reg, int value)

#include "../NCR5380.c"

static Scsi_Host_Template cumanascsi_template = {
static struct scsi_host_template cumanascsi_template = {
.module = THIS_MODULE,
.name = "Cumana 16-bit SCSI",
.info = cumanascsi_info,
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/arm/cumana_2.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ int cumanascsi_2_proc_info (struct Scsi_Host *host, char *buffer, char **start,
return pos;
}

static Scsi_Host_Template cumanascsi2_template = {
static struct scsi_host_template cumanascsi2_template = {
.module = THIS_MODULE,
.proc_info = cumanascsi_2_proc_info,
.name = "Cumana SCSI II",
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/arm/ecoscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ printk("reading %p len %d\n",addr, len);

#include "../NCR5380.c"

static Scsi_Host_Template ecoscsi_template = {
static struct scsi_host_template ecoscsi_template = {
.module = THIS_MODULE,
.name = "Serial Port EcoSCSI NCR5380",
.proc_name = "ecoscsi",
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/arm/eesox.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ static ssize_t eesoxscsi_store_term(struct device *dev, struct device_attribute
static DEVICE_ATTR(bus_term, S_IRUGO | S_IWUSR,
eesoxscsi_show_term, eesoxscsi_store_term);

static Scsi_Host_Template eesox_template = {
static struct scsi_host_template eesox_template = {
.module = THIS_MODULE,
.proc_info = eesoxscsi_proc_info,
.name = "EESOX SCSI",
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/arm/oak.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ printk("reading %p len %d\n", addr, len);

#include "../NCR5380.c"

static Scsi_Host_Template oakscsi_template = {
static struct scsi_host_template oakscsi_template = {
.module = THIS_MODULE,
.proc_info = oakscsi_proc_info,
.name = "Oak 16-bit SCSI",
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/arm/powertec.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ powertecscsi_store_term(struct device *dev, struct device_attribute *attr, const
static DEVICE_ATTR(bus_term, S_IRUGO | S_IWUSR,
powertecscsi_show_term, powertecscsi_store_term);

static Scsi_Host_Template powertecscsi_template = {
static struct scsi_host_template powertecscsi_template = {
.module = THIS_MODULE,
.proc_info = powertecscsi_proc_info,
.name = "PowerTec SCSI",
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/ata_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static struct pci_driver piix_pci_driver = {
.remove = ata_pci_remove_one,
};

static Scsi_Host_Template piix_sht = {
static struct scsi_host_template piix_sht = {
.module = THIS_MODULE,
.name = DRV_NAME,
.ioctl = ata_scsi_ioctl,
Expand Down
Loading

0 comments on commit d0be4a7

Please sign in to comment.