aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 11:13:10 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 11:13:10 -0500
commitbb592cf474404e51cbf3c419fb72fda83c4b7d72 (patch)
tree05823f536d5f095857a7aff732e205d249e4b7a1 /include
parent79c9601c2e0dbbe69895d302de4d19f3a31fbd30 (diff)
parentaf0940dac37545b1e7900b19c464fb6367d3f82f (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: ieee1394: Use hweight32 firewire: cdev: reduce stack usage by ioctl_dispatch firewire: ohci: 0 may be a valid DMA address firewire: core: WARN on wrong usage of core transaction functions firewire: core: optimize Topology Map creation firewire: core: clarify generate_config_rom usage firewire: optimize config ROM creation firewire: cdev: normalize variable names firewire: normalize style of queue_work wrappers firewire: cdev: fix memory leak in an error path
Diffstat (limited to 'include')
-rw-r--r--include/linux/firewire.h17
1 files changed, 2 insertions, 15 deletions
diff --git a/include/linux/firewire.h b/include/linux/firewire.h
index 7e1d4dec83e7..9416a461b696 100644
--- a/include/linux/firewire.h
+++ b/include/linux/firewire.h
@@ -20,20 +20,6 @@
20#define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args) 20#define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args)
21#define fw_error(s, args...) printk(KERN_ERR KBUILD_MODNAME ": " s, ## args) 21#define fw_error(s, args...) printk(KERN_ERR KBUILD_MODNAME ": " s, ## args)
22 22
23static inline void fw_memcpy_from_be32(void *_dst, void *_src, size_t size)
24{
25 u32 *dst = _dst;
26 __be32 *src = _src;
27 int i;
28
29 for (i = 0; i < size / 4; i++)
30 dst[i] = be32_to_cpu(src[i]);
31}
32
33static inline void fw_memcpy_to_be32(void *_dst, void *_src, size_t size)
34{
35 fw_memcpy_from_be32(_dst, _src, size);
36}
37#define CSR_REGISTER_BASE 0xfffff0000000ULL 23#define CSR_REGISTER_BASE 0xfffff0000000ULL
38 24
39/* register offsets are relative to CSR_REGISTER_BASE */ 25/* register offsets are relative to CSR_REGISTER_BASE */
@@ -131,7 +117,7 @@ struct fw_card {
131 117
132 bool broadcast_channel_allocated; 118 bool broadcast_channel_allocated;
133 u32 broadcast_channel; 119 u32 broadcast_channel;
134 u32 topology_map[(CSR_TOPOLOGY_MAP_END - CSR_TOPOLOGY_MAP) / 4]; 120 __be32 topology_map[(CSR_TOPOLOGY_MAP_END - CSR_TOPOLOGY_MAP) / 4];
135}; 121};
136 122
137struct fw_attribute_group { 123struct fw_attribute_group {
@@ -281,6 +267,7 @@ struct fw_packet {
281 void *payload; 267 void *payload;
282 size_t payload_length; 268 size_t payload_length;
283 dma_addr_t payload_bus; 269 dma_addr_t payload_bus;
270 bool payload_mapped;
284 u32 timestamp; 271 u32 timestamp;
285 272
286 /* 273 /*