Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[sfrench/cifs-2.6.git] / drivers / firewire / fw-transaction.h
index fa7967b57408586359f70ae5bc610f39d7a55223..a43bb22912f9da9488fd83a2060b80c78bdfe55b 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/fs.h>
 #include <linux/dma-mapping.h>
 #include <linux/firewire-constants.h>
+#include <asm/atomic.h>
 
 #define TCODE_IS_READ_REQUEST(tcode)   (((tcode) & ~1) == 4)
 #define TCODE_IS_BLOCK_PACKET(tcode)   (((tcode) &  1) != 0)
 static inline void
 fw_memcpy_from_be32(void *_dst, void *_src, size_t size)
 {
-       u32 *dst = _dst;
-       u32 *src = _src;
+       u32    *dst = _dst;
+       __be32 *src = _src;
        int i;
 
        for (i = 0; i < size / 4; i++)
-               dst[i] = cpu_to_be32(src[i]);
+               dst[i] = be32_to_cpu(src[i]);
 }
 
 static inline void
@@ -219,6 +220,7 @@ extern struct bus_type fw_bus_type;
 struct fw_card {
        const struct fw_card_driver *driver;
        struct device *device;
+       atomic_t device_count;
        struct kref kref;
 
        int node_id;