]> err.no Git - linux-2.6/commitdiff
ide: constify struct ide_port_info
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 19 Oct 2007 22:32:34 +0000 (00:32 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 19 Oct 2007 22:32:34 +0000 (00:32 +0200)
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
34 files changed:
drivers/ide/pci/aec62xx.c
drivers/ide/pci/alim15x3.c
drivers/ide/pci/amd74xx.c
drivers/ide/pci/atiixp.c
drivers/ide/pci/cmd64x.c
drivers/ide/pci/cs5520.c
drivers/ide/pci/cs5530.c
drivers/ide/pci/cs5535.c
drivers/ide/pci/cy82c693.c
drivers/ide/pci/generic.c
drivers/ide/pci/hpt34x.c
drivers/ide/pci/hpt366.c
drivers/ide/pci/it8213.c
drivers/ide/pci/it821x.c
drivers/ide/pci/jmicron.c
drivers/ide/pci/ns87415.c
drivers/ide/pci/opti621.c
drivers/ide/pci/pdc202xx_new.c
drivers/ide/pci/pdc202xx_old.c
drivers/ide/pci/piix.c
drivers/ide/pci/rz1000.c
drivers/ide/pci/sc1200.c
drivers/ide/pci/scc_pata.c
drivers/ide/pci/serverworks.c
drivers/ide/pci/siimage.c
drivers/ide/pci/sis5513.c
drivers/ide/pci/sl82c105.c
drivers/ide/pci/slc90e66.c
drivers/ide/pci/tc86c001.c
drivers/ide/pci/triflex.c
drivers/ide/pci/trm290.c
drivers/ide/pci/via82cxxx.c
drivers/ide/setup-pci.c
include/linux/ide.h

index b2dd8ce06b93adc7bc0f4c631e69a10d08c6a656..19ec421f7b9f4c2f4871c74069c9dd0fa9db46e2 100644 (file)
@@ -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,
index db6b567c1ad72cc500d9246568b28cc369d79146..a607dd31a64c58a9e23b7677d0702fb24cacd64e 100644 (file)
@@ -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,
index 8ef7a5183ffd562b8f22f2964bcceb6682f42a6c..8d4125ec252c102fd982158aeac8dd6e5cb4b4cc 100644 (file)
@@ -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;
 
@@ -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"),
index 05972ff47cb5ad434e98f6b9d5594c6e1a2048d5..ef8e0164ef7a019e560608741d3b880ed6a12452 100644 (file)
@@ -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,
index ae01319ed131754c9473f1bbf44b4991f67a3448..ea0143ef5fe5aee02df0e09442f790f5f68a6fcd 100644 (file)
@@ -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,
index 71da68bcd119355db7b29be7a78f6e26130ea6a1..0466462fd21b9a7ce82b9ab6789d0aa7648ff273 100644 (file)
@@ -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")
 };
@@ -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);
index c08416a1e73d3456d240c2675d3cb6d0813d9c39..49fef84642e45ed513b25226baaf4bcd7346b2ee 100644 (file)
@@ -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,
index c94bd06667b9d91533e7fb3da2a34a53cb490c21..9094916e37803c61a02306f0d402653a771a2fc7 100644 (file)
@@ -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 |
index c1adc1ba854c6b447004231ff8d1d3b8e8f83942..3ef4fc10fe2cf596e463634d19c8fe01c842458b 100644 (file)
@@ -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,
index 2d869aecfb87072a99ae2f6e391c5a5fe59333fc..f44d70852c3cc9c18efcb4bae6b75ba3294f2762 100644 (file)
@@ -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 */
@@ -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 */
index 18eaf6b7915b6d6c1b985450650f729615072121..ae6307fae4f9311b35ba24b7727e5c21b05c6b54 100644 (file)
@@ -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,
@@ -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);
index d95ec7d7119203b1260668726cec737cfdc54b6a..612b795241bfc5bf5741de77b633c81e6b416563 100644 (file)
@@ -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,
index 52e403f42d5f81be9055042a60fc0d3aaf35d8d0..90b52ed37bfc365de2a6041eac56280b5d1ba44e 100644 (file)
@@ -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"),
 };
 
index 06bd5762e0a9f62b42e2e7930535341a435e52b2..1a7ddd12e65c111d9779324019848951844b34ec 100644 (file)
@@ -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"),
 };
 
index f7fcc3b2ddbbeba314e8709dd31bba1e9f876f5a..bdf64d99770805313647814c848cedc5d43ff600 100644 (file)
@@ -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,
index f80be320cb99d8837a419d3623a8402dd1ec7a67..d4df4642dbb5ff83e136b26126816fcc3ca09fff 100644 (file)
@@ -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,
index 6152738c1ee864a9729649697e28789ff53dcb52..8d28f335611b02a91e5610e892b73a98c833ed95 100644 (file)
@@ -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,
index 4dc2a8a3e4a0401946ae25510a1e9166ad7cfbc3..4234efeba606750d9b4d7e4cc5ad95aaea57faba 100644 (file)
@@ -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),
@@ -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;
 
