X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Fpowerpc%2Fkernel%2Frtas_pci.c;h=589a2797eac2006075af50ee60e6bff836f3882c;hb=84c3d4aaec3338201b449034beac41635866bddf;hp=433a0a0949fb2341b61384d553520e19fcdf4a38;hpb=6598b60fd56ba5e915a001cc4e307880a94d19ae;p=linux-2.6 diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index 433a0a0949..589a2797ea 100644 --- a/arch/powerpc/kernel/rtas_pci.c +++ b/arch/powerpc/kernel/rtas_pci.c @@ -56,21 +56,6 @@ static inline int config_access_valid(struct pci_dn *dn, int where) return 0; } -static int of_device_available(struct device_node * dn) -{ - const char *status; - - status = of_get_property(dn, "status", NULL); - - if (!status) - return 1; - - if (!strcmp(status, "okay")) - return 1; - - return 0; -} - int rtas_read_config(struct pci_dn *pdn, int where, int size, u32 *val) { int returnval = -1; @@ -117,7 +102,7 @@ static int rtas_pci_read_config(struct pci_bus *bus, for (dn = busdn->child; dn; dn = dn->sibling) { struct pci_dn *pdn = PCI_DN(dn); if (pdn && pdn->devfn == devfn - && of_device_available(dn)) + && of_device_is_available(dn)) return rtas_read_config(pdn, where, size, val); } @@ -164,18 +149,18 @@ static int rtas_pci_write_config(struct pci_bus *bus, for (dn = busdn->child; dn; dn = dn->sibling) { struct pci_dn *pdn = PCI_DN(dn); if (pdn && pdn->devfn == devfn - && of_device_available(dn)) + && of_device_is_available(dn)) return rtas_write_config(pdn, where, size, val); } return PCIBIOS_DEVICE_NOT_FOUND; } -struct pci_ops rtas_pci_ops = { +static struct pci_ops rtas_pci_ops = { .read = rtas_pci_read_config, .write = rtas_pci_write_config, }; -int is_python(struct device_node *dev) +static int is_python(struct device_node *dev) { const char *model = of_get_property(dev, "model", NULL); @@ -326,7 +311,7 @@ int pcibios_remove_root_bus(struct pci_controller *phb) res = b->resource[0]; if (!res->flags) { - printk(KERN_ERR "%s: no IO resource for PHB %s\n", __FUNCTION__, + printk(KERN_ERR "%s: no IO resource for PHB %s\n", __func__, b->name); return 1; } @@ -334,13 +319,13 @@ int pcibios_remove_root_bus(struct pci_controller *phb) rc = pcibios_unmap_io_space(b); if (rc) { printk(KERN_ERR "%s: failed to unmap IO on bus %s\n", - __FUNCTION__, b->name); + __func__, b->name); return 1; } if (release_resource(res)) { printk(KERN_ERR "%s: failed to release IO on bus %s\n", - __FUNCTION__, b->name); + __func__, b->name); return 1; } @@ -348,13 +333,13 @@ int pcibios_remove_root_bus(struct pci_controller *phb) res = b->resource[i]; if (!res->flags && i == 0) { printk(KERN_ERR "%s: no MEM resource for PHB %s\n", - __FUNCTION__, b->name); + __func__, b->name); return 1; } if (res->flags && release_resource(res)) { printk(KERN_ERR "%s: failed to release IO %d on bus %s\n", - __FUNCTION__, i, b->name); + __func__, i, b->name); return 1; } }