]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/sysdev/mv64x60_pci.c
x86 PM: consolidate suspend and hibernation code
[linux-2.6-omap-h63xx.git] / arch / powerpc / sysdev / mv64x60_pci.c
index 45db86c2363c469a982a7e6cbefe3444e0c21391..d21ab8fa4993c87d464c0c81a6fcb56d3dfc01f3 100644 (file)
@@ -24,8 +24,9 @@
 #define MV64X60_VAL_LEN_MAX            11
 #define MV64X60_PCICFG_CPCI_HOTSWAP    0x68
 
-static ssize_t mv64x60_hs_reg_read(struct kobject *kobj, char *buf, loff_t off,
-                                  size_t count)
+static ssize_t mv64x60_hs_reg_read(struct kobject *kobj,
+                                  struct bin_attribute *attr, char *buf,
+                                  loff_t off, size_t count)
 {
        struct pci_dev *phb;
        u32 v;
@@ -44,8 +45,9 @@ static ssize_t mv64x60_hs_reg_read(struct kobject *kobj, char *buf, loff_t off,
        return sprintf(buf, "0x%08x\n", v);
 }
 
-static ssize_t mv64x60_hs_reg_write(struct kobject *kobj, char *buf, loff_t off,
-                                   size_t count)
+static ssize_t mv64x60_hs_reg_write(struct kobject *kobj,
+                                   struct bin_attribute *attr, char *buf,
+                                   loff_t off, size_t count)
 {
        struct pci_dev *phb;
        u32 v;
@@ -144,7 +146,7 @@ static int __init mv64x60_add_bridge(struct device_node *dev)
        hose->first_busno = bus_range ? bus_range[0] : 0;
        hose->last_busno = bus_range ? bus_range[1] : 0xff;
 
-       setup_indirect_pci(hose, rsrc.start, rsrc.start + 4);
+       setup_indirect_pci(hose, rsrc.start, rsrc.start + 4, 0);
        hose->self_busno = hose->first_busno;
 
        printk(KERN_INFO "Found MV64x60 PCI host bridge at 0x%016llx. "
@@ -162,8 +164,8 @@ static int __init mv64x60_add_bridge(struct device_node *dev)
 
 void __init mv64x60_pci_init(void)
 {
-       struct device_node *np = NULL;
+       struct device_node *np;
 
-       while ((np = of_find_compatible_node(np, "pci", "marvell,mv64x60-pci")))
+       for_each_compatible_node(np, "pci", "marvell,mv64x60-pci")
                mv64x60_add_bridge(np);
 }