Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
[pandora-kernel.git] / arch / powerpc / platforms / pseries / eeh_driver.c
index 06b89b5..8c1ca47 100644 (file)
@@ -42,17 +42,20 @@ static inline const char * pcid_name (struct pci_dev *pdev)
 }
 
 #ifdef DEBUG
-static void print_device_node_tree (struct pci_dn *pdn, int dent)
+static void print_device_node_tree(struct pci_dn *pdn, int dent)
 {
        int i;
-       if (!pdn) return;
-       for (i=0;i<dent; i++)
+       struct device_node *pc;
+
+       if (!pdn)
+               return;
+       for (i = 0; i < dent; i++)
                printk(" ");
        printk("dn=%s mode=%x \tcfg_addr=%x pe_addr=%x \tfull=%s\n",
                pdn->node->name, pdn->eeh_mode, pdn->eeh_config_addr,
                pdn->eeh_pe_config_addr, pdn->node->full_name);
        dent += 3;
-       struct device_node *pc = pdn->node->child;
+       pc = pdn->node->child;
        while (pc) {
                print_device_node_tree(PCI_DN(pc), dent);
                pc = pc->sibling;
@@ -310,8 +313,6 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
        const char *location, *pci_str, *drv_str;
 
        frozen_dn = find_device_pe(event->dn);
-       frozen_bus = pcibios_find_pci_bus(frozen_dn);
-
        if (!frozen_dn) {
 
                location = of_get_property(event->dn, "ibm,loc-code", NULL);
@@ -321,6 +322,8 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
                        location, pci_name(event->dev));
                return NULL;
        }
+
+       frozen_bus = pcibios_find_pci_bus(frozen_dn);
        location = of_get_property(frozen_dn, "ibm,loc-code", NULL);
        location = location ? location : "unknown";