Commit 039788e1 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

ide: replace ide_pci_device_t by struct ide_port_info



* Rename struct ide_pci_device_s to struct ide_port_info.

* Remove ide_pci_device_t typedef.

While at it:

* Fix __ide_pci_register_driver() comment.

* Fix aec62xx_init_one() comment.

* Remove unused 'cds' field from ide_hwgroup_t.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 6157332e
......@@ -194,7 +194,7 @@ static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif)
}
}
static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
static struct ide_port_info aec62xx_chipsets[] __devinitdata = {
{ /* 0 */
.name = "AEC6210",
.init_chipset = init_chipset_aec62xx,
......@@ -253,12 +253,12 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
* finds a device matching our IDE device tables.
*
* NOTE: since we're going to modify the 'name' field for AEC-6[26]80[R]
* chips, pass a local copy of 'struct pci_device_id' down the call chain.
* chips, pass a local copy of 'struct ide_port_info' down the call chain.
*/
static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
ide_pci_device_t d;
struct ide_port_info d;
u8 idx = id->driver_data;
d = aec62xx_chipsets[idx];
......
......@@ -746,7 +746,7 @@ static void __devinit init_dma_ali15x3 (ide_hwif_t *hwif, unsigned long dmabase)
ide_setup_dma(hwif, dmabase, 8);
}
static ide_pci_device_t ali15x3_chipset __devinitdata = {
static struct ide_port_info ali15x3_chipset __devinitdata = {
.name = "ALI15X3",
.init_chipset = init_chipset_ali15x3,
.init_hwif = init_hwif_ali15x3,
......@@ -772,7 +772,7 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev
{ },
};
ide_pci_device_t d = ali15x3_chipset;
struct ide_port_info d = ali15x3_chipset;
u8 rev = dev->revision;
if (pci_dev_present(ati_rs100))
......
......@@ -77,7 +77,7 @@ static struct amd_ide_chip {
};
static struct amd_ide_chip *amd_config;
static ide_pci_device_t *amd_chipset;
static struct ide_port_info *amd_chipset;
static unsigned int amd_80w;
static unsigned int amd_clock;
......@@ -295,7 +295,7 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
.mwdma_mask = ATA_MWDMA2, \
}
static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
static struct ide_port_info amd74xx_chipsets[] __devinitdata = {
/* 0 */ DECLARE_AMD_DEV("AMD7401"),
/* 1 */ DECLARE_AMD_DEV("AMD7409"),
/* 2 */ DECLARE_AMD_DEV("AMD7411"),
......
......@@ -189,8 +189,7 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif)
hwif->dma_host_off = &atiixp_dma_host_off;
}
static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
static struct ide_port_info atiixp_pci_info[] __devinitdata = {
{ /* 0 */
.name = "ATIIXP",
.init_hwif = init_hwif_atiixp,
......
......@@ -548,7 +548,7 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif)
}
}
static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
static struct ide_port_info cmd64x_chipsets[] __devinitdata = {
{ /* 0 */
.name = "CMD643",
.init_chipset = init_chipset_cmd64x,
......@@ -591,7 +591,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
ide_pci_device_t d;
struct ide_port_info d;
u8 idx = id->driver_data;
d = cmd64x_chipsets[idx];
......
......@@ -141,7 +141,7 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif)
.pio_mask = ATA_PIO4, \
}
static ide_pci_device_t cyrix_chipsets[] __devinitdata = {
static struct ide_port_info cyrix_chipsets[] __devinitdata = {
/* 0 */ DECLARE_CS_DEV("Cyrix 5510"),
/* 1 */ DECLARE_CS_DEV("Cyrix 5520")
};
......@@ -154,7 +154,7 @@ static ide_pci_device_t cyrix_chipsets[] __devinitdata = {
static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
ide_pci_device_t *d = &cyrix_chipsets[id->driver_data];
struct ide_port_info *d = &cyrix_chipsets[id->driver_data];
u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
ide_setup_pci_noise(dev, d);
......
......@@ -261,7 +261,7 @@ static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif)
hwif->udma_filter = cs5530_udma_filter;
}
static ide_pci_device_t cs5530_chipset __devinitdata = {
static struct ide_port_info cs5530_chipset __devinitdata = {
.name = "CS5530",
.init_chipset = init_chipset_cs5530,
.init_hwif = init_hwif_cs5530,
......
......@@ -186,7 +186,7 @@ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif)
hwif->cbl = cs5535_cable_detect(hwif->pci_dev);
}
static ide_pci_device_t cs5535_chipset __devinitdata = {
static struct ide_port_info cs5535_chipset __devinitdata = {
.name = "CS5535",
.init_hwif = init_hwif_cs5535,
.host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE |
......
......@@ -448,7 +448,7 @@ static void __devinit init_iops_cy82c693(ide_hwif_t *hwif)
}
}
static ide_pci_device_t cy82c693_chipset __devinitdata = {
static struct ide_port_info cy82c693_chipset __devinitdata = {
.name = "CY82C693",
.init_chipset = init_chipset_cy82c693,
.init_iops = init_iops_cy82c693,
......
......@@ -67,7 +67,7 @@ MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE st
.udma_mask = ATA_UDMA6, \
}
static ide_pci_device_t generic_chipsets[] __devinitdata = {
static struct ide_port_info generic_chipsets[] __devinitdata = {
/* 0 */ DECLARE_GENERIC_PCI_DEV("Unknown", 0),
{ /* 1 */
......@@ -123,7 +123,7 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
ide_pci_device_t *d = &generic_chipsets[id->driver_data];
struct ide_port_info *d = &generic_chipsets[id->driver_data];
int ret = -ENODEV;
/* Don't use the generic entry unless instructed to do so */
......
......@@ -129,7 +129,7 @@ static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif)
hwif->set_dma_mode = &hpt34x_set_mode;
}
static ide_pci_device_t hpt34x_chipsets[] __devinitdata = {
static struct ide_port_info hpt34x_chipsets[] __devinitdata = {
{ /* 0 */
.name = "HPT343",
.init_chipset = init_chipset_hpt34x,
......@@ -158,7 +158,7 @@ static ide_pci_device_t hpt34x_chipsets[] __devinitdata = {
static int __devinit hpt34x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
ide_pci_device_t *d;
struct ide_port_info *d;
u16 pcicmd = 0;
pci_read_config_word(dev, PCI_COMMAND, &pcicmd);
......
......@@ -1425,7 +1425,7 @@ static int __devinit hpt36x_init(struct pci_dev *dev, struct pci_dev *dev2)
return 0;
}
static ide_pci_device_t hpt366_chipsets[] __devinitdata = {
static struct ide_port_info hpt366_chipsets[] __devinitdata = {
{ /* 0 */
.name = "HPT36x",
.init_chipset = init_chipset_hpt366,
......@@ -1510,7 +1510,7 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic
{
struct hpt_info *info = NULL;
struct pci_dev *dev2 = NULL;
ide_pci_device_t d;
struct ide_port_info d;
u8 idx = id->driver_data;
u8 rev = dev->revision;
......
......@@ -193,7 +193,7 @@ static void __devinit init_hwif_it8213(ide_hwif_t *hwif)
.udma_mask = ATA_UDMA6, \
}
static ide_pci_device_t it8213_chipsets[] __devinitdata = {
static struct ide_port_info it8213_chipsets[] __devinitdata = {
/* 0 */ DECLARE_ITE_DEV("IT8213"),
};
......
......@@ -638,7 +638,7 @@ static unsigned int __devinit init_chipset_it821x(struct pci_dev *dev, const cha
.pio_mask = ATA_PIO4, \
}
static ide_pci_device_t it821x_chipsets[] __devinitdata = {
static struct ide_port_info it821x_chipsets[] __devinitdata = {
/* 0 */ DECLARE_ITE_DEV("IT8212"),
};
......
......@@ -118,7 +118,7 @@ static void __devinit init_hwif_jmicron(ide_hwif_t *hwif)
hwif->cbl = ata66_jmicron(hwif);
}
static ide_pci_device_t jmicron_chipset __devinitdata = {
static struct ide_port_info jmicron_chipset __devinitdata = {
.name = "JMB",
.init_hwif = init_hwif_jmicron,
.host_flags = IDE_HFLAG_BOOTABLE,
......
......@@ -260,7 +260,7 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif)
hwif->ide_dma_end = &ns87415_ide_dma_end;
}
static ide_pci_device_t ns87415_chipset __devinitdata = {
static struct ide_port_info ns87415_chipset __devinitdata = {
.name = "NS87415",
#ifdef CONFIG_SUPERIO
.init_iops = init_iops_ns87415,
......
......@@ -331,7 +331,7 @@ static void __devinit init_hwif_opti621 (ide_hwif_t *hwif)
hwif->set_pio_mode = &opti621_set_pio_mode;
}
static ide_pci_device_t opti621_chipsets[] __devinitdata = {
static struct ide_port_info opti621_chipsets[] __devinitdata = {
{ /* 0 */
.name = "OPTI621",
.init_hwif = init_hwif_opti621,
......
......@@ -513,7 +513,7 @@ static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev)
.udma_mask = udma, \
}
static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
static struct ide_port_info pdcnew_chipsets[] __devinitdata = {
/* 0 */ DECLARE_PDCNEW_DEV("PDC20268", ATA_UDMA5),
/* 1 */ DECLARE_PDCNEW_DEV("PDC20269", ATA_UDMA6),
/* 2 */ DECLARE_PDCNEW_DEV("PDC20270", ATA_UDMA5),
......@@ -534,7 +534,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
ide_pci_device_t *d;
struct ide_port_info *d;
struct pci_dev *bridge = dev->bus->self;
u8 idx = id->driver_data;
......
......@@ -390,7 +390,7 @@ static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev,
.udma_mask = udma, \
}
static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
static struct ide_port_info pdc202xx_chipsets[] __devinitdata = {
{ /* 0 */
.name = "PDC20246",
.init_chipset = init_chipset_pdc202xx,
......@@ -421,7 +421,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = {
static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
ide_pci_device_t *d;
struct ide_port_info *d;
u8 idx = id->driver_data;
d = &pdc202xx_chipsets[idx];
......
......@@ -396,7 +396,7 @@ static void __devinit init_hwif_ich(ide_hwif_t *hwif)
.udma_mask = udma, \
}
static ide_pci_device_t piix_pci_info[] __devinitdata = {
static struct ide_port_info piix_pci_info[] __devinitdata = {
/* 0 */ DECLARE_PIIX_DEV("PIIXa", 0x00), /* no udma */
/* 1 */ DECLARE_PIIX_DEV("PIIXb", 0x00), /* no udma */
......@@ -449,9 +449,7 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = {
static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
ide_pci_device_t *d = &piix_pci_info[id->driver_data];
return ide_setup_pci_device(dev, d);
return ide_setup_pci_device(dev, &piix_pci_info[id->driver_data]);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment