diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/rtas_pci.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index 945e8f4db873..3ab88a9dc70d 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) | |||
56 | return 0; | 56 | return 0; |
57 | } | 57 | } |
58 | 58 | ||
59 | static int of_device_available(struct device_node * dn) | ||
60 | { | ||
61 | const char *status; | ||
62 | |||
63 | status = of_get_property(dn, "status", NULL); | ||
64 | |||
65 | if (!status) | ||
66 | return 1; | ||
67 | |||
68 | if (!strcmp(status, "okay")) | ||
69 | return 1; | ||
70 | |||
71 | return 0; | ||
72 | } | ||
73 | |||
74 | int rtas_read_config(struct pci_dn *pdn, int where, int size, u32 *val) | 59 | int rtas_read_config(struct pci_dn *pdn, int where, int size, u32 *val) |
75 | { | 60 | { |
76 | int returnval = -1; | 61 | int returnval = -1; |
@@ -117,7 +102,7 @@ static int rtas_pci_read_config(struct pci_bus *bus, | |||
117 | for (dn = busdn->child; dn; dn = dn->sibling) { | 102 | for (dn = busdn->child; dn; dn = dn->sibling) { |
118 | struct pci_dn *pdn = PCI_DN(dn); | 103 | struct pci_dn *pdn = PCI_DN(dn); |
119 | if (pdn && pdn->devfn == devfn | 104 | if (pdn && pdn->devfn == devfn |
120 | && of_device_available(dn)) | 105 | && of_device_is_available(dn)) |
121 | return rtas_read_config(pdn, where, size, val); | 106 | return rtas_read_config(pdn, where, size, val); |
122 | } | 107 | } |
123 | 108 | ||
@@ -164,7 +149,7 @@ static int rtas_pci_write_config(struct pci_bus *bus, | |||
164 | for (dn = busdn->child; dn; dn = dn->sibling) { | 149 | for (dn = busdn->child; dn; dn = dn->sibling) { |
165 | struct pci_dn *pdn = PCI_DN(dn); | 150 | struct pci_dn *pdn = PCI_DN(dn); |
166 | if (pdn && pdn->devfn == devfn | 151 | if (pdn && pdn->devfn == devfn |
167 | && of_device_available(dn)) | 152 | && of_device_is_available(dn)) |
168 | return rtas_write_config(pdn, where, size, val); | 153 | return rtas_write_config(pdn, where, size, val); |
169 | } | 154 | } |
170 | return PCIBIOS_DEVICE_NOT_FOUND; | 155 | return PCIBIOS_DEVICE_NOT_FOUND; |