index 9aacc2f28768c2b1b03d418769aa0b435dd165f3..e09742e2ba592607e31dd3356099fabf8fae5ea8 100644 (file)
@@ -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,
@@ -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];
index 450d3d52bd15d5f32b3c17e5fd6864e76568cc92..9329d4a810e50fe4a25b45c5f9b6e8b26640e6c6 100644 (file)
@@ -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 */
 
index 190af15bc83234049cdcfde9625936be8ae2683c..6b10ae260fa29e148ae6f9f874400ce1d0997381 100644 (file)
@@ -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,
index bebe18a7aed9080c59bf071e5701fb4ae2f0be25..d2c8b5524f283df712581463e0c80a59b99fa0dc 100644 (file)
@@ -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 |
index cb1bfe54b498717f9bf3ef6bff98b68db8ec194c..ebb7132b9b848c6c87f92cbe9dc6b92450980c8f 100644 (file)
@@ -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;
@@ -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"),
 };
 
index be54f4fcb045295a743beb1b5f71637a33ff0c65..a7280311357b3e539aae503165ed0b9e69603f71 100644 (file)
@@ -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,
index f066bc5bc07d850b469e7243fb54b22329e85dda..dc915cb22bec5e9e2313ac140a2cced771b21ffb 100644 (file)
@@ -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")
index 8223e0e8e3f4c12783641a4ac27523f9e4dbf365..6b7bb53acefdc68d1928bd0bd85eb3d0c3e4a5c3 100644 (file)
@@ -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,
index 8d12888eb38f4e52ef339fc1fa1a9f4c4e22ea77..147d783f7529e681fb1d69645942d00780bd42e0 100644 (file)
@@ -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,
index 9352d0c8d0554803edecaaa0866bd39fd2581276..c457bf4289c58c8fe8f305838104ea97bcef96ee 100644 (file)
@@ -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}},
index 6e41ccb9f0a7dbb35f3788157a62fb28cfd5e75c..a66ebd14664e66149bce9ada527692a7acd7977b 100644 (file)
@@ -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,
index 0755893a3d09695c6277360c2fb0e7bbdc016dce..a227c41d23a3110e0efaaec5cebe40ac7718cc2b 100644 (file)
@@ -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}},
index ed19f0a3444440f9e4b7fba171b08fdc494df051..5011ba22e36c4e23a73a39ca98700ef2c31de738 100644 (file)
@@ -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,
index 69a2a2c177e74c2eb3c325fa5cd506e5872d7a43..a0d3c16b68ec4fdba9d4d54d9a2bcb6e7181860e 100644 (file)
@@ -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,
index 3517eb0eddbde859a3389829b12fe2266c4cab10..727544c205b900a754399537bcfefb5e2a54043f 100644 (file)
@@ -155,7 +155,7 @@ static int ide_setup_pci_baseregs (struct pci_dev *dev, const char *name)
  *     and enforce IDE simplex rules.
  */
 
