]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ieee1394/nodemgr.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
[linux-2.6-omap-h63xx.git] / drivers / ieee1394 / nodemgr.c
index 629a9d88a0da3480f7a03ef5c1457bf1a3cefdfb..6a1a0572275e96a8a72fbc87c730c9ce200f5544 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/kthread.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
+#include <linux/mutex.h>
 #include <linux/freezer.h>
 #include <asm/atomic.h>
 
@@ -115,7 +116,7 @@ static int nodemgr_bus_read(struct csr1212_csr *csr, u64 addr, u16 length,
 
 static int nodemgr_get_max_rom(quadlet_t *bus_info_data, void *__ci)
 {
-       return (CSR1212_BE32_TO_CPU(bus_info_data[2]) >> 8) & 0x3;
+       return (be32_to_cpu(bus_info_data[2]) >> 8) & 0x3;
 }
 
 static struct csr1212_bus_ops nodemgr_csr_ops = {
@@ -580,7 +581,7 @@ static void nodemgr_create_drv_files(struct hpsb_protocol_driver *driver)
                        goto fail;
        return;
 fail:
-       HPSB_ERR("Failed to add sysfs attribute for driver %s", driver->name);
+       HPSB_ERR("Failed to add sysfs attribute");
 }
 
 
@@ -604,8 +605,7 @@ static void nodemgr_create_ne_dev_files(struct node_entry *ne)
                        goto fail;
        return;
 fail:
-       HPSB_ERR("Failed to add sysfs attribute for node %016Lx",
-                (unsigned long long)ne->guid);
+       HPSB_ERR("Failed to add sysfs attribute");
 }
 
 
@@ -619,7 +619,7 @@ static void nodemgr_create_host_dev_files(struct hpsb_host *host)
                        goto fail;
        return;
 fail:
-       HPSB_ERR("Failed to add sysfs attribute for host %d", host->id);
+       HPSB_ERR("Failed to add sysfs attribute");
 }
 
 
@@ -679,8 +679,7 @@ static void nodemgr_create_ud_dev_files(struct unit_directory *ud)
        }
        return;
 fail:
-       HPSB_ERR("Failed to add sysfs attributes for unit %s",
-                ud->device.bus_id);
+       HPSB_ERR("Failed to add sysfs attribute");
 }
 
 
@@ -1144,13 +1143,13 @@ static void nodemgr_process_root_directory(struct host_info *hi, struct node_ent
                last_key_id = kv->key.id;
        }
 
-       if (ne->vendor_name_kv &&
-           device_create_file(&ne->device, &dev_attr_ne_vendor_name_kv))
-               goto fail;
-       return;
-fail:
-       HPSB_ERR("Failed to add sysfs attribute for node %016Lx",
-                (unsigned long long)ne->guid);
+       if (ne->vendor_name_kv) {
+               int error = device_create_file(&ne->device,
+                                              &dev_attr_ne_vendor_name_kv);
+
+               if (error && error != -EEXIST)
+                       HPSB_ERR("Failed to add sysfs attribute");
+       }
 }
 
 #ifdef CONFIG_HOTPLUG