summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/rtas_pci.c
diff options
context:
space:
mode:
authorNathan Lynch <ntl@pobox.com>2008-03-13 19:52:10 (GMT)
committerPaul Mackerras <paulus@samba.org>2008-04-07 03:49:25 (GMT)
commitc6d4d5a8a83e4a564bcf233fdd565183c33df5d1 (patch)
tree801bfb328121f02df9e78380eb25f325ea2a41cb /arch/powerpc/kernel/rtas_pci.c
parent834d97d452208279edf11c57eca150360d2dd1d6 (diff)
downloadlinux-c6d4d5a8a83e4a564bcf233fdd565183c33df5d1.tar.xz
[POWERPC] Convert pci and eeh code to of_device_is_available
A couple of places are duplicating the function of of_device_is_available; convert them to use it. Signed-off-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/rtas_pci.c')
-rw-r--r--arch/powerpc/kernel/rtas_pci.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c
index 945e8f4..3ab88a9 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,7 +149,7 @@ 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;