Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330336
b: refs/heads/master
c: 1e38b71
h: refs/heads/master
v: v3
  • Loading branch information
Gavin Shan authored and Benjamin Herrenschmidt committed Sep 18, 2012
1 parent c459cf0 commit 1157e61
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: feadf7c0a1a7c08c74bebb4a13b755f8c40e3bbc
refs/heads/master: 1e38b7140185e384da216aff66a711df09b5afc9
8 changes: 8 additions & 0 deletions trunk/arch/powerpc/include/asm/pci-bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,14 @@ static inline int pci_device_from_OF_node(struct device_node *np,
#if defined(CONFIG_EEH)
static inline struct eeh_dev *of_node_to_eeh_dev(struct device_node *dn)
{
/*
* For those OF nodes whose parent isn't PCI bridge, they
* don't have PCI_DN actually. So we have to skip them for
* any EEH operations.
*/
if (!dn || !PCI_DN(dn))
return NULL;

return PCI_DN(dn)->edev;
}
#else
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/pseries/eeh.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ static void eeh_add_device_early(struct device_node *dn)
{
struct pci_controller *phb;

if (!dn || !of_node_to_eeh_dev(dn))
if (!of_node_to_eeh_dev(dn))
return;
phb = of_node_to_eeh_dev(dn)->phb;

Expand Down

0 comments on commit 1157e61

Please sign in to comment.