]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/firewire/fw-transaction.h
Merge branch 'merge-fixes' into devel
[linux-2.6-omap-h63xx.git] / drivers / firewire / fw-transaction.h
index 5ceaccd10564cbfd7623757ba351e8490d542fe7..04d3854f65600924e53183b63f4001d048d047eb 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
@@ -200,11 +201,7 @@ struct fw_address_region {
        u64 end;
 };
 
-extern const struct fw_address_region fw_low_memory_region;
 extern const struct fw_address_region fw_high_memory_region;
-extern const struct fw_address_region fw_private_region;
-extern const struct fw_address_region fw_csr_region;
-extern const struct fw_address_region fw_unit_space_region;
 
 int fw_core_add_address_handler(struct fw_address_handler *handler,
                                const struct fw_address_region *region);
@@ -219,19 +216,17 @@ extern struct bus_type fw_bus_type;
 struct fw_card {
        const struct fw_card_driver *driver;
        struct device *device;
-       struct kref kref;
+       atomic_t device_count;
 
        int node_id;
        int generation;
-       /* This is the generation used for timestamping incoming requests. */
-       int request_generation;
        int current_tlabel, tlabel_mask;
        struct list_head transaction_list;
        struct timer_list flush_timer;
        unsigned long reset_jiffies;
 
        unsigned long long guid;
-       int max_receive;
+       unsigned max_receive;
        int link_speed;
        int config_rom_generation;
 
@@ -261,9 +256,6 @@ struct fw_card {
        int bm_generation;
 };
 
-struct fw_card *fw_card_get(struct fw_card *card);
-void fw_card_put(struct fw_card *card);
-
 /*
  * The iso packet format allows for an immediate header/payload part
  * stored in 'header' immediately after the packet info plus an