diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2006-07-03 12:02:29 -0400 |
---|---|---|
committer | Ben Collins <bcollins@ubuntu.com> | 2006-07-03 12:02:29 -0400 |
commit | de4394f13cc843fae2a3ba2df752ee20e6e779a8 (patch) | |
tree | f583ed92bda4b5da3b27a10ff1d40131996eff0d | |
parent | e1d118f16dca0f54faba3e8dd5b6adbbf7ac68c8 (diff) |
[PATCH] ieee1394: update #include directives in midlayer header files
Remove unnecessary includes, add missing includes.
Use forward type declarations for some structs.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
-rw-r--r-- | drivers/ieee1394/csr.h | 6 | ||||
-rw-r--r-- | drivers/ieee1394/dma.c | 7 | ||||
-rw-r--r-- | drivers/ieee1394/dma.h | 7 | ||||
-rw-r--r-- | drivers/ieee1394/dv1394.c | 12 | ||||
-rw-r--r-- | drivers/ieee1394/eth1394.c | 11 | ||||
-rw-r--r-- | drivers/ieee1394/highlevel.h | 10 | ||||
-rw-r--r-- | drivers/ieee1394/hosts.h | 10 | ||||
-rw-r--r-- | drivers/ieee1394/ieee1394_core.h | 10 | ||||
-rw-r--r-- | drivers/ieee1394/ieee1394_hotplug.h | 3 | ||||
-rw-r--r-- | drivers/ieee1394/ieee1394_transactions.h | 7 | ||||
-rw-r--r-- | drivers/ieee1394/ieee1394_types.h | 7 | ||||
-rw-r--r-- | drivers/ieee1394/iso.c | 5 | ||||
-rw-r--r-- | drivers/ieee1394/iso.h | 7 | ||||
-rw-r--r-- | drivers/ieee1394/nodemgr.c | 9 | ||||
-rw-r--r-- | drivers/ieee1394/nodemgr.h | 10 | ||||
-rw-r--r-- | drivers/ieee1394/raw1394.c | 11 | ||||
-rw-r--r-- | drivers/ieee1394/video1394.c | 12 |
17 files changed, 91 insertions, 53 deletions
diff --git a/drivers/ieee1394/csr.h b/drivers/ieee1394/csr.h index 0655596f25d3..2bc080f76510 100644 --- a/drivers/ieee1394/csr.h +++ b/drivers/ieee1394/csr.h | |||
@@ -1,12 +1,10 @@ | |||
1 | |||
2 | #ifndef _IEEE1394_CSR_H | 1 | #ifndef _IEEE1394_CSR_H |
3 | #define _IEEE1394_CSR_H | 2 | #define _IEEE1394_CSR_H |
4 | 3 | ||
5 | #ifdef CONFIG_PREEMPT | 4 | #include <linux/spinlock_types.h> |
6 | #include <linux/sched.h> | ||
7 | #endif | ||
8 | 5 | ||
9 | #include "csr1212.h" | 6 | #include "csr1212.h" |
7 | #include "ieee1394_types.h" | ||
10 | 8 | ||
11 | #define CSR_REGISTER_BASE 0xfffff0000000ULL | 9 | #define CSR_REGISTER_BASE 0xfffff0000000ULL |
12 | 10 | ||
diff --git a/drivers/ieee1394/dma.c b/drivers/ieee1394/dma.c index ca5167de707d..c68f328e1a29 100644 --- a/drivers/ieee1394/dma.c +++ b/drivers/ieee1394/dma.c | |||
@@ -7,10 +7,13 @@ | |||
7 | * directory of the kernel sources for details. | 7 | * directory of the kernel sources for details. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/mm.h> | ||
10 | #include <linux/module.h> | 11 | #include <linux/module.h> |
11 | #include <linux/vmalloc.h> | 12 | #include <linux/pci.h> |
12 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
13 | #include <linux/mm.h> | 14 | #include <linux/vmalloc.h> |
15 | #include <asm/scatterlist.h> | ||
16 | |||
14 | #include "dma.h" | 17 | #include "dma.h" |
15 | 18 | ||
16 | /* dma_prog_region */ | 19 | /* dma_prog_region */ |
diff --git a/drivers/ieee1394/dma.h b/drivers/ieee1394/dma.h index b0f0885c4551..a1682aba71c7 100644 --- a/drivers/ieee1394/dma.h +++ b/drivers/ieee1394/dma.h | |||
@@ -10,8 +10,11 @@ | |||
10 | #ifndef IEEE1394_DMA_H | 10 | #ifndef IEEE1394_DMA_H |
11 | #define IEEE1394_DMA_H | 11 | #define IEEE1394_DMA_H |
12 | 12 | ||
13 | #include <linux/pci.h> | 13 | #include <asm/types.h> |
14 | #include <asm/scatterlist.h> | 14 | |
15 | struct pci_dev; | ||
16 | struct scatterlist; | ||
17 | struct vm_area_struct; | ||
15 | 18 | ||
16 | /** | 19 | /** |
17 | * struct dma_prog_region - small contiguous DMA buffer | 20 | * struct dma_prog_region - small contiguous DMA buffer |
diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c index 87532dd43374..bdc50f25fb42 100644 --- a/drivers/ieee1394/dv1394.c +++ b/drivers/ieee1394/dv1394.c | |||
@@ -110,15 +110,15 @@ | |||
110 | #include <linux/compat.h> | 110 | #include <linux/compat.h> |
111 | #include <linux/cdev.h> | 111 | #include <linux/cdev.h> |
112 | 112 | ||
113 | #include "dv1394.h" | ||
114 | #include "dv1394-private.h" | ||
115 | #include "highlevel.h" | ||
116 | #include "hosts.h" | ||
113 | #include "ieee1394.h" | 117 | #include "ieee1394.h" |
118 | #include "ieee1394_core.h" | ||
119 | #include "ieee1394_hotplug.h" | ||
114 | #include "ieee1394_types.h" | 120 | #include "ieee1394_types.h" |
115 | #include "nodemgr.h" | 121 | #include "nodemgr.h" |
116 | #include "hosts.h" | ||
117 | #include "ieee1394_core.h" | ||
118 | #include "highlevel.h" | ||
119 | #include "dv1394.h" | ||
120 | #include "dv1394-private.h" | ||
121 | |||
122 | #include "ohci1394.h" | 122 | #include "ohci1394.h" |
123 | 123 | ||
124 | /* DEBUG LEVELS: | 124 | /* DEBUG LEVELS: |
diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index 2d5b57be98c3..09826be86aad 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c | |||
@@ -67,16 +67,17 @@ | |||
67 | #include <asm/semaphore.h> | 67 | #include <asm/semaphore.h> |
68 | #include <net/arp.h> | 68 | #include <net/arp.h> |
69 | 69 | ||
70 | #include "config_roms.h" | ||
70 | #include "csr1212.h" | 71 | #include "csr1212.h" |
71 | #include "ieee1394_types.h" | 72 | #include "eth1394.h" |
73 | #include "highlevel.h" | ||
74 | #include "ieee1394.h" | ||
72 | #include "ieee1394_core.h" | 75 | #include "ieee1394_core.h" |
76 | #include "ieee1394_hotplug.h" | ||
73 | #include "ieee1394_transactions.h" | 77 | #include "ieee1394_transactions.h" |
74 | #include "ieee1394.h" | 78 | #include "ieee1394_types.h" |
75 | #include "highlevel.h" | ||
76 | #include "iso.h" | 79 | #include "iso.h" |
77 | #include "nodemgr.h" | 80 | #include "nodemgr.h" |
78 | #include "eth1394.h" | ||
79 | #include "config_roms.h" | ||
80 | 81 | ||
81 | #define ETH1394_PRINT_G(level, fmt, args...) \ | 82 | #define ETH1394_PRINT_G(level, fmt, args...) \ |
82 | printk(level "%s: " fmt, driver_name, ## args) | 83 | printk(level "%s: " fmt, driver_name, ## args) |
diff --git a/drivers/ieee1394/highlevel.h b/drivers/ieee1394/highlevel.h index 134bb6c3eadb..50f2dd2c7e20 100644 --- a/drivers/ieee1394/highlevel.h +++ b/drivers/ieee1394/highlevel.h | |||
@@ -1,6 +1,16 @@ | |||
1 | #ifndef IEEE1394_HIGHLEVEL_H | 1 | #ifndef IEEE1394_HIGHLEVEL_H |
2 | #define IEEE1394_HIGHLEVEL_H | 2 | #define IEEE1394_HIGHLEVEL_H |
3 | 3 | ||
4 | #include <linux/list.h> | ||
5 | #include <linux/spinlock_types.h> | ||
6 | #include <linux/types.h> | ||
7 | |||
8 | struct module; | ||
9 | |||
10 | #include "ieee1394_types.h" | ||
11 | |||
12 | struct hpsb_host; | ||
13 | |||
4 | /* internal to ieee1394 core */ | 14 | /* internal to ieee1394 core */ |
5 | struct hpsb_address_serve { | 15 | struct hpsb_address_serve { |
6 | struct list_head host_list; /* per host list */ | 16 | struct list_head host_list; /* per host list */ |
diff --git a/drivers/ieee1394/hosts.h b/drivers/ieee1394/hosts.h index 857d7d80bc87..b911e2af99a3 100644 --- a/drivers/ieee1394/hosts.h +++ b/drivers/ieee1394/hosts.h | |||
@@ -2,17 +2,19 @@ | |||
2 | #define _IEEE1394_HOSTS_H | 2 | #define _IEEE1394_HOSTS_H |
3 | 3 | ||
4 | #include <linux/device.h> | 4 | #include <linux/device.h> |
5 | #include <linux/wait.h> | ||
6 | #include <linux/list.h> | 5 | #include <linux/list.h> |
7 | #include <linux/timer.h> | ||
8 | #include <linux/skbuff.h> | 6 | #include <linux/skbuff.h> |
7 | #include <linux/timer.h> | ||
8 | #include <linux/types.h> | ||
9 | #include <linux/workqueue.h> | ||
10 | #include <asm/atomic.h> | ||
9 | 11 | ||
10 | #include <asm/semaphore.h> | 12 | struct pci_dev; |
13 | struct module; | ||
11 | 14 | ||
12 | #include "ieee1394_types.h" | 15 | #include "ieee1394_types.h" |
13 | #include "csr.h" | 16 | #include "csr.h" |
14 | 17 | ||
15 | |||
16 | struct hpsb_packet; | 18 | struct hpsb_packet; |
17 | struct hpsb_iso; | 19 | struct hpsb_iso; |
18 | 20 | ||
diff --git a/drivers/ieee1394/ieee1394_core.h b/drivers/ieee1394/ieee1394_core.h index 31d9efccdc0d..1ce172b28569 100644 --- a/drivers/ieee1394/ieee1394_core.h +++ b/drivers/ieee1394/ieee1394_core.h | |||
@@ -1,12 +1,16 @@ | |||
1 | |||
2 | #ifndef _IEEE1394_CORE_H | 1 | #ifndef _IEEE1394_CORE_H |
3 | #define _IEEE1394_CORE_H | 2 | #define _IEEE1394_CORE_H |
4 | 3 | ||
5 | #include <linux/slab.h> | 4 | #include <linux/device.h> |
5 | #include <linux/fs.h> | ||
6 | #include <linux/list.h> | ||
7 | #include <linux/skbuff.h> | ||
8 | #include <linux/types.h> | ||
6 | #include <asm/atomic.h> | 9 | #include <asm/atomic.h> |
7 | #include <asm/semaphore.h> | 10 | #include <asm/semaphore.h> |
8 | #include "hosts.h" | ||
9 | 11 | ||
12 | #include "hosts.h" | ||
13 | #include "ieee1394_types.h" | ||
10 | 14 | ||
11 | struct hpsb_packet { | 15 | struct hpsb_packet { |
12 | /* This struct is basically read-only for hosts with the exception of | 16 | /* This struct is basically read-only for hosts with the exception of |
diff --git a/drivers/ieee1394/ieee1394_hotplug.h b/drivers/ieee1394/ieee1394_hotplug.h index 5be70d31b007..183d93188d48 100644 --- a/drivers/ieee1394/ieee1394_hotplug.h +++ b/drivers/ieee1394/ieee1394_hotplug.h | |||
@@ -1,9 +1,8 @@ | |||
1 | #ifndef _IEEE1394_HOTPLUG_H | 1 | #ifndef _IEEE1394_HOTPLUG_H |
2 | #define _IEEE1394_HOTPLUG_H | 2 | #define _IEEE1394_HOTPLUG_H |
3 | 3 | ||
4 | #include <linux/kernel.h> | ||
5 | #include <linux/types.h> | ||
6 | #include <linux/mod_devicetable.h> | 4 | #include <linux/mod_devicetable.h> |
5 | #include <linux/types.h> | ||
7 | 6 | ||
8 | /* Unit spec id and sw version entry for some protocols */ | 7 | /* Unit spec id and sw version entry for some protocols */ |
9 | #define AVC_UNIT_SPEC_ID_ENTRY 0x0000A02D | 8 | #define AVC_UNIT_SPEC_ID_ENTRY 0x0000A02D |
diff --git a/drivers/ieee1394/ieee1394_transactions.h b/drivers/ieee1394/ieee1394_transactions.h index 5f809f50845f..290d37060b03 100644 --- a/drivers/ieee1394/ieee1394_transactions.h +++ b/drivers/ieee1394/ieee1394_transactions.h | |||
@@ -1,7 +1,12 @@ | |||
1 | #ifndef _IEEE1394_TRANSACTIONS_H | 1 | #ifndef _IEEE1394_TRANSACTIONS_H |
2 | #define _IEEE1394_TRANSACTIONS_H | 2 | #define _IEEE1394_TRANSACTIONS_H |
3 | 3 | ||
4 | #include "ieee1394_core.h" | 4 | #include <linux/types.h> |
5 | |||
6 | #include "ieee1394_types.h" | ||
7 | |||
8 | struct hpsb_packet; | ||
9 | struct hpsb_host; | ||
5 | 10 | ||
6 | int hpsb_get_tlabel(struct hpsb_packet *packet); | 11 | int hpsb_get_tlabel(struct hpsb_packet *packet); |
7 | void hpsb_free_tlabel(struct hpsb_packet *packet); | 12 | void hpsb_free_tlabel(struct hpsb_packet *packet); |
diff --git a/drivers/ieee1394/ieee1394_types.h b/drivers/ieee1394/ieee1394_types.h index ed6fdd811a09..6c246913b16f 100644 --- a/drivers/ieee1394/ieee1394_types.h +++ b/drivers/ieee1394/ieee1394_types.h | |||
@@ -1,17 +1,14 @@ | |||
1 | |||
2 | #ifndef _IEEE1394_TYPES_H | 1 | #ifndef _IEEE1394_TYPES_H |
3 | #define _IEEE1394_TYPES_H | 2 | #define _IEEE1394_TYPES_H |
4 | 3 | ||
5 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
6 | #include <linux/types.h> | ||
7 | #include <linux/list.h> | 5 | #include <linux/list.h> |
8 | #include <linux/init.h> | ||
9 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
10 | #include <linux/string.h> | 7 | #include <linux/string.h> |
8 | #include <linux/types.h> | ||
11 | 9 | ||
12 | #include <asm/semaphore.h> | ||
13 | #include <asm/byteorder.h> | 10 | #include <asm/byteorder.h> |
14 | 11 | #include <asm/semaphore.h> | |
15 | 12 | ||
16 | /* Transaction Label handling */ | 13 | /* Transaction Label handling */ |
17 | struct hpsb_tlabel_pool { | 14 | struct hpsb_tlabel_pool { |
diff --git a/drivers/ieee1394/iso.c b/drivers/ieee1394/iso.c index f26680ebef7c..08bd15d2a7b6 100644 --- a/drivers/ieee1394/iso.c +++ b/drivers/ieee1394/iso.c | |||
@@ -9,8 +9,11 @@ | |||
9 | * directory of the kernel sources for details. | 9 | * directory of the kernel sources for details. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | 12 | #include <linux/pci.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/slab.h> | ||
15 | |||
16 | #include "hosts.h" | ||
14 | #include "iso.h" | 17 | #include "iso.h" |
15 | 18 | ||
16 | void hpsb_iso_stop(struct hpsb_iso *iso) | 19 | void hpsb_iso_stop(struct hpsb_iso *iso) |
diff --git a/drivers/ieee1394/iso.h b/drivers/ieee1394/iso.h index ed639c4c510f..1210a97e8685 100644 --- a/drivers/ieee1394/iso.h +++ b/drivers/ieee1394/iso.h | |||
@@ -12,9 +12,14 @@ | |||
12 | #ifndef IEEE1394_ISO_H | 12 | #ifndef IEEE1394_ISO_H |
13 | #define IEEE1394_ISO_H | 13 | #define IEEE1394_ISO_H |
14 | 14 | ||
15 | #include "hosts.h" | 15 | #include <linux/spinlock_types.h> |
16 | #include <asm/atomic.h> | ||
17 | #include <asm/types.h> | ||
18 | |||
16 | #include "dma.h" | 19 | #include "dma.h" |
17 | 20 | ||
21 | struct hpsb_host; | ||
22 | |||
18 | /* high-level ISO interface */ | 23 | /* high-level ISO interface */ |
19 | 24 | ||
20 | /* | 25 | /* |
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index dfed2ed2ed99..b873e5d57959 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c | |||
@@ -21,13 +21,14 @@ | |||
21 | #include <linux/moduleparam.h> | 21 | #include <linux/moduleparam.h> |
22 | #include <asm/atomic.h> | 22 | #include <asm/atomic.h> |
23 | 23 | ||
24 | #include "ieee1394_types.h" | 24 | #include "csr.h" |
25 | #include "highlevel.h" | ||
26 | #include "hosts.h" | ||
25 | #include "ieee1394.h" | 27 | #include "ieee1394.h" |
26 | #include "ieee1394_core.h" | 28 | #include "ieee1394_core.h" |
27 | #include "hosts.h" | 29 | #include "ieee1394_hotplug.h" |
30 | #include "ieee1394_types.h" | ||
28 | #include "ieee1394_transactions.h" | 31 | #include "ieee1394_transactions.h" |
29 | #include "highlevel.h" | ||
30 | #include "csr.h" | ||
31 | #include "nodemgr.h" | 32 | #include "nodemgr.h" |
32 | 33 | ||
33 | static int ignore_drivers; | 34 | static int ignore_drivers; |
diff --git a/drivers/ieee1394/nodemgr.h b/drivers/ieee1394/nodemgr.h index b35c1b5c8d86..f649c9d321b8 100644 --- a/drivers/ieee1394/nodemgr.h +++ b/drivers/ieee1394/nodemgr.h | |||
@@ -21,9 +21,15 @@ | |||
21 | #define _IEEE1394_NODEMGR_H | 21 | #define _IEEE1394_NODEMGR_H |
22 | 22 | ||
23 | #include <linux/device.h> | 23 | #include <linux/device.h> |
24 | #include "csr1212.h" | 24 | #include <asm/types.h> |
25 | |||
25 | #include "ieee1394_core.h" | 26 | #include "ieee1394_core.h" |
26 | #include "ieee1394_hotplug.h" | 27 | #include "ieee1394_types.h" |
28 | |||
29 | struct csr1212_csr; | ||
30 | struct csr1212_keyval; | ||
31 | struct hpsb_host; | ||
32 | struct ieee1394_device_id; | ||
27 | 33 | ||
28 | /* '1' '3' '9' '4' in ASCII */ | 34 | /* '1' '3' '9' '4' in ASCII */ |
29 | #define IEEE1394_BUSID_MAGIC __constant_cpu_to_be32(0x31333934) | 35 | #define IEEE1394_BUSID_MAGIC __constant_cpu_to_be32(0x31333934) |
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c index 571ea68c0cf2..46c88e8a24f3 100644 --- a/drivers/ieee1394/raw1394.c +++ b/drivers/ieee1394/raw1394.c | |||
@@ -44,14 +44,15 @@ | |||
44 | #include <linux/compat.h> | 44 | #include <linux/compat.h> |
45 | 45 | ||
46 | #include "csr1212.h" | 46 | #include "csr1212.h" |
47 | #include "highlevel.h" | ||
48 | #include "hosts.h" | ||
47 | #include "ieee1394.h" | 49 | #include "ieee1394.h" |
48 | #include "ieee1394_types.h" | ||
49 | #include "ieee1394_core.h" | 50 | #include "ieee1394_core.h" |
50 | #include "nodemgr.h" | 51 | #include "ieee1394_hotplug.h" |
51 | #include "hosts.h" | ||
52 | #include "highlevel.h" | ||
53 | #include "iso.h" | ||
54 | #include "ieee1394_transactions.h" | 52 | #include "ieee1394_transactions.h" |
53 | #include "ieee1394_types.h" | ||
54 | #include "iso.h" | ||
55 | #include "nodemgr.h" | ||
55 | #include "raw1394.h" | 56 | #include "raw1394.h" |
56 | #include "raw1394-private.h" | 57 | #include "raw1394-private.h" |
57 | 58 | ||
diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c index c6e3f02bc6d7..6b5353d81ae2 100644 --- a/drivers/ieee1394/video1394.c +++ b/drivers/ieee1394/video1394.c | |||
@@ -49,16 +49,16 @@ | |||
49 | #include <linux/compat.h> | 49 | #include <linux/compat.h> |
50 | #include <linux/cdev.h> | 50 | #include <linux/cdev.h> |
51 | 51 | ||
52 | #include "ieee1394.h" | 52 | #include "dma.h" |
53 | #include "ieee1394_types.h" | 53 | #include "highlevel.h" |
54 | #include "hosts.h" | 54 | #include "hosts.h" |
55 | #include "ieee1394.h" | ||
55 | #include "ieee1394_core.h" | 56 | #include "ieee1394_core.h" |
56 | #include "highlevel.h" | 57 | #include "ieee1394_hotplug.h" |
57 | #include "video1394.h" | 58 | #include "ieee1394_types.h" |
58 | #include "nodemgr.h" | 59 | #include "nodemgr.h" |
59 | #include "dma.h" | ||
60 | |||
61 | #include "ohci1394.h" | 60 | #include "ohci1394.h" |
61 | #include "video1394.h" | ||
62 | 62 | ||
63 | #define ISO_CHANNELS 64 | 63 | #define ISO_CHANNELS 64 |
64 | 64 | ||