[SPARC64]: Fix PCI rework to adhere to of_get_property() const return.
authorDavid S. Miller <davem@sunset.davemloft.net>
Thu, 29 Mar 2007 08:50:16 +0000 (01:50 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 08:55:37 +0000 (01:55 -0700)
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/of_device.c
arch/sparc64/kernel/pci.c
arch/sparc64/kernel/pci_common.c
arch/sparc64/kernel/pci_sabre.c
arch/sparc64/kernel/pci_schizo.c

index f18eec6..9ac9a30 100644 (file)
@@ -317,7 +317,7 @@ static unsigned int of_bus_default_get_flags(const u32 *addr)
 static int of_bus_pci_match(struct device_node *np)
 {
        if (!strcmp(np->type, "pci") || !strcmp(np->type, "pciex")) {
-               char *model = of_get_property(np, "model", NULL);
+               const char *model = of_get_property(np, "model", NULL);
 
                if (model && !strcmp(model, "SUNW,simba"))
                        return 0;
@@ -339,7 +339,7 @@ static int of_bus_pci_match(struct device_node *np)
 
 static int of_bus_simba_match(struct device_node *np)
 {
-       char *model = of_get_property(np, "model", NULL);
+       const char *model = of_get_property(np, "model", NULL);
 
        if (model && !strcmp(model, "SUNW,simba"))
                return 1;
index 8a7c699..023af41 100644 (file)
@@ -551,7 +551,7 @@ void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm,
        ranges = of_get_property(node, "ranges", &len);
        simba = 0;
        if (ranges == NULL) {
-               char *model = of_get_property(node, "model", NULL);
+               const char *model = of_get_property(node, "model", NULL);
                if (model && !strcmp(model, "SUNW,simba")) {
                        simba = 1;
                } else {
index 6b5c8e7..1e6aeed 100644 (file)
@@ -54,7 +54,7 @@ static void pci_register_legacy_regions(struct resource *io_res,
 
 static void pci_register_iommu_region(struct pci_pbm_info *pbm)
 {
-       u32 *vdma = of_get_property(pbm->prom_node, "virtual-dma", NULL);
+       const u32 *vdma = of_get_property(pbm->prom_node, "virtual-dma", NULL);
 
        if (vdma) {
                struct resource *rp = kmalloc(sizeof(*rp), GFP_KERNEL);
@@ -73,7 +73,7 @@ static void pci_register_iommu_region(struct pci_pbm_info *pbm)
 
 void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
 {
-       struct linux_prom_pci_ranges *pbm_ranges;
+       const struct linux_prom_pci_ranges *pbm_ranges;
        int i, saw_mem, saw_io;
        int num_pbm_ranges;
 
@@ -82,7 +82,7 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
        num_pbm_ranges = i / sizeof(*pbm_ranges);
 
        for (i = 0; i < num_pbm_ranges; i++) {
-               struct linux_prom_pci_ranges *pr = &pbm_ranges[i];
+               const struct linux_prom_pci_ranges *pr = &pbm_ranges[i];
                unsigned long a;
                u32 parent_phys_hi, parent_phys_lo;
                int type;
index a2f129d..9a2ce06 100644 (file)
@@ -1015,12 +1015,12 @@ static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp
 
 void sabre_init(struct device_node *dp, char *model_name)
 {
-       struct linux_prom64_registers *pr_regs;
+       const struct linux_prom64_registers *pr_regs;
        struct pci_controller_info *p;
        struct pci_iommu *iommu;
        int tsbsize;
-       u32 *busrange;
-       u32 *vdma;
+       const u32 *busrange;
+       const u32 *vdma;
        u32 upa_portid, dma_mask;
        u64 clear_irq;
 
index 322cdbf..47a5aa9 100644 (file)
@@ -1490,11 +1490,11 @@ static void schizo_pbm_init(struct pci_controller_info *p,
                            struct device_node *dp, u32 portid,
                            int chip_type)
 {
-       struct linux_prom64_registers *regs;
-       unsigned int *busrange;
+       const struct linux_prom64_registers *regs;
+       const unsigned int *busrange;
        struct pci_pbm_info *pbm;
        const char *chipset_name;
-       u32 *ino_bitmap;
+       const u32 *ino_bitmap;
        int is_pbm_a;
 
        switch (chip_type) {