-static unsigned long ide_get_or_set_dma_base(struct ide_port_info *d, ide_hwif_t *hwif)
+static unsigned long ide_get_or_set_dma_base(const struct ide_port_info *d, ide_hwif_t *hwif)
 {
        unsigned long   dma_base = 0;
        struct pci_dev  *dev = hwif->pci_dev;
@@ -225,7 +225,7 @@ static unsigned long ide_get_or_set_dma_base(struct ide_port_info *d, ide_hwif_t
 }
 #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */
 
-void ide_setup_pci_noise(struct pci_dev *dev, struct ide_port_info *d)
+void ide_setup_pci_noise(struct pci_dev *dev, const struct ide_port_info *d)
 {
        printk(KERN_INFO "%s: IDE controller at PCI slot %s\n",
                         d->name, pci_name(dev));
@@ -245,7 +245,7 @@ EXPORT_SYMBOL_GPL(ide_setup_pci_noise);
  *     Returns zero on success or an error code
  */
 
-static int ide_pci_enable(struct pci_dev *dev, struct ide_port_info *d)
+static int ide_pci_enable(struct pci_dev *dev, const struct ide_port_info *d)
 {
        int ret;
 
@@ -290,7 +290,7 @@ out:
  *     Returns zero on success or an error code.
  */
 
-static int ide_pci_configure(struct pci_dev *dev, struct ide_port_info *d)
+static int ide_pci_configure(struct pci_dev *dev, const struct ide_port_info *d)
 {
        u16 pcicmd = 0;
        /*
@@ -326,7 +326,7 @@ static int ide_pci_configure(struct pci_dev *dev, struct ide_port_info *d)
  *     print an error and return an error code. Otherwise return 0
  */
 
-static int ide_pci_check_iomem(struct pci_dev *dev, struct ide_port_info *d, int bar)
+static int ide_pci_check_iomem(struct pci_dev *dev, const struct ide_port_info *d, int bar)
 {
        ulong flags = pci_resource_flags(dev, bar);
        
@@ -358,7 +358,7 @@ static int ide_pci_check_iomem(struct pci_dev *dev, struct ide_port_info *d, int
  *     Returns the new hardware interface structure, or NULL on a failure
  */
 
-static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, struct ide_port_info *d, ide_hwif_t *mate, int port, int irq)
+static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, const struct ide_port_info *d, ide_hwif_t *mate, int port, int irq)
 {
        unsigned long ctl = 0, base = 0;
        ide_hwif_t *hwif;
@@ -423,7 +423,7 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, struct ide_port_info
  *     state
  */
 
-static void ide_hwif_setup_dma(struct pci_dev *dev, struct ide_port_info *d, ide_hwif_t *hwif)
+static void ide_hwif_setup_dma(struct pci_dev *dev, const struct ide_port_info *d, ide_hwif_t *hwif)
 {
 #ifdef CONFIG_BLK_DEV_IDEDMA_PCI
        u16 pcicmd;
@@ -472,7 +472,7 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, struct ide_port_info *d, ide
  *     and enables it if need be
  */
 
-static int ide_setup_pci_controller(struct pci_dev *dev, struct ide_port_info *d, int noisy, int *config)
+static int ide_setup_pci_controller(struct pci_dev *dev, const struct ide_port_info *d, int noisy, int *config)
 {
        int ret;
        u16 pcicmd;
@@ -520,7 +520,7 @@ out:
  *     where the chipset setup is not the default PCI IDE one.
  */
 
-void ide_pci_setup_ports(struct pci_dev *dev, struct ide_port_info *d, int pciirq, u8 *idx)
+void ide_pci_setup_ports(struct pci_dev *dev, const struct ide_port_info *d, int pciirq, u8 *idx)
 {
        int channels = (d->host_flags & IDE_HFLAG_SINGLE) ? 1 : 2, port;
        ide_hwif_t *hwif, *mate = NULL;
@@ -531,8 +531,8 @@ void ide_pci_setup_ports(struct pci_dev *dev, struct ide_port_info *d, int pciir
         */
 
        for (port = 0; port < channels; ++port) {
-               ide_pci_enablebit_t *e = &(d->enablebits[port]);
-       
+               const ide_pci_enablebit_t *e = &(d->enablebits[port]);
+
                if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) ||
                    (tmp & e->mask) != e->val)) {
                        printk(KERN_INFO "%s: IDE port disabled\n", d->name);
@@ -611,7 +611,7 @@ EXPORT_SYMBOL_GPL(ide_pci_setup_ports);
  * for all other chipsets, we just assume both interfaces are enabled.
  */
 static int do_ide_setup_pci_device(struct pci_dev *dev,
-                                  struct ide_port_info *d,
+                                  const struct ide_port_info *d,
                                   u8 *idx, u8 noisy)
 {
        int tried_config = 0;
@@ -668,7 +668,7 @@ out:
        return ret;
 }
 
-int ide_setup_pci_device(struct pci_dev *dev, struct ide_port_info *d)
+int ide_setup_pci_device(struct pci_dev *dev, const struct ide_port_info *d)
 {
        u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
        int ret;
@@ -684,7 +684,7 @@ int ide_setup_pci_device(struct pci_dev *dev, struct ide_port_info *d)
 EXPORT_SYMBOL_GPL(ide_setup_pci_device);
 
 int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2,
-                         struct ide_port_info *d)
+                         const struct ide_port_info *d)
 {
        struct pci_dev *pdev[] = { dev1, dev2 };
        int ret, i;
index eaebd4fcb8573363e5fdff52b81019be74b2047b..2e4b8dd03cfe79413f9a5a2d75b3754863781a12 100644 (file)
@@ -680,7 +680,7 @@ typedef struct hwif_s {
        hwif_chipset_t chipset; /* sub-module for tuning.. */
 
        struct pci_dev  *pci_dev;       /* for pci chipsets */
-       struct ide_port_info *cds;      /* chipset device struct */
+       const struct ide_port_info *cds;        /* chipset device struct */
 
        ide_ack_intr_t *ack_intr;
 
@@ -1150,8 +1150,8 @@ extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *o
 #define ide_pci_register_driver(d) pci_register_driver(d)
 #endif
 
-void ide_pci_setup_ports(struct pci_dev *, struct ide_port_info *, int, u8 *);
-void ide_setup_pci_noise(struct pci_dev *, struct ide_port_info *);
+void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, u8 *);
+void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *);
 
 extern void default_hwif_iops(ide_hwif_t *);
 extern void default_hwif_mmiops(ide_hwif_t *);
@@ -1244,8 +1244,8 @@ struct ide_port_info {
        u8                      udma_mask;
 };
 
-int ide_setup_pci_device(struct pci_dev *, struct ide_port_info *);
-int ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, struct ide_port_info *);
+int ide_setup_pci_device(struct pci_dev *, const struct ide_port_info *);
+int ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, const struct ide_port_info *);
 
 void ide_map_sg(ide_drive_t *, struct request *);
 void ide_init_sg_cmd(ide_drive_t *, struct request *);