From de4394f13cc843fae2a3ba2df752ee20e6e779a8 Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Mon, 3 Jul 2006 12:02:29 -0400 Subject: [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 Signed-off-by: Ben Collins --- drivers/ieee1394/csr.h | 6 ++---- drivers/ieee1394/dma.c | 7 +++++-- drivers/ieee1394/dma.h | 7 +++++-- drivers/ieee1394/dv1394.c | 12 ++++++------ drivers/ieee1394/eth1394.c | 11 ++++++----- drivers/ieee1394/highlevel.h | 10 ++++++++++ drivers/ieee1394/hosts.h | 10 ++++++---- drivers/ieee1394/ieee1394_core.h | 10 +++++++--- drivers/ieee1394/ieee1394_hotplug.h | 3 +-- drivers/ieee1394/ieee1394_transactions.h | 7 ++++++- drivers/ieee1394/ieee1394_types.h | 7 ++----- drivers/ieee1394/iso.c | 5 ++++- drivers/ieee1394/iso.h | 7 ++++++- drivers/ieee1394/nodemgr.c | 9 +++++---- drivers/ieee1394/nodemgr.h | 10 ++++++++-- drivers/ieee1394/raw1394.c | 11 ++++++----- drivers/ieee1394/video1394.c | 12 ++++++------ 17 files changed, 91 insertions(+), 53 deletions(-) (limited to 'drivers/ieee1394') diff --git a/drivers/ieee1394/csr.h b/drivers/ieee1394/csr.h index 0655596..2bc080f 100644 --- a/drivers/ieee1394/csr.h +++ b/drivers/ieee1394/csr.h @@ -1,12 +1,10 @@ - #ifndef _IEEE1394_CSR_H #define _IEEE1394_CSR_H -#ifdef CONFIG_PREEMPT -#include -#endif +#include #include "csr1212.h" +#include "ieee1394_types.h" #define CSR_REGISTER_BASE 0xfffff0000000ULL diff --git a/drivers/ieee1394/dma.c b/drivers/ieee1394/dma.c index ca5167d..c68f328 100644 --- a/drivers/ieee1394/dma.c +++ b/drivers/ieee1394/dma.c @@ -7,10 +7,13 @@ * directory of the kernel sources for details. */ +#include #include -#include +#include #include -#include +#include +#include + #include "dma.h" /* dma_prog_region */ diff --git a/drivers/ieee1394/dma.h b/drivers/ieee1394/dma.h index b0f0885..a1682ab 100644 --- a/drivers/ieee1394/dma.h +++ b/drivers/ieee1394/dma.h @@ -10,8 +10,11 @@ #ifndef IEEE1394_DMA_H #define IEEE1394_DMA_H -#include -#include +#include + +struct pci_dev; +struct scatterlist; +struct vm_area_struct; /** * struct dma_prog_region - small contiguous DMA buffer diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c index 87532dd..bdc50f2 100644 --- a/drivers/ieee1394/dv1394.c +++ b/drivers/ieee1394/dv1394.c @@ -110,15 +110,15 @@ #include #include +#include "dv1394.h" +#include "dv1394-private.h" +#include "highlevel.h" +#include "hosts.h" #include "ieee1394.h" +#include "ieee1394_core.h" +#include "ieee1394_hotplug.h" #include "ieee1394_types.h" #include "nodemgr.h" -#include "hosts.h" -#include "ieee1394_core.h" -#include "highlevel.h" -#include "dv1394.h" -#include "dv1394-private.h" - #include "ohci1394.h" /* DEBUG LEVELS: diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index 2d5b57b..09826be 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c @@ -67,16 +67,17 @@ #include #include +#include "config_roms.h" #include "csr1212.h" -#include "ieee1394_types.h" +#include "eth1394.h" +#include "highlevel.h" +#include "ieee1394.h" #include "ieee1394_core.h" +#include "ieee1394_hotplug.h" #include "ieee1394_transactions.h" -#include "ieee1394.h" -#include "highlevel.h" +#include "ieee1394_types.h" #include "iso.h" #include "nodemgr.h" -#include "eth1394.h" -#include "config_roms.h" #define ETH1394_PRINT_G(level, fmt, args...) \ printk(level "%s: " fmt, driver_name, ## args) diff --git a/drivers/ieee1394/highlevel.h b/drivers/ieee1394/highlevel.h index 134bb6c..50f2dd2 100644 --- a/drivers/ieee1394/highlevel.h +++ b/drivers/ieee1394/highlevel.h @@ -1,6 +1,16 @@ #ifndef IEEE1394_HIGHLEVEL_H #define IEEE1394_HIGHLEVEL_H +#include +#include +#include + +struct module; + +#include "ieee1394_types.h" + +struct hpsb_host; + /* internal to ieee1394 core */ struct hpsb_address_serve { struct list_head host_list; /* per host list */ diff --git a/drivers/ieee1394/hosts.h b/drivers/ieee1394/hosts.h index 857d7d8..b911e2a 100644 --- a/drivers/ieee1394/hosts.h +++ b/drivers/ieee1394/hosts.h @@ -2,17 +2,19 @@ #define _IEEE1394_HOSTS_H #include -#include #include -#include #include +#include +#include +#include +#include -#include +struct pci_dev; +struct module; #include "ieee1394_types.h" #include "csr.h" - struct hpsb_packet; struct hpsb_iso; diff --git a/drivers/ieee1394/ieee1394_core.h b/drivers/ieee1394/ieee1394_core.h index 31d9efc..1ce172b 100644 --- a/drivers/ieee1394/ieee1394_core.h +++ b/drivers/ieee1394/ieee1394_core.h @@ -1,12 +1,16 @@ - #ifndef _IEEE1394_CORE_H #define _IEEE1394_CORE_H -#include +#include +#include +#include +#include +#include #include #include -#include "hosts.h" +#include "hosts.h" +#include "ieee1394_types.h" struct hpsb_packet { /* 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 5be70d3..183d931 100644 --- a/drivers/ieee1394/ieee1394_hotplug.h +++ b/drivers/ieee1394/ieee1394_hotplug.h @@ -1,9 +1,8 @@ #ifndef _IEEE1394_HOTPLUG_H #define _IEEE1394_HOTPLUG_H -#include -#include #include +#include /* Unit spec id and sw version entry for some protocols */ #define AVC_UNIT_SPEC_ID_ENTRY 0x0000A02D diff --git a/drivers/ieee1394/ieee1394_transactions.h b/drivers/ieee1394/ieee1394_transactions.h index 5f809f5..290d370 100644 --- a/drivers/ieee1394/ieee1394_transactions.h +++ b/drivers/ieee1394/ieee1394_transactions.h @@ -1,7 +1,12 @@ #ifndef _IEEE1394_TRANSACTIONS_H #define _IEEE1394_TRANSACTIONS_H -#include "ieee1394_core.h" +#include + +#include "ieee1394_types.h" + +struct hpsb_packet; +struct hpsb_host; int hpsb_get_tlabel(struct hpsb_packet *packet); void hpsb_free_tlabel(struct hpsb_packet *packet); diff --git a/drivers/ieee1394/ieee1394_types.h b/drivers/ieee1394/ieee1394_types.h index ed6fdd8..6c24691 100644 --- a/drivers/ieee1394/ieee1394_types.h +++ b/drivers/ieee1394/ieee1394_types.h @@ -1,17 +1,14 @@ - #ifndef _IEEE1394_TYPES_H #define _IEEE1394_TYPES_H #include -#include #include -#include #include #include +#include -#include #include - +#include /* Transaction Label handling */ struct hpsb_tlabel_pool { diff --git a/drivers/ieee1394/iso.c b/drivers/ieee1394/iso.c index f26680e..08bd15d 100644 --- a/drivers/ieee1394/iso.c +++ b/drivers/ieee1394/iso.c @@ -9,8 +9,11 @@ * directory of the kernel sources for details. */ -#include +#include #include +#include + +#include "hosts.h" #include "iso.h" void hpsb_iso_stop(struct hpsb_iso *iso) diff --git a/drivers/ieee1394/iso.h b/drivers/ieee1394/iso.h index ed639c4..1210a97 100644 --- a/drivers/ieee1394/iso.h +++ b/drivers/ieee1394/iso.h @@ -12,9 +12,14 @@ #ifndef IEEE1394_ISO_H #define IEEE1394_ISO_H -#include "hosts.h" +#include +#include +#include + #include "dma.h" +struct hpsb_host; + /* high-level ISO interface */ /* diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index dfed2ed..b873e5d 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c @@ -21,13 +21,14 @@ #include #include -#include "ieee1394_types.h" +#include "csr.h" +#include "highlevel.h" +#include "hosts.h" #include "ieee1394.h" #include "ieee1394_core.h" -#include "hosts.h" +#include "ieee1394_hotplug.h" +#include "ieee1394_types.h" #include "ieee1394_transactions.h" -#include "highlevel.h" -#include "csr.h" #include "nodemgr.h" static int ignore_drivers; diff --git a/drivers/ieee1394/nodemgr.h b/drivers/ieee1394/nodemgr.h index b35c1b5..f649c9d 100644 --- a/drivers/ieee1394/nodemgr.h +++ b/drivers/ieee1394/nodemgr.h @@ -21,9 +21,15 @@ #define _IEEE1394_NODEMGR_H #include -#include "csr1212.h" +#include + #include "ieee1394_core.h" -#include "ieee1394_hotplug.h" +#include "ieee1394_types.h" + +struct csr1212_csr; +struct csr1212_keyval; +struct hpsb_host; +struct ieee1394_device_id; /* '1' '3' '9' '4' in ASCII */ #define IEEE1394_BUSID_MAGIC __constant_cpu_to_be32(0x31333934) diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c index 571ea68..46c88e8 100644 --- a/drivers/ieee1394/raw1394.c +++ b/drivers/ieee1394/raw1394.c @@ -44,14 +44,15 @@ #include #include "csr1212.h" +#include "highlevel.h" +#include "hosts.h" #include "ieee1394.h" -#include "ieee1394_types.h" #include "ieee1394_core.h" -#include "nodemgr.h" -#include "hosts.h" -#include "highlevel.h" -#include "iso.h" +#include "ieee1394_hotplug.h" #include "ieee1394_transactions.h" +#include "ieee1394_types.h" +#include "iso.h" +#include "nodemgr.h" #include "raw1394.h" #include "raw1394-private.h" diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c index c6e3f02..6b5353d 100644 --- a/drivers/ieee1394/video1394.c +++ b/drivers/ieee1394/video1394.c @@ -49,16 +49,16 @@ #include #include -#include "ieee1394.h" -#include "ieee1394_types.h" +#include "dma.h" +#include "highlevel.h" #include "hosts.h" +#include "ieee1394.h" #include "ieee1394_core.h" -#include "highlevel.h" -#include "video1394.h" +#include "ieee1394_hotplug.h" +#include "ieee1394_types.h" #include "nodemgr.h" -#include "dma.h" - #include "ohci1394.h" +#include "video1394.h" #define ISO_CHANNELS 64 -- cgit v1.1