Skip to content

Commit

Permalink
ide: constify struct ide_port_info
Browse files Browse the repository at this point in the history
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 19, 2007
1 parent 039788e commit 8562043
Show file tree
Hide file tree
Showing 34 changed files with 58 additions and 58 deletions.
2 changes: 1 addition & 1 deletion drivers/ide/pci/aec62xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif)
}
}

static struct ide_port_info aec62xx_chipsets[] __devinitdata = {
static const struct ide_port_info aec62xx_chipsets[] __devinitdata = {
{ /* 0 */
.name = "AEC6210",
.init_chipset = init_chipset_aec62xx,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/alim15x3.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ static void __devinit init_dma_ali15x3 (ide_hwif_t *hwif, unsigned long dmabase)
ide_setup_dma(hwif, dmabase, 8);
}

static struct ide_port_info ali15x3_chipset __devinitdata = {
static const struct ide_port_info ali15x3_chipset __devinitdata = {
.name = "ALI15X3",
.init_chipset = init_chipset_ali15x3,
.init_hwif = init_hwif_ali15x3,
Expand Down
4 changes: 2 additions & 2 deletions drivers/ide/pci/amd74xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static struct amd_ide_chip {
};

static struct amd_ide_chip *amd_config;
static struct ide_port_info *amd_chipset;
static const struct ide_port_info *amd_chipset;
static unsigned int amd_80w;
static unsigned int amd_clock;

Expand Down Expand Up @@ -295,7 +295,7 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
.mwdma_mask = ATA_MWDMA2, \
}

static struct ide_port_info amd74xx_chipsets[] __devinitdata = {
static const struct ide_port_info amd74xx_chipsets[] __devinitdata = {
/* 0 */ DECLARE_AMD_DEV("AMD7401"),
/* 1 */ DECLARE_AMD_DEV("AMD7409"),
/* 2 */ DECLARE_AMD_DEV("AMD7411"),
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/atiixp.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif)
hwif->dma_host_off = &atiixp_dma_host_off;
}

static struct ide_port_info atiixp_pci_info[] __devinitdata = {
static const struct ide_port_info atiixp_pci_info[] __devinitdata = {
{ /* 0 */
.name = "ATIIXP",
.init_hwif = init_hwif_atiixp,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/cmd64x.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif)
}
}

static struct ide_port_info cmd64x_chipsets[] __devinitdata = {
static const struct ide_port_info cmd64x_chipsets[] __devinitdata = {
{ /* 0 */
.name = "CMD643",
.init_chipset = init_chipset_cmd64x,
Expand Down
4 changes: 2 additions & 2 deletions drivers/ide/pci/cs5520.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif)
.pio_mask = ATA_PIO4, \
}

static struct ide_port_info cyrix_chipsets[] __devinitdata = {
static const struct ide_port_info cyrix_chipsets[] __devinitdata = {
/* 0 */ DECLARE_CS_DEV("Cyrix 5510"),
/* 1 */ DECLARE_CS_DEV("Cyrix 5520")
};
Expand All @@ -154,7 +154,7 @@ static struct ide_port_info cyrix_chipsets[] __devinitdata = {

static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
struct ide_port_info *d = &cyrix_chipsets[id->driver_data];
const struct ide_port_info *d = &cyrix_chipsets[id->driver_data];
u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };

ide_setup_pci_noise(dev, d);
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/cs5530.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif)
hwif->udma_filter = cs5530_udma_filter;
}

static struct ide_port_info cs5530_chipset __devinitdata = {
static const struct ide_port_info cs5530_chipset __devinitdata = {
.name = "CS5530",
.init_chipset = init_chipset_cs5530,
.init_hwif = init_hwif_cs5530,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/cs5535.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif)
hwif->cbl = cs5535_cable_detect(hwif->pci_dev);
}

static struct ide_port_info cs5535_chipset __devinitdata = {
static const struct ide_port_info cs5535_chipset __devinitdata = {
.name = "CS5535",
.init_hwif = init_hwif_cs5535,
.host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE |
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/cy82c693.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ static void __devinit init_iops_cy82c693(ide_hwif_t *hwif)
}
}

static struct ide_port_info cy82c693_chipset __devinitdata = {
static const struct ide_port_info cy82c693_chipset __devinitdata = {
.name = "CY82C693",
.init_chipset = init_chipset_cy82c693,
.init_iops = init_iops_cy82c693,
Expand Down
4 changes: 2 additions & 2 deletions drivers/ide/pci/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE st
.udma_mask = ATA_UDMA6, \
}

static struct ide_port_info generic_chipsets[] __devinitdata = {
static const struct ide_port_info generic_chipsets[] __devinitdata = {
/* 0 */ DECLARE_GENERIC_PCI_DEV("Unknown", 0),

{ /* 1 */
Expand Down Expand Up @@ -123,7 +123,7 @@ static struct ide_port_info generic_chipsets[] __devinitdata = {

static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
struct ide_port_info *d = &generic_chipsets[id->driver_data];
const struct ide_port_info *d = &generic_chipsets[id->driver_data];
int ret = -ENODEV;

/* Don't use the generic entry unless instructed to do so */
Expand Down
4 changes: 2 additions & 2 deletions drivers/ide/pci/hpt34x.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif)
hwif->set_dma_mode = &hpt34x_set_mode;
}

static struct ide_port_info hpt34x_chipsets[] __devinitdata = {
static const struct ide_port_info hpt34x_chipsets[] __devinitdata = {
{ /* 0 */
.name = "HPT343",
.init_chipset = init_chipset_hpt34x,
Expand Down Expand Up @@ -158,7 +158,7 @@ static struct ide_port_info hpt34x_chipsets[] __devinitdata = {

static int __devinit hpt34x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
struct ide_port_info *d;
const struct ide_port_info *d;
u16 pcicmd = 0;

pci_read_config_word(dev, PCI_COMMAND, &pcicmd);
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/hpt366.c
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@ static int __devinit hpt36x_init(struct pci_dev *dev, struct pci_dev *dev2)
return 0;
}

static struct ide_port_info hpt366_chipsets[] __devinitdata = {
static const struct ide_port_info hpt366_chipsets[] __devinitdata = {
{ /* 0 */
.name = "HPT36x",
.init_chipset = init_chipset_hpt366,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/it8213.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static void __devinit init_hwif_it8213(ide_hwif_t *hwif)
.udma_mask = ATA_UDMA6, \
}

static struct ide_port_info it8213_chipsets[] __devinitdata = {
static const struct ide_port_info it8213_chipsets[] __devinitdata = {
/* 0 */ DECLARE_ITE_DEV("IT8213"),
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/it821x.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ static unsigned int __devinit init_chipset_it821x(struct pci_dev *dev, const cha
.pio_mask = ATA_PIO4, \
}

static struct ide_port_info it821x_chipsets[] __devinitdata = {
static const struct ide_port_info it821x_chipsets[] __devinitdata = {
/* 0 */ DECLARE_ITE_DEV("IT8212"),
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/jmicron.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static void __devinit init_hwif_jmicron(ide_hwif_t *hwif)
hwif->cbl = ata66_jmicron(hwif);
}

static struct ide_port_info jmicron_chipset __devinitdata = {
static const struct ide_port_info jmicron_chipset __devinitdata = {
.name = "JMB",
.init_hwif = init_hwif_jmicron,
.host_flags = IDE_HFLAG_BOOTABLE,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/ns87415.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif)
hwif->ide_dma_end = &ns87415_ide_dma_end;
}

static struct ide_port_info ns87415_chipset __devinitdata = {
static const struct ide_port_info ns87415_chipset __devinitdata = {
.name = "NS87415",
#ifdef CONFIG_SUPERIO
.init_iops = init_iops_ns87415,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/opti621.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ static void __devinit init_hwif_opti621 (ide_hwif_t *hwif)
hwif->set_pio_mode = &opti621_set_pio_mode;
}

static struct ide_port_info opti621_chipsets[] __devinitdata = {
static const struct ide_port_info opti621_chipsets[] __devinitdata = {
{ /* 0 */
.name = "OPTI621",
.init_hwif = init_hwif_opti621,
Expand Down
4 changes: 2 additions & 2 deletions drivers/ide/pci/pdc202xx_new.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev)
.udma_mask = udma, \
}

static struct ide_port_info pdcnew_chipsets[] __devinitdata = {
static const 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),
Expand All @@ -534,7 +534,7 @@ static struct ide_port_info pdcnew_chipsets[] __devinitdata = {

static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
struct ide_port_info *d;
const struct ide_port_info *d;
struct pci_dev *bridge = dev->bus->self;
u8 idx = id->driver_data;

Expand Down
4 changes: 2 additions & 2 deletions drivers/ide/pci/pdc202xx_old.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev,
.udma_mask = udma, \
}

static struct ide_port_info pdc202xx_chipsets[] __devinitdata = {
static const struct ide_port_info pdc202xx_chipsets[] __devinitdata = {
{ /* 0 */
.name = "PDC20246",
.init_chipset = init_chipset_pdc202xx,
Expand Down Expand Up @@ -421,7 +421,7 @@ static struct ide_port_info pdc202xx_chipsets[] __devinitdata = {

static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
struct ide_port_info *d;
const struct ide_port_info *d;
u8 idx = id->driver_data;

d = &pdc202xx_chipsets[idx];
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ static void __devinit init_hwif_ich(ide_hwif_t *hwif)
.udma_mask = udma, \
}

static struct ide_port_info piix_pci_info[] __devinitdata = {
static const struct ide_port_info piix_pci_info[] __devinitdata = {
/* 0 */ DECLARE_PIIX_DEV("PIIXa", 0x00), /* no udma */
/* 1 */ DECLARE_PIIX_DEV("PIIXb", 0x00), /* no udma */

Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/rz1000.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif)
}
}

static struct ide_port_info rz1000_chipset __devinitdata = {
static const struct ide_port_info rz1000_chipset __devinitdata = {
.name = "RZ100x",
.init_hwif = init_hwif_rz1000,
.chipset = ide_rz1000,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/sc1200.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif)
hwif->ide_dma_end = &sc1200_ide_dma_end;
}

static struct ide_port_info sc1200_chipset __devinitdata = {
static const struct ide_port_info sc1200_chipset __devinitdata = {
.name = "SC1200",
.init_hwif = init_hwif_sc1200,
.host_flags = IDE_HFLAG_SERIALIZE |
Expand Down
4 changes: 2 additions & 2 deletions drivers/ide/pci/scc_pata.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ static int setup_mmio_scc (struct pci_dev *dev, const char *name)
*/

static int __devinit init_setup_scc(struct pci_dev *dev,
struct ide_port_info *d)
const struct ide_port_info *d)
{
unsigned long ctl_base;
unsigned long dma_base;
Expand Down Expand Up @@ -703,7 +703,7 @@ static void __devinit init_hwif_scc(ide_hwif_t *hwif)
.pio_mask = ATA_PIO4, \
}

static struct ide_port_info scc_chipsets[] __devinitdata = {
static const struct ide_port_info scc_chipsets[] __devinitdata = {
/* 0 */ DECLARE_SCC_DEV("sccIDE"),
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/serverworks.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif)
}
}

static struct ide_port_info serverworks_chipsets[] __devinitdata = {
static const struct ide_port_info serverworks_chipsets[] __devinitdata = {
{ /* 0 */
.name = "SvrWks OSB4",
.init_chipset = init_chipset_svwks,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/siimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif)
.udma_mask = ATA_UDMA6, \
}

static struct ide_port_info siimage_chipsets[] __devinitdata = {
static const struct ide_port_info siimage_chipsets[] __devinitdata = {
/* 0 */ DECLARE_SII_DEV("SiI680"),
/* 1 */ DECLARE_SII_DEV("SiI3112 Serial ATA"),
/* 2 */ DECLARE_SII_DEV("Adaptec AAR-1210SA")
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/sis5513.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ static void __devinit init_hwif_sis5513 (ide_hwif_t *hwif)
hwif->cbl = ata66_sis5513(hwif);
}

static struct ide_port_info sis5513_chipset __devinitdata = {
static const struct ide_port_info sis5513_chipset __devinitdata = {
.name = "SIS5513",
.init_chipset = init_chipset_sis5513,
.init_hwif = init_hwif_sis5513,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/sl82c105.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif)
hwif->serialized = hwif->mate->serialized = 1;
}

static struct ide_port_info sl82c105_chipset __devinitdata = {
static const struct ide_port_info sl82c105_chipset __devinitdata = {
.name = "W82C105",
.init_chipset = init_chipset_sl82c105,
.init_hwif = init_hwif_sl82c105,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/slc90e66.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)
hwif->cbl = (reg47 & mask) ? ATA_CBL_PATA40 : ATA_CBL_PATA80;
}

static struct ide_port_info slc90e66_chipset __devinitdata = {
static const struct ide_port_info slc90e66_chipset __devinitdata = {
.name = "SLC90E66",
.init_hwif = init_hwif_slc90e66,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/tc86c001.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static unsigned int __devinit init_chipset_tc86c001(struct pci_dev *dev,
return err;
}

static struct ide_port_info tc86c001_chipset __devinitdata = {
static const struct ide_port_info tc86c001_chipset __devinitdata = {
.name = "TC86C001",
.init_chipset = init_chipset_tc86c001,
.init_hwif = init_hwif_tc86c001,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/triflex.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static void __devinit init_hwif_triflex(ide_hwif_t *hwif)
hwif->set_dma_mode = &triflex_set_mode;
}

static struct ide_port_info triflex_device __devinitdata = {
static const struct ide_port_info triflex_device __devinitdata = {
.name = "TRIFLEX",
.init_hwif = init_hwif_triflex,
.enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}},
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/trm290.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif)
#endif
}

static struct ide_port_info trm290_chipset __devinitdata = {
static const struct ide_port_info trm290_chipset __devinitdata = {
.name = "TRM290",
.init_hwif = init_hwif_trm290,
.chipset = ide_trm290,
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/pci/via82cxxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif)
hwif->cbl = via82cxxx_cable_detect(hwif);
}

static struct ide_port_info via82cxxx_chipset __devinitdata = {
static const struct ide_port_info via82cxxx_chipset __devinitdata = {
.name = "VP_IDE",
.init_chipset = init_chipset_via82cxxx,
.init_hwif = init_hwif_via82cxxx,
Expand Down
Loading

0 comments on commit 8562043

Please sign in to comment.