Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Stefan Richter and committed by
Ben Collins
de4394f1 e1d118f1

+97 -59
+2 -4
drivers/ieee1394/csr.h
··· 1 - 2 1 #ifndef _IEEE1394_CSR_H 3 2 #define _IEEE1394_CSR_H 4 3 5 - #ifdef CONFIG_PREEMPT 6 - #include <linux/sched.h> 7 - #endif 4 + #include <linux/spinlock_types.h> 8 5 9 6 #include "csr1212.h" 7 + #include "ieee1394_types.h" 10 8 11 9 #define CSR_REGISTER_BASE 0xfffff0000000ULL 12 10
+6 -3
drivers/ieee1394/dma.c
··· 7 7 * directory of the kernel sources for details. 8 8 */ 9 9 10 - #include <linux/module.h> 11 - #include <linux/vmalloc.h> 12 - #include <linux/slab.h> 13 10 #include <linux/mm.h> 11 + #include <linux/module.h> 12 + #include <linux/pci.h> 13 + #include <linux/slab.h> 14 + #include <linux/vmalloc.h> 15 + #include <asm/scatterlist.h> 16 + 14 17 #include "dma.h" 15 18 16 19 /* dma_prog_region */
+5 -2
drivers/ieee1394/dma.h
··· 10 10 #ifndef IEEE1394_DMA_H 11 11 #define IEEE1394_DMA_H 12 12 13 - #include <linux/pci.h> 14 - #include <asm/scatterlist.h> 13 + #include <asm/types.h> 14 + 15 + struct pci_dev; 16 + struct scatterlist; 17 + struct vm_area_struct; 15 18 16 19 /** 17 20 * struct dma_prog_region - small contiguous DMA buffer
+7 -7
drivers/ieee1394/dv1394.c
··· 110 110 #include <linux/compat.h> 111 111 #include <linux/cdev.h> 112 112 113 - #include "ieee1394.h" 114 - #include "ieee1394_types.h" 115 - #include "nodemgr.h" 116 - #include "hosts.h" 117 - #include "ieee1394_core.h" 118 - #include "highlevel.h" 119 113 #include "dv1394.h" 120 114 #include "dv1394-private.h" 121 - 115 + #include "highlevel.h" 116 + #include "hosts.h" 117 + #include "ieee1394.h" 118 + #include "ieee1394_core.h" 119 + #include "ieee1394_hotplug.h" 120 + #include "ieee1394_types.h" 121 + #include "nodemgr.h" 122 122 #include "ohci1394.h" 123 123 124 124 /* DEBUG LEVELS:
+7 -6
drivers/ieee1394/eth1394.c
··· 67 67 #include <asm/semaphore.h> 68 68 #include <net/arp.h> 69 69 70 + #include "config_roms.h" 70 71 #include "csr1212.h" 71 - #include "ieee1394_types.h" 72 - #include "ieee1394_core.h" 73 - #include "ieee1394_transactions.h" 74 - #include "ieee1394.h" 72 + #include "eth1394.h" 75 73 #include "highlevel.h" 74 + #include "ieee1394.h" 75 + #include "ieee1394_core.h" 76 + #include "ieee1394_hotplug.h" 77 + #include "ieee1394_transactions.h" 78 + #include "ieee1394_types.h" 76 79 #include "iso.h" 77 80 #include "nodemgr.h" 78 - #include "eth1394.h" 79 - #include "config_roms.h" 80 81 81 82 #define ETH1394_PRINT_G(level, fmt, args...) \ 82 83 printk(level "%s: " fmt, driver_name, ## args)
+10
drivers/ieee1394/highlevel.h
··· 1 1 #ifndef IEEE1394_HIGHLEVEL_H 2 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 14 /* internal to ieee1394 core */ 5 15 struct hpsb_address_serve { 6 16 struct list_head host_list; /* per host list */
+6 -4
drivers/ieee1394/hosts.h
··· 2 2 #define _IEEE1394_HOSTS_H 3 3 4 4 #include <linux/device.h> 5 - #include <linux/wait.h> 6 5 #include <linux/list.h> 7 - #include <linux/timer.h> 8 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 15 #include "ieee1394_types.h" 13 16 #include "csr.h" 14 - 15 17 16 18 struct hpsb_packet; 17 19 struct hpsb_iso;
+7 -3
drivers/ieee1394/ieee1394_core.h
··· 1 - 2 1 #ifndef _IEEE1394_CORE_H 3 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 9 #include <asm/atomic.h> 7 10 #include <asm/semaphore.h> 8 - #include "hosts.h" 9 11 12 + #include "hosts.h" 13 + #include "ieee1394_types.h" 10 14 11 15 struct hpsb_packet { 12 16 /* This struct is basically read-only for hosts with the exception of
+1 -2
drivers/ieee1394/ieee1394_hotplug.h
··· 1 1 #ifndef _IEEE1394_HOTPLUG_H 2 2 #define _IEEE1394_HOTPLUG_H 3 3 4 - #include <linux/kernel.h> 5 - #include <linux/types.h> 6 4 #include <linux/mod_devicetable.h> 5 + #include <linux/types.h> 7 6 8 7 /* Unit spec id and sw version entry for some protocols */ 9 8 #define AVC_UNIT_SPEC_ID_ENTRY 0x0000A02D
+6 -1
drivers/ieee1394/ieee1394_transactions.h
··· 1 1 #ifndef _IEEE1394_TRANSACTIONS_H 2 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 11 int hpsb_get_tlabel(struct hpsb_packet *packet); 7 12 void hpsb_free_tlabel(struct hpsb_packet *packet);
+2 -5
drivers/ieee1394/ieee1394_types.h
··· 1 - 2 1 #ifndef _IEEE1394_TYPES_H 3 2 #define _IEEE1394_TYPES_H 4 3 5 4 #include <linux/kernel.h> 6 - #include <linux/types.h> 7 5 #include <linux/list.h> 8 - #include <linux/init.h> 9 6 #include <linux/spinlock.h> 10 7 #include <linux/string.h> 8 + #include <linux/types.h> 11 9 12 - #include <asm/semaphore.h> 13 10 #include <asm/byteorder.h> 14 - 11 + #include <asm/semaphore.h> 15 12 16 13 /* Transaction Label handling */ 17 14 struct hpsb_tlabel_pool {
+4 -1
drivers/ieee1394/iso.c
··· 9 9 * directory of the kernel sources for details. 10 10 */ 11 11 12 - #include <linux/slab.h> 12 + #include <linux/pci.h> 13 13 #include <linux/sched.h> 14 + #include <linux/slab.h> 15 + 16 + #include "hosts.h" 14 17 #include "iso.h" 15 18 16 19 void hpsb_iso_stop(struct hpsb_iso *iso)
+6 -1
drivers/ieee1394/iso.h
··· 12 12 #ifndef IEEE1394_ISO_H 13 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 19 #include "dma.h" 20 + 21 + struct hpsb_host; 17 22 18 23 /* high-level ISO interface */ 19 24
+5 -4
drivers/ieee1394/nodemgr.c
··· 21 21 #include <linux/moduleparam.h> 22 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 27 #include "ieee1394.h" 26 28 #include "ieee1394_core.h" 27 - #include "hosts.h" 29 + #include "ieee1394_hotplug.h" 30 + #include "ieee1394_types.h" 28 31 #include "ieee1394_transactions.h" 29 - #include "highlevel.h" 30 - #include "csr.h" 31 32 #include "nodemgr.h" 32 33 33 34 static int ignore_drivers;
+8 -2
drivers/ieee1394/nodemgr.h
··· 21 21 #define _IEEE1394_NODEMGR_H 22 22 23 23 #include <linux/device.h> 24 - #include "csr1212.h" 24 + #include <asm/types.h> 25 + 25 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 34 /* '1' '3' '9' '4' in ASCII */ 29 35 #define IEEE1394_BUSID_MAGIC __constant_cpu_to_be32(0x31333934)
+7 -6
drivers/ieee1394/raw1394.c
··· 44 44 #include <linux/compat.h> 45 45 46 46 #include "csr1212.h" 47 - #include "ieee1394.h" 48 - #include "ieee1394_types.h" 49 - #include "ieee1394_core.h" 50 - #include "nodemgr.h" 51 - #include "hosts.h" 52 47 #include "highlevel.h" 53 - #include "iso.h" 48 + #include "hosts.h" 49 + #include "ieee1394.h" 50 + #include "ieee1394_core.h" 51 + #include "ieee1394_hotplug.h" 54 52 #include "ieee1394_transactions.h" 53 + #include "ieee1394_types.h" 54 + #include "iso.h" 55 + #include "nodemgr.h" 55 56 #include "raw1394.h" 56 57 #include "raw1394-private.h" 57 58
+8 -8
drivers/ieee1394/video1394.c
··· 49 49 #include <linux/compat.h> 50 50 #include <linux/cdev.h> 51 51 52 - #include "ieee1394.h" 53 - #include "ieee1394_types.h" 54 - #include "hosts.h" 55 - #include "ieee1394_core.h" 56 - #include "highlevel.h" 57 - #include "video1394.h" 58 - #include "nodemgr.h" 59 52 #include "dma.h" 60 - 53 + #include "highlevel.h" 54 + #include "hosts.h" 55 + #include "ieee1394.h" 56 + #include "ieee1394_core.h" 57 + #include "ieee1394_hotplug.h" 58 + #include "ieee1394_types.h" 59 + #include "nodemgr.h" 61 60 #include "ohci1394.h" 61 + #include "video1394.h" 62 62 63 63 #define ISO_CHANNELS 64 64 64