diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2008-04-23 22:08:54 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-04-24 06:58:03 -0400 |
commit | 988479ebccc44e141d06ac55e4438d6b473008b5 (patch) | |
tree | 7e3997b8c54eab989e93beef475d193a4652f7a5 /arch | |
parent | 5c02cd2fb83bd4a11270eeb6682e507f04897837 (diff) |
[POWERPC] Use of_get_next_parent() in platforms/cell/axon_msi.c
Replace two open-coded occurences of the of_get_next_parent() logic.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/cell/axon_msi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c index d95e71dee91f..c39f5c225f2e 100644 --- a/arch/powerpc/platforms/cell/axon_msi.c +++ b/arch/powerpc/platforms/cell/axon_msi.c | |||
@@ -123,7 +123,7 @@ static struct axon_msic *find_msi_translator(struct pci_dev *dev) | |||
123 | return NULL; | 123 | return NULL; |
124 | } | 124 | } |
125 | 125 | ||
126 | for (; dn; tmp = of_get_parent(dn), of_node_put(dn), dn = tmp) { | 126 | for (; dn; dn = of_get_next_parent(dn)) { |
127 | ph = of_get_property(dn, "msi-translator", NULL); | 127 | ph = of_get_property(dn, "msi-translator", NULL); |
128 | if (ph) | 128 | if (ph) |
129 | break; | 129 | break; |
@@ -169,7 +169,7 @@ static int axon_msi_check_device(struct pci_dev *dev, int nvec, int type) | |||
169 | 169 | ||
170 | static int setup_msi_msg_address(struct pci_dev *dev, struct msi_msg *msg) | 170 | static int setup_msi_msg_address(struct pci_dev *dev, struct msi_msg *msg) |
171 | { | 171 | { |
172 | struct device_node *dn, *tmp; | 172 | struct device_node *dn; |
173 | struct msi_desc *entry; | 173 | struct msi_desc *entry; |
174 | int len; | 174 | int len; |
175 | const u32 *prop; | 175 | const u32 *prop; |
@@ -182,7 +182,7 @@ static int setup_msi_msg_address(struct pci_dev *dev, struct msi_msg *msg) | |||
182 | 182 | ||
183 | entry = list_first_entry(&dev->msi_list, struct msi_desc, list); | 183 | entry = list_first_entry(&dev->msi_list, struct msi_desc, list); |
184 | 184 | ||
185 | for (; dn; tmp = of_get_parent(dn), of_node_put(dn), dn = tmp) { | 185 | for (; dn; dn = of_get_next_parent(dn)) { |
186 | if (entry->msi_attrib.is_64) { | 186 | if (entry->msi_attrib.is_64) { |
187 | prop = of_get_property(dn, "msi-address-64", &len); | 187 | prop = of_get_property(dn, "msi-address-64", &len); |
188 | if (prop) | 188 | if (prop) |