]> 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 9b3baa7317d749ea24e698995767b75b237ae36d..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;
@@ -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);
 }