diff options
Diffstat (limited to 'drivers')
1128 files changed, 3771 insertions, 4873 deletions
diff --git a/drivers/acorn/block/Kconfig b/drivers/acorn/block/Kconfig index 073add35e66f..a0ff25ea439f 100644 --- a/drivers/acorn/block/Kconfig +++ b/drivers/acorn/block/Kconfig | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | menu "Acorn-specific block devices" | 5 | menu "Acorn-specific block devices" |
6 | depends on ARCH_ACORN | 6 | depends on ARCH_ARC || ARCH_A5K |
7 | 7 | ||
8 | config BLK_DEV_FD1772 | 8 | config BLK_DEV_FD1772 |
9 | tristate "Old Archimedes floppy (1772) support" | 9 | tristate "Old Archimedes floppy (1772) support" |
diff --git a/drivers/acorn/block/mfmhd.c b/drivers/acorn/block/mfmhd.c index ce074f6f3369..d9c9a35961b3 100644 --- a/drivers/acorn/block/mfmhd.c +++ b/drivers/acorn/block/mfmhd.c | |||
@@ -99,7 +99,6 @@ | |||
99 | */ | 99 | */ |
100 | 100 | ||
101 | #include <linux/module.h> | 101 | #include <linux/module.h> |
102 | #include <linux/config.h> | ||
103 | #include <linux/sched.h> | 102 | #include <linux/sched.h> |
104 | #include <linux/fs.h> | 103 | #include <linux/fs.h> |
105 | #include <linux/interrupt.h> | 104 | #include <linux/interrupt.h> |
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 2c626e81a289..84a68965c11a 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c | |||
@@ -248,7 +248,7 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) | |||
248 | num_enabled++; | 248 | num_enabled++; |
249 | } | 249 | } |
250 | if (!num_enabled) { | 250 | if (!num_enabled) { |
251 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "\nadd_memory failed\n")); | 251 | printk(KERN_ERR PREFIX "add_memory failed\n"); |
252 | mem_device->state = MEMORY_INVALID_STATE; | 252 | mem_device->state = MEMORY_INVALID_STATE; |
253 | return -EINVAL; | 253 | return -EINVAL; |
254 | } | 254 | } |
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 13d6d5bdea26..4d622981f61a 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/config.h> | ||
27 | #include <linux/init.h> | 26 | #include <linux/init.h> |
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
29 | #include <linux/types.h> | 28 | #include <linux/types.h> |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index c68b1bb138c3..d4bd314d60ba 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
31 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index fb96e3bf969b..feda0341f5a7 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 24 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | 27 | ||
29 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index a05b3dfb5cc5..5fcb50c7b778 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -1433,7 +1433,7 @@ static int acpi_device_resume(struct device * dev) | |||
1433 | } | 1433 | } |
1434 | 1434 | ||
1435 | 1435 | ||
1436 | struct bus_type acpi_bus_type = { | 1436 | static struct bus_type acpi_bus_type = { |
1437 | .name = "acpi", | 1437 | .name = "acpi", |
1438 | .suspend = acpi_device_suspend, | 1438 | .suspend = acpi_device_suspend, |
1439 | .resume = acpi_device_resume, | 1439 | .resume = acpi_device_resume, |
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index ed5e8816d83d..bfb3bfcf9e91 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/init.h> | 26 | #include <linux/init.h> |
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
29 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
diff --git a/drivers/atm/adummy.c b/drivers/atm/adummy.c index d1387cfe2d30..6cc93de0b71d 100644 --- a/drivers/atm/adummy.c +++ b/drivers/atm/adummy.c | |||
@@ -2,7 +2,6 @@ | |||
2 | * adummy.c: a dummy ATM driver | 2 | * adummy.c: a dummy ATM driver |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/config.h> | ||
6 | #include <linux/module.h> | 5 | #include <linux/module.h> |
7 | #include <linux/version.h> | 6 | #include <linux/version.h> |
8 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
diff --git a/drivers/atm/ambassador.h b/drivers/atm/ambassador.h index 84a93063cfe1..8296420ceaef 100644 --- a/drivers/atm/ambassador.h +++ b/drivers/atm/ambassador.h | |||
@@ -23,7 +23,6 @@ | |||
23 | #ifndef AMBASSADOR_H | 23 | #ifndef AMBASSADOR_H |
24 | #define AMBASSADOR_H | 24 | #define AMBASSADOR_H |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | 26 | ||
28 | #ifdef CONFIG_ATM_AMBASSADOR_DEBUG | 27 | #ifdef CONFIG_ATM_AMBASSADOR_DEBUG |
29 | #define DEBUG_AMBASSADOR | 28 | #define DEBUG_AMBASSADOR |
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c index c13c4d736ef5..976ced1f019e 100644 --- a/drivers/atm/eni.c +++ b/drivers/atm/eni.c | |||
@@ -4,7 +4,6 @@ | |||
4 | 4 | ||
5 | 5 | ||
6 | #include <linux/module.h> | 6 | #include <linux/module.h> |
7 | #include <linux/config.h> | ||
8 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
9 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
10 | #include <linux/pci.h> | 9 | #include <linux/pci.h> |
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 92923bf27233..9be9a4055199 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
@@ -25,7 +25,6 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
30 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
31 | #include <linux/init.h> | 30 | #include <linux/init.h> |
diff --git a/drivers/atm/fore200e.h b/drivers/atm/fore200e.h index 2558eb853235..f9abfdac33e4 100644 --- a/drivers/atm/fore200e.h +++ b/drivers/atm/fore200e.h | |||
@@ -3,7 +3,6 @@ | |||
3 | #define _FORE200E_H | 3 | #define _FORE200E_H |
4 | 4 | ||
5 | #ifdef __KERNEL__ | 5 | #ifdef __KERNEL__ |
6 | #include <linux/config.h> | ||
7 | 6 | ||
8 | /* rx buffer sizes */ | 7 | /* rx buffer sizes */ |
9 | 8 | ||
diff --git a/drivers/atm/he.c b/drivers/atm/he.c index fde9334059af..a5cbd3d6e50f 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c | |||
@@ -55,7 +55,6 @@ | |||
55 | 55 | ||
56 | */ | 56 | */ |
57 | 57 | ||
58 | #include <linux/config.h> | ||
59 | #include <linux/module.h> | 58 | #include <linux/module.h> |
60 | #include <linux/kernel.h> | 59 | #include <linux/kernel.h> |
61 | #include <linux/skbuff.h> | 60 | #include <linux/skbuff.h> |
@@ -1018,7 +1017,7 @@ he_init_irq(struct he_dev *he_dev) | |||
1018 | return 0; | 1017 | return 0; |
1019 | } | 1018 | } |
1020 | 1019 | ||
1021 | static int __init | 1020 | static int __devinit |
1022 | he_start(struct atm_dev *dev) | 1021 | he_start(struct atm_dev *dev) |
1023 | { | 1022 | { |
1024 | struct he_dev *he_dev; | 1023 | struct he_dev *he_dev; |
diff --git a/drivers/atm/horizon.h b/drivers/atm/horizon.h index e2cc7020fa3b..4461229f56a5 100644 --- a/drivers/atm/horizon.h +++ b/drivers/atm/horizon.h | |||
@@ -30,7 +30,6 @@ | |||
30 | #ifndef DRIVER_ATM_HORIZON_H | 30 | #ifndef DRIVER_ATM_HORIZON_H |
31 | #define DRIVER_ATM_HORIZON_H | 31 | #define DRIVER_ATM_HORIZON_H |
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | 33 | ||
35 | #ifdef CONFIG_ATM_HORIZON_DEBUG | 34 | #ifdef CONFIG_ATM_HORIZON_DEBUG |
36 | #define DEBUG_HORIZON | 35 | #define DEBUG_HORIZON |
diff --git a/drivers/atm/idt77105.c b/drivers/atm/idt77105.c index 0aabfc2a59d9..325325afabec 100644 --- a/drivers/atm/idt77105.c +++ b/drivers/atm/idt77105.c | |||
@@ -358,7 +358,7 @@ static const struct atmphy_ops idt77105_ops = { | |||
358 | }; | 358 | }; |
359 | 359 | ||
360 | 360 | ||
361 | int idt77105_init(struct atm_dev *dev) | 361 | int __devinit idt77105_init(struct atm_dev *dev) |
362 | { | 362 | { |
363 | dev->phy = &idt77105_ops; | 363 | dev->phy = &idt77105_ops; |
364 | return 0; | 364 | return 0; |
diff --git a/drivers/atm/idt77105.h b/drivers/atm/idt77105.h index 8ba8218aaefe..3fd2bc899761 100644 --- a/drivers/atm/idt77105.h +++ b/drivers/atm/idt77105.h | |||
@@ -76,7 +76,7 @@ | |||
76 | #define IDT77105_CTRSEL_RHEC 0x01 /* W, Rx HEC Error Counter */ | 76 | #define IDT77105_CTRSEL_RHEC 0x01 /* W, Rx HEC Error Counter */ |
77 | 77 | ||
78 | #ifdef __KERNEL__ | 78 | #ifdef __KERNEL__ |
79 | int idt77105_init(struct atm_dev *dev) __init; | 79 | int idt77105_init(struct atm_dev *dev); |
80 | #endif | 80 | #endif |
81 | 81 | ||
82 | /* | 82 | /* |
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index b4a76cade646..8fdb30116f99 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c | |||
@@ -34,7 +34,6 @@ static char const rcsid[] = | |||
34 | 34 | ||
35 | 35 | ||
36 | #include <linux/module.h> | 36 | #include <linux/module.h> |
37 | #include <linux/config.h> | ||
38 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
39 | #include <linux/skbuff.h> | 38 | #include <linux/skbuff.h> |
40 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index 2e2e50e1167a..333a7bc609d2 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c | |||
@@ -2284,7 +2284,7 @@ static int reset_sar(struct atm_dev *dev) | |||
2284 | } | 2284 | } |
2285 | 2285 | ||
2286 | 2286 | ||
2287 | static int __init ia_init(struct atm_dev *dev) | 2287 | static int __devinit ia_init(struct atm_dev *dev) |
2288 | { | 2288 | { |
2289 | IADEV *iadev; | 2289 | IADEV *iadev; |
2290 | unsigned long real_base; | 2290 | unsigned long real_base; |
@@ -2480,7 +2480,7 @@ static void ia_free_rx(IADEV *iadev) | |||
2480 | iadev->rx_dle_dma); | 2480 | iadev->rx_dle_dma); |
2481 | } | 2481 | } |
2482 | 2482 | ||
2483 | static int __init ia_start(struct atm_dev *dev) | 2483 | static int __devinit ia_start(struct atm_dev *dev) |
2484 | { | 2484 | { |
2485 | IADEV *iadev; | 2485 | IADEV *iadev; |
2486 | int error; | 2486 | int error; |
diff --git a/drivers/atm/iphase.h b/drivers/atm/iphase.h index b8d0bd4d6c30..133eefcc0475 100644 --- a/drivers/atm/iphase.h +++ b/drivers/atm/iphase.h | |||
@@ -43,7 +43,6 @@ | |||
43 | #ifndef IPHASE_H | 43 | #ifndef IPHASE_H |
44 | #define IPHASE_H | 44 | #define IPHASE_H |
45 | 45 | ||
46 | #include <linux/config.h> | ||
47 | 46 | ||
48 | /************************ IADBG DEFINE *********************************/ | 47 | /************************ IADBG DEFINE *********************************/ |
49 | /* IADebugFlag Bit Map */ | 48 | /* IADebugFlag Bit Map */ |
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index 074abc81ec3d..b78612d3fa46 100644 --- a/drivers/atm/nicstar.c +++ b/drivers/atm/nicstar.c | |||
@@ -36,7 +36,6 @@ | |||
36 | /* Header files ***************************************************************/ | 36 | /* Header files ***************************************************************/ |
37 | 37 | ||
38 | #include <linux/module.h> | 38 | #include <linux/module.h> |
39 | #include <linux/config.h> | ||
40 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
41 | #include <linux/skbuff.h> | 40 | #include <linux/skbuff.h> |
42 | #include <linux/atmdev.h> | 41 | #include <linux/atmdev.h> |
diff --git a/drivers/atm/suni.c b/drivers/atm/suni.c index b1d063cc4fbe..f04f39c00833 100644 --- a/drivers/atm/suni.c +++ b/drivers/atm/suni.c | |||
@@ -289,7 +289,7 @@ static const struct atmphy_ops suni_ops = { | |||
289 | }; | 289 | }; |
290 | 290 | ||
291 | 291 | ||
292 | int suni_init(struct atm_dev *dev) | 292 | int __devinit suni_init(struct atm_dev *dev) |
293 | { | 293 | { |
294 | unsigned char mri; | 294 | unsigned char mri; |
295 | 295 | ||
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c index f484747f255e..1699c934bad0 100644 --- a/drivers/atm/zatm.c +++ b/drivers/atm/zatm.c | |||
@@ -3,7 +3,6 @@ | |||
3 | /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ | 3 | /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ |
4 | 4 | ||
5 | 5 | ||
6 | #include <linux/config.h> | ||
7 | #include <linux/module.h> | 6 | #include <linux/module.h> |
8 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
9 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
diff --git a/drivers/atm/zatm.h b/drivers/atm/zatm.h index 416fe0fda60c..ae9165ce15a0 100644 --- a/drivers/atm/zatm.h +++ b/drivers/atm/zatm.h | |||
@@ -6,7 +6,6 @@ | |||
6 | #ifndef DRIVER_ATM_ZATM_H | 6 | #ifndef DRIVER_ATM_ZATM_H |
7 | #define DRIVER_ATM_ZATM_H | 7 | #define DRIVER_ATM_ZATM_H |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/skbuff.h> | 9 | #include <linux/skbuff.h> |
11 | #include <linux/atm.h> | 10 | #include <linux/atm.h> |
12 | #include <linux/atmdev.h> | 11 | #include <linux/atmdev.h> |
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 050d86d0b872..83fa8b291a59 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/device.h> | 11 | #include <linux/device.h> |
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
diff --git a/drivers/base/class.c b/drivers/base/class.c index 9aa127460262..de8908320f23 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/device.h> | 13 | #include <linux/device.h> |
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
diff --git a/drivers/base/core.c b/drivers/base/core.c index 27c2176895de..b21f864c9ce8 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/device.h> | 11 | #include <linux/device.h> |
13 | #include <linux/err.h> | 12 | #include <linux/err.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
diff --git a/drivers/base/driver.c b/drivers/base/driver.c index b400314e1c62..562600dd540a 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/device.h> | 11 | #include <linux/device.h> |
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
diff --git a/drivers/base/node.c b/drivers/base/node.c index eae2bdc183bb..d7de1753e094 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -40,24 +40,13 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) | |||
40 | int n; | 40 | int n; |
41 | int nid = dev->id; | 41 | int nid = dev->id; |
42 | struct sysinfo i; | 42 | struct sysinfo i; |
43 | struct page_state ps; | ||
44 | unsigned long inactive; | 43 | unsigned long inactive; |
45 | unsigned long active; | 44 | unsigned long active; |
46 | unsigned long free; | 45 | unsigned long free; |
47 | 46 | ||
48 | si_meminfo_node(&i, nid); | 47 | si_meminfo_node(&i, nid); |
49 | get_page_state_node(&ps, nid); | ||
50 | __get_zone_counts(&active, &inactive, &free, NODE_DATA(nid)); | 48 | __get_zone_counts(&active, &inactive, &free, NODE_DATA(nid)); |
51 | 49 | ||
52 | /* Check for negative values in these approximate counters */ | ||
53 | if ((long)ps.nr_dirty < 0) | ||
54 | ps.nr_dirty = 0; | ||
55 | if ((long)ps.nr_writeback < 0) | ||
56 | ps.nr_writeback = 0; | ||
57 | if ((long)ps.nr_mapped < 0) | ||
58 | ps.nr_mapped = 0; | ||
59 | if ((long)ps.nr_slab < 0) | ||
60 | ps.nr_slab = 0; | ||
61 | 50 | ||
62 | n = sprintf(buf, "\n" | 51 | n = sprintf(buf, "\n" |
63 | "Node %d MemTotal: %8lu kB\n" | 52 | "Node %d MemTotal: %8lu kB\n" |
@@ -71,7 +60,12 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) | |||
71 | "Node %d LowFree: %8lu kB\n" | 60 | "Node %d LowFree: %8lu kB\n" |
72 | "Node %d Dirty: %8lu kB\n" | 61 | "Node %d Dirty: %8lu kB\n" |
73 | "Node %d Writeback: %8lu kB\n" | 62 | "Node %d Writeback: %8lu kB\n" |
63 | "Node %d FilePages: %8lu kB\n" | ||
74 | "Node %d Mapped: %8lu kB\n" | 64 | "Node %d Mapped: %8lu kB\n" |
65 | "Node %d AnonPages: %8lu kB\n" | ||
66 | "Node %d PageTables: %8lu kB\n" | ||
67 | "Node %d NFS Unstable: %8lu kB\n" | ||
68 | "Node %d Bounce: %8lu kB\n" | ||
75 | "Node %d Slab: %8lu kB\n", | 69 | "Node %d Slab: %8lu kB\n", |
76 | nid, K(i.totalram), | 70 | nid, K(i.totalram), |
77 | nid, K(i.freeram), | 71 | nid, K(i.freeram), |
@@ -82,10 +76,15 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) | |||
82 | nid, K(i.freehigh), | 76 | nid, K(i.freehigh), |
83 | nid, K(i.totalram - i.totalhigh), | 77 | nid, K(i.totalram - i.totalhigh), |
84 | nid, K(i.freeram - i.freehigh), | 78 | nid, K(i.freeram - i.freehigh), |
85 | nid, K(ps.nr_dirty), | 79 | nid, K(node_page_state(nid, NR_FILE_DIRTY)), |
86 | nid, K(ps.nr_writeback), | 80 | nid, K(node_page_state(nid, NR_WRITEBACK)), |
87 | nid, K(ps.nr_mapped), | 81 | nid, K(node_page_state(nid, NR_FILE_PAGES)), |
88 | nid, K(ps.nr_slab)); | 82 | nid, K(node_page_state(nid, NR_FILE_MAPPED)), |
83 | nid, K(node_page_state(nid, NR_ANON_PAGES)), | ||
84 | nid, K(node_page_state(nid, NR_PAGETABLE)), | ||
85 | nid, K(node_page_state(nid, NR_UNSTABLE_NFS)), | ||
86 | nid, K(node_page_state(nid, NR_BOUNCE)), | ||
87 | nid, K(node_page_state(nid, NR_SLAB))); | ||
89 | n += hugetlb_report_node_meminfo(nid, buf + n); | 88 | n += hugetlb_report_node_meminfo(nid, buf + n); |
90 | return n; | 89 | return n; |
91 | } | 90 | } |
@@ -95,28 +94,6 @@ static SYSDEV_ATTR(meminfo, S_IRUGO, node_read_meminfo, NULL); | |||
95 | 94 | ||
96 | static ssize_t node_read_numastat(struct sys_device * dev, char * buf) | 95 | static ssize_t node_read_numastat(struct sys_device * dev, char * buf) |
97 | { | 96 | { |
98 | unsigned long numa_hit, numa_miss, interleave_hit, numa_foreign; | ||
99 | unsigned long local_node, other_node; | ||
100 | int i, cpu; | ||
101 | pg_data_t *pg = NODE_DATA(dev->id); | ||
102 | numa_hit = 0; | ||
103 | numa_miss = 0; | ||
104 | interleave_hit = 0; | ||
105 | numa_foreign = 0; | ||
106 | local_node = 0; | ||
107 | other_node = 0; | ||
108 | for (i = 0; i < MAX_NR_ZONES; i++) { | ||
109 | struct zone *z = &pg->node_zones[i]; | ||
110 | for_each_online_cpu(cpu) { | ||
111 | struct per_cpu_pageset *ps = zone_pcp(z,cpu); | ||
112 | numa_hit += ps->numa_hit; | ||
113 | numa_miss += ps->numa_miss; | ||
114 | numa_foreign += ps->numa_foreign; | ||
115 | interleave_hit += ps->interleave_hit; | ||
116 | local_node += ps->local_node; | ||
117 | other_node += ps->other_node; | ||
118 | } | ||
119 | } | ||
120 | return sprintf(buf, | 97 | return sprintf(buf, |
121 | "numa_hit %lu\n" | 98 | "numa_hit %lu\n" |
122 | "numa_miss %lu\n" | 99 | "numa_miss %lu\n" |
@@ -124,12 +101,12 @@ static ssize_t node_read_numastat(struct sys_device * dev, char * buf) | |||
124 | "interleave_hit %lu\n" | 101 | "interleave_hit %lu\n" |
125 | "local_node %lu\n" | 102 | "local_node %lu\n" |
126 | "other_node %lu\n", | 103 | "other_node %lu\n", |
127 | numa_hit, | 104 | node_page_state(dev->id, NUMA_HIT), |
128 | numa_miss, | 105 | node_page_state(dev->id, NUMA_MISS), |
129 | numa_foreign, | 106 | node_page_state(dev->id, NUMA_FOREIGN), |
130 | interleave_hit, | 107 | node_page_state(dev->id, NUMA_INTERLEAVE_HIT), |
131 | local_node, | 108 | node_page_state(dev->id, NUMA_LOCAL), |
132 | other_node); | 109 | node_page_state(dev->id, NUMA_OTHER)); |
133 | } | 110 | } |
134 | static SYSDEV_ATTR(numastat, S_IRUGO, node_read_numastat, NULL); | 111 | static SYSDEV_ATTR(numastat, S_IRUGO, node_read_numastat, NULL); |
135 | 112 | ||
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 0d2e101e4f15..fdfa3d0cf6af 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * ancestral dependencies that the subsystem list maintains. | 19 | * ancestral dependencies that the subsystem list maintains. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/device.h> | 22 | #include <linux/device.h> |
24 | #include "power.h" | 23 | #include "power.h" |
25 | 24 | ||
diff --git a/drivers/base/power/shutdown.c b/drivers/base/power/shutdown.c index 8826a5b6673e..3483ae4d57f5 100644 --- a/drivers/base/power/shutdown.c +++ b/drivers/base/power/shutdown.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/device.h> | 11 | #include <linux/device.h> |
13 | #include <asm/semaphore.h> | 12 | #include <asm/semaphore.h> |
14 | 13 | ||
diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 6858178b3aff..04e5db445c74 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * add themselves as children of the system bus. | 12 | * add themselves as children of the system bus. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/sysdev.h> | 15 | #include <linux/sysdev.h> |
17 | #include <linux/err.h> | 16 | #include <linux/err.h> |
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
diff --git a/drivers/block/acsi.c b/drivers/block/acsi.c index a317e4303952..0b80fbb8dbfd 100644 --- a/drivers/block/acsi.c +++ b/drivers/block/acsi.c | |||
@@ -43,7 +43,6 @@ | |||
43 | * | 43 | * |
44 | */ | 44 | */ |
45 | 45 | ||
46 | #include <linux/config.h> | ||
47 | #include <linux/module.h> | 46 | #include <linux/module.h> |
48 | #include <linux/errno.h> | 47 | #include <linux/errno.h> |
49 | #include <linux/signal.h> | 48 | #include <linux/signal.h> |
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 013c5daddb0b..7b3b94ddddcc 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -50,7 +50,6 @@ | |||
50 | * | 50 | * |
51 | */ | 51 | */ |
52 | 52 | ||
53 | #include <linux/config.h> | ||
54 | #include <linux/module.h> | 53 | #include <linux/module.h> |
55 | #include <linux/moduleparam.h> | 54 | #include <linux/moduleparam.h> |
56 | #include <linux/sched.h> | 55 | #include <linux/sched.h> |
diff --git a/drivers/block/paride/paride.c b/drivers/block/paride/paride.c index ce94aa11f6a7..4b258f7836f3 100644 --- a/drivers/block/paride/paride.c +++ b/drivers/block/paride/paride.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #define PI_VERSION "1.06" | 21 | #define PI_VERSION "1.06" |
22 | 22 | ||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/config.h> | ||
25 | #include <linux/kmod.h> | 24 | #include <linux/kmod.h> |
26 | #include <linux/types.h> | 25 | #include <linux/types.h> |
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 3e4cce5e4736..bde2c64b6346 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -44,7 +44,6 @@ | |||
44 | *************************************************************************/ | 44 | *************************************************************************/ |
45 | 45 | ||
46 | #include <linux/pktcdvd.h> | 46 | #include <linux/pktcdvd.h> |
47 | #include <linux/config.h> | ||
48 | #include <linux/module.h> | 47 | #include <linux/module.h> |
49 | #include <linux/types.h> | 48 | #include <linux/types.h> |
50 | #include <linux/kernel.h> | 49 | #include <linux/kernel.h> |
diff --git a/drivers/block/ps2esdi.c b/drivers/block/ps2esdi.c index a729013a3973..aef5a0ccabc9 100644 --- a/drivers/block/ps2esdi.c +++ b/drivers/block/ps2esdi.c | |||
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | #define DEVICE_NAME "PS/2 ESDI" | 30 | #define DEVICE_NAME "PS/2 ESDI" |
31 | 31 | ||
32 | #include <linux/config.h> | ||
33 | #include <linux/major.h> | 32 | #include <linux/major.h> |
34 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
35 | #include <linux/wait.h> | 34 | #include <linux/wait.h> |
diff --git a/drivers/block/rd.c b/drivers/block/rd.c index a9e1c2524c2a..3cf246abb5ec 100644 --- a/drivers/block/rd.c +++ b/drivers/block/rd.c | |||
@@ -42,7 +42,6 @@ | |||
42 | * and set blk_size for -ENOSPC, Werner Fink <werner@suse.de>, Apr '99 | 42 | * and set blk_size for -ENOSPC, Werner Fink <werner@suse.de>, Apr '99 |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <linux/config.h> | ||
46 | #include <linux/string.h> | 45 | #include <linux/string.h> |
47 | #include <linux/slab.h> | 46 | #include <linux/slab.h> |
48 | #include <asm/atomic.h> | 47 | #include <asm/atomic.h> |
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c index 628877945f9b..3721e12135d9 100644 --- a/drivers/block/swim3.c +++ b/drivers/block/swim3.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * handle GCR disks | 16 | * handle GCR disks |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/stddef.h> | 19 | #include <linux/stddef.h> |
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
22 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
diff --git a/drivers/block/umem.c b/drivers/block/umem.c index 585197b95af7..f675f97f2a78 100644 --- a/drivers/block/umem.c +++ b/drivers/block/umem.c | |||
@@ -35,7 +35,6 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | //#define DEBUG /* uncomment if you want debugging info (pr_debug) */ | 37 | //#define DEBUG /* uncomment if you want debugging info (pr_debug) */ |
38 | #include <linux/config.h> | ||
39 | #include <linux/sched.h> | 38 | #include <linux/sched.h> |
40 | #include <linux/fs.h> | 39 | #include <linux/fs.h> |
41 | #include <linux/bio.h> | 40 | #include <linux/bio.h> |
diff --git a/drivers/bluetooth/bcm203x.c b/drivers/bluetooth/bcm203x.c index 3e7a067cc087..6f67141f4de0 100644 --- a/drivers/bluetooth/bcm203x.c +++ b/drivers/bluetooth/bcm203x.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | 26 | ||
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c index 8947c8837dac..23f96213f4ac 100644 --- a/drivers/bluetooth/bfusb.c +++ b/drivers/bluetooth/bfusb.c | |||
@@ -21,7 +21,6 @@ | |||
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | 25 | ||
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index 473a13b22b29..2830f58d6f77 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | 24 | ||
26 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c index 9446960ac742..e0231dc2cb1a 100644 --- a/drivers/bluetooth/bpa10x.c +++ b/drivers/bluetooth/bpa10x.c | |||
@@ -21,7 +21,6 @@ | |||
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | 25 | ||
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index b94ac2f9f7ba..c9dba5565cac 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c | |||
@@ -21,7 +21,6 @@ | |||
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | 25 | ||
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c index 9ce4c93467e5..c889bf8109a1 100644 --- a/drivers/bluetooth/btuart_cs.c +++ b/drivers/bluetooth/btuart_cs.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | 24 | ||
26 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index ed8dca84ff69..be6eed175aa3 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | 24 | ||
26 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
diff --git a/drivers/bluetooth/hci_bcsp.c b/drivers/bluetooth/hci_bcsp.c index 7bd4ef904115..d0cface535fb 100644 --- a/drivers/bluetooth/hci_bcsp.c +++ b/drivers/bluetooth/hci_bcsp.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | 26 | ||
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c index 4804d474dc87..ad62abbbb739 100644 --- a/drivers/bluetooth/hci_h4.c +++ b/drivers/bluetooth/hci_h4.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/module.h> | 26 | #include <linux/module.h> |
28 | 27 | ||
29 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index 613673b12fa6..1994270c16e1 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/module.h> | 26 | #include <linux/module.h> |
28 | 27 | ||
29 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c index 92382e823285..a7d9d7e99e72 100644 --- a/drivers/bluetooth/hci_usb.c +++ b/drivers/bluetooth/hci_usb.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
36 | 35 | ||
37 | #include <linux/kernel.h> | 36 | #include <linux/kernel.h> |
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index 85738223ff0c..ea589007fa26 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/module.h> | 26 | #include <linux/module.h> |
28 | 27 | ||
29 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 3170eaa25087..ca27ee89240b 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c | |||
@@ -263,7 +263,6 @@ | |||
263 | /* #define ERRLOGMASK (CD_WARNING|CD_OPEN|CD_COUNT_TRACKS|CD_CLOSE) */ | 263 | /* #define ERRLOGMASK (CD_WARNING|CD_OPEN|CD_COUNT_TRACKS|CD_CLOSE) */ |
264 | /* #define ERRLOGMASK (CD_WARNING|CD_REG_UNREG|CD_DO_IOCTL|CD_OPEN|CD_CLOSE|CD_COUNT_TRACKS) */ | 264 | /* #define ERRLOGMASK (CD_WARNING|CD_REG_UNREG|CD_DO_IOCTL|CD_OPEN|CD_CLOSE|CD_COUNT_TRACKS) */ |
265 | 265 | ||
266 | #include <linux/config.h> | ||
267 | #include <linux/module.h> | 266 | #include <linux/module.h> |
268 | #include <linux/fs.h> | 267 | #include <linux/fs.h> |
269 | #include <linux/buffer_head.h> | 268 | #include <linux/buffer_head.h> |
diff --git a/drivers/cdrom/cm206.c b/drivers/cdrom/cm206.c index 4ee288688fed..9b05ddd23141 100644 --- a/drivers/cdrom/cm206.c +++ b/drivers/cdrom/cm206.c | |||
@@ -914,7 +914,7 @@ static void seek(int lba) | |||
914 | cd->dsb = wait_dsb(); | 914 | cd->dsb = wait_dsb(); |
915 | } | 915 | } |
916 | 916 | ||
917 | uch bcdbin(unsigned char bcd) | 917 | static uch bcdbin(unsigned char bcd) |
918 | { /* stolen from mcd.c! */ | 918 | { /* stolen from mcd.c! */ |
919 | return (bcd >> 4) * 10 + (bcd & 0xf); | 919 | return (bcd >> 4) * 10 + (bcd & 0xf); |
920 | } | 920 | } |
@@ -1532,7 +1532,7 @@ static void __init parse_options(void) | |||
1532 | } | 1532 | } |
1533 | } | 1533 | } |
1534 | 1534 | ||
1535 | static int __cm206_init(void) | 1535 | static int __init __cm206_init(void) |
1536 | { | 1536 | { |
1537 | parse_options(); | 1537 | parse_options(); |
1538 | #if !defined(AUTO_PROBE_MODULE) | 1538 | #if !defined(AUTO_PROBE_MODULE) |
@@ -1593,8 +1593,3 @@ __setup("cm206=", cm206_setup); | |||
1593 | #endif /* !MODULE */ | 1593 | #endif /* !MODULE */ |
1594 | MODULE_ALIAS_BLOCKDEV_MAJOR(CM206_CDROM_MAJOR); | 1594 | MODULE_ALIAS_BLOCKDEV_MAJOR(CM206_CDROM_MAJOR); |
1595 | 1595 | ||
1596 | /* | ||
1597 | * Local variables: | ||
1598 | * compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -fno-strength-reduce -m486 -DMODULE -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h -c -o cm206.o cm206.c" | ||
1599 | * End: | ||
1600 | */ | ||
diff --git a/drivers/cdrom/sbpcd.c b/drivers/cdrom/sbpcd.c index 2fc966c65a0e..ba50e5a712f2 100644 --- a/drivers/cdrom/sbpcd.c +++ b/drivers/cdrom/sbpcd.c | |||
@@ -381,7 +381,6 @@ | |||
381 | #include <asm/io.h> | 381 | #include <asm/io.h> |
382 | #include <asm/uaccess.h> | 382 | #include <asm/uaccess.h> |
383 | #include <stdarg.h> | 383 | #include <stdarg.h> |
384 | #include <linux/config.h> | ||
385 | #include "sbpcd.h" | 384 | #include "sbpcd.h" |
386 | 385 | ||
387 | #define MAJOR_NR MATSUSHITA_CDROM_MAJOR | 386 | #define MAJOR_NR MATSUSHITA_CDROM_MAJOR |
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index f74eeeb8e377..8cd52984cda5 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * work is done in the northbridge(s). | 8 | * work is done in the northbridge(s). |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c index a92ab53a1370..cc5ea347a8a7 100644 --- a/drivers/char/agp/generic.c +++ b/drivers/char/agp/generic.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * TODO: | 27 | * TODO: |
28 | * - Allocate more than order 0 pages to avoid too much linear map splitting. | 28 | * - Allocate more than order 0 pages to avoid too much linear map splitting. |
29 | */ | 29 | */ |
30 | #include <linux/config.h> | ||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c index 6602b3156df5..3e7dc7cbd740 100644 --- a/drivers/char/amiserial.c +++ b/drivers/char/amiserial.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * ever possible. | 31 | * ever possible. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
36 | 35 | ||
37 | #undef SERIAL_PARANOIA_CHECK | 36 | #undef SERIAL_PARANOIA_CHECK |
diff --git a/drivers/char/consolemap.c b/drivers/char/consolemap.c index c85a4fa60da7..04a12027a740 100644 --- a/drivers/char/consolemap.c +++ b/drivers/char/consolemap.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * Fix bug in inverse translation. Stanislav Voronyi <stas@cnti.uanet.kharkov.ua>, Dec 1998 | 11 | * Fix bug in inverse translation. Stanislav Voronyi <stas@cnti.uanet.kharkov.ua>, Dec 1998 |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | #include <linux/kd.h> | 15 | #include <linux/kd.h> |
17 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 2657eeba7da6..1f61a6744a26 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c | |||
@@ -633,7 +633,6 @@ static char rcsid[] = | |||
633 | /* | 633 | /* |
634 | * Include section | 634 | * Include section |
635 | */ | 635 | */ |
636 | #include <linux/config.h> | ||
637 | #include <linux/module.h> | 636 | #include <linux/module.h> |
638 | #include <linux/errno.h> | 637 | #include <linux/errno.h> |
639 | #include <linux/signal.h> | 638 | #include <linux/signal.h> |
diff --git a/drivers/char/decserial.c b/drivers/char/decserial.c index aa1440934e95..85f404e25c73 100644 --- a/drivers/char/decserial.c +++ b/drivers/char/decserial.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * console device I strongly recommend to use only one. | 16 | * console device I strongly recommend to use only one. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/init.h> | 19 | #include <linux/init.h> |
21 | #include <asm/dec/machtype.h> | 20 | #include <asm/dec/machtype.h> |
22 | 21 | ||
diff --git a/drivers/char/drm/drm.h b/drivers/char/drm/drm.h index 9da0ddb892b5..5642ac43e0f5 100644 --- a/drivers/char/drm/drm.h +++ b/drivers/char/drm/drm.h | |||
@@ -38,7 +38,6 @@ | |||
38 | 38 | ||
39 | #if defined(__linux__) | 39 | #if defined(__linux__) |
40 | #if defined(__KERNEL__) | 40 | #if defined(__KERNEL__) |
41 | #include <linux/config.h> | ||
42 | #endif | 41 | #endif |
43 | #include <asm/ioctl.h> /* For _IO* macros */ | 42 | #include <asm/ioctl.h> /* For _IO* macros */ |
44 | #define DRM_IOCTL_NR(n) _IOC_NR(n) | 43 | #define DRM_IOCTL_NR(n) _IOC_NR(n) |
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index cb76e5ca9a23..d2a56182bc35 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h | |||
@@ -44,7 +44,6 @@ | |||
44 | * can build the DRM (part of PI DRI). 4/21/2000 S + B */ | 44 | * can build the DRM (part of PI DRI). 4/21/2000 S + B */ |
45 | #include <asm/current.h> | 45 | #include <asm/current.h> |
46 | #endif /* __alpha__ */ | 46 | #endif /* __alpha__ */ |
47 | #include <linux/config.h> | ||
48 | #include <linux/module.h> | 47 | #include <linux/module.h> |
49 | #include <linux/kernel.h> | 48 | #include <linux/kernel.h> |
50 | #include <linux/miscdevice.h> | 49 | #include <linux/miscdevice.h> |
diff --git a/drivers/char/drm/drm_memory.c b/drivers/char/drm/drm_memory.c index 7e3318e1d1c6..5681cae1d404 100644 --- a/drivers/char/drm/drm_memory.c +++ b/drivers/char/drm/drm_memory.c | |||
@@ -33,7 +33,6 @@ | |||
33 | * OTHER DEALINGS IN THE SOFTWARE. | 33 | * OTHER DEALINGS IN THE SOFTWARE. |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/config.h> | ||
37 | #include <linux/highmem.h> | 36 | #include <linux/highmem.h> |
38 | #include "drmP.h" | 37 | #include "drmP.h" |
39 | 38 | ||
diff --git a/drivers/char/drm/drm_memory.h b/drivers/char/drm/drm_memory.h index 714d9aedcff5..f1b97aff10cf 100644 --- a/drivers/char/drm/drm_memory.h +++ b/drivers/char/drm/drm_memory.h | |||
@@ -33,7 +33,6 @@ | |||
33 | * OTHER DEALINGS IN THE SOFTWARE. | 33 | * OTHER DEALINGS IN THE SOFTWARE. |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/config.h> | ||
37 | #include <linux/highmem.h> | 36 | #include <linux/highmem.h> |
38 | #include <linux/vmalloc.h> | 37 | #include <linux/vmalloc.h> |
39 | #include "drmP.h" | 38 | #include "drmP.h" |
diff --git a/drivers/char/drm/drm_memory_debug.h b/drivers/char/drm/drm_memory_debug.h index d117cc997192..74581af806e1 100644 --- a/drivers/char/drm/drm_memory_debug.h +++ b/drivers/char/drm/drm_memory_debug.h | |||
@@ -31,7 +31,6 @@ | |||
31 | * OTHER DEALINGS IN THE SOFTWARE. | 31 | * OTHER DEALINGS IN THE SOFTWARE. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include "drmP.h" | 34 | #include "drmP.h" |
36 | 35 | ||
37 | typedef struct drm_mem_stats { | 36 | typedef struct drm_mem_stats { |
diff --git a/drivers/char/drm/drm_scatter.c b/drivers/char/drm/drm_scatter.c index ce81bf248200..06ef7ddbe67d 100644 --- a/drivers/char/drm/drm_scatter.c +++ b/drivers/char/drm/drm_scatter.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * DEALINGS IN THE SOFTWARE. | 31 | * DEALINGS IN THE SOFTWARE. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include <linux/vmalloc.h> | 34 | #include <linux/vmalloc.h> |
36 | #include "drmP.h" | 35 | #include "drmP.h" |
37 | 36 | ||
diff --git a/drivers/char/drm/drm_sysfs.c b/drivers/char/drm/drm_sysfs.c index 0b9f98a7eb10..51ad98c685c3 100644 --- a/drivers/char/drm/drm_sysfs.c +++ b/drivers/char/drm/drm_sysfs.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/device.h> | 15 | #include <linux/device.h> |
17 | #include <linux/kdev_t.h> | 16 | #include <linux/kdev_t.h> |
18 | #include <linux/err.h> | 17 | #include <linux/err.h> |
diff --git a/drivers/char/drm/ffb_drv.c b/drivers/char/drm/ffb_drv.c index c13f9abb41e9..dd45111a4854 100644 --- a/drivers/char/drm/ffb_drv.c +++ b/drivers/char/drm/ffb_drv.c | |||
@@ -4,7 +4,6 @@ | |||
4 | * Copyright (C) 2000 David S. Miller (davem@redhat.com) | 4 | * Copyright (C) 2000 David S. Miller (davem@redhat.com) |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/config.h> | ||
8 | #include "ffb.h" | 7 | #include "ffb.h" |
9 | #include "drmP.h" | 8 | #include "drmP.h" |
10 | 9 | ||
diff --git a/drivers/char/drm/i810_drv.c b/drivers/char/drm/i810_drv.c index dfe6ad2b6a6e..fabb9a817966 100644 --- a/drivers/char/drm/i810_drv.c +++ b/drivers/char/drm/i810_drv.c | |||
@@ -30,7 +30,6 @@ | |||
30 | * Gareth Hughes <gareth@valinux.com> | 30 | * Gareth Hughes <gareth@valinux.com> |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | #include "drmP.h" | 33 | #include "drmP.h" |
35 | #include "drm.h" | 34 | #include "drm.h" |
36 | #include "i810_drm.h" | 35 | #include "i810_drm.h" |
diff --git a/drivers/char/drm/i830_drv.c b/drivers/char/drm/i830_drv.c index 722658188f5f..389597e4a623 100644 --- a/drivers/char/drm/i830_drv.c +++ b/drivers/char/drm/i830_drv.c | |||
@@ -32,7 +32,6 @@ | |||
32 | * Keith Whitwell <keith@tungstengraphics.com> | 32 | * Keith Whitwell <keith@tungstengraphics.com> |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/config.h> | ||
36 | #include "drmP.h" | 35 | #include "drmP.h" |
37 | #include "drm.h" | 36 | #include "drm.h" |
38 | #include "i830_drm.h" | 37 | #include "i830_drm.h" |
diff --git a/drivers/char/drm/mga_drv.c b/drivers/char/drm/mga_drv.c index 9f7ed0e0351b..e30f556b79f1 100644 --- a/drivers/char/drm/mga_drv.c +++ b/drivers/char/drm/mga_drv.c | |||
@@ -29,7 +29,6 @@ | |||
29 | * Gareth Hughes <gareth@valinux.com> | 29 | * Gareth Hughes <gareth@valinux.com> |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/config.h> | ||
33 | #include "drmP.h" | 32 | #include "drmP.h" |
34 | #include "drm.h" | 33 | #include "drm.h" |
35 | #include "mga_drm.h" | 34 | #include "mga_drm.h" |
diff --git a/drivers/char/drm/r128_drv.c b/drivers/char/drm/r128_drv.c index e20450ae220e..6108e7587e12 100644 --- a/drivers/char/drm/r128_drv.c +++ b/drivers/char/drm/r128_drv.c | |||
@@ -29,7 +29,6 @@ | |||
29 | * Gareth Hughes <gareth@valinux.com> | 29 | * Gareth Hughes <gareth@valinux.com> |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/config.h> | ||
33 | #include "drmP.h" | 32 | #include "drmP.h" |
34 | #include "drm.h" | 33 | #include "drm.h" |
35 | #include "r128_drm.h" | 34 | #include "r128_drm.h" |
diff --git a/drivers/char/drm/radeon_drv.c b/drivers/char/drm/radeon_drv.c index b04ed1b562b9..eb985c2a31e9 100644 --- a/drivers/char/drm/radeon_drv.c +++ b/drivers/char/drm/radeon_drv.c | |||
@@ -29,7 +29,6 @@ | |||
29 | * OTHER DEALINGS IN THE SOFTWARE. | 29 | * OTHER DEALINGS IN THE SOFTWARE. |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/config.h> | ||
33 | #include "drmP.h" | 32 | #include "drmP.h" |
34 | #include "drm.h" | 33 | #include "drm.h" |
35 | #include "radeon_drm.h" | 34 | #include "radeon_drm.h" |
diff --git a/drivers/char/drm/savage_drv.c b/drivers/char/drm/savage_drv.c index aa6c0d1a82f8..eee52aa92a7c 100644 --- a/drivers/char/drm/savage_drv.c +++ b/drivers/char/drm/savage_drv.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 23 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include "drmP.h" | 26 | #include "drmP.h" |
28 | #include "savage_drm.h" | 27 | #include "savage_drm.h" |
29 | #include "savage_drv.h" | 28 | #include "savage_drv.h" |
diff --git a/drivers/char/drm/sis_drv.c b/drivers/char/drm/sis_drv.c index 6f6d7d613ede..5e9dc86f2956 100644 --- a/drivers/char/drm/sis_drv.c +++ b/drivers/char/drm/sis_drv.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include "drmP.h" | 28 | #include "drmP.h" |
30 | #include "sis_drm.h" | 29 | #include "sis_drm.h" |
31 | #include "sis_drv.h" | 30 | #include "sis_drv.h" |
diff --git a/drivers/char/drm/tdfx_drv.c b/drivers/char/drm/tdfx_drv.c index baa4416032a8..012ff2e356b2 100644 --- a/drivers/char/drm/tdfx_drv.c +++ b/drivers/char/drm/tdfx_drv.c | |||
@@ -30,7 +30,6 @@ | |||
30 | * Gareth Hughes <gareth@valinux.com> | 30 | * Gareth Hughes <gareth@valinux.com> |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | #include "drmP.h" | 33 | #include "drmP.h" |
35 | #include "tdfx_drv.h" | 34 | #include "tdfx_drv.h" |
36 | 35 | ||
diff --git a/drivers/char/drm/via_drv.c b/drivers/char/drm/via_drv.c index 3f012255d315..b3d364d793d7 100644 --- a/drivers/char/drm/via_drv.c +++ b/drivers/char/drm/via_drv.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * DEALINGS IN THE SOFTWARE. | 22 | * DEALINGS IN THE SOFTWARE. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include "drmP.h" | 25 | #include "drmP.h" |
27 | #include "via_drm.h" | 26 | #include "via_drm.h" |
28 | #include "via_drv.h" | 27 | #include "via_drv.h" |
diff --git a/drivers/char/ds1302.c b/drivers/char/ds1302.c index a75e8609be01..625e8b517005 100644 --- a/drivers/char/ds1302.c +++ b/drivers/char/ds1302.c | |||
@@ -12,7 +12,6 @@ | |||
12 | *! | 12 | *! |
13 | *!***************************************************************************/ | 13 | *!***************************************************************************/ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | 15 | ||
17 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
18 | #include <linux/init.h> | 17 | #include <linux/init.h> |
diff --git a/drivers/char/ds1620.c b/drivers/char/ds1620.c index 62cda25724e3..953e670dcd09 100644 --- a/drivers/char/ds1620.c +++ b/drivers/char/ds1620.c | |||
@@ -2,7 +2,6 @@ | |||
2 | * linux/drivers/char/ds1620.c: Dallas Semiconductors DS1620 | 2 | * linux/drivers/char/ds1620.c: Dallas Semiconductors DS1620 |
3 | * thermometer driver (as used in the Rebel.com NetWinder) | 3 | * thermometer driver (as used in the Rebel.com NetWinder) |
4 | */ | 4 | */ |
5 | #include <linux/config.h> | ||
6 | #include <linux/module.h> | 5 | #include <linux/module.h> |
7 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
8 | #include <linux/miscdevice.h> | 7 | #include <linux/miscdevice.h> |
diff --git a/drivers/char/ec3104_keyb.c b/drivers/char/ec3104_keyb.c index 4aed66968821..abac18b1871c 100644 --- a/drivers/char/ec3104_keyb.c +++ b/drivers/char/ec3104_keyb.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * (prumpf@tux.org). | 26 | * (prumpf@tux.org). |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | 29 | ||
31 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
32 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
diff --git a/drivers/char/epca.c b/drivers/char/epca.c index d0b3890d9302..86d290e9f307 100644 --- a/drivers/char/epca.c +++ b/drivers/char/epca.c | |||
@@ -30,7 +30,6 @@ | |||
30 | /* See README.epca for change history --DAT*/ | 30 | /* See README.epca for change history --DAT*/ |
31 | 31 | ||
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | #include <linux/module.h> | 33 | #include <linux/module.h> |
35 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
36 | #include <linux/types.h> | 35 | #include <linux/types.h> |
diff --git a/drivers/char/ftape/lowlevel/ftape-calibr.c b/drivers/char/ftape/lowlevel/ftape-calibr.c index 956b2586e138..8e50bfd35a52 100644 --- a/drivers/char/ftape/lowlevel/ftape-calibr.c +++ b/drivers/char/ftape/lowlevel/ftape-calibr.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * functions. | 24 | * functions. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
29 | #include <linux/jiffies.h> | 28 | #include <linux/jiffies.h> |
30 | #include <asm/system.h> | 29 | #include <asm/system.h> |
diff --git a/drivers/char/ftape/lowlevel/ftape-ctl.c b/drivers/char/ftape/lowlevel/ftape-ctl.c index 32e043911790..5d7c1ce92d59 100644 --- a/drivers/char/ftape/lowlevel/ftape-ctl.c +++ b/drivers/char/ftape/lowlevel/ftape-ctl.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux. | 25 | * QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
30 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
31 | #include <linux/mman.h> | 30 | #include <linux/mman.h> |
diff --git a/drivers/char/ftape/lowlevel/ftape-init.c b/drivers/char/ftape/lowlevel/ftape-init.c index b54260d457c2..4998132a81d1 100644 --- a/drivers/char/ftape/lowlevel/ftape-init.c +++ b/drivers/char/ftape/lowlevel/ftape-init.c | |||
@@ -21,7 +21,6 @@ | |||
21 | * for the QIC-40/80/3010/3020 floppy-tape driver for Linux. | 21 | * for the QIC-40/80/3010/3020 floppy-tape driver for Linux. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
27 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
diff --git a/drivers/char/ftape/lowlevel/ftape-proc.c b/drivers/char/ftape/lowlevel/ftape-proc.c index c66251e997ed..e805b15e0a12 100644 --- a/drivers/char/ftape/lowlevel/ftape-proc.c +++ b/drivers/char/ftape/lowlevel/ftape-proc.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * Old code removed, switched to dynamic proc entry. | 26 | * Old code removed, switched to dynamic proc entry. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | 29 | ||
31 | #if defined(CONFIG_PROC_FS) && defined(CONFIG_FT_PROC_FS) | 30 | #if defined(CONFIG_PROC_FS) && defined(CONFIG_FT_PROC_FS) |
32 | 31 | ||
diff --git a/drivers/char/ftape/lowlevel/ftape-setup.c b/drivers/char/ftape/lowlevel/ftape-setup.c index 280a1a55d87e..678340acd0b7 100644 --- a/drivers/char/ftape/lowlevel/ftape-setup.c +++ b/drivers/char/ftape/lowlevel/ftape-setup.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * "ftape" for Linux. | 25 | * "ftape" for Linux. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/string.h> | 28 | #include <linux/string.h> |
30 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
31 | #include <linux/mm.h> | 30 | #include <linux/mm.h> |
diff --git a/drivers/char/ftape/lowlevel/ftape-tracing.h b/drivers/char/ftape/lowlevel/ftape-tracing.h index fa7cd20ee66c..2950810c7085 100644 --- a/drivers/char/ftape/lowlevel/ftape-tracing.h +++ b/drivers/char/ftape/lowlevel/ftape-tracing.h | |||
@@ -28,7 +28,6 @@ | |||
28 | * QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux. | 28 | * QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
33 | 32 | ||
34 | /* | 33 | /* |
diff --git a/drivers/char/ftape/lowlevel/ftape_syms.c b/drivers/char/ftape/lowlevel/ftape_syms.c index 5dc3a380c9bf..8e0dc4a07ca6 100644 --- a/drivers/char/ftape/lowlevel/ftape_syms.c +++ b/drivers/char/ftape/lowlevel/ftape_syms.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * exports to its high level clients | 25 | * exports to its high level clients |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | 29 | ||
31 | #include <linux/ftape.h> | 30 | #include <linux/ftape.h> |
diff --git a/drivers/char/ftape/zftape/zftape-ctl.c b/drivers/char/ftape/zftape/zftape-ctl.c index 6c7874e5c199..22ba0f5d00cf 100644 --- a/drivers/char/ftape/zftape/zftape-ctl.c +++ b/drivers/char/ftape/zftape/zftape-ctl.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * for the QIC-40/80/3010/3020 floppy-tape driver for Linux. | 24 | * for the QIC-40/80/3010/3020 floppy-tape driver for Linux. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
29 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
diff --git a/drivers/char/ftape/zftape/zftape-ctl.h b/drivers/char/ftape/zftape/zftape-ctl.h index 414159891990..8e6f2d7ac74e 100644 --- a/drivers/char/ftape/zftape/zftape-ctl.h +++ b/drivers/char/ftape/zftape/zftape-ctl.h | |||
@@ -27,7 +27,6 @@ | |||
27 | * for the QIC-40/80 floppy-tape driver for Linux. | 27 | * for the QIC-40/80 floppy-tape driver for Linux. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/ioctl.h> | 30 | #include <linux/ioctl.h> |
32 | #include <linux/mtio.h> | 31 | #include <linux/mtio.h> |
33 | 32 | ||
diff --git a/drivers/char/ftape/zftape/zftape-init.c b/drivers/char/ftape/zftape/zftape-init.c index 3eeb869a9a11..55272566b740 100644 --- a/drivers/char/ftape/zftape/zftape-init.c +++ b/drivers/char/ftape/zftape/zftape-init.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * to the ftape floppy tape driver for Linux | 20 | * to the ftape floppy tape driver for Linux |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
26 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
diff --git a/drivers/char/genrtc.c b/drivers/char/genrtc.c index 588fca542a98..bebd7e34f792 100644 --- a/drivers/char/genrtc.c +++ b/drivers/char/genrtc.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #define RTC_VERSION "1.07" | 43 | #define RTC_VERSION "1.07" |
44 | 44 | ||
45 | #include <linux/module.h> | 45 | #include <linux/module.h> |
46 | #include <linux/config.h> | ||
47 | #include <linux/errno.h> | 46 | #include <linux/errno.h> |
48 | #include <linux/miscdevice.h> | 47 | #include <linux/miscdevice.h> |
49 | #include <linux/fcntl.h> | 48 | #include <linux/fcntl.h> |
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 07473cd84121..8b6c76f8ef0e 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index 6e380aecea6a..859e5005c785 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/console.h> | 25 | #include <linux/console.h> |
27 | #include <linux/cpumask.h> | 26 | #include <linux/cpumask.h> |
28 | #include <linux/init.h> | 27 | #include <linux/init.h> |
diff --git a/drivers/char/ip2/i2ellis.h b/drivers/char/ip2/i2ellis.h index 510b026d7d26..5eabe47b0bc8 100644 --- a/drivers/char/ip2/i2ellis.h +++ b/drivers/char/ip2/i2ellis.h | |||
@@ -47,7 +47,6 @@ | |||
47 | //---------------------- | 47 | //---------------------- |
48 | // Mandatory Includes: | 48 | // Mandatory Includes: |
49 | //---------------------- | 49 | //---------------------- |
50 | #include <linux/config.h> | ||
51 | #include "ip2types.h" | 50 | #include "ip2types.h" |
52 | #include "i2hw.h" // The hardware definitions | 51 | #include "i2hw.h" // The hardware definitions |
53 | 52 | ||
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index 8619542766cb..f9aa53c76f99 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c | |||
@@ -82,7 +82,6 @@ | |||
82 | /************/ | 82 | /************/ |
83 | /* Includes */ | 83 | /* Includes */ |
84 | /************/ | 84 | /************/ |
85 | #include <linux/config.h> | ||
86 | 85 | ||
87 | #include <linux/ctype.h> | 86 | #include <linux/ctype.h> |
88 | #include <linux/string.h> | 87 | #include <linux/string.h> |
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c index da637adbbfaa..2fc894fef1cb 100644 --- a/drivers/char/ipmi/ipmi_devintf.c +++ b/drivers/char/ipmi/ipmi_devintf.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 31 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
36 | #include <linux/moduleparam.h> | 35 | #include <linux/moduleparam.h> |
37 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index ad26f4b997c5..0aa5d608fe6f 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 31 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
36 | #include <linux/errno.h> | 35 | #include <linux/errno.h> |
37 | #include <asm/system.h> | 36 | #include <asm/system.h> |
diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c index d0b5c08e7b4e..8d941db83457 100644 --- a/drivers/char/ipmi/ipmi_poweroff.c +++ b/drivers/char/ipmi/ipmi_poweroff.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * with this program; if not, write to the Free Software Foundation, Inc., | 31 | * with this program; if not, write to the Free Software Foundation, Inc., |
32 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 32 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
33 | */ | 33 | */ |
34 | #include <linux/config.h> | ||
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
36 | #include <linux/moduleparam.h> | 35 | #include <linux/moduleparam.h> |
37 | #include <linux/proc_fs.h> | 36 | #include <linux/proc_fs.h> |
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index bd4f2248b758..c7f3e5c80666 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -38,7 +38,6 @@ | |||
38 | * and drives the real SMI state machine. | 38 | * and drives the real SMI state machine. |
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include <linux/config.h> | ||
42 | #include <linux/module.h> | 41 | #include <linux/module.h> |
43 | #include <linux/moduleparam.h> | 42 | #include <linux/moduleparam.h> |
44 | #include <asm/system.h> | 43 | #include <asm/system.h> |
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index 1a0a19c53605..74a889c58333 100644 --- a/drivers/char/ipmi/ipmi_watchdog.c +++ b/drivers/char/ipmi/ipmi_watchdog.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 31 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
36 | #include <linux/moduleparam.h> | 35 | #include <linux/moduleparam.h> |
37 | #include <linux/ipmi.h> | 36 | #include <linux/ipmi.h> |
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 478bf4d7d065..c105b9540ad8 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c | |||
@@ -245,7 +245,7 @@ static int lock_card(struct isi_board *card) | |||
245 | printk(KERN_WARNING "ISICOM: Failed to lock Card (0x%lx)\n", | 245 | printk(KERN_WARNING "ISICOM: Failed to lock Card (0x%lx)\n", |
246 | card->base); | 246 | card->base); |
247 | 247 | ||
248 | return 0; /* Failed to aquire the card! */ | 248 | return 0; /* Failed to acquire the card! */ |
249 | } | 249 | } |
250 | 250 | ||
251 | static int lock_card_at_interrupt(struct isi_board *card) | 251 | static int lock_card_at_interrupt(struct isi_board *card) |
@@ -262,7 +262,7 @@ static int lock_card_at_interrupt(struct isi_board *card) | |||
262 | spin_unlock_irqrestore(&card->card_lock, card->flags); | 262 | spin_unlock_irqrestore(&card->card_lock, card->flags); |
263 | } | 263 | } |
264 | /* Failing in interrupt is an acceptable event */ | 264 | /* Failing in interrupt is an acceptable event */ |
265 | return 0; /* Failed to aquire the card! */ | 265 | return 0; /* Failed to acquire the card! */ |
266 | } | 266 | } |
267 | 267 | ||
268 | static void unlock_card(struct isi_board *card) | 268 | static void unlock_card(struct isi_board *card) |
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index c74e5660a9b7..fbce2f0669d6 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | /*****************************************************************************/ | 27 | /*****************************************************************************/ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
32 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
@@ -282,7 +281,6 @@ static char *stli_brdnames[] = { | |||
282 | 281 | ||
283 | /*****************************************************************************/ | 282 | /*****************************************************************************/ |
284 | 283 | ||
285 | #ifdef MODULE | ||
286 | /* | 284 | /* |
287 | * Define some string labels for arguments passed from the module | 285 | * Define some string labels for arguments passed from the module |
288 | * load line. These allow for easy board definitions, and easy | 286 | * load line. These allow for easy board definitions, and easy |
@@ -381,8 +379,6 @@ MODULE_PARM_DESC(board2, "Board 2 config -> name[,ioaddr[,memaddr]"); | |||
381 | module_param_array(board3, charp, NULL, 0); | 379 | module_param_array(board3, charp, NULL, 0); |
382 | MODULE_PARM_DESC(board3, "Board 3 config -> name[,ioaddr[,memaddr]"); | 380 | MODULE_PARM_DESC(board3, "Board 3 config -> name[,ioaddr[,memaddr]"); |
383 | 381 | ||
384 | #endif | ||
385 | |||
386 | /* | 382 | /* |
387 | * Set up a default memory address table for EISA board probing. | 383 | * Set up a default memory address table for EISA board probing. |
388 | * The default addresses are all bellow 1Mbyte, which has to be the | 384 | * The default addresses are all bellow 1Mbyte, which has to be the |
@@ -643,14 +639,8 @@ static unsigned int stli_baudrates[] = { | |||
643 | * Prototype all functions in this driver! | 639 | * Prototype all functions in this driver! |
644 | */ | 640 | */ |
645 | 641 | ||
646 | #ifdef MODULE | ||
647 | static void stli_argbrds(void); | ||
648 | static int stli_parsebrd(stlconf_t *confp, char **argp); | 642 | static int stli_parsebrd(stlconf_t *confp, char **argp); |
649 | 643 | static int stli_init(void); | |
650 | static unsigned long stli_atol(char *str); | ||
651 | #endif | ||
652 | |||
653 | int stli_init(void); | ||
654 | static int stli_open(struct tty_struct *tty, struct file *filp); | 644 | static int stli_open(struct tty_struct *tty, struct file *filp); |
655 | static void stli_close(struct tty_struct *tty, struct file *filp); | 645 | static void stli_close(struct tty_struct *tty, struct file *filp); |
656 | static int stli_write(struct tty_struct *tty, const unsigned char *buf, int count); | 646 | static int stli_write(struct tty_struct *tty, const unsigned char *buf, int count); |
@@ -786,8 +776,6 @@ static int stli_timeron; | |||
786 | 776 | ||
787 | static struct class *istallion_class; | 777 | static struct class *istallion_class; |
788 | 778 | ||
789 | #ifdef MODULE | ||
790 | |||
791 | /* | 779 | /* |
792 | * Loadable module initialization stuff. | 780 | * Loadable module initialization stuff. |
793 | */ | 781 | */ |
@@ -954,8 +942,6 @@ static int stli_parsebrd(stlconf_t *confp, char **argp) | |||
954 | return(1); | 942 | return(1); |
955 | } | 943 | } |
956 | 944 | ||
957 | #endif | ||
958 | |||
959 | /*****************************************************************************/ | 945 | /*****************************************************************************/ |
960 | 946 | ||
961 | static int stli_open(struct tty_struct *tty, struct file *filp) | 947 | static int stli_open(struct tty_struct *tty, struct file *filp) |
@@ -4694,7 +4680,7 @@ static struct tty_operations stli_ops = { | |||
4694 | 4680 | ||
4695 | /*****************************************************************************/ | 4681 | /*****************************************************************************/ |
4696 | 4682 | ||
4697 | int __init stli_init(void) | 4683 | static int __init stli_init(void) |
4698 | { | 4684 | { |
4699 | int i; | 4685 | int i; |
4700 | printk(KERN_INFO "%s: version %s\n", stli_drvtitle, stli_drvversion); | 4686 | printk(KERN_INFO "%s: version %s\n", stli_drvtitle, stli_drvversion); |
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index 4bb3d2272604..056ebe84b81d 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * 21-08-02: Converted to input API, major cleanup. (Vojtech Pavlik) | 24 | * 21-08-02: Converted to input API, major cleanup. (Vojtech Pavlik) |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/module.h> | 27 | #include <linux/module.h> |
29 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
30 | #include <linux/tty.h> | 29 | #include <linux/tty.h> |
diff --git a/drivers/char/lcd.c b/drivers/char/lcd.c index 29963d8be667..7d49b241de56 100644 --- a/drivers/char/lcd.c +++ b/drivers/char/lcd.c | |||
@@ -14,7 +14,6 @@ | |||
14 | 14 | ||
15 | #define RTC_IO_EXTENT 0x10 /*Only really two ports, but... */ | 15 | #define RTC_IO_EXTENT 0x10 /*Only really two ports, but... */ |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/types.h> | 17 | #include <linux/types.h> |
19 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
20 | #include <linux/miscdevice.h> | 19 | #include <linux/miscdevice.h> |
diff --git a/drivers/char/lp.c b/drivers/char/lp.c index b11a390581ba..582cdbdb0c42 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c | |||
@@ -114,7 +114,6 @@ | |||
114 | #include <linux/module.h> | 114 | #include <linux/module.h> |
115 | #include <linux/init.h> | 115 | #include <linux/init.h> |
116 | 116 | ||
117 | #include <linux/config.h> | ||
118 | #include <linux/errno.h> | 117 | #include <linux/errno.h> |
119 | #include <linux/kernel.h> | 118 | #include <linux/kernel.h> |
120 | #include <linux/major.h> | 119 | #include <linux/major.h> |
diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c index c268ee04b2aa..bb07c2766b27 100644 --- a/drivers/char/mbcs.c +++ b/drivers/char/mbcs.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * MOATB Core Services driver. | 10 | * MOATB Core Services driver. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | #include <linux/moduleparam.h> | 15 | #include <linux/moduleparam.h> |
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 6fe7b6c6c462..70f3954d6dfd 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * Shared /dev/zero mmaping support, Feb 2000, Kanoj Sarcar <kanoj@sgi.com> | 8 | * Shared /dev/zero mmaping support, Feb 2000, Kanoj Sarcar <kanoj@sgi.com> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
13 | #include <linux/miscdevice.h> | 12 | #include <linux/miscdevice.h> |
14 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
diff --git a/drivers/char/misc.c b/drivers/char/misc.c index dfe1cede3916..d5fa19da330b 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c | |||
@@ -34,7 +34,6 @@ | |||
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/module.h> | 36 | #include <linux/module.h> |
37 | #include <linux/config.h> | ||
38 | 37 | ||
39 | #include <linux/fs.h> | 38 | #include <linux/fs.h> |
40 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index 52ef61f54ba0..4ea7bd5f4f56 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c | |||
@@ -29,7 +29,6 @@ | |||
29 | * version : 5.1 | 29 | * version : 5.1 |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/config.h> | ||
33 | #include <linux/module.h> | 32 | #include <linux/module.h> |
34 | #include <linux/types.h> | 33 | #include <linux/types.h> |
35 | #include <linux/mm.h> | 34 | #include <linux/mm.h> |
diff --git a/drivers/char/mwave/3780i.c b/drivers/char/mwave/3780i.c index d1fe05e83882..4e4865e90e50 100644 --- a/drivers/char/mwave/3780i.c +++ b/drivers/char/mwave/3780i.c | |||
@@ -46,7 +46,6 @@ | |||
46 | * First release to the public | 46 | * First release to the public |
47 | */ | 47 | */ |
48 | 48 | ||
49 | #include <linux/config.h> | ||
50 | #include <linux/kernel.h> | 49 | #include <linux/kernel.h> |
51 | #include <linux/unistd.h> | 50 | #include <linux/unistd.h> |
52 | #include <linux/delay.h> | 51 | #include <linux/delay.h> |
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 72cfd09091e0..eb1559fcb81a 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c | |||
@@ -36,7 +36,6 @@ | |||
36 | */ | 36 | */ |
37 | 37 | ||
38 | 38 | ||
39 | #include <linux/config.h> | ||
40 | #include <linux/module.h> | 39 | #include <linux/module.h> |
41 | #include <linux/autoconf.h> | 40 | #include <linux/autoconf.h> |
42 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
diff --git a/drivers/char/n_hdlc.c b/drivers/char/n_hdlc.c index 9f54733f1623..337a87f86a3b 100644 --- a/drivers/char/n_hdlc.c +++ b/drivers/char/n_hdlc.c | |||
@@ -81,7 +81,6 @@ | |||
81 | #define HDLC_MAGIC 0x239e | 81 | #define HDLC_MAGIC 0x239e |
82 | #define HDLC_VERSION "$Revision: 4.8 $" | 82 | #define HDLC_VERSION "$Revision: 4.8 $" |
83 | 83 | ||
84 | #include <linux/config.h> | ||
85 | #include <linux/module.h> | 84 | #include <linux/module.h> |
86 | #include <linux/init.h> | 85 | #include <linux/init.h> |
87 | #include <linux/kernel.h> | 86 | #include <linux/kernel.h> |
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index 3556ccd77570..8c5f102622b6 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #define NVRAM_VERSION "1.2" | 37 | #define NVRAM_VERSION "1.2" |
38 | 38 | ||
39 | #include <linux/module.h> | 39 | #include <linux/module.h> |
40 | #include <linux/config.h> | ||
41 | #include <linux/sched.h> | 40 | #include <linux/sched.h> |
42 | #include <linux/smp_lock.h> | 41 | #include <linux/smp_lock.h> |
43 | #include <linux/nvram.h> | 42 | #include <linux/nvram.h> |
diff --git a/drivers/char/nwbutton.c b/drivers/char/nwbutton.c index 4083b781adbf..94845dd12ca9 100644 --- a/drivers/char/nwbutton.c +++ b/drivers/char/nwbutton.c | |||
@@ -4,7 +4,6 @@ | |||
4 | * | 4 | * |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/config.h> | ||
8 | #include <linux/module.h> | 7 | #include <linux/module.h> |
9 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
10 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
diff --git a/drivers/char/pc8736x_gpio.c b/drivers/char/pc8736x_gpio.c index 1c706ccfdbb3..c860de6a6fde 100644 --- a/drivers/char/pc8736x_gpio.c +++ b/drivers/char/pc8736x_gpio.c | |||
@@ -319,9 +319,10 @@ static int __init pc8736x_gpio_init(void) | |||
319 | return 0; | 319 | return 0; |
320 | 320 | ||
321 | undo_platform_dev_add: | 321 | undo_platform_dev_add: |
322 | platform_device_put(pdev); | 322 | platform_device_del(pdev); |
323 | undo_platform_dev_alloc: | 323 | undo_platform_dev_alloc: |
324 | kfree(pdev); | 324 | platform_device_put(pdev); |
325 | |||
325 | return rc; | 326 | return rc; |
326 | } | 327 | } |
327 | 328 | ||
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index eab5394da666..31c8a21f9d87 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c | |||
@@ -149,12 +149,7 @@ struct cm4000_dev { | |||
149 | #define ZERO_DEV(dev) \ | 149 | #define ZERO_DEV(dev) \ |
150 | memset(&dev->atr_csum,0, \ | 150 | memset(&dev->atr_csum,0, \ |
151 | sizeof(struct cm4000_dev) - \ | 151 | sizeof(struct cm4000_dev) - \ |
152 | /*link*/ sizeof(struct pcmcia_device *) - \ | 152 | offsetof(struct cm4000_dev, atr_csum)) |
153 | /*node*/ sizeof(dev_node_t) - \ | ||
154 | /*atr*/ MAX_ATR*sizeof(char) - \ | ||
155 | /*rbuf*/ 512*sizeof(char) - \ | ||
156 | /*sbuf*/ 512*sizeof(char) - \ | ||
157 | /*queue*/ 4*sizeof(wait_queue_head_t)) | ||
158 | 153 | ||
159 | static struct pcmcia_device *dev_table[CM4000_MAX_DEV]; | 154 | static struct pcmcia_device *dev_table[CM4000_MAX_DEV]; |
160 | static struct class *cmm_class; | 155 | static struct class *cmm_class; |
diff --git a/drivers/char/pty.c b/drivers/char/pty.c index 9491e4307566..34dd4c38110e 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/module.h> /* For EXPORT_SYMBOL */ | 14 | #include <linux/module.h> /* For EXPORT_SYMBOL */ |
16 | 15 | ||
17 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
diff --git a/drivers/char/qtronix.c b/drivers/char/qtronix.c index 601d09baf9d7..1087530e5854 100644 --- a/drivers/char/qtronix.c +++ b/drivers/char/qtronix.c | |||
@@ -33,7 +33,6 @@ | |||
33 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 33 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/config.h> | ||
37 | 36 | ||
38 | /* | 37 | /* |
39 | * NOTE: | 38 | * NOTE: |
diff --git a/drivers/char/random.c b/drivers/char/random.c index 58f3512c52e1..164bddae047f 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
@@ -224,7 +224,6 @@ | |||
224 | */ | 224 | */ |
225 | 225 | ||
226 | #include <linux/utsname.h> | 226 | #include <linux/utsname.h> |
227 | #include <linux/config.h> | ||
228 | #include <linux/module.h> | 227 | #include <linux/module.h> |
229 | #include <linux/kernel.h> | 228 | #include <linux/kernel.h> |
230 | #include <linux/major.h> | 229 | #include <linux/major.h> |
diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c index aa43436d5d1b..5332d1d4b0e4 100644 --- a/drivers/char/rio/rio_linux.c +++ b/drivers/char/rio/rio_linux.c | |||
@@ -33,7 +33,6 @@ | |||
33 | * */ | 33 | * */ |
34 | 34 | ||
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/config.h> | ||
37 | #include <linux/kdev_t.h> | 36 | #include <linux/kdev_t.h> |
38 | #include <asm/io.h> | 37 | #include <asm/io.h> |
39 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
diff --git a/drivers/char/rio/rio_linux.h b/drivers/char/rio/rio_linux.h index 55b9c97e8477..dc3f005614a3 100644 --- a/drivers/char/rio/rio_linux.h +++ b/drivers/char/rio/rio_linux.h | |||
@@ -23,7 +23,6 @@ | |||
23 | * Version 1.0 -- July, 1999. | 23 | * Version 1.0 -- July, 1999. |
24 | * | 24 | * |
25 | */ | 25 | */ |
26 | #include <linux/config.h> | ||
27 | 26 | ||
28 | #define RIO_NBOARDS 4 | 27 | #define RIO_NBOARDS 4 |
29 | #define RIO_PORTSPERBOARD 128 | 28 | #define RIO_PORTSPERBOARD 128 |
diff --git a/drivers/char/rio/rioinit.c b/drivers/char/rio/rioinit.c index 12e34bc3f7ce..99f3df02b61c 100644 --- a/drivers/char/rio/rioinit.c +++ b/drivers/char/rio/rioinit.c | |||
@@ -33,7 +33,6 @@ | |||
33 | static char *_rioinit_c_sccs_ = "@(#)rioinit.c 1.3"; | 33 | static char *_rioinit_c_sccs_ = "@(#)rioinit.c 1.3"; |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | #include <linux/config.h> | ||
37 | #include <linux/module.h> | 36 | #include <linux/module.h> |
38 | #include <linux/slab.h> | 37 | #include <linux/slab.h> |
39 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index 0897b0c8d528..37dc2edd8d75 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c | |||
@@ -61,7 +61,6 @@ | |||
61 | * this driver.) | 61 | * this driver.) |
62 | */ | 62 | */ |
63 | 63 | ||
64 | #include <linux/config.h> | ||
65 | #include <linux/interrupt.h> | 64 | #include <linux/interrupt.h> |
66 | #include <linux/module.h> | 65 | #include <linux/module.h> |
67 | #include <linux/kernel.h> | 66 | #include <linux/kernel.h> |
diff --git a/drivers/char/scx200_gpio.c b/drivers/char/scx200_gpio.c index 5a280a330401..45083e5dd23b 100644 --- a/drivers/char/scx200_gpio.c +++ b/drivers/char/scx200_gpio.c | |||
@@ -126,9 +126,10 @@ static int __init scx200_gpio_init(void) | |||
126 | undo_chrdev_region: | 126 | undo_chrdev_region: |
127 | unregister_chrdev_region(dev, num_pins); | 127 | unregister_chrdev_region(dev, num_pins); |
128 | undo_platform_device_add: | 128 | undo_platform_device_add: |
129 | platform_device_put(pdev); | 129 | platform_device_del(pdev); |
130 | undo_malloc: | 130 | undo_malloc: |
131 | kfree(pdev); | 131 | platform_device_put(pdev); |
132 | |||
132 | return rc; | 133 | return rc; |
133 | } | 134 | } |
134 | 135 | ||
@@ -136,7 +137,6 @@ static void __exit scx200_gpio_cleanup(void) | |||
136 | { | 137 | { |
137 | kfree(scx200_devices); | 138 | kfree(scx200_devices); |
138 | unregister_chrdev_region(MKDEV(major, 0), num_pins); | 139 | unregister_chrdev_region(MKDEV(major, 0), num_pins); |
139 | platform_device_put(pdev); | ||
140 | platform_device_unregister(pdev); | 140 | platform_device_unregister(pdev); |
141 | /* kfree(pdev); */ | 141 | /* kfree(pdev); */ |
142 | } | 142 | } |
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c index c851eeaa4069..21a710cb4bba 100644 --- a/drivers/char/serial167.c +++ b/drivers/char/serial167.c | |||
@@ -44,7 +44,6 @@ | |||
44 | * - replace bottom half handler with task queue handler | 44 | * - replace bottom half handler with task queue handler |
45 | */ | 45 | */ |
46 | 46 | ||
47 | #include <linux/config.h> | ||
48 | #include <linux/errno.h> | 47 | #include <linux/errno.h> |
49 | #include <linux/signal.h> | 48 | #include <linux/signal.h> |
50 | #include <linux/sched.h> | 49 | #include <linux/sched.h> |
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index 43dfd8689dce..e19d4856e9fc 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
@@ -33,7 +33,6 @@ | |||
33 | * | 33 | * |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/config.h> | ||
37 | #include <linux/module.h> | 36 | #include <linux/module.h> |
38 | #include <linux/input.h> | 37 | #include <linux/input.h> |
39 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c index d2d6b01dcd05..d4243fb80815 100644 --- a/drivers/char/specialix.c +++ b/drivers/char/specialix.c | |||
@@ -75,7 +75,6 @@ | |||
75 | * Documentation/specialix.txt | 75 | * Documentation/specialix.txt |
76 | */ | 76 | */ |
77 | 77 | ||
78 | #include <linux/config.h> | ||
79 | #include <linux/module.h> | 78 | #include <linux/module.h> |
80 | 79 | ||
81 | #include <asm/io.h> | 80 | #include <asm/io.h> |
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 0f7a542d9041..f15df0e423e0 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | /*****************************************************************************/ | 27 | /*****************************************************************************/ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
32 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c index 4e35d4181224..03edccc8a823 100644 --- a/drivers/char/synclink_gt.c +++ b/drivers/char/synclink_gt.c | |||
@@ -46,7 +46,6 @@ | |||
46 | //#define DBGRBUF(info) dump_rbufs(info) | 46 | //#define DBGRBUF(info) dump_rbufs(info) |
47 | 47 | ||
48 | 48 | ||
49 | #include <linux/config.h> | ||
50 | #include <linux/module.h> | 49 | #include <linux/module.h> |
51 | #include <linux/version.h> | 50 | #include <linux/version.h> |
52 | #include <linux/errno.h> | 51 | #include <linux/errno.h> |
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index 21bf15ad9980..ba54df3cf60a 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c | |||
@@ -34,7 +34,6 @@ | |||
34 | 34 | ||
35 | #define MAX_DEVICES 12 | 35 | #define MAX_DEVICES 12 |
36 | 36 | ||
37 | #include <linux/config.h> | ||
38 | #include <linux/module.h> | 37 | #include <linux/module.h> |
39 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
40 | #include <linux/signal.h> | 39 | #include <linux/signal.h> |
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 35082dc12eae..a064ee9181c0 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * based upon discusions in irc://irc.openprojects.net/#kernelnewbies | 12 | * based upon discusions in irc://irc.openprojects.net/#kernelnewbies |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
17 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
18 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c index f7802e5bd7ca..e0633a119d29 100644 --- a/drivers/char/tipar.c +++ b/drivers/char/tipar.c | |||
@@ -42,7 +42,6 @@ | |||
42 | */ | 42 | */ |
43 | #undef DEBUG /* change to #define to get debugging | 43 | #undef DEBUG /* change to #define to get debugging |
44 | * output - for pr_debug() */ | 44 | * output - for pr_debug() */ |
45 | #include <linux/config.h> | ||
46 | #include <linux/module.h> | 45 | #include <linux/module.h> |
47 | #include <linux/types.h> | 46 | #include <linux/types.h> |
48 | #include <linux/errno.h> | 47 | #include <linux/errno.h> |
diff --git a/drivers/char/tlclk.c b/drivers/char/tlclk.c index ef68d152d3e4..dfc4437afefb 100644 --- a/drivers/char/tlclk.c +++ b/drivers/char/tlclk.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * MPCBL0010 ATCA computer. | 27 | * MPCBL0010 ATCA computer. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/init.h> | 31 | #include <linux/init.h> |
33 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index a1143238feca..615e934da05f 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -65,7 +65,6 @@ | |||
65 | * alloc_tty_struct() always uses kmalloc() -- Andrew Morton <andrewm@uow.edu.eu> 17Mar01 | 65 | * alloc_tty_struct() always uses kmalloc() -- Andrew Morton <andrewm@uow.edu.eu> 17Mar01 |
66 | */ | 66 | */ |
67 | 67 | ||
68 | #include <linux/config.h> | ||
69 | #include <linux/types.h> | 68 | #include <linux/types.h> |
70 | #include <linux/major.h> | 69 | #include <linux/major.h> |
71 | #include <linux/errno.h> | 70 | #include <linux/errno.h> |
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c index 234d7f3fb114..45e9bd81bc0e 100644 --- a/drivers/char/vc_screen.c +++ b/drivers/char/vc_screen.c | |||
@@ -21,7 +21,6 @@ | |||
21 | * - making it shorter - scr_readw are macros which expand in PRETTY long code | 21 | * - making it shorter - scr_readw are macros which expand in PRETTY long code |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
26 | #include <linux/major.h> | 25 | #include <linux/major.h> |
27 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c index 07f5ce4b28e3..766f7864c6c6 100644 --- a/drivers/char/viocons.c +++ b/drivers/char/viocons.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * along with this program; if not, write to the Free Software Foundation, | 25 | * along with this program; if not, write to the Free Software Foundation, |
26 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 26 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
27 | */ | 27 | */ |
28 | #include <linux/config.h> | ||
29 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
30 | #include <linux/proc_fs.h> | 29 | #include <linux/proc_fs.h> |
31 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index 198f1505ae23..7d42c8ec8dbc 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * the OS/400 partition. The format of the messages is defined in | 31 | * the OS/400 partition. The format of the messages is defined in |
32 | * iseries/vio.h | 32 | * iseries/vio.h |
33 | */ | 33 | */ |
34 | #include <linux/config.h> | ||
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
36 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
37 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
diff --git a/drivers/char/vme_scc.c b/drivers/char/vme_scc.c index fe99fc1aba45..b17a6e2bbca8 100644 --- a/drivers/char/vme_scc.c +++ b/drivers/char/vme_scc.c | |||
@@ -14,7 +14,6 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/config.h> | ||
18 | #include <linux/kdev_t.h> | 17 | #include <linux/kdev_t.h> |
19 | #include <asm/io.h> | 18 | #include <asm/io.h> |
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index d6f65032649a..3ef823d7d255 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -86,7 +86,6 @@ | |||
86 | #include <linux/consolemap.h> | 86 | #include <linux/consolemap.h> |
87 | #include <linux/timer.h> | 87 | #include <linux/timer.h> |
88 | #include <linux/interrupt.h> | 88 | #include <linux/interrupt.h> |
89 | #include <linux/config.h> | ||
90 | #include <linux/workqueue.h> | 89 | #include <linux/workqueue.h> |
91 | #include <linux/bootmem.h> | 90 | #include <linux/bootmem.h> |
92 | #include <linux/pm.h> | 91 | #include <linux/pm.h> |
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index 24011e7c81ff..eccffaf26faa 100644 --- a/drivers/char/vt_ioctl.c +++ b/drivers/char/vt_ioctl.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * Check put/get_user, cleanups - acme@conectiva.com.br - Jun 2001 | 10 | * Check put/get_user, cleanups - acme@conectiva.com.br - Jun 2001 |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
15 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
16 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
diff --git a/drivers/char/watchdog/at91_wdt.c b/drivers/char/watchdog/at91_wdt.c index 00080655533d..f61dedc3c96c 100644 --- a/drivers/char/watchdog/at91_wdt.c +++ b/drivers/char/watchdog/at91_wdt.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
14 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
diff --git a/drivers/char/watchdog/booke_wdt.c b/drivers/char/watchdog/booke_wdt.c index b6640606b44d..537f5c6729bf 100644 --- a/drivers/char/watchdog/booke_wdt.c +++ b/drivers/char/watchdog/booke_wdt.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * option) any later version. | 14 | * option) any later version. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
19 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
20 | #include <linux/miscdevice.h> | 19 | #include <linux/miscdevice.h> |
diff --git a/drivers/char/watchdog/eurotechwdt.c b/drivers/char/watchdog/eurotechwdt.c index 25c2f2575611..e89cda010b49 100644 --- a/drivers/char/watchdog/eurotechwdt.c +++ b/drivers/char/watchdog/eurotechwdt.c | |||
@@ -40,7 +40,6 @@ | |||
40 | * Added Matt Domsch's nowayout module option. | 40 | * Added Matt Domsch's nowayout module option. |
41 | */ | 41 | */ |
42 | 42 | ||
43 | #include <linux/config.h> | ||
44 | #include <linux/interrupt.h> | 43 | #include <linux/interrupt.h> |
45 | #include <linux/module.h> | 44 | #include <linux/module.h> |
46 | #include <linux/moduleparam.h> | 45 | #include <linux/moduleparam.h> |
diff --git a/drivers/char/watchdog/ib700wdt.c b/drivers/char/watchdog/ib700wdt.c index cf60329eec85..a2e53c715b36 100644 --- a/drivers/char/watchdog/ib700wdt.c +++ b/drivers/char/watchdog/ib700wdt.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
36 | #include <linux/types.h> | 35 | #include <linux/types.h> |
37 | #include <linux/miscdevice.h> | 36 | #include <linux/miscdevice.h> |
diff --git a/drivers/char/watchdog/ibmasr.c b/drivers/char/watchdog/ibmasr.c index 294c474ae485..b0741cbdc139 100644 --- a/drivers/char/watchdog/ibmasr.c +++ b/drivers/char/watchdog/ibmasr.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * of the GNU Public License, incorporated herein by reference. | 10 | * of the GNU Public License, incorporated herein by reference. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
diff --git a/drivers/char/watchdog/indydog.c b/drivers/char/watchdog/indydog.c index b4b94daba67e..d387979b2434 100644 --- a/drivers/char/watchdog/indydog.c +++ b/drivers/char/watchdog/indydog.c | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/moduleparam.h> | 15 | #include <linux/moduleparam.h> |
16 | #include <linux/config.h> | ||
17 | #include <linux/types.h> | 16 | #include <linux/types.h> |
18 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
19 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
diff --git a/drivers/char/watchdog/ixp2000_wdt.c b/drivers/char/watchdog/ixp2000_wdt.c index 0cfb9b9c4a4b..aa29a7d68759 100644 --- a/drivers/char/watchdog/ixp2000_wdt.c +++ b/drivers/char/watchdog/ixp2000_wdt.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * warranty of any kind, whether express or implied. | 16 | * warranty of any kind, whether express or implied. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/module.h> | 19 | #include <linux/module.h> |
21 | #include <linux/moduleparam.h> | 20 | #include <linux/moduleparam.h> |
22 | #include <linux/types.h> | 21 | #include <linux/types.h> |
diff --git a/drivers/char/watchdog/ixp4xx_wdt.c b/drivers/char/watchdog/ixp4xx_wdt.c index 3800835ca8f3..e6a3fe83fa01 100644 --- a/drivers/char/watchdog/ixp4xx_wdt.c +++ b/drivers/char/watchdog/ixp4xx_wdt.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * warranty of any kind, whether express or implied. | 13 | * warranty of any kind, whether express or implied. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
18 | #include <linux/moduleparam.h> | 17 | #include <linux/moduleparam.h> |
19 | #include <linux/types.h> | 18 | #include <linux/types.h> |
diff --git a/drivers/char/watchdog/machzwd.c b/drivers/char/watchdog/machzwd.c index a9a20aad61e7..b67b4878ae0f 100644 --- a/drivers/char/watchdog/machzwd.c +++ b/drivers/char/watchdog/machzwd.c | |||
@@ -28,7 +28,6 @@ | |||
28 | * Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT | 28 | * Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | #include <linux/module.h> | 31 | #include <linux/module.h> |
33 | #include <linux/moduleparam.h> | 32 | #include <linux/moduleparam.h> |
34 | #include <linux/types.h> | 33 | #include <linux/types.h> |
diff --git a/drivers/char/watchdog/mixcomwd.c b/drivers/char/watchdog/mixcomwd.c index d8dede575402..433c27f98159 100644 --- a/drivers/char/watchdog/mixcomwd.c +++ b/drivers/char/watchdog/mixcomwd.c | |||
@@ -37,7 +37,6 @@ | |||
37 | 37 | ||
38 | #include <linux/module.h> | 38 | #include <linux/module.h> |
39 | #include <linux/moduleparam.h> | 39 | #include <linux/moduleparam.h> |
40 | #include <linux/config.h> | ||
41 | #include <linux/types.h> | 40 | #include <linux/types.h> |
42 | #include <linux/miscdevice.h> | 41 | #include <linux/miscdevice.h> |
43 | #include <linux/ioport.h> | 42 | #include <linux/ioport.h> |
diff --git a/drivers/char/watchdog/mpc83xx_wdt.c b/drivers/char/watchdog/mpc83xx_wdt.c index 5d6f5061603a..dac1381af364 100644 --- a/drivers/char/watchdog/mpc83xx_wdt.c +++ b/drivers/char/watchdog/mpc83xx_wdt.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * option) any later version. | 15 | * option) any later version. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
20 | #include <linux/init.h> | 19 | #include <linux/init.h> |
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
diff --git a/drivers/char/watchdog/mpc8xx_wdt.c b/drivers/char/watchdog/mpc8xx_wdt.c index b2fc71e20850..11f0ccd4c4d4 100644 --- a/drivers/char/watchdog/mpc8xx_wdt.c +++ b/drivers/char/watchdog/mpc8xx_wdt.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * or implied. | 9 | * or implied. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/drivers/char/watchdog/mpcore_wdt.c b/drivers/char/watchdog/mpcore_wdt.c index 2c2c51773200..9c11d920add5 100644 --- a/drivers/char/watchdog/mpcore_wdt.c +++ b/drivers/char/watchdog/mpcore_wdt.c | |||
@@ -21,7 +21,6 @@ | |||
21 | */ | 21 | */ |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/moduleparam.h> | 23 | #include <linux/moduleparam.h> |
24 | #include <linux/config.h> | ||
25 | #include <linux/types.h> | 24 | #include <linux/types.h> |
26 | #include <linux/miscdevice.h> | 25 | #include <linux/miscdevice.h> |
27 | #include <linux/watchdog.h> | 26 | #include <linux/watchdog.h> |
diff --git a/drivers/char/watchdog/mv64x60_wdt.c b/drivers/char/watchdog/mv64x60_wdt.c index f1b9cf89f153..20a6cbb0fbb8 100644 --- a/drivers/char/watchdog/mv64x60_wdt.c +++ b/drivers/char/watchdog/mv64x60_wdt.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * or implied. | 15 | * or implied. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
20 | #include <linux/init.h> | 19 | #include <linux/init.h> |
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
diff --git a/drivers/char/watchdog/pcwd_usb.c b/drivers/char/watchdog/pcwd_usb.c index 0d072bed501d..92bf8c1a0f0d 100644 --- a/drivers/char/watchdog/pcwd_usb.c +++ b/drivers/char/watchdog/pcwd_usb.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * http://www.berkprod.com/ or http://www.pcwatchdog.com/ | 24 | * http://www.berkprod.com/ or http://www.pcwatchdog.com/ |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
29 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
30 | #include <linux/init.h> | 29 | #include <linux/init.h> |
diff --git a/drivers/char/watchdog/s3c2410_wdt.c b/drivers/char/watchdog/s3c2410_wdt.c index 1ea04e9b2b0b..f267dad26071 100644 --- a/drivers/char/watchdog/s3c2410_wdt.c +++ b/drivers/char/watchdog/s3c2410_wdt.c | |||
@@ -37,7 +37,6 @@ | |||
37 | 37 | ||
38 | #include <linux/module.h> | 38 | #include <linux/module.h> |
39 | #include <linux/moduleparam.h> | 39 | #include <linux/moduleparam.h> |
40 | #include <linux/config.h> | ||
41 | #include <linux/types.h> | 40 | #include <linux/types.h> |
42 | #include <linux/timer.h> | 41 | #include <linux/timer.h> |
43 | #include <linux/miscdevice.h> | 42 | #include <linux/miscdevice.h> |
diff --git a/drivers/char/watchdog/sa1100_wdt.c b/drivers/char/watchdog/sa1100_wdt.c index 522a9370db94..b22e95c5470c 100644 --- a/drivers/char/watchdog/sa1100_wdt.c +++ b/drivers/char/watchdog/sa1100_wdt.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * | 17 | * |
18 | * 27/11/2000 Initial release | 18 | * 27/11/2000 Initial release |
19 | */ | 19 | */ |
20 | #include <linux/config.h> | ||
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/moduleparam.h> | 21 | #include <linux/moduleparam.h> |
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
diff --git a/drivers/char/watchdog/sbc8360.c b/drivers/char/watchdog/sbc8360.c index c6cbf808d8c2..6562aa910ace 100644 --- a/drivers/char/watchdog/sbc8360.c +++ b/drivers/char/watchdog/sbc8360.c | |||
@@ -36,7 +36,6 @@ | |||
36 | * | 36 | * |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include <linux/config.h> | ||
40 | #include <linux/module.h> | 39 | #include <linux/module.h> |
41 | #include <linux/types.h> | 40 | #include <linux/types.h> |
42 | #include <linux/miscdevice.h> | 41 | #include <linux/miscdevice.h> |
diff --git a/drivers/char/watchdog/sbc_epx_c3.c b/drivers/char/watchdog/sbc_epx_c3.c index 837b1ec3ffe3..09867fadc720 100644 --- a/drivers/char/watchdog/sbc_epx_c3.c +++ b/drivers/char/watchdog/sbc_epx_c3.c | |||
@@ -15,7 +15,6 @@ | |||
15 | 15 | ||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/moduleparam.h> | 17 | #include <linux/moduleparam.h> |
18 | #include <linux/config.h> | ||
19 | #include <linux/types.h> | 18 | #include <linux/types.h> |
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
diff --git a/drivers/char/watchdog/sc1200wdt.c b/drivers/char/watchdog/sc1200wdt.c index 20b88f9b7be2..78ef6333c181 100644 --- a/drivers/char/watchdog/sc1200wdt.c +++ b/drivers/char/watchdog/sc1200wdt.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/moduleparam.h> | 31 | #include <linux/moduleparam.h> |
33 | #include <linux/miscdevice.h> | 32 | #include <linux/miscdevice.h> |
diff --git a/drivers/char/watchdog/scx200_wdt.c b/drivers/char/watchdog/scx200_wdt.c index b4a102a2d7e3..c0b4754e8de0 100644 --- a/drivers/char/watchdog/scx200_wdt.c +++ b/drivers/char/watchdog/scx200_wdt.c | |||
@@ -17,7 +17,6 @@ | |||
17 | of any nature resulting due to the use of this software. This | 17 | of any nature resulting due to the use of this software. This |
18 | software is provided AS-IS with no warranties. */ | 18 | software is provided AS-IS with no warranties. */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/moduleparam.h> | 21 | #include <linux/moduleparam.h> |
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
diff --git a/drivers/char/watchdog/shwdt.c b/drivers/char/watchdog/shwdt.c index 1f4cab55b2ef..803701b675c0 100644 --- a/drivers/char/watchdog/shwdt.c +++ b/drivers/char/watchdog/shwdt.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * Added expect close support, made emulated timeout runtime changeable | 17 | * Added expect close support, made emulated timeout runtime changeable |
18 | * general cleanups, add some ioctls | 18 | * general cleanups, add some ioctls |
19 | */ | 19 | */ |
20 | #include <linux/config.h> | ||
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/moduleparam.h> | 21 | #include <linux/moduleparam.h> |
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
diff --git a/drivers/char/watchdog/softdog.c b/drivers/char/watchdog/softdog.c index a91edaf3a350..79ce5c655428 100644 --- a/drivers/char/watchdog/softdog.c +++ b/drivers/char/watchdog/softdog.c | |||
@@ -38,7 +38,6 @@ | |||
38 | 38 | ||
39 | #include <linux/module.h> | 39 | #include <linux/module.h> |
40 | #include <linux/moduleparam.h> | 40 | #include <linux/moduleparam.h> |
41 | #include <linux/config.h> | ||
42 | #include <linux/types.h> | 41 | #include <linux/types.h> |
43 | #include <linux/timer.h> | 42 | #include <linux/timer.h> |
44 | #include <linux/miscdevice.h> | 43 | #include <linux/miscdevice.h> |
diff --git a/drivers/char/watchdog/w83977f_wdt.c b/drivers/char/watchdog/w83977f_wdt.c index a7ff64c8921f..c31849e4c5c2 100644 --- a/drivers/char/watchdog/w83977f_wdt.c +++ b/drivers/char/watchdog/w83977f_wdt.c | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/moduleparam.h> | 19 | #include <linux/moduleparam.h> |
20 | #include <linux/config.h> | ||
21 | #include <linux/types.h> | 20 | #include <linux/types.h> |
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
23 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
diff --git a/drivers/char/watchdog/wd501p.h b/drivers/char/watchdog/wd501p.h index 84e60eb74337..a4504f40394d 100644 --- a/drivers/char/watchdog/wd501p.h +++ b/drivers/char/watchdog/wd501p.h | |||
@@ -19,7 +19,6 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | 22 | ||
24 | #define WDT_COUNT0 (io+0) | 23 | #define WDT_COUNT0 (io+0) |
25 | #define WDT_COUNT1 (io+1) | 24 | #define WDT_COUNT1 (io+1) |
diff --git a/drivers/char/watchdog/wdrtas.c b/drivers/char/watchdog/wdrtas.c index dacfe31caccf..3a462c34b92a 100644 --- a/drivers/char/watchdog/wdrtas.c +++ b/drivers/char/watchdog/wdrtas.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 26 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
31 | #include <linux/init.h> | 30 | #include <linux/init.h> |
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
diff --git a/drivers/char/watchdog/wdt.c b/drivers/char/watchdog/wdt.c index ec7e401228ee..2586e9e858e2 100644 --- a/drivers/char/watchdog/wdt.c +++ b/drivers/char/watchdog/wdt.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * Matt Domsch : Added nowayout module option | 31 | * Matt Domsch : Added nowayout module option |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
36 | #include <linux/module.h> | 35 | #include <linux/module.h> |
37 | #include <linux/moduleparam.h> | 36 | #include <linux/moduleparam.h> |
diff --git a/drivers/char/watchdog/wdt977.c b/drivers/char/watchdog/wdt977.c index 3843900e94c4..3cde2b9bb763 100644 --- a/drivers/char/watchdog/wdt977.c +++ b/drivers/char/watchdog/wdt977.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/moduleparam.h> | 26 | #include <linux/moduleparam.h> |
27 | #include <linux/config.h> | ||
28 | #include <linux/types.h> | 27 | #include <linux/types.h> |
29 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
30 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
diff --git a/drivers/char/watchdog/wdt_pci.c b/drivers/char/watchdog/wdt_pci.c index 4b3311993d48..c79cc9543d96 100644 --- a/drivers/char/watchdog/wdt_pci.c +++ b/drivers/char/watchdog/wdt_pci.c | |||
@@ -35,7 +35,6 @@ | |||
35 | * Matt Domsch : nowayout module option | 35 | * Matt Domsch : nowayout module option |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include <linux/config.h> | ||
39 | #include <linux/interrupt.h> | 38 | #include <linux/interrupt.h> |
40 | #include <linux/module.h> | 39 | #include <linux/module.h> |
41 | #include <linux/moduleparam.h> | 40 | #include <linux/moduleparam.h> |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 35e0b9ceecf7..1ba4039777e8 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * | 15 | * |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
20 | #include <linux/module.h> | 19 | #include <linux/module.h> |
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 145061b8472a..25eee5394201 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/sysdev.h> | 13 | #include <linux/sysdev.h> |
15 | #include <linux/cpu.h> | 14 | #include <linux/cpu.h> |
diff --git a/drivers/cpufreq/cpufreq_userspace.c b/drivers/cpufreq/cpufreq_userspace.c index 071ee4f1bbf2..44ae5e5b94cf 100644 --- a/drivers/cpufreq/cpufreq_userspace.c +++ b/drivers/cpufreq/cpufreq_userspace.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/smp.h> | 16 | #include <linux/smp.h> |
diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c index 53423ad6d4a3..d75864e35fef 100644 --- a/drivers/edac/amd76x_edac.c +++ b/drivers/edac/amd76x_edac.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
18 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
@@ -20,6 +19,9 @@ | |||
20 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
21 | #include "edac_mc.h" | 20 | #include "edac_mc.h" |
22 | 21 | ||
22 | #define AMD76X_REVISION " Ver: 2.0.0 " __DATE__ | ||
23 | |||
24 | |||
23 | #define amd76x_printk(level, fmt, arg...) \ | 25 | #define amd76x_printk(level, fmt, arg...) \ |
24 | edac_printk(level, "amd76x", fmt, ##arg) | 26 | edac_printk(level, "amd76x", fmt, ##arg) |
25 | 27 | ||
@@ -102,15 +104,18 @@ static const struct amd76x_dev_info amd76x_devs[] = { | |||
102 | static void amd76x_get_error_info(struct mem_ctl_info *mci, | 104 | static void amd76x_get_error_info(struct mem_ctl_info *mci, |
103 | struct amd76x_error_info *info) | 105 | struct amd76x_error_info *info) |
104 | { | 106 | { |
105 | pci_read_config_dword(mci->pdev, AMD76X_ECC_MODE_STATUS, | 107 | struct pci_dev *pdev; |
108 | |||
109 | pdev = to_pci_dev(mci->dev); | ||
110 | pci_read_config_dword(pdev, AMD76X_ECC_MODE_STATUS, | ||
106 | &info->ecc_mode_status); | 111 | &info->ecc_mode_status); |
107 | 112 | ||
108 | if (info->ecc_mode_status & BIT(8)) | 113 | if (info->ecc_mode_status & BIT(8)) |
109 | pci_write_bits32(mci->pdev, AMD76X_ECC_MODE_STATUS, | 114 | pci_write_bits32(pdev, AMD76X_ECC_MODE_STATUS, |
110 | (u32) BIT(8), (u32) BIT(8)); | 115 | (u32) BIT(8), (u32) BIT(8)); |
111 | 116 | ||
112 | if (info->ecc_mode_status & BIT(9)) | 117 | if (info->ecc_mode_status & BIT(9)) |
113 | pci_write_bits32(mci->pdev, AMD76X_ECC_MODE_STATUS, | 118 | pci_write_bits32(pdev, AMD76X_ECC_MODE_STATUS, |
114 | (u32) BIT(9), (u32) BIT(9)); | 119 | (u32) BIT(9), (u32) BIT(9)); |
115 | } | 120 | } |
116 | 121 | ||
@@ -176,6 +181,38 @@ static void amd76x_check(struct mem_ctl_info *mci) | |||
176 | amd76x_process_error_info(mci, &info, 1); | 181 | amd76x_process_error_info(mci, &info, 1); |
177 | } | 182 | } |
178 | 183 | ||
184 | static void amd76x_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, | ||
185 | enum edac_type edac_mode) | ||
186 | { | ||
187 | struct csrow_info *csrow; | ||
188 | u32 mba, mba_base, mba_mask, dms; | ||
189 | int index; | ||
190 | |||
191 | for (index = 0; index < mci->nr_csrows; index++) { | ||
192 | csrow = &mci->csrows[index]; | ||
193 | |||
194 | /* find the DRAM Chip Select Base address and mask */ | ||
195 | pci_read_config_dword(pdev, | ||
196 | AMD76X_MEM_BASE_ADDR + (index * 4), | ||
197 | &mba); | ||
198 | |||
199 | if (!(mba & BIT(0))) | ||
200 | continue; | ||
201 | |||
202 | mba_base = mba & 0xff800000UL; | ||
203 | mba_mask = ((mba & 0xff80) << 16) | 0x7fffffUL; | ||
204 | pci_read_config_dword(pdev, AMD76X_DRAM_MODE_STATUS, &dms); | ||
205 | csrow->first_page = mba_base >> PAGE_SHIFT; | ||
206 | csrow->nr_pages = (mba_mask + 1) >> PAGE_SHIFT; | ||
207 | csrow->last_page = csrow->first_page + csrow->nr_pages - 1; | ||
208 | csrow->page_mask = mba_mask >> PAGE_SHIFT; | ||
209 | csrow->grain = csrow->nr_pages << PAGE_SHIFT; | ||
210 | csrow->mtype = MEM_RDDR; | ||
211 | csrow->dtype = ((dms >> index) & 0x1) ? DEV_X4 : DEV_UNKNOWN; | ||
212 | csrow->edac_mode = edac_mode; | ||
213 | } | ||
214 | } | ||
215 | |||
179 | /** | 216 | /** |
180 | * amd76x_probe1 - Perform set up for detected device | 217 | * amd76x_probe1 - Perform set up for detected device |
181 | * @pdev; PCI device detected | 218 | * @pdev; PCI device detected |
@@ -187,15 +224,13 @@ static void amd76x_check(struct mem_ctl_info *mci) | |||
187 | */ | 224 | */ |
188 | static int amd76x_probe1(struct pci_dev *pdev, int dev_idx) | 225 | static int amd76x_probe1(struct pci_dev *pdev, int dev_idx) |
189 | { | 226 | { |
190 | int rc = -ENODEV; | 227 | static const enum edac_type ems_modes[] = { |
191 | int index; | ||
192 | struct mem_ctl_info *mci = NULL; | ||
193 | enum edac_type ems_modes[] = { | ||
194 | EDAC_NONE, | 228 | EDAC_NONE, |
195 | EDAC_EC, | 229 | EDAC_EC, |
196 | EDAC_SECDED, | 230 | EDAC_SECDED, |
197 | EDAC_SECDED | 231 | EDAC_SECDED |
198 | }; | 232 | }; |
233 | struct mem_ctl_info *mci = NULL; | ||
199 | u32 ems; | 234 | u32 ems; |
200 | u32 ems_mode; | 235 | u32 ems_mode; |
201 | struct amd76x_error_info discard; | 236 | struct amd76x_error_info discard; |
@@ -206,53 +241,28 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx) | |||
206 | mci = edac_mc_alloc(0, AMD76X_NR_CSROWS, AMD76X_NR_CHANS); | 241 | mci = edac_mc_alloc(0, AMD76X_NR_CSROWS, AMD76X_NR_CHANS); |
207 | 242 | ||
208 | if (mci == NULL) { | 243 | if (mci == NULL) { |
209 | rc = -ENOMEM; | 244 | return -ENOMEM; |
210 | goto fail; | ||
211 | } | 245 | } |
212 | 246 | ||
213 | debugf0("%s(): mci = %p\n", __func__, mci); | 247 | debugf0("%s(): mci = %p\n", __func__, mci); |
214 | mci->pdev = pdev; | 248 | mci->dev = &pdev->dev; |
215 | mci->mtype_cap = MEM_FLAG_RDDR; | 249 | mci->mtype_cap = MEM_FLAG_RDDR; |
216 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED; | 250 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED; |
217 | mci->edac_cap = ems_mode ? | 251 | mci->edac_cap = ems_mode ? |
218 | (EDAC_FLAG_EC | EDAC_FLAG_SECDED) : EDAC_FLAG_NONE; | 252 | (EDAC_FLAG_EC | EDAC_FLAG_SECDED) : EDAC_FLAG_NONE; |
219 | mci->mod_name = EDAC_MOD_STR; | 253 | mci->mod_name = EDAC_MOD_STR; |
220 | mci->mod_ver = "$Revision: 1.4.2.5 $"; | 254 | mci->mod_ver = AMD76X_REVISION; |
221 | mci->ctl_name = amd76x_devs[dev_idx].ctl_name; | 255 | mci->ctl_name = amd76x_devs[dev_idx].ctl_name; |
222 | mci->edac_check = amd76x_check; | 256 | mci->edac_check = amd76x_check; |
223 | mci->ctl_page_to_phys = NULL; | 257 | mci->ctl_page_to_phys = NULL; |
224 | 258 | ||
225 | for (index = 0; index < mci->nr_csrows; index++) { | 259 | amd76x_init_csrows(mci, pdev, ems_modes[ems_mode]); |
226 | struct csrow_info *csrow = &mci->csrows[index]; | ||
227 | u32 mba; | ||
228 | u32 mba_base; | ||
229 | u32 mba_mask; | ||
230 | u32 dms; | ||
231 | |||
232 | /* find the DRAM Chip Select Base address and mask */ | ||
233 | pci_read_config_dword(mci->pdev, | ||
234 | AMD76X_MEM_BASE_ADDR + (index * 4), &mba); | ||
235 | |||
236 | if (!(mba & BIT(0))) | ||
237 | continue; | ||
238 | |||
239 | mba_base = mba & 0xff800000UL; | ||
240 | mba_mask = ((mba & 0xff80) << 16) | 0x7fffffUL; | ||
241 | pci_read_config_dword(mci->pdev, AMD76X_DRAM_MODE_STATUS, | ||
242 | &dms); | ||
243 | csrow->first_page = mba_base >> PAGE_SHIFT; | ||
244 | csrow->nr_pages = (mba_mask + 1) >> PAGE_SHIFT; | ||
245 | csrow->last_page = csrow->first_page + csrow->nr_pages - 1; | ||
246 | csrow->page_mask = mba_mask >> PAGE_SHIFT; | ||
247 | csrow->grain = csrow->nr_pages << PAGE_SHIFT; | ||
248 | csrow->mtype = MEM_RDDR; | ||
249 | csrow->dtype = ((dms >> index) & 0x1) ? DEV_X4 : DEV_UNKNOWN; | ||
250 | csrow->edac_mode = ems_modes[ems_mode]; | ||
251 | } | ||
252 | |||
253 | amd76x_get_error_info(mci, &discard); /* clear counters */ | 260 | amd76x_get_error_info(mci, &discard); /* clear counters */ |
254 | 261 | ||
255 | if (edac_mc_add_mc(mci)) { | 262 | /* Here we assume that we will never see multiple instances of this |
263 | * type of memory controller. The ID is therefore hardcoded to 0. | ||
264 | */ | ||
265 | if (edac_mc_add_mc(mci,0)) { | ||
256 | debugf3("%s(): failed edac_mc_add_mc()\n", __func__); | 266 | debugf3("%s(): failed edac_mc_add_mc()\n", __func__); |
257 | goto fail; | 267 | goto fail; |
258 | } | 268 | } |
@@ -262,9 +272,8 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx) | |||
262 | return 0; | 272 | return 0; |
263 | 273 | ||
264 | fail: | 274 | fail: |
265 | if (mci != NULL) | 275 | edac_mc_free(mci); |
266 | edac_mc_free(mci); | 276 | return -ENODEV; |
267 | return rc; | ||
268 | } | 277 | } |
269 | 278 | ||
270 | /* returns count (>= 0), or negative on error */ | 279 | /* returns count (>= 0), or negative on error */ |
@@ -291,7 +300,7 @@ static void __devexit amd76x_remove_one(struct pci_dev *pdev) | |||
291 | 300 | ||
292 | debugf0("%s()\n", __func__); | 301 | debugf0("%s()\n", __func__); |
293 | 302 | ||
294 | if ((mci = edac_mc_del_mc(pdev)) == NULL) | 303 | if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) |
295 | return; | 304 | return; |
296 | 305 | ||
297 | edac_mc_free(mci); | 306 | edac_mc_free(mci); |
diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c index fce31936e6d7..815c3eb783de 100644 --- a/drivers/edac/e752x_edac.c +++ b/drivers/edac/e752x_edac.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/init.h> | 21 | #include <linux/init.h> |
23 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
@@ -25,6 +24,8 @@ | |||
25 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
26 | #include "edac_mc.h" | 25 | #include "edac_mc.h" |
27 | 26 | ||
27 | #define E752X_REVISION " Ver: 2.0.0 " __DATE__ | ||
28 | |||
28 | static int force_function_unhide; | 29 | static int force_function_unhide; |
29 | 30 | ||
30 | #define e752x_printk(level, fmt, arg...) \ | 31 | #define e752x_printk(level, fmt, arg...) \ |
@@ -763,22 +764,174 @@ static void e752x_check(struct mem_ctl_info *mci) | |||
763 | e752x_process_error_info(mci, &info, 1); | 764 | e752x_process_error_info(mci, &info, 1); |
764 | } | 765 | } |
765 | 766 | ||
766 | static int e752x_probe1(struct pci_dev *pdev, int dev_idx) | 767 | /* Return 1 if dual channel mode is active. Else return 0. */ |
768 | static inline int dual_channel_active(u16 ddrcsr) | ||
769 | { | ||
770 | return (((ddrcsr >> 12) & 3) == 3); | ||
771 | } | ||
772 | |||
773 | static void e752x_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, | ||
774 | u16 ddrcsr) | ||
775 | { | ||
776 | struct csrow_info *csrow; | ||
777 | unsigned long last_cumul_size; | ||
778 | int index, mem_dev, drc_chan; | ||
779 | int drc_drbg; /* DRB granularity 0=64mb, 1=128mb */ | ||
780 | int drc_ddim; /* DRAM Data Integrity Mode 0=none, 2=edac */ | ||
781 | u8 value; | ||
782 | u32 dra, drc, cumul_size; | ||
783 | |||
784 | pci_read_config_dword(pdev, E752X_DRA, &dra); | ||
785 | pci_read_config_dword(pdev, E752X_DRC, &drc); | ||
786 | drc_chan = dual_channel_active(ddrcsr); | ||
787 | drc_drbg = drc_chan + 1; /* 128 in dual mode, 64 in single */ | ||
788 | drc_ddim = (drc >> 20) & 0x3; | ||
789 | |||
790 | /* The dram row boundary (DRB) reg values are boundary address for | ||
791 | * each DRAM row with a granularity of 64 or 128MB (single/dual | ||
792 | * channel operation). DRB regs are cumulative; therefore DRB7 will | ||
793 | * contain the total memory contained in all eight rows. | ||
794 | */ | ||
795 | for (last_cumul_size = index = 0; index < mci->nr_csrows; index++) { | ||
796 | /* mem_dev 0=x8, 1=x4 */ | ||
797 | mem_dev = (dra >> (index * 4 + 2)) & 0x3; | ||
798 | csrow = &mci->csrows[index]; | ||
799 | |||
800 | mem_dev = (mem_dev == 2); | ||
801 | pci_read_config_byte(pdev, E752X_DRB + index, &value); | ||
802 | /* convert a 128 or 64 MiB DRB to a page size. */ | ||
803 | cumul_size = value << (25 + drc_drbg - PAGE_SHIFT); | ||
804 | debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, | ||
805 | cumul_size); | ||
806 | if (cumul_size == last_cumul_size) | ||
807 | continue; /* not populated */ | ||
808 | |||
809 | csrow->first_page = last_cumul_size; | ||
810 | csrow->last_page = cumul_size - 1; | ||
811 | csrow->nr_pages = cumul_size - last_cumul_size; | ||
812 | last_cumul_size = cumul_size; | ||
813 | csrow->grain = 1 << 12; /* 4KiB - resolution of CELOG */ | ||
814 | csrow->mtype = MEM_RDDR; /* only one type supported */ | ||
815 | csrow->dtype = mem_dev ? DEV_X4 : DEV_X8; | ||
816 | |||
817 | /* | ||
818 | * if single channel or x8 devices then SECDED | ||
819 | * if dual channel and x4 then S4ECD4ED | ||
820 | */ | ||
821 | if (drc_ddim) { | ||
822 | if (drc_chan && mem_dev) { | ||
823 | csrow->edac_mode = EDAC_S4ECD4ED; | ||
824 | mci->edac_cap |= EDAC_FLAG_S4ECD4ED; | ||
825 | } else { | ||
826 | csrow->edac_mode = EDAC_SECDED; | ||
827 | mci->edac_cap |= EDAC_FLAG_SECDED; | ||
828 | } | ||
829 | } else | ||
830 | csrow->edac_mode = EDAC_NONE; | ||
831 | } | ||
832 | } | ||
833 | |||
834 | static void e752x_init_mem_map_table(struct pci_dev *pdev, | ||
835 | struct e752x_pvt *pvt) | ||
767 | { | 836 | { |
768 | int rc = -ENODEV; | ||
769 | int index; | 837 | int index; |
838 | u8 value, last, row, stat8; | ||
839 | |||
840 | last = 0; | ||
841 | row = 0; | ||
842 | |||
843 | for (index = 0; index < 8; index += 2) { | ||
844 | pci_read_config_byte(pdev, E752X_DRB + index, &value); | ||
845 | /* test if there is a dimm in this slot */ | ||
846 | if (value == last) { | ||
847 | /* no dimm in the slot, so flag it as empty */ | ||
848 | pvt->map[index] = 0xff; | ||
849 | pvt->map[index + 1] = 0xff; | ||
850 | } else { /* there is a dimm in the slot */ | ||
851 | pvt->map[index] = row; | ||
852 | row++; | ||
853 | last = value; | ||
854 | /* test the next value to see if the dimm is double | ||
855 | * sided | ||
856 | */ | ||
857 | pci_read_config_byte(pdev, E752X_DRB + index + 1, | ||
858 | &value); | ||
859 | pvt->map[index + 1] = (value == last) ? | ||
860 | 0xff : /* the dimm is single sided, | ||
861 | so flag as empty */ | ||
862 | row; /* this is a double sided dimm | ||
863 | to save the next row # */ | ||
864 | row++; | ||
865 | last = value; | ||
866 | } | ||
867 | } | ||
868 | |||
869 | /* set the map type. 1 = normal, 0 = reversed */ | ||
870 | pci_read_config_byte(pdev, E752X_DRM, &stat8); | ||
871 | pvt->map_type = ((stat8 & 0x0f) > ((stat8 >> 4) & 0x0f)); | ||
872 | } | ||
873 | |||
874 | /* Return 0 on success or 1 on failure. */ | ||
875 | static int e752x_get_devs(struct pci_dev *pdev, int dev_idx, | ||
876 | struct e752x_pvt *pvt) | ||
877 | { | ||
878 | struct pci_dev *dev; | ||
879 | |||
880 | pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL, | ||
881 | pvt->dev_info->err_dev, | ||
882 | pvt->bridge_ck); | ||
883 | |||
884 | if (pvt->bridge_ck == NULL) | ||
885 | pvt->bridge_ck = pci_scan_single_device(pdev->bus, | ||
886 | PCI_DEVFN(0, 1)); | ||
887 | |||
888 | if (pvt->bridge_ck == NULL) { | ||
889 | e752x_printk(KERN_ERR, "error reporting device not found:" | ||
890 | "vendor %x device 0x%x (broken BIOS?)\n", | ||
891 | PCI_VENDOR_ID_INTEL, e752x_devs[dev_idx].err_dev); | ||
892 | return 1; | ||
893 | } | ||
894 | |||
895 | dev = pci_get_device(PCI_VENDOR_ID_INTEL, e752x_devs[dev_idx].ctl_dev, | ||
896 | NULL); | ||
897 | |||
898 | if (dev == NULL) | ||
899 | goto fail; | ||
900 | |||
901 | pvt->dev_d0f0 = dev; | ||
902 | pvt->dev_d0f1 = pci_dev_get(pvt->bridge_ck); | ||
903 | |||
904 | return 0; | ||
905 | |||
906 | fail: | ||
907 | pci_dev_put(pvt->bridge_ck); | ||
908 | return 1; | ||
909 | } | ||
910 | |||
911 | static void e752x_init_error_reporting_regs(struct e752x_pvt *pvt) | ||
912 | { | ||
913 | struct pci_dev *dev; | ||
914 | |||
915 | dev = pvt->dev_d0f1; | ||
916 | /* Turn off error disable & SMI in case the BIOS turned it on */ | ||
917 | pci_write_config_byte(dev, E752X_HI_ERRMASK, 0x00); | ||
918 | pci_write_config_byte(dev, E752X_HI_SMICMD, 0x00); | ||
919 | pci_write_config_word(dev, E752X_SYSBUS_ERRMASK, 0x00); | ||
920 | pci_write_config_word(dev, E752X_SYSBUS_SMICMD, 0x00); | ||
921 | pci_write_config_byte(dev, E752X_BUF_ERRMASK, 0x00); | ||
922 | pci_write_config_byte(dev, E752X_BUF_SMICMD, 0x00); | ||
923 | pci_write_config_byte(dev, E752X_DRAM_ERRMASK, 0x00); | ||
924 | pci_write_config_byte(dev, E752X_DRAM_SMICMD, 0x00); | ||
925 | } | ||
926 | |||
927 | static int e752x_probe1(struct pci_dev *pdev, int dev_idx) | ||
928 | { | ||
770 | u16 pci_data; | 929 | u16 pci_data; |
771 | u8 stat8; | 930 | u8 stat8; |
772 | struct mem_ctl_info *mci = NULL; | 931 | struct mem_ctl_info *mci; |
773 | struct e752x_pvt *pvt = NULL; | 932 | struct e752x_pvt *pvt; |
774 | u16 ddrcsr; | 933 | u16 ddrcsr; |
775 | u32 drc; | ||
776 | int drc_chan; /* Number of channels 0=1chan,1=2chan */ | 934 | int drc_chan; /* Number of channels 0=1chan,1=2chan */ |
777 | int drc_drbg; /* DRB granularity 0=64mb, 1=128mb */ | ||
778 | int drc_ddim; /* DRAM Data Integrity Mode 0=none,2=edac */ | ||
779 | u32 dra; | ||
780 | unsigned long last_cumul_size; | ||
781 | struct pci_dev *dev = NULL; | ||
782 | struct e752x_error_info discard; | 935 | struct e752x_error_info discard; |
783 | 936 | ||
784 | debugf0("%s(): mci\n", __func__); | 937 | debugf0("%s(): mci\n", __func__); |
@@ -792,25 +945,20 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx) | |||
792 | if (!force_function_unhide && !(stat8 & (1 << 5))) { | 945 | if (!force_function_unhide && !(stat8 & (1 << 5))) { |
793 | printk(KERN_INFO "Contact your BIOS vendor to see if the " | 946 | printk(KERN_INFO "Contact your BIOS vendor to see if the " |
794 | "E752x error registers can be safely un-hidden\n"); | 947 | "E752x error registers can be safely un-hidden\n"); |
795 | goto fail; | 948 | return -ENOMEM; |
796 | } | 949 | } |
797 | stat8 |= (1 << 5); | 950 | stat8 |= (1 << 5); |
798 | pci_write_config_byte(pdev, E752X_DEVPRES1, stat8); | 951 | pci_write_config_byte(pdev, E752X_DEVPRES1, stat8); |
799 | 952 | ||
800 | /* need to find out the number of channels */ | ||
801 | pci_read_config_dword(pdev, E752X_DRC, &drc); | ||
802 | pci_read_config_word(pdev, E752X_DDRCSR, &ddrcsr); | 953 | pci_read_config_word(pdev, E752X_DDRCSR, &ddrcsr); |
803 | /* FIXME: should check >>12 or 0xf, true for all? */ | 954 | /* FIXME: should check >>12 or 0xf, true for all? */ |
804 | /* Dual channel = 1, Single channel = 0 */ | 955 | /* Dual channel = 1, Single channel = 0 */ |
805 | drc_chan = (((ddrcsr >> 12) & 3) == 3); | 956 | drc_chan = dual_channel_active(ddrcsr); |
806 | drc_drbg = drc_chan + 1; /* 128 in dual mode, 64 in single */ | ||
807 | drc_ddim = (drc >> 20) & 0x3; | ||
808 | 957 | ||
809 | mci = edac_mc_alloc(sizeof(*pvt), E752X_NR_CSROWS, drc_chan + 1); | 958 | mci = edac_mc_alloc(sizeof(*pvt), E752X_NR_CSROWS, drc_chan + 1); |
810 | 959 | ||
811 | if (mci == NULL) { | 960 | if (mci == NULL) { |
812 | rc = -ENOMEM; | 961 | return -ENOMEM; |
813 | goto fail; | ||
814 | } | 962 | } |
815 | 963 | ||
816 | debugf3("%s(): init mci\n", __func__); | 964 | debugf3("%s(): init mci\n", __func__); |
@@ -819,159 +967,54 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx) | |||
819 | EDAC_FLAG_S4ECD4ED; | 967 | EDAC_FLAG_S4ECD4ED; |
820 | /* FIXME - what if different memory types are in different csrows? */ | 968 | /* FIXME - what if different memory types are in different csrows? */ |
821 | mci->mod_name = EDAC_MOD_STR; | 969 | mci->mod_name = EDAC_MOD_STR; |
822 | mci->mod_ver = "$Revision: 1.5.2.11 $"; | 970 | mci->mod_ver = E752X_REVISION; |
823 | mci->pdev = pdev; | 971 | mci->dev = &pdev->dev; |
824 | 972 | ||
825 | debugf3("%s(): init pvt\n", __func__); | 973 | debugf3("%s(): init pvt\n", __func__); |
826 | pvt = (struct e752x_pvt *) mci->pvt_info; | 974 | pvt = (struct e752x_pvt *) mci->pvt_info; |
827 | pvt->dev_info = &e752x_devs[dev_idx]; | 975 | pvt->dev_info = &e752x_devs[dev_idx]; |
828 | pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL, | 976 | pvt->mc_symmetric = ((ddrcsr & 0x10) != 0); |
829 | pvt->dev_info->err_dev, | ||
830 | pvt->bridge_ck); | ||
831 | |||
832 | if (pvt->bridge_ck == NULL) | ||
833 | pvt->bridge_ck = pci_scan_single_device(pdev->bus, | ||
834 | PCI_DEVFN(0, 1)); | ||
835 | 977 | ||
836 | if (pvt->bridge_ck == NULL) { | 978 | if (e752x_get_devs(pdev, dev_idx, pvt)) { |
837 | e752x_printk(KERN_ERR, "error reporting device not found:" | 979 | edac_mc_free(mci); |
838 | "vendor %x device 0x%x (broken BIOS?)\n", | 980 | return -ENODEV; |
839 | PCI_VENDOR_ID_INTEL, e752x_devs[dev_idx].err_dev); | ||
840 | goto fail; | ||
841 | } | 981 | } |
842 | 982 | ||
843 | pvt->mc_symmetric = ((ddrcsr & 0x10) != 0); | ||
844 | debugf3("%s(): more mci init\n", __func__); | 983 | debugf3("%s(): more mci init\n", __func__); |
845 | mci->ctl_name = pvt->dev_info->ctl_name; | 984 | mci->ctl_name = pvt->dev_info->ctl_name; |
846 | mci->edac_check = e752x_check; | 985 | mci->edac_check = e752x_check; |
847 | mci->ctl_page_to_phys = ctl_page_to_phys; | 986 | mci->ctl_page_to_phys = ctl_page_to_phys; |
848 | 987 | ||
849 | /* find out the device types */ | 988 | e752x_init_csrows(mci, pdev, ddrcsr); |
850 | pci_read_config_dword(pdev, E752X_DRA, &dra); | 989 | e752x_init_mem_map_table(pdev, pvt); |
851 | |||
852 | /* | ||
853 | * The dram row boundary (DRB) reg values are boundary address for | ||
854 | * each DRAM row with a granularity of 64 or 128MB (single/dual | ||
855 | * channel operation). DRB regs are cumulative; therefore DRB7 will | ||
856 | * contain the total memory contained in all eight rows. | ||
857 | */ | ||
858 | for (last_cumul_size = index = 0; index < mci->nr_csrows; index++) { | ||
859 | u8 value; | ||
860 | u32 cumul_size; | ||
861 | |||
862 | /* mem_dev 0=x8, 1=x4 */ | ||
863 | int mem_dev = (dra >> (index * 4 + 2)) & 0x3; | ||
864 | struct csrow_info *csrow = &mci->csrows[index]; | ||
865 | |||
866 | mem_dev = (mem_dev == 2); | ||
867 | pci_read_config_byte(mci->pdev, E752X_DRB + index, &value); | ||
868 | /* convert a 128 or 64 MiB DRB to a page size. */ | ||
869 | cumul_size = value << (25 + drc_drbg - PAGE_SHIFT); | ||
870 | debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, | ||
871 | cumul_size); | ||
872 | |||
873 | if (cumul_size == last_cumul_size) | ||
874 | continue; /* not populated */ | ||
875 | |||
876 | csrow->first_page = last_cumul_size; | ||
877 | csrow->last_page = cumul_size - 1; | ||
878 | csrow->nr_pages = cumul_size - last_cumul_size; | ||
879 | last_cumul_size = cumul_size; | ||
880 | csrow->grain = 1 << 12; /* 4KiB - resolution of CELOG */ | ||
881 | csrow->mtype = MEM_RDDR; /* only one type supported */ | ||
882 | csrow->dtype = mem_dev ? DEV_X4 : DEV_X8; | ||
883 | |||
884 | /* | ||
885 | * if single channel or x8 devices then SECDED | ||
886 | * if dual channel and x4 then S4ECD4ED | ||
887 | */ | ||
888 | if (drc_ddim) { | ||
889 | if (drc_chan && mem_dev) { | ||
890 | csrow->edac_mode = EDAC_S4ECD4ED; | ||
891 | mci->edac_cap |= EDAC_FLAG_S4ECD4ED; | ||
892 | } else { | ||
893 | csrow->edac_mode = EDAC_SECDED; | ||
894 | mci->edac_cap |= EDAC_FLAG_SECDED; | ||
895 | } | ||
896 | } else | ||
897 | csrow->edac_mode = EDAC_NONE; | ||
898 | } | ||
899 | |||
900 | /* Fill in the memory map table */ | ||
901 | { | ||
902 | u8 value; | ||
903 | u8 last = 0; | ||
904 | u8 row = 0; | ||
905 | |||
906 | for (index = 0; index < 8; index += 2) { | ||
907 | pci_read_config_byte(mci->pdev, E752X_DRB + index, | ||
908 | &value); | ||
909 | |||
910 | /* test if there is a dimm in this slot */ | ||
911 | if (value == last) { | ||
912 | /* no dimm in the slot, so flag it as empty */ | ||
913 | pvt->map[index] = 0xff; | ||
914 | pvt->map[index + 1] = 0xff; | ||
915 | } else { /* there is a dimm in the slot */ | ||
916 | pvt->map[index] = row; | ||
917 | row++; | ||
918 | last = value; | ||
919 | /* test the next value to see if the dimm is | ||
920 | double sided */ | ||
921 | pci_read_config_byte(mci->pdev, | ||
922 | E752X_DRB + index + 1, | ||
923 | &value); | ||
924 | pvt->map[index + 1] = (value == last) ? | ||
925 | 0xff : /* the dimm is single sided, | ||
926 | * so flag as empty | ||
927 | */ | ||
928 | row; /* this is a double sided dimm | ||
929 | * to save the next row # | ||
930 | */ | ||
931 | row++; | ||
932 | last = value; | ||
933 | } | ||
934 | } | ||
935 | } | ||
936 | 990 | ||
937 | /* set the map type. 1 = normal, 0 = reversed */ | 991 | /* set the map type. 1 = normal, 0 = reversed */ |
938 | pci_read_config_byte(mci->pdev, E752X_DRM, &stat8); | 992 | pci_read_config_byte(pdev, E752X_DRM, &stat8); |
939 | pvt->map_type = ((stat8 & 0x0f) > ((stat8 >> 4) & 0x0f)); | 993 | pvt->map_type = ((stat8 & 0x0f) > ((stat8 >> 4) & 0x0f)); |
940 | 994 | ||
941 | mci->edac_cap |= EDAC_FLAG_NONE; | 995 | mci->edac_cap |= EDAC_FLAG_NONE; |
942 | debugf3("%s(): tolm, remapbase, remaplimit\n", __func__); | 996 | debugf3("%s(): tolm, remapbase, remaplimit\n", __func__); |
943 | 997 | ||
944 | /* load the top of low memory, remap base, and remap limit vars */ | 998 | /* load the top of low memory, remap base, and remap limit vars */ |
945 | pci_read_config_word(mci->pdev, E752X_TOLM, &pci_data); | 999 | pci_read_config_word(pdev, E752X_TOLM, &pci_data); |
946 | pvt->tolm = ((u32) pci_data) << 4; | 1000 | pvt->tolm = ((u32) pci_data) << 4; |
947 | pci_read_config_word(mci->pdev, E752X_REMAPBASE, &pci_data); | 1001 | pci_read_config_word(pdev, E752X_REMAPBASE, &pci_data); |
948 | pvt->remapbase = ((u32) pci_data) << 14; | 1002 | pvt->remapbase = ((u32) pci_data) << 14; |
949 | pci_read_config_word(mci->pdev, E752X_REMAPLIMIT, &pci_data); | 1003 | pci_read_config_word(pdev, E752X_REMAPLIMIT, &pci_data); |
950 | pvt->remaplimit = ((u32) pci_data) << 14; | 1004 | pvt->remaplimit = ((u32) pci_data) << 14; |
951 | e752x_printk(KERN_INFO, | 1005 | e752x_printk(KERN_INFO, |
952 | "tolm = %x, remapbase = %x, remaplimit = %x\n", pvt->tolm, | 1006 | "tolm = %x, remapbase = %x, remaplimit = %x\n", pvt->tolm, |
953 | pvt->remapbase, pvt->remaplimit); | 1007 | pvt->remapbase, pvt->remaplimit); |
954 | 1008 | ||
955 | if (edac_mc_add_mc(mci)) { | 1009 | /* Here we assume that we will never see multiple instances of this |
1010 | * type of memory controller. The ID is therefore hardcoded to 0. | ||
1011 | */ | ||
1012 | if (edac_mc_add_mc(mci,0)) { | ||
956 | debugf3("%s(): failed edac_mc_add_mc()\n", __func__); | 1013 | debugf3("%s(): failed edac_mc_add_mc()\n", __func__); |
957 | goto fail; | 1014 | goto fail; |
958 | } | 1015 | } |
959 | 1016 | ||
960 | dev = pci_get_device(PCI_VENDOR_ID_INTEL, e752x_devs[dev_idx].ctl_dev, | 1017 | e752x_init_error_reporting_regs(pvt); |
961 | NULL); | ||
962 | pvt->dev_d0f0 = dev; | ||
963 | /* find the error reporting device and clear errors */ | ||
964 | dev = pvt->dev_d0f1 = pci_dev_get(pvt->bridge_ck); | ||
965 | /* Turn off error disable & SMI in case the BIOS turned it on */ | ||
966 | pci_write_config_byte(dev, E752X_HI_ERRMASK, 0x00); | ||
967 | pci_write_config_byte(dev, E752X_HI_SMICMD, 0x00); | ||
968 | pci_write_config_word(dev, E752X_SYSBUS_ERRMASK, 0x00); | ||
969 | pci_write_config_word(dev, E752X_SYSBUS_SMICMD, 0x00); | ||
970 | pci_write_config_byte(dev, E752X_BUF_ERRMASK, 0x00); | ||
971 | pci_write_config_byte(dev, E752X_BUF_SMICMD, 0x00); | ||
972 | pci_write_config_byte(dev, E752X_DRAM_ERRMASK, 0x00); | ||
973 | pci_write_config_byte(dev, E752X_DRAM_SMICMD, 0x00); | ||
974 | |||
975 | e752x_get_error_info(mci, &discard); /* clear other MCH errors */ | 1018 | e752x_get_error_info(mci, &discard); /* clear other MCH errors */ |
976 | 1019 | ||
977 | /* get this far and it's successful */ | 1020 | /* get this far and it's successful */ |
@@ -979,20 +1022,12 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx) | |||
979 | return 0; | 1022 | return 0; |
980 | 1023 | ||
981 | fail: | 1024 | fail: |
982 | if (mci) { | 1025 | pci_dev_put(pvt->dev_d0f0); |
983 | if (pvt->dev_d0f0) | 1026 | pci_dev_put(pvt->dev_d0f1); |
984 | pci_dev_put(pvt->dev_d0f0); | 1027 | pci_dev_put(pvt->bridge_ck); |
985 | 1028 | edac_mc_free(mci); | |
986 | if (pvt->dev_d0f1) | ||
987 | pci_dev_put(pvt->dev_d0f1); | ||
988 | |||
989 | if (pvt->bridge_ck) | ||
990 | pci_dev_put(pvt->bridge_ck); | ||
991 | |||
992 | edac_mc_free(mci); | ||
993 | } | ||
994 | 1029 | ||
995 | return rc; | 1030 | return -ENODEV; |
996 | } | 1031 | } |
997 | 1032 | ||
998 | /* returns count (>= 0), or negative on error */ | 1033 | /* returns count (>= 0), or negative on error */ |
@@ -1015,7 +1050,7 @@ static void __devexit e752x_remove_one(struct pci_dev *pdev) | |||
1015 | 1050 | ||
1016 | debugf0("%s()\n", __func__); | 1051 | debugf0("%s()\n", __func__); |
1017 | 1052 | ||
1018 | if ((mci = edac_mc_del_mc(pdev)) == NULL) | 1053 | if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) |
1019 | return; | 1054 | return; |
1020 | 1055 | ||
1021 | pvt = (struct e752x_pvt *) mci->pvt_info; | 1056 | pvt = (struct e752x_pvt *) mci->pvt_info; |
diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c index a9518d3e4be4..5a5ecd5a0409 100644 --- a/drivers/edac/e7xxx_edac.c +++ b/drivers/edac/e7xxx_edac.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/init.h> | 26 | #include <linux/init.h> |
28 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
@@ -30,6 +29,8 @@ | |||
30 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
31 | #include "edac_mc.h" | 30 | #include "edac_mc.h" |
32 | 31 | ||
32 | #define E7XXX_REVISION " Ver: 2.0.0 " __DATE__ | ||
33 | |||
33 | #define e7xxx_printk(level, fmt, arg...) \ | 34 | #define e7xxx_printk(level, fmt, arg...) \ |
34 | edac_printk(level, "e7xxx", fmt, ##arg) | 35 | edac_printk(level, "e7xxx", fmt, ##arg) |
35 | 36 | ||
@@ -333,99 +334,61 @@ static void e7xxx_check(struct mem_ctl_info *mci) | |||
333 | e7xxx_process_error_info(mci, &info, 1); | 334 | e7xxx_process_error_info(mci, &info, 1); |
334 | } | 335 | } |
335 | 336 | ||
336 | static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx) | 337 | /* Return 1 if dual channel mode is active. Else return 0. */ |
338 | static inline int dual_channel_active(u32 drc, int dev_idx) | ||
337 | { | 339 | { |
338 | int rc = -ENODEV; | 340 | return (dev_idx == E7501) ? ((drc >> 22) & 0x1) : 1; |
339 | int index; | 341 | } |
340 | u16 pci_data; | ||
341 | struct mem_ctl_info *mci = NULL; | ||
342 | struct e7xxx_pvt *pvt = NULL; | ||
343 | u32 drc; | ||
344 | int drc_chan = 1; /* Number of channels 0=1chan,1=2chan */ | ||
345 | int drc_drbg = 1; /* DRB granularity 0=32mb,1=64mb */ | ||
346 | int drc_ddim; /* DRAM Data Integrity Mode 0=none,2=edac */ | ||
347 | u32 dra; | ||
348 | unsigned long last_cumul_size; | ||
349 | struct e7xxx_error_info discard; | ||
350 | |||
351 | debugf0("%s(): mci\n", __func__); | ||
352 | 342 | ||
353 | /* need to find out the number of channels */ | ||
354 | pci_read_config_dword(pdev, E7XXX_DRC, &drc); | ||
355 | 343 | ||
344 | /* Return DRB granularity (0=32mb, 1=64mb). */ | ||
345 | static inline int drb_granularity(u32 drc, int dev_idx) | ||
346 | { | ||
356 | /* only e7501 can be single channel */ | 347 | /* only e7501 can be single channel */ |
357 | if (dev_idx == E7501) { | 348 | return (dev_idx == E7501) ? ((drc >> 18) & 0x3) : 1; |
358 | drc_chan = ((drc >> 22) & 0x1); | 349 | } |
359 | drc_drbg = (drc >> 18) & 0x3; | ||
360 | } | ||
361 | |||
362 | drc_ddim = (drc >> 20) & 0x3; | ||
363 | mci = edac_mc_alloc(sizeof(*pvt), E7XXX_NR_CSROWS, drc_chan + 1); | ||
364 | |||
365 | if (mci == NULL) { | ||
366 | rc = -ENOMEM; | ||
367 | goto fail; | ||
368 | } | ||
369 | |||
370 | debugf3("%s(): init mci\n", __func__); | ||
371 | mci->mtype_cap = MEM_FLAG_RDDR; | ||
372 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED | | ||
373 | EDAC_FLAG_S4ECD4ED; | ||
374 | /* FIXME - what if different memory types are in different csrows? */ | ||
375 | mci->mod_name = EDAC_MOD_STR; | ||
376 | mci->mod_ver = "$Revision: 1.5.2.9 $"; | ||
377 | mci->pdev = pdev; | ||
378 | 350 | ||
379 | debugf3("%s(): init pvt\n", __func__); | ||
380 | pvt = (struct e7xxx_pvt *) mci->pvt_info; | ||
381 | pvt->dev_info = &e7xxx_devs[dev_idx]; | ||
382 | pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL, | ||
383 | pvt->dev_info->err_dev, | ||
384 | pvt->bridge_ck); | ||
385 | 351 | ||
386 | if (!pvt->bridge_ck) { | 352 | static void e7xxx_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, |
387 | e7xxx_printk(KERN_ERR, "error reporting device not found:" | 353 | int dev_idx, u32 drc) |
388 | "vendor %x device 0x%x (broken BIOS?)\n", | 354 | { |
389 | PCI_VENDOR_ID_INTEL, e7xxx_devs[dev_idx].err_dev); | 355 | unsigned long last_cumul_size; |
390 | goto fail; | 356 | int index; |
391 | } | 357 | u8 value; |
392 | 358 | u32 dra, cumul_size; | |
393 | debugf3("%s(): more mci init\n", __func__); | 359 | int drc_chan, drc_drbg, drc_ddim, mem_dev; |
394 | mci->ctl_name = pvt->dev_info->ctl_name; | 360 | struct csrow_info *csrow; |
395 | mci->edac_check = e7xxx_check; | ||
396 | mci->ctl_page_to_phys = ctl_page_to_phys; | ||
397 | 361 | ||
398 | /* find out the device types */ | ||
399 | pci_read_config_dword(pdev, E7XXX_DRA, &dra); | 362 | pci_read_config_dword(pdev, E7XXX_DRA, &dra); |
363 | drc_chan = dual_channel_active(drc, dev_idx); | ||
364 | drc_drbg = drb_granularity(drc, dev_idx); | ||
365 | drc_ddim = (drc >> 20) & 0x3; | ||
366 | last_cumul_size = 0; | ||
400 | 367 | ||
401 | /* | 368 | /* The dram row boundary (DRB) reg values are boundary address |
402 | * The dram row boundary (DRB) reg values are boundary address | ||
403 | * for each DRAM row with a granularity of 32 or 64MB (single/dual | 369 | * for each DRAM row with a granularity of 32 or 64MB (single/dual |
404 | * channel operation). DRB regs are cumulative; therefore DRB7 will | 370 | * channel operation). DRB regs are cumulative; therefore DRB7 will |
405 | * contain the total memory contained in all eight rows. | 371 | * contain the total memory contained in all eight rows. |
406 | */ | 372 | */ |
407 | for (last_cumul_size = index = 0; index < mci->nr_csrows; index++) { | 373 | for (index = 0; index < mci->nr_csrows; index++) { |
408 | u8 value; | ||
409 | u32 cumul_size; | ||
410 | /* mem_dev 0=x8, 1=x4 */ | 374 | /* mem_dev 0=x8, 1=x4 */ |
411 | int mem_dev = (dra >> (index * 4 + 3)) & 0x1; | 375 | mem_dev = (dra >> (index * 4 + 3)) & 0x1; |
412 | struct csrow_info *csrow = &mci->csrows[index]; | 376 | csrow = &mci->csrows[index]; |
413 | 377 | ||
414 | pci_read_config_byte(mci->pdev, E7XXX_DRB + index, &value); | 378 | pci_read_config_byte(pdev, E7XXX_DRB + index, &value); |
415 | /* convert a 64 or 32 MiB DRB to a page size. */ | 379 | /* convert a 64 or 32 MiB DRB to a page size. */ |
416 | cumul_size = value << (25 + drc_drbg - PAGE_SHIFT); | 380 | cumul_size = value << (25 + drc_drbg - PAGE_SHIFT); |
417 | debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, | 381 | debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, |
418 | cumul_size); | 382 | cumul_size); |
419 | |||
420 | if (cumul_size == last_cumul_size) | 383 | if (cumul_size == last_cumul_size) |
421 | continue; /* not populated */ | 384 | continue; /* not populated */ |
422 | 385 | ||
423 | csrow->first_page = last_cumul_size; | 386 | csrow->first_page = last_cumul_size; |
424 | csrow->last_page = cumul_size - 1; | 387 | csrow->last_page = cumul_size - 1; |
425 | csrow->nr_pages = cumul_size - last_cumul_size; | 388 | csrow->nr_pages = cumul_size - last_cumul_size; |
426 | last_cumul_size = cumul_size; | 389 | last_cumul_size = cumul_size; |
427 | csrow->grain = 1 << 12; /* 4KiB - resolution of CELOG */ | 390 | csrow->grain = 1 << 12; /* 4KiB - resolution of CELOG */ |
428 | csrow->mtype = MEM_RDDR; /* only one type supported */ | 391 | csrow->mtype = MEM_RDDR; /* only one type supported */ |
429 | csrow->dtype = mem_dev ? DEV_X4 : DEV_X8; | 392 | csrow->dtype = mem_dev ? DEV_X4 : DEV_X8; |
430 | 393 | ||
431 | /* | 394 | /* |
@@ -443,16 +406,61 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx) | |||
443 | } else | 406 | } else |
444 | csrow->edac_mode = EDAC_NONE; | 407 | csrow->edac_mode = EDAC_NONE; |
445 | } | 408 | } |
409 | } | ||
446 | 410 | ||
447 | mci->edac_cap |= EDAC_FLAG_NONE; | 411 | static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx) |
412 | { | ||
413 | u16 pci_data; | ||
414 | struct mem_ctl_info *mci = NULL; | ||
415 | struct e7xxx_pvt *pvt = NULL; | ||
416 | u32 drc; | ||
417 | int drc_chan; | ||
418 | struct e7xxx_error_info discard; | ||
419 | |||
420 | debugf0("%s(): mci\n", __func__); | ||
421 | pci_read_config_dword(pdev, E7XXX_DRC, &drc); | ||
422 | |||
423 | drc_chan = dual_channel_active(drc, dev_idx); | ||
424 | mci = edac_mc_alloc(sizeof(*pvt), E7XXX_NR_CSROWS, drc_chan + 1); | ||
425 | |||
426 | if (mci == NULL) | ||
427 | return -ENOMEM; | ||
428 | |||
429 | debugf3("%s(): init mci\n", __func__); | ||
430 | mci->mtype_cap = MEM_FLAG_RDDR; | ||
431 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED | | ||
432 | EDAC_FLAG_S4ECD4ED; | ||
433 | /* FIXME - what if different memory types are in different csrows? */ | ||
434 | mci->mod_name = EDAC_MOD_STR; | ||
435 | mci->mod_ver = E7XXX_REVISION; | ||
436 | mci->dev = &pdev->dev; | ||
437 | debugf3("%s(): init pvt\n", __func__); | ||
438 | pvt = (struct e7xxx_pvt *) mci->pvt_info; | ||
439 | pvt->dev_info = &e7xxx_devs[dev_idx]; | ||
440 | pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL, | ||
441 | pvt->dev_info->err_dev, | ||
442 | pvt->bridge_ck); | ||
448 | 443 | ||
444 | if (!pvt->bridge_ck) { | ||
445 | e7xxx_printk(KERN_ERR, "error reporting device not found:" | ||
446 | "vendor %x device 0x%x (broken BIOS?)\n", | ||
447 | PCI_VENDOR_ID_INTEL, e7xxx_devs[dev_idx].err_dev); | ||
448 | goto fail0; | ||
449 | } | ||
450 | |||
451 | debugf3("%s(): more mci init\n", __func__); | ||
452 | mci->ctl_name = pvt->dev_info->ctl_name; | ||
453 | mci->edac_check = e7xxx_check; | ||
454 | mci->ctl_page_to_phys = ctl_page_to_phys; | ||
455 | e7xxx_init_csrows(mci, pdev, dev_idx, drc); | ||
456 | mci->edac_cap |= EDAC_FLAG_NONE; | ||
449 | debugf3("%s(): tolm, remapbase, remaplimit\n", __func__); | 457 | debugf3("%s(): tolm, remapbase, remaplimit\n", __func__); |
450 | /* load the top of low memory, remap base, and remap limit vars */ | 458 | /* load the top of low memory, remap base, and remap limit vars */ |
451 | pci_read_config_word(mci->pdev, E7XXX_TOLM, &pci_data); | 459 | pci_read_config_word(pdev, E7XXX_TOLM, &pci_data); |
452 | pvt->tolm = ((u32) pci_data) << 4; | 460 | pvt->tolm = ((u32) pci_data) << 4; |
453 | pci_read_config_word(mci->pdev, E7XXX_REMAPBASE, &pci_data); | 461 | pci_read_config_word(pdev, E7XXX_REMAPBASE, &pci_data); |
454 | pvt->remapbase = ((u32) pci_data) << 14; | 462 | pvt->remapbase = ((u32) pci_data) << 14; |
455 | pci_read_config_word(mci->pdev, E7XXX_REMAPLIMIT, &pci_data); | 463 | pci_read_config_word(pdev, E7XXX_REMAPLIMIT, &pci_data); |
456 | pvt->remaplimit = ((u32) pci_data) << 14; | 464 | pvt->remaplimit = ((u32) pci_data) << 14; |
457 | e7xxx_printk(KERN_INFO, | 465 | e7xxx_printk(KERN_INFO, |
458 | "tolm = %x, remapbase = %x, remaplimit = %x\n", pvt->tolm, | 466 | "tolm = %x, remapbase = %x, remaplimit = %x\n", pvt->tolm, |
@@ -461,23 +469,25 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx) | |||
461 | /* clear any pending errors, or initial state bits */ | 469 | /* clear any pending errors, or initial state bits */ |
462 | e7xxx_get_error_info(mci, &discard); | 470 | e7xxx_get_error_info(mci, &discard); |
463 | 471 | ||
464 | if (edac_mc_add_mc(mci) != 0) { | 472 | /* Here we assume that we will never see multiple instances of this |
473 | * type of memory controller. The ID is therefore hardcoded to 0. | ||
474 | */ | ||
475 | if (edac_mc_add_mc(mci,0)) { | ||
465 | debugf3("%s(): failed edac_mc_add_mc()\n", __func__); | 476 | debugf3("%s(): failed edac_mc_add_mc()\n", __func__); |
466 | goto fail; | 477 | goto fail1; |
467 | } | 478 | } |
468 | 479 | ||
469 | /* get this far and it's successful */ | 480 | /* get this far and it's successful */ |
470 | debugf3("%s(): success\n", __func__); | 481 | debugf3("%s(): success\n", __func__); |
471 | return 0; | 482 | return 0; |
472 | 483 | ||
473 | fail: | 484 | fail1: |
474 | if (mci != NULL) { | 485 | pci_dev_put(pvt->bridge_ck); |
475 | if(pvt != NULL && pvt->bridge_ck) | 486 | |
476 | pci_dev_put(pvt->bridge_ck); | 487 | fail0: |
477 | edac_mc_free(mci); | 488 | edac_mc_free(mci); |
478 | } | ||
479 | 489 | ||
480 | return rc; | 490 | return -ENODEV; |
481 | } | 491 | } |
482 | 492 | ||
483 | /* returns count (>= 0), or negative on error */ | 493 | /* returns count (>= 0), or negative on error */ |
@@ -498,7 +508,7 @@ static void __devexit e7xxx_remove_one(struct pci_dev *pdev) | |||
498 | 508 | ||
499 | debugf0("%s()\n", __func__); | 509 | debugf0("%s()\n", __func__); |
500 | 510 | ||
501 | if ((mci = edac_mc_del_mc(pdev)) == NULL) | 511 | if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) |
502 | return; | 512 | return; |
503 | 513 | ||
504 | pvt = (struct e7xxx_pvt *) mci->pvt_info; | 514 | pvt = (struct e7xxx_pvt *) mci->pvt_info; |
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index ea06e3a4dc35..3a7cfe88b169 100644 --- a/drivers/edac/edac_mc.c +++ b/drivers/edac/edac_mc.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/proc_fs.h> | 16 | #include <linux/proc_fs.h> |
18 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
@@ -54,16 +53,17 @@ static int log_ce = 1; | |||
54 | static int panic_on_ue; | 53 | static int panic_on_ue; |
55 | static int poll_msec = 1000; | 54 | static int poll_msec = 1000; |
56 | 55 | ||
57 | static int check_pci_parity = 0; /* default YES check PCI parity */ | ||
58 | static int panic_on_pci_parity; /* default no panic on PCI Parity */ | ||
59 | static atomic_t pci_parity_count = ATOMIC_INIT(0); | ||
60 | |||
61 | /* lock to memory controller's control array */ | 56 | /* lock to memory controller's control array */ |
62 | static DECLARE_MUTEX(mem_ctls_mutex); | 57 | static DECLARE_MUTEX(mem_ctls_mutex); |
63 | static struct list_head mc_devices = LIST_HEAD_INIT(mc_devices); | 58 | static struct list_head mc_devices = LIST_HEAD_INIT(mc_devices); |
64 | 59 | ||
65 | static struct task_struct *edac_thread; | 60 | static struct task_struct *edac_thread; |
66 | 61 | ||
62 | #ifdef CONFIG_PCI | ||
63 | static int check_pci_parity = 0; /* default YES check PCI parity */ | ||
64 | static int panic_on_pci_parity; /* default no panic on PCI Parity */ | ||
65 | static atomic_t pci_parity_count = ATOMIC_INIT(0); | ||
66 | |||
67 | /* Structure of the whitelist and blacklist arrays */ | 67 | /* Structure of the whitelist and blacklist arrays */ |
68 | struct edac_pci_device_list { | 68 | struct edac_pci_device_list { |
69 | unsigned int vendor; /* Vendor ID */ | 69 | unsigned int vendor; /* Vendor ID */ |
@@ -80,6 +80,12 @@ static int pci_blacklist_count; | |||
80 | static struct edac_pci_device_list pci_whitelist[MAX_LISTED_PCI_DEVICES]; | 80 | static struct edac_pci_device_list pci_whitelist[MAX_LISTED_PCI_DEVICES]; |
81 | static int pci_whitelist_count ; | 81 | static int pci_whitelist_count ; |
82 | 82 | ||
83 | #ifndef DISABLE_EDAC_SYSFS | ||
84 | static struct kobject edac_pci_kobj; /* /sys/devices/system/edac/pci */ | ||
85 | static struct completion edac_pci_kobj_complete; | ||
86 | #endif /* DISABLE_EDAC_SYSFS */ | ||
87 | #endif /* CONFIG_PCI */ | ||
88 | |||
83 | /* START sysfs data and methods */ | 89 | /* START sysfs data and methods */ |
84 | 90 | ||
85 | #ifndef DISABLE_EDAC_SYSFS | 91 | #ifndef DISABLE_EDAC_SYSFS |
@@ -127,18 +133,15 @@ static struct sysdev_class edac_class = { | |||
127 | set_kset_name("edac"), | 133 | set_kset_name("edac"), |
128 | }; | 134 | }; |
129 | 135 | ||
130 | /* sysfs objects: | 136 | /* sysfs object: |
131 | * /sys/devices/system/edac/mc | 137 | * /sys/devices/system/edac/mc |
132 | * /sys/devices/system/edac/pci | ||
133 | */ | 138 | */ |
134 | static struct kobject edac_memctrl_kobj; | 139 | static struct kobject edac_memctrl_kobj; |
135 | static struct kobject edac_pci_kobj; | ||
136 | 140 | ||
137 | /* We use these to wait for the reference counts on edac_memctrl_kobj and | 141 | /* We use these to wait for the reference counts on edac_memctrl_kobj and |
138 | * edac_pci_kobj to reach 0. | 142 | * edac_pci_kobj to reach 0. |
139 | */ | 143 | */ |
140 | static struct completion edac_memctrl_kobj_complete; | 144 | static struct completion edac_memctrl_kobj_complete; |
141 | static struct completion edac_pci_kobj_complete; | ||
142 | 145 | ||
143 | /* | 146 | /* |
144 | * /sys/devices/system/edac/mc; | 147 | * /sys/devices/system/edac/mc; |
@@ -324,6 +327,8 @@ static void edac_sysfs_memctrl_teardown(void) | |||
324 | #endif /* DISABLE_EDAC_SYSFS */ | 327 | #endif /* DISABLE_EDAC_SYSFS */ |
325 | } | 328 | } |
326 | 329 | ||
330 | #ifdef CONFIG_PCI | ||
331 | |||
327 | #ifndef DISABLE_EDAC_SYSFS | 332 | #ifndef DISABLE_EDAC_SYSFS |
328 | 333 | ||
329 | /* | 334 | /* |
@@ -624,6 +629,252 @@ static void edac_sysfs_pci_teardown(void) | |||
624 | #endif | 629 | #endif |
625 | } | 630 | } |
626 | 631 | ||
632 | |||
633 | static u16 get_pci_parity_status(struct pci_dev *dev, int secondary) | ||
634 | { | ||
635 | int where; | ||
636 | u16 status; | ||
637 | |||
638 | where = secondary ? PCI_SEC_STATUS : PCI_STATUS; | ||
639 | pci_read_config_word(dev, where, &status); | ||
640 | |||
641 | /* If we get back 0xFFFF then we must suspect that the card has been | ||
642 | * pulled but the Linux PCI layer has not yet finished cleaning up. | ||
643 | * We don't want to report on such devices | ||
644 | */ | ||
645 | |||
646 | if (status == 0xFFFF) { | ||
647 | u32 sanity; | ||
648 | |||
649 | pci_read_config_dword(dev, 0, &sanity); | ||
650 | |||
651 | if (sanity == 0xFFFFFFFF) | ||
652 | return 0; | ||
653 | } | ||
654 | |||
655 | status &= PCI_STATUS_DETECTED_PARITY | PCI_STATUS_SIG_SYSTEM_ERROR | | ||
656 | PCI_STATUS_PARITY; | ||
657 | |||
658 | if (status) | ||
659 | /* reset only the bits we are interested in */ | ||
660 | pci_write_config_word(dev, where, status); | ||
661 | |||
662 | return status; | ||
663 | } | ||
664 | |||
665 | typedef void (*pci_parity_check_fn_t) (struct pci_dev *dev); | ||
666 | |||
667 | /* Clear any PCI parity errors logged by this device. */ | ||
668 | static void edac_pci_dev_parity_clear(struct pci_dev *dev) | ||
669 | { | ||
670 | u8 header_type; | ||
671 | |||
672 | get_pci_parity_status(dev, 0); | ||
673 | |||
674 | /* read the device TYPE, looking for bridges */ | ||
675 | pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type); | ||
676 | |||
677 | if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) | ||
678 | get_pci_parity_status(dev, 1); | ||
679 | } | ||
680 | |||
681 | /* | ||
682 | * PCI Parity polling | ||
683 | * | ||
684 | */ | ||
685 | static void edac_pci_dev_parity_test(struct pci_dev *dev) | ||
686 | { | ||
687 | u16 status; | ||
688 | u8 header_type; | ||
689 | |||
690 | /* read the STATUS register on this device | ||
691 | */ | ||
692 | status = get_pci_parity_status(dev, 0); | ||
693 | |||
694 | debugf2("PCI STATUS= 0x%04x %s\n", status, dev->dev.bus_id ); | ||
695 | |||
696 | /* check the status reg for errors */ | ||
697 | if (status) { | ||
698 | if (status & (PCI_STATUS_SIG_SYSTEM_ERROR)) | ||
699 | edac_printk(KERN_CRIT, EDAC_PCI, | ||
700 | "Signaled System Error on %s\n", | ||
701 | pci_name(dev)); | ||
702 | |||
703 | if (status & (PCI_STATUS_PARITY)) { | ||
704 | edac_printk(KERN_CRIT, EDAC_PCI, | ||
705 | "Master Data Parity Error on %s\n", | ||
706 | pci_name(dev)); | ||
707 | |||
708 | atomic_inc(&pci_parity_count); | ||
709 | } | ||
710 | |||
711 | if (status & (PCI_STATUS_DETECTED_PARITY)) { | ||
712 | edac_printk(KERN_CRIT, EDAC_PCI, | ||
713 | "Detected Parity Error on %s\n", | ||
714 | pci_name(dev)); | ||
715 | |||
716 | atomic_inc(&pci_parity_count); | ||
717 | } | ||
718 | } | ||
719 | |||
720 | /* read the device TYPE, looking for bridges */ | ||
721 | pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type); | ||
722 | |||
723 | debugf2("PCI HEADER TYPE= 0x%02x %s\n", header_type, dev->dev.bus_id ); | ||
724 | |||
725 | if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) { | ||
726 | /* On bridges, need to examine secondary status register */ | ||
727 | status = get_pci_parity_status(dev, 1); | ||
728 | |||
729 | debugf2("PCI SEC_STATUS= 0x%04x %s\n", | ||
730 | status, dev->dev.bus_id ); | ||
731 | |||
732 | /* check the secondary status reg for errors */ | ||
733 | if (status) { | ||
734 | if (status & (PCI_STATUS_SIG_SYSTEM_ERROR)) | ||
735 | edac_printk(KERN_CRIT, EDAC_PCI, "Bridge " | ||
736 | "Signaled System Error on %s\n", | ||
737 | pci_name(dev)); | ||
738 | |||
739 | if (status & (PCI_STATUS_PARITY)) { | ||
740 | edac_printk(KERN_CRIT, EDAC_PCI, "Bridge " | ||
741 | "Master Data Parity Error on " | ||
742 | "%s\n", pci_name(dev)); | ||
743 | |||
744 | atomic_inc(&pci_parity_count); | ||
745 | } | ||
746 | |||
747 | if (status & (PCI_STATUS_DETECTED_PARITY)) { | ||
748 | edac_printk(KERN_CRIT, EDAC_PCI, "Bridge " | ||
749 | "Detected Parity Error on %s\n", | ||
750 | pci_name(dev)); | ||
751 | |||
752 | atomic_inc(&pci_parity_count); | ||
753 | } | ||
754 | } | ||
755 | } | ||
756 | } | ||
757 | |||
758 | /* | ||
759 | * check_dev_on_list: Scan for a PCI device on a white/black list | ||
760 | * @list: an EDAC &edac_pci_device_list white/black list pointer | ||
761 | * @free_index: index of next free entry on the list | ||
762 | * @pci_dev: PCI Device pointer | ||
763 | * | ||
764 | * see if list contains the device. | ||
765 | * | ||
766 | * Returns: 0 not found | ||
767 | * 1 found on list | ||
768 | */ | ||
769 | static int check_dev_on_list(struct edac_pci_device_list *list, | ||
770 | int free_index, struct pci_dev *dev) | ||
771 | { | ||
772 | int i; | ||
773 | int rc = 0; /* Assume not found */ | ||
774 | unsigned short vendor=dev->vendor; | ||
775 | unsigned short device=dev->device; | ||
776 | |||
777 | /* Scan the list, looking for a vendor/device match */ | ||
778 | for (i = 0; i < free_index; i++, list++ ) { | ||
779 | if ((list->vendor == vendor ) && (list->device == device )) { | ||
780 | rc = 1; | ||
781 | break; | ||
782 | } | ||
783 | } | ||
784 | |||
785 | return rc; | ||
786 | } | ||
787 | |||
788 | /* | ||
789 | * pci_dev parity list iterator | ||
790 | * Scan the PCI device list for one iteration, looking for SERRORs | ||
791 | * Master Parity ERRORS or Parity ERRORs on primary or secondary devices | ||
792 | */ | ||
793 | static inline void edac_pci_dev_parity_iterator(pci_parity_check_fn_t fn) | ||
794 | { | ||
795 | struct pci_dev *dev = NULL; | ||
796 | |||
797 | /* request for kernel access to the next PCI device, if any, | ||
798 | * and while we are looking at it have its reference count | ||
799 | * bumped until we are done with it | ||
800 | */ | ||
801 | while((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { | ||
802 | /* if whitelist exists then it has priority, so only scan | ||
803 | * those devices on the whitelist | ||
804 | */ | ||
805 | if (pci_whitelist_count > 0 ) { | ||
806 | if (check_dev_on_list(pci_whitelist, | ||
807 | pci_whitelist_count, dev)) | ||
808 | fn(dev); | ||
809 | } else { | ||
810 | /* | ||
811 | * if no whitelist, then check if this devices is | ||
812 | * blacklisted | ||
813 | */ | ||
814 | if (!check_dev_on_list(pci_blacklist, | ||
815 | pci_blacklist_count, dev)) | ||
816 | fn(dev); | ||
817 | } | ||
818 | } | ||
819 | } | ||
820 | |||
821 | static void do_pci_parity_check(void) | ||
822 | { | ||
823 | unsigned long flags; | ||
824 | int before_count; | ||
825 | |||
826 | debugf3("%s()\n", __func__); | ||
827 | |||
828 | if (!check_pci_parity) | ||
829 | return; | ||
830 | |||
831 | before_count = atomic_read(&pci_parity_count); | ||
832 | |||
833 | /* scan all PCI devices looking for a Parity Error on devices and | ||
834 | * bridges | ||
835 | */ | ||
836 | local_irq_save(flags); | ||
837 | edac_pci_dev_parity_iterator(edac_pci_dev_parity_test); | ||
838 | local_irq_restore(flags); | ||
839 | |||
840 | /* Only if operator has selected panic on PCI Error */ | ||
841 | if (panic_on_pci_parity) { | ||
842 | /* If the count is different 'after' from 'before' */ | ||
843 | if (before_count != atomic_read(&pci_parity_count)) | ||
844 | panic("EDAC: PCI Parity Error"); | ||
845 | } | ||
846 | } | ||
847 | |||
848 | static inline void clear_pci_parity_errors(void) | ||
849 | { | ||
850 | /* Clear any PCI bus parity errors that devices initially have logged | ||
851 | * in their registers. | ||
852 | */ | ||
853 | edac_pci_dev_parity_iterator(edac_pci_dev_parity_clear); | ||
854 | } | ||
855 | |||
856 | #else /* CONFIG_PCI */ | ||
857 | |||
858 | static inline void do_pci_parity_check(void) | ||
859 | { | ||
860 | /* no-op */ | ||
861 | } | ||
862 | |||
863 | static inline void clear_pci_parity_errors(void) | ||
864 | { | ||
865 | /* no-op */ | ||
866 | } | ||
867 | |||
868 | static void edac_sysfs_pci_teardown(void) | ||
869 | { | ||
870 | } | ||
871 | |||
872 | static int edac_sysfs_pci_setup(void) | ||
873 | { | ||
874 | return 0; | ||
875 | } | ||
876 | #endif /* CONFIG_PCI */ | ||
877 | |||
627 | #ifndef DISABLE_EDAC_SYSFS | 878 | #ifndef DISABLE_EDAC_SYSFS |
628 | 879 | ||
629 | /* EDAC sysfs CSROW data structures and methods */ | 880 | /* EDAC sysfs CSROW data structures and methods */ |
@@ -1132,7 +1383,7 @@ static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci) | |||
1132 | return err; | 1383 | return err; |
1133 | 1384 | ||
1134 | /* create a symlink for the device */ | 1385 | /* create a symlink for the device */ |
1135 | err = sysfs_create_link(edac_mci_kobj, &mci->pdev->dev.kobj, | 1386 | err = sysfs_create_link(edac_mci_kobj, &mci->dev->kobj, |
1136 | EDAC_DEVICE_SYMLINK); | 1387 | EDAC_DEVICE_SYMLINK); |
1137 | 1388 | ||
1138 | if (err) | 1389 | if (err) |
@@ -1238,7 +1489,7 @@ void edac_mc_dump_mci(struct mem_ctl_info *mci) | |||
1238 | debugf4("\tmci->edac_check = %p\n", mci->edac_check); | 1489 | debugf4("\tmci->edac_check = %p\n", mci->edac_check); |
1239 | debugf3("\tmci->nr_csrows = %d, csrows = %p\n", | 1490 | debugf3("\tmci->nr_csrows = %d, csrows = %p\n", |
1240 | mci->nr_csrows, mci->csrows); | 1491 | mci->nr_csrows, mci->csrows); |
1241 | debugf3("\tpdev = %p\n", mci->pdev); | 1492 | debugf3("\tdev = %p\n", mci->dev); |
1242 | debugf3("\tmod_name:ctl_name = %s:%s\n", | 1493 | debugf3("\tmod_name:ctl_name = %s:%s\n", |
1243 | mci->mod_name, mci->ctl_name); | 1494 | mci->mod_name, mci->ctl_name); |
1244 | debugf3("\tpvt_info = %p\n\n", mci->pvt_info); | 1495 | debugf3("\tpvt_info = %p\n\n", mci->pvt_info); |
@@ -1363,7 +1614,7 @@ void edac_mc_free(struct mem_ctl_info *mci) | |||
1363 | } | 1614 | } |
1364 | EXPORT_SYMBOL_GPL(edac_mc_free); | 1615 | EXPORT_SYMBOL_GPL(edac_mc_free); |
1365 | 1616 | ||
1366 | static struct mem_ctl_info *find_mci_by_pdev(struct pci_dev *pdev) | 1617 | static struct mem_ctl_info *find_mci_by_dev(struct device *dev) |
1367 | { | 1618 | { |
1368 | struct mem_ctl_info *mci; | 1619 | struct mem_ctl_info *mci; |
1369 | struct list_head *item; | 1620 | struct list_head *item; |
@@ -1373,54 +1624,53 @@ static struct mem_ctl_info *find_mci_by_pdev(struct pci_dev *pdev) | |||
1373 | list_for_each(item, &mc_devices) { | 1624 | list_for_each(item, &mc_devices) { |
1374 | mci = list_entry(item, struct mem_ctl_info, link); | 1625 | mci = list_entry(item, struct mem_ctl_info, link); |
1375 | 1626 | ||
1376 | if (mci->pdev == pdev) | 1627 | if (mci->dev == dev) |
1377 | return mci; | 1628 | return mci; |
1378 | } | 1629 | } |
1379 | 1630 | ||
1380 | return NULL; | 1631 | return NULL; |
1381 | } | 1632 | } |
1382 | 1633 | ||
1383 | static int add_mc_to_global_list(struct mem_ctl_info *mci) | 1634 | /* Return 0 on success, 1 on failure. |
1635 | * Before calling this function, caller must | ||
1636 | * assign a unique value to mci->mc_idx. | ||
1637 | */ | ||
1638 | static int add_mc_to_global_list (struct mem_ctl_info *mci) | ||
1384 | { | 1639 | { |
1385 | struct list_head *item, *insert_before; | 1640 | struct list_head *item, *insert_before; |
1386 | struct mem_ctl_info *p; | 1641 | struct mem_ctl_info *p; |
1387 | int i; | ||
1388 | 1642 | ||
1389 | if (list_empty(&mc_devices)) { | 1643 | insert_before = &mc_devices; |
1390 | mci->mc_idx = 0; | ||
1391 | insert_before = &mc_devices; | ||
1392 | } else { | ||
1393 | if (find_mci_by_pdev(mci->pdev)) { | ||
1394 | edac_printk(KERN_WARNING, EDAC_MC, | ||
1395 | "%s (%s) %s %s already assigned %d\n", | ||
1396 | mci->pdev->dev.bus_id, | ||
1397 | pci_name(mci->pdev), mci->mod_name, | ||
1398 | mci->ctl_name, mci->mc_idx); | ||
1399 | return 1; | ||
1400 | } | ||
1401 | 1644 | ||
1402 | insert_before = NULL; | 1645 | if (unlikely((p = find_mci_by_dev(mci->dev)) != NULL)) |
1403 | i = 0; | 1646 | goto fail0; |
1404 | 1647 | ||
1405 | list_for_each(item, &mc_devices) { | 1648 | list_for_each(item, &mc_devices) { |
1406 | p = list_entry(item, struct mem_ctl_info, link); | 1649 | p = list_entry(item, struct mem_ctl_info, link); |
1407 | 1650 | ||
1408 | if (p->mc_idx != i) { | 1651 | if (p->mc_idx >= mci->mc_idx) { |
1409 | insert_before = item; | 1652 | if (unlikely(p->mc_idx == mci->mc_idx)) |
1410 | break; | 1653 | goto fail1; |
1411 | } | ||
1412 | 1654 | ||
1413 | i++; | 1655 | insert_before = item; |
1656 | break; | ||
1414 | } | 1657 | } |
1415 | |||
1416 | mci->mc_idx = i; | ||
1417 | |||
1418 | if (insert_before == NULL) | ||
1419 | insert_before = &mc_devices; | ||
1420 | } | 1658 | } |
1421 | 1659 | ||
1422 | list_add_tail_rcu(&mci->link, insert_before); | 1660 | list_add_tail_rcu(&mci->link, insert_before); |
1423 | return 0; | 1661 | return 0; |
1662 | |||
1663 | fail0: | ||
1664 | edac_printk(KERN_WARNING, EDAC_MC, | ||
1665 | "%s (%s) %s %s already assigned %d\n", p->dev->bus_id, | ||
1666 | dev_name(p->dev), p->mod_name, p->ctl_name, p->mc_idx); | ||
1667 | return 1; | ||
1668 | |||
1669 | fail1: | ||
1670 | edac_printk(KERN_WARNING, EDAC_MC, | ||
1671 | "bug in low-level driver: attempt to assign\n" | ||
1672 | " duplicate mc_idx %d in %s()\n", p->mc_idx, __func__); | ||
1673 | return 1; | ||
1424 | } | 1674 | } |
1425 | 1675 | ||
1426 | static void complete_mc_list_del(struct rcu_head *head) | 1676 | static void complete_mc_list_del(struct rcu_head *head) |
@@ -1444,6 +1694,7 @@ static void del_mc_from_global_list(struct mem_ctl_info *mci) | |||
1444 | * edac_mc_add_mc: Insert the 'mci' structure into the mci global list and | 1694 | * edac_mc_add_mc: Insert the 'mci' structure into the mci global list and |
1445 | * create sysfs entries associated with mci structure | 1695 | * create sysfs entries associated with mci structure |
1446 | * @mci: pointer to the mci structure to be added to the list | 1696 | * @mci: pointer to the mci structure to be added to the list |
1697 | * @mc_idx: A unique numeric identifier to be assigned to the 'mci' structure. | ||
1447 | * | 1698 | * |
1448 | * Return: | 1699 | * Return: |
1449 | * 0 Success | 1700 | * 0 Success |
@@ -1451,9 +1702,10 @@ static void del_mc_from_global_list(struct mem_ctl_info *mci) | |||
1451 | */ | 1702 | */ |
1452 | 1703 | ||
1453 | /* FIXME - should a warning be printed if no error detection? correction? */ | 1704 | /* FIXME - should a warning be printed if no error detection? correction? */ |
1454 | int edac_mc_add_mc(struct mem_ctl_info *mci) | 1705 | int edac_mc_add_mc(struct mem_ctl_info *mci, int mc_idx) |
1455 | { | 1706 | { |
1456 | debugf0("%s()\n", __func__); | 1707 | debugf0("%s()\n", __func__); |
1708 | mci->mc_idx = mc_idx; | ||
1457 | #ifdef CONFIG_EDAC_DEBUG | 1709 | #ifdef CONFIG_EDAC_DEBUG |
1458 | if (edac_debug_level >= 3) | 1710 | if (edac_debug_level >= 3) |
1459 | edac_mc_dump_mci(mci); | 1711 | edac_mc_dump_mci(mci); |
@@ -1486,8 +1738,8 @@ int edac_mc_add_mc(struct mem_ctl_info *mci) | |||
1486 | } | 1738 | } |
1487 | 1739 | ||
1488 | /* Report action taken */ | 1740 | /* Report action taken */ |
1489 | edac_mc_printk(mci, KERN_INFO, "Giving out device to %s %s: PCI %s\n", | 1741 | edac_mc_printk(mci, KERN_INFO, "Giving out device to %s %s: DEV %s\n", |
1490 | mci->mod_name, mci->ctl_name, pci_name(mci->pdev)); | 1742 | mci->mod_name, mci->ctl_name, dev_name(mci->dev)); |
1491 | 1743 | ||
1492 | up(&mem_ctls_mutex); | 1744 | up(&mem_ctls_mutex); |
1493 | return 0; | 1745 | return 0; |
@@ -1504,18 +1756,18 @@ EXPORT_SYMBOL_GPL(edac_mc_add_mc); | |||
1504 | /** | 1756 | /** |
1505 | * edac_mc_del_mc: Remove sysfs entries for specified mci structure and | 1757 | * edac_mc_del_mc: Remove sysfs entries for specified mci structure and |
1506 | * remove mci structure from global list | 1758 | * remove mci structure from global list |
1507 | * @pdev: Pointer to 'struct pci_dev' representing mci structure to remove. | 1759 | * @pdev: Pointer to 'struct device' representing mci structure to remove. |
1508 | * | 1760 | * |
1509 | * Return pointer to removed mci structure, or NULL if device not found. | 1761 | * Return pointer to removed mci structure, or NULL if device not found. |
1510 | */ | 1762 | */ |
1511 | struct mem_ctl_info * edac_mc_del_mc(struct pci_dev *pdev) | 1763 | struct mem_ctl_info * edac_mc_del_mc(struct device *dev) |
1512 | { | 1764 | { |
1513 | struct mem_ctl_info *mci; | 1765 | struct mem_ctl_info *mci; |
1514 | 1766 | ||
1515 | debugf0("MC: %s()\n", __func__); | 1767 | debugf0("MC: %s()\n", __func__); |
1516 | down(&mem_ctls_mutex); | 1768 | down(&mem_ctls_mutex); |
1517 | 1769 | ||
1518 | if ((mci = find_mci_by_pdev(pdev)) == NULL) { | 1770 | if ((mci = find_mci_by_dev(dev)) == NULL) { |
1519 | up(&mem_ctls_mutex); | 1771 | up(&mem_ctls_mutex); |
1520 | return NULL; | 1772 | return NULL; |
1521 | } | 1773 | } |
@@ -1524,8 +1776,8 @@ struct mem_ctl_info * edac_mc_del_mc(struct pci_dev *pdev) | |||
1524 | del_mc_from_global_list(mci); | 1776 | del_mc_from_global_list(mci); |
1525 | up(&mem_ctls_mutex); | 1777 | up(&mem_ctls_mutex); |
1526 | edac_printk(KERN_INFO, EDAC_MC, | 1778 | edac_printk(KERN_INFO, EDAC_MC, |
1527 | "Removed device %d for %s %s: PCI %s\n", mci->mc_idx, | 1779 | "Removed device %d for %s %s: DEV %s\n", mci->mc_idx, |
1528 | mci->mod_name, mci->ctl_name, pci_name(mci->pdev)); | 1780 | mci->mod_name, mci->ctl_name, dev_name(mci->dev)); |
1529 | return mci; | 1781 | return mci; |
1530 | } | 1782 | } |
1531 | EXPORT_SYMBOL_GPL(edac_mc_del_mc); | 1783 | EXPORT_SYMBOL_GPL(edac_mc_del_mc); |
@@ -1739,244 +1991,6 @@ void edac_mc_handle_ue_no_info(struct mem_ctl_info *mci, const char *msg) | |||
1739 | } | 1991 | } |
1740 | EXPORT_SYMBOL_GPL(edac_mc_handle_ue_no_info); | 1992 | EXPORT_SYMBOL_GPL(edac_mc_handle_ue_no_info); |
1741 | 1993 | ||
1742 | #ifdef CONFIG_PCI | ||
1743 | |||
1744 | static u16 get_pci_parity_status(struct pci_dev *dev, int secondary) | ||
1745 | { | ||
1746 | int where; | ||
1747 | u16 status; | ||
1748 | |||
1749 | where = secondary ? PCI_SEC_STATUS : PCI_STATUS; | ||
1750 | pci_read_config_word(dev, where, &status); | ||
1751 | |||
1752 | /* If we get back 0xFFFF then we must suspect that the card has been | ||
1753 | * pulled but the Linux PCI layer has not yet finished cleaning up. | ||
1754 | * We don't want to report on such devices | ||
1755 | */ | ||
1756 | |||
1757 | if (status == 0xFFFF) { | ||
1758 | u32 sanity; | ||
1759 | |||
1760 | pci_read_config_dword(dev, 0, &sanity); | ||
1761 | |||
1762 | if (sanity == 0xFFFFFFFF) | ||
1763 | return 0; | ||
1764 | } | ||
1765 | |||
1766 | status &= PCI_STATUS_DETECTED_PARITY | PCI_STATUS_SIG_SYSTEM_ERROR | | ||
1767 | PCI_STATUS_PARITY; | ||
1768 | |||
1769 | if (status) | ||
1770 | /* reset only the bits we are interested in */ | ||
1771 | pci_write_config_word(dev, where, status); | ||
1772 | |||
1773 | return status; | ||
1774 | } | ||
1775 | |||
1776 | typedef void (*pci_parity_check_fn_t) (struct pci_dev *dev); | ||
1777 | |||
1778 | /* Clear any PCI parity errors logged by this device. */ | ||
1779 | static void edac_pci_dev_parity_clear(struct pci_dev *dev) | ||
1780 | { | ||
1781 | u8 header_type; | ||
1782 | |||
1783 | get_pci_parity_status(dev, 0); | ||
1784 | |||
1785 | /* read the device TYPE, looking for bridges */ | ||
1786 | pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type); | ||
1787 | |||
1788 | if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) | ||
1789 | get_pci_parity_status(dev, 1); | ||
1790 | } | ||
1791 | |||
1792 | /* | ||
1793 | * PCI Parity polling | ||
1794 | * | ||
1795 | */ | ||
1796 | static void edac_pci_dev_parity_test(struct pci_dev *dev) | ||
1797 | { | ||
1798 | u16 status; | ||
1799 | u8 header_type; | ||
1800 | |||
1801 | /* read the STATUS register on this device | ||
1802 | */ | ||
1803 | status = get_pci_parity_status(dev, 0); | ||
1804 | |||
1805 | debugf2("PCI STATUS= 0x%04x %s\n", status, dev->dev.bus_id ); | ||
1806 | |||
1807 | /* check the status reg for errors */ | ||
1808 | if (status) { | ||
1809 | if (status & (PCI_STATUS_SIG_SYSTEM_ERROR)) | ||
1810 | edac_printk(KERN_CRIT, EDAC_PCI, | ||
1811 | "Signaled System Error on %s\n", | ||
1812 | pci_name(dev)); | ||
1813 | |||
1814 | if (status & (PCI_STATUS_PARITY)) { | ||
1815 | edac_printk(KERN_CRIT, EDAC_PCI, | ||
1816 | "Master Data Parity Error on %s\n", | ||
1817 | pci_name(dev)); | ||
1818 | |||
1819 | atomic_inc(&pci_parity_count); | ||
1820 | } | ||
1821 | |||
1822 | if (status & (PCI_STATUS_DETECTED_PARITY)) { | ||
1823 | edac_printk(KERN_CRIT, EDAC_PCI, | ||
1824 | "Detected Parity Error on %s\n", | ||
1825 | pci_name(dev)); | ||
1826 | |||
1827 | atomic_inc(&pci_parity_count); | ||
1828 | } | ||
1829 | } | ||
1830 | |||
1831 | /* read the device TYPE, looking for bridges */ | ||
1832 | pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type); | ||
1833 | |||
1834 | debugf2("PCI HEADER TYPE= 0x%02x %s\n", header_type, dev->dev.bus_id ); | ||
1835 | |||
1836 | if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) { | ||
1837 | /* On bridges, need to examine secondary status register */ | ||
1838 | status = get_pci_parity_status(dev, 1); | ||
1839 | |||
1840 | debugf2("PCI SEC_STATUS= 0x%04x %s\n", | ||
1841 | status, dev->dev.bus_id ); | ||
1842 | |||
1843 | /* check the secondary status reg for errors */ | ||
1844 | if (status) { | ||
1845 | if (status & (PCI_STATUS_SIG_SYSTEM_ERROR)) | ||
1846 | edac_printk(KERN_CRIT, EDAC_PCI, "Bridge " | ||
1847 | "Signaled System Error on %s\n", | ||
1848 | pci_name(dev)); | ||
1849 | |||
1850 | if (status & (PCI_STATUS_PARITY)) { | ||
1851 | edac_printk(KERN_CRIT, EDAC_PCI, "Bridge " | ||
1852 | "Master Data Parity Error on " | ||
1853 | "%s\n", pci_name(dev)); | ||
1854 | |||
1855 | atomic_inc(&pci_parity_count); | ||
1856 | } | ||
1857 | |||
1858 | if (status & (PCI_STATUS_DETECTED_PARITY)) { | ||
1859 | edac_printk(KERN_CRIT, EDAC_PCI, "Bridge " | ||
1860 | "Detected Parity Error on %s\n", | ||
1861 | pci_name(dev)); | ||
1862 | |||
1863 | atomic_inc(&pci_parity_count); | ||
1864 | } | ||
1865 | } | ||
1866 | } | ||
1867 | } | ||
1868 | |||
1869 | /* | ||
1870 | * check_dev_on_list: Scan for a PCI device on a white/black list | ||
1871 | * @list: an EDAC &edac_pci_device_list white/black list pointer | ||
1872 | * @free_index: index of next free entry on the list | ||
1873 | * @pci_dev: PCI Device pointer | ||
1874 | * | ||
1875 | * see if list contains the device. | ||
1876 | * | ||
1877 | * Returns: 0 not found | ||
1878 | * 1 found on list | ||
1879 | */ | ||
1880 | static int check_dev_on_list(struct edac_pci_device_list *list, | ||
1881 | int free_index, struct pci_dev *dev) | ||
1882 | { | ||
1883 | int i; | ||
1884 | int rc = 0; /* Assume not found */ | ||
1885 | unsigned short vendor=dev->vendor; | ||
1886 | unsigned short device=dev->device; | ||
1887 | |||
1888 | /* Scan the list, looking for a vendor/device match */ | ||
1889 | for (i = 0; i < free_index; i++, list++ ) { | ||
1890 | if ((list->vendor == vendor ) && (list->device == device )) { | ||
1891 | rc = 1; | ||
1892 | break; | ||
1893 | } | ||
1894 | } | ||
1895 | |||
1896 | return rc; | ||
1897 | } | ||
1898 | |||
1899 | /* | ||
1900 | * pci_dev parity list iterator | ||
1901 | * Scan the PCI device list for one iteration, looking for SERRORs | ||
1902 | * Master Parity ERRORS or Parity ERRORs on primary or secondary devices | ||
1903 | */ | ||
1904 | static inline void edac_pci_dev_parity_iterator(pci_parity_check_fn_t fn) | ||
1905 | { | ||
1906 | struct pci_dev *dev = NULL; | ||
1907 | |||
1908 | /* request for kernel access to the next PCI device, if any, | ||
1909 | * and while we are looking at it have its reference count | ||
1910 | * bumped until we are done with it | ||
1911 | */ | ||
1912 | while((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { | ||
1913 | /* if whitelist exists then it has priority, so only scan | ||
1914 | * those devices on the whitelist | ||
1915 | */ | ||
1916 | if (pci_whitelist_count > 0 ) { | ||
1917 | if (check_dev_on_list(pci_whitelist, | ||
1918 | pci_whitelist_count, dev)) | ||
1919 | fn(dev); | ||
1920 | } else { | ||
1921 | /* | ||
1922 | * if no whitelist, then check if this devices is | ||
1923 | * blacklisted | ||
1924 | */ | ||
1925 | if (!check_dev_on_list(pci_blacklist, | ||
1926 | pci_blacklist_count, dev)) | ||
1927 | fn(dev); | ||
1928 | } | ||
1929 | } | ||
1930 | } | ||
1931 | |||
1932 | static void do_pci_parity_check(void) | ||
1933 | { | ||
1934 | unsigned long flags; | ||
1935 | int before_count; | ||
1936 | |||
1937 | debugf3("%s()\n", __func__); | ||
1938 | |||
1939 | if (!check_pci_parity) | ||
1940 | return; | ||
1941 | |||
1942 | before_count = atomic_read(&pci_parity_count); | ||
1943 | |||
1944 | /* scan all PCI devices looking for a Parity Error on devices and | ||
1945 | * bridges | ||
1946 | */ | ||
1947 | local_irq_save(flags); | ||
1948 | edac_pci_dev_parity_iterator(edac_pci_dev_parity_test); | ||
1949 | local_irq_restore(flags); | ||
1950 | |||
1951 | /* Only if operator has selected panic on PCI Error */ | ||
1952 | if (panic_on_pci_parity) { | ||
1953 | /* If the count is different 'after' from 'before' */ | ||
1954 | if (before_count != atomic_read(&pci_parity_count)) | ||
1955 | panic("EDAC: PCI Parity Error"); | ||
1956 | } | ||
1957 | } | ||
1958 | |||
1959 | static inline void clear_pci_parity_errors(void) | ||
1960 | { | ||
1961 | /* Clear any PCI bus parity errors that devices initially have logged | ||
1962 | * in their registers. | ||
1963 | */ | ||
1964 | edac_pci_dev_parity_iterator(edac_pci_dev_parity_clear); | ||
1965 | } | ||
1966 | |||
1967 | #else /* CONFIG_PCI */ | ||
1968 | |||
1969 | static inline void do_pci_parity_check(void) | ||
1970 | { | ||
1971 | /* no-op */ | ||
1972 | } | ||
1973 | |||
1974 | static inline void clear_pci_parity_errors(void) | ||
1975 | { | ||
1976 | /* no-op */ | ||
1977 | } | ||
1978 | |||
1979 | #endif /* CONFIG_PCI */ | ||
1980 | 1994 | ||
1981 | /* | 1995 | /* |
1982 | * Iterate over all MC instances and check for ECC, et al, errors | 1996 | * Iterate over all MC instances and check for ECC, et al, errors |
@@ -2096,10 +2110,12 @@ MODULE_DESCRIPTION("Core library routines for MC reporting"); | |||
2096 | 2110 | ||
2097 | module_param(panic_on_ue, int, 0644); | 2111 | module_param(panic_on_ue, int, 0644); |
2098 | MODULE_PARM_DESC(panic_on_ue, "Panic on uncorrected error: 0=off 1=on"); | 2112 | MODULE_PARM_DESC(panic_on_ue, "Panic on uncorrected error: 0=off 1=on"); |
2113 | #ifdef CONFIG_PCI | ||
2099 | module_param(check_pci_parity, int, 0644); | 2114 | module_param(check_pci_parity, int, 0644); |
2100 | MODULE_PARM_DESC(check_pci_parity, "Check for PCI bus parity errors: 0=off 1=on"); | 2115 | MODULE_PARM_DESC(check_pci_parity, "Check for PCI bus parity errors: 0=off 1=on"); |
2101 | module_param(panic_on_pci_parity, int, 0644); | 2116 | module_param(panic_on_pci_parity, int, 0644); |
2102 | MODULE_PARM_DESC(panic_on_pci_parity, "Panic on PCI Bus Parity error: 0=off 1=on"); | 2117 | MODULE_PARM_DESC(panic_on_pci_parity, "Panic on PCI Bus Parity error: 0=off 1=on"); |
2118 | #endif | ||
2103 | module_param(log_ue, int, 0644); | 2119 | module_param(log_ue, int, 0644); |
2104 | MODULE_PARM_DESC(log_ue, "Log uncorrectable error to console: 0=off 1=on"); | 2120 | MODULE_PARM_DESC(log_ue, "Log uncorrectable error to console: 0=off 1=on"); |
2105 | module_param(log_ce, int, 0644); | 2121 | module_param(log_ce, int, 0644); |
diff --git a/drivers/edac/edac_mc.h b/drivers/edac/edac_mc.h index 8d9e83909b9c..1be4947e28af 100644 --- a/drivers/edac/edac_mc.h +++ b/drivers/edac/edac_mc.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #ifndef _EDAC_MC_H_ | 18 | #ifndef _EDAC_MC_H_ |
19 | #define _EDAC_MC_H_ | 19 | #define _EDAC_MC_H_ |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
@@ -88,6 +87,12 @@ extern int edac_debug_level; | |||
88 | #define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \ | 87 | #define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \ |
89 | PCI_DEVICE_ID_ ## vend ## _ ## dev | 88 | PCI_DEVICE_ID_ ## vend ## _ ## dev |
90 | 89 | ||
90 | #if defined(CONFIG_X86) && defined(CONFIG_PCI) | ||
91 | #define dev_name(dev) pci_name(to_pci_dev(dev)) | ||
92 | #else | ||
93 | #define dev_name(dev) to_platform_device(dev)->name | ||
94 | #endif | ||
95 | |||
91 | /* memory devices */ | 96 | /* memory devices */ |
92 | enum dev_type { | 97 | enum dev_type { |
93 | DEV_UNKNOWN = 0, | 98 | DEV_UNKNOWN = 0, |
@@ -327,10 +332,10 @@ struct mem_ctl_info { | |||
327 | struct csrow_info *csrows; | 332 | struct csrow_info *csrows; |
328 | /* | 333 | /* |
329 | * FIXME - what about controllers on other busses? - IDs must be | 334 | * FIXME - what about controllers on other busses? - IDs must be |
330 | * unique. pdev pointer should be sufficiently unique, but | 335 | * unique. dev pointer should be sufficiently unique, but |
331 | * BUS:SLOT.FUNC numbers may not be unique. | 336 | * BUS:SLOT.FUNC numbers may not be unique. |
332 | */ | 337 | */ |
333 | struct pci_dev *pdev; | 338 | struct device *dev; |
334 | const char *mod_name; | 339 | const char *mod_name; |
335 | const char *mod_ver; | 340 | const char *mod_ver; |
336 | const char *ctl_name; | 341 | const char *ctl_name; |
@@ -353,6 +358,8 @@ struct mem_ctl_info { | |||
353 | struct completion kobj_complete; | 358 | struct completion kobj_complete; |
354 | }; | 359 | }; |
355 | 360 | ||
361 | #ifdef CONFIG_PCI | ||
362 | |||
356 | /* write all or some bits in a byte-register*/ | 363 | /* write all or some bits in a byte-register*/ |
357 | static inline void pci_write_bits8(struct pci_dev *pdev, int offset, u8 value, | 364 | static inline void pci_write_bits8(struct pci_dev *pdev, int offset, u8 value, |
358 | u8 mask) | 365 | u8 mask) |
@@ -401,14 +408,16 @@ static inline void pci_write_bits32(struct pci_dev *pdev, int offset, | |||
401 | pci_write_config_dword(pdev, offset, value); | 408 | pci_write_config_dword(pdev, offset, value); |
402 | } | 409 | } |
403 | 410 | ||
411 | #endif /* CONFIG_PCI */ | ||
412 | |||
404 | #ifdef CONFIG_EDAC_DEBUG | 413 | #ifdef CONFIG_EDAC_DEBUG |
405 | void edac_mc_dump_channel(struct channel_info *chan); | 414 | void edac_mc_dump_channel(struct channel_info *chan); |
406 | void edac_mc_dump_mci(struct mem_ctl_info *mci); | 415 | void edac_mc_dump_mci(struct mem_ctl_info *mci); |
407 | void edac_mc_dump_csrow(struct csrow_info *csrow); | 416 | void edac_mc_dump_csrow(struct csrow_info *csrow); |
408 | #endif /* CONFIG_EDAC_DEBUG */ | 417 | #endif /* CONFIG_EDAC_DEBUG */ |
409 | 418 | ||
410 | extern int edac_mc_add_mc(struct mem_ctl_info *mci); | 419 | extern int edac_mc_add_mc(struct mem_ctl_info *mci,int mc_idx); |
411 | extern struct mem_ctl_info * edac_mc_del_mc(struct pci_dev *pdev); | 420 | extern struct mem_ctl_info * edac_mc_del_mc(struct device *dev); |
412 | extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci, | 421 | extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci, |
413 | unsigned long page); | 422 | unsigned long page); |
414 | extern void edac_mc_scrub_block(unsigned long page, unsigned long offset, | 423 | extern void edac_mc_scrub_block(unsigned long page, unsigned long offset, |
diff --git a/drivers/edac/i82860_edac.c b/drivers/edac/i82860_edac.c index fd342163cf97..e30a4a2eaf38 100644 --- a/drivers/edac/i82860_edac.c +++ b/drivers/edac/i82860_edac.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * by Thayne Harbaugh of Linux Networx. (http://lnxi.com) | 9 | * by Thayne Harbaugh of Linux Networx. (http://lnxi.com) |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
@@ -17,6 +16,8 @@ | |||
17 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
18 | #include "edac_mc.h" | 17 | #include "edac_mc.h" |
19 | 18 | ||
19 | #define I82860_REVISION " Ver: 2.0.0 " __DATE__ | ||
20 | |||
20 | #define i82860_printk(level, fmt, arg...) \ | 21 | #define i82860_printk(level, fmt, arg...) \ |
21 | edac_printk(level, "i82860", fmt, ##arg) | 22 | edac_printk(level, "i82860", fmt, ##arg) |
22 | 23 | ||
@@ -63,17 +64,21 @@ static struct pci_dev *mci_pdev = NULL; /* init dev: in case that AGP code | |||
63 | static void i82860_get_error_info(struct mem_ctl_info *mci, | 64 | static void i82860_get_error_info(struct mem_ctl_info *mci, |
64 | struct i82860_error_info *info) | 65 | struct i82860_error_info *info) |
65 | { | 66 | { |
67 | struct pci_dev *pdev; | ||
68 | |||
69 | pdev = to_pci_dev(mci->dev); | ||
70 | |||
66 | /* | 71 | /* |
67 | * This is a mess because there is no atomic way to read all the | 72 | * This is a mess because there is no atomic way to read all the |
68 | * registers at once and the registers can transition from CE being | 73 | * registers at once and the registers can transition from CE being |
69 | * overwritten by UE. | 74 | * overwritten by UE. |
70 | */ | 75 | */ |
71 | pci_read_config_word(mci->pdev, I82860_ERRSTS, &info->errsts); | 76 | pci_read_config_word(pdev, I82860_ERRSTS, &info->errsts); |
72 | pci_read_config_dword(mci->pdev, I82860_EAP, &info->eap); | 77 | pci_read_config_dword(pdev, I82860_EAP, &info->eap); |
73 | pci_read_config_word(mci->pdev, I82860_DERRCTL_STS, &info->derrsyn); | 78 | pci_read_config_word(pdev, I82860_DERRCTL_STS, &info->derrsyn); |
74 | pci_read_config_word(mci->pdev, I82860_ERRSTS, &info->errsts2); | 79 | pci_read_config_word(pdev, I82860_ERRSTS, &info->errsts2); |
75 | 80 | ||
76 | pci_write_bits16(mci->pdev, I82860_ERRSTS, 0x0003, 0x0003); | 81 | pci_write_bits16(pdev, I82860_ERRSTS, 0x0003, 0x0003); |
77 | 82 | ||
78 | /* | 83 | /* |
79 | * If the error is the same for both reads then the first set of reads | 84 | * If the error is the same for both reads then the first set of reads |
@@ -84,8 +89,8 @@ static void i82860_get_error_info(struct mem_ctl_info *mci, | |||
84 | return; | 89 | return; |
85 | 90 | ||
86 | if ((info->errsts ^ info->errsts2) & 0x0003) { | 91 | if ((info->errsts ^ info->errsts2) & 0x0003) { |
87 | pci_read_config_dword(mci->pdev, I82860_EAP, &info->eap); | 92 | pci_read_config_dword(pdev, I82860_EAP, &info->eap); |
88 | pci_read_config_word(mci->pdev, I82860_DERRCTL_STS, | 93 | pci_read_config_word(pdev, I82860_DERRCTL_STS, |
89 | &info->derrsyn); | 94 | &info->derrsyn); |
90 | } | 95 | } |
91 | } | 96 | } |
@@ -127,15 +132,50 @@ static void i82860_check(struct mem_ctl_info *mci) | |||
127 | i82860_process_error_info(mci, &info, 1); | 132 | i82860_process_error_info(mci, &info, 1); |
128 | } | 133 | } |
129 | 134 | ||
130 | static int i82860_probe1(struct pci_dev *pdev, int dev_idx) | 135 | static void i82860_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev) |
131 | { | 136 | { |
132 | int rc = -ENODEV; | ||
133 | int index; | ||
134 | struct mem_ctl_info *mci = NULL; | ||
135 | unsigned long last_cumul_size; | 137 | unsigned long last_cumul_size; |
136 | struct i82860_error_info discard; | 138 | u16 mchcfg_ddim; /* DRAM Data Integrity Mode 0=none, 2=edac */ |
139 | u16 value; | ||
140 | u32 cumul_size; | ||
141 | struct csrow_info *csrow; | ||
142 | int index; | ||
143 | |||
144 | pci_read_config_word(pdev, I82860_MCHCFG, &mchcfg_ddim); | ||
145 | mchcfg_ddim = mchcfg_ddim & 0x180; | ||
146 | last_cumul_size = 0; | ||
147 | |||
148 | /* The group row boundary (GRA) reg values are boundary address | ||
149 | * for each DRAM row with a granularity of 16MB. GRA regs are | ||
150 | * cumulative; therefore GRA15 will contain the total memory contained | ||
151 | * in all eight rows. | ||
152 | */ | ||
153 | for (index = 0; index < mci->nr_csrows; index++) { | ||
154 | csrow = &mci->csrows[index]; | ||
155 | pci_read_config_word(pdev, I82860_GBA + index * 2, &value); | ||
156 | cumul_size = (value & I82860_GBA_MASK) << | ||
157 | (I82860_GBA_SHIFT - PAGE_SHIFT); | ||
158 | debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, | ||
159 | cumul_size); | ||
137 | 160 | ||
138 | u16 mchcfg_ddim; /* DRAM Data Integrity Mode 0=none,2=edac */ | 161 | if (cumul_size == last_cumul_size) |
162 | continue; /* not populated */ | ||
163 | |||
164 | csrow->first_page = last_cumul_size; | ||
165 | csrow->last_page = cumul_size - 1; | ||
166 | csrow->nr_pages = cumul_size - last_cumul_size; | ||
167 | last_cumul_size = cumul_size; | ||
168 | csrow->grain = 1 << 12; /* I82860_EAP has 4KiB reolution */ | ||
169 | csrow->mtype = MEM_RMBS; | ||
170 | csrow->dtype = DEV_UNKNOWN; | ||
171 | csrow->edac_mode = mchcfg_ddim ? EDAC_SECDED : EDAC_NONE; | ||
172 | } | ||
173 | } | ||
174 | |||
175 | static int i82860_probe1(struct pci_dev *pdev, int dev_idx) | ||
176 | { | ||
177 | struct mem_ctl_info *mci; | ||
178 | struct i82860_error_info discard; | ||
139 | 179 | ||
140 | /* RDRAM has channels but these don't map onto the abstractions that | 180 | /* RDRAM has channels but these don't map onto the abstractions that |
141 | edac uses. | 181 | edac uses. |
@@ -151,67 +191,35 @@ static int i82860_probe1(struct pci_dev *pdev, int dev_idx) | |||
151 | return -ENOMEM; | 191 | return -ENOMEM; |
152 | 192 | ||
153 | debugf3("%s(): init mci\n", __func__); | 193 | debugf3("%s(): init mci\n", __func__); |
154 | mci->pdev = pdev; | 194 | mci->dev = &pdev->dev; |
155 | mci->mtype_cap = MEM_FLAG_DDR; | 195 | mci->mtype_cap = MEM_FLAG_DDR; |
156 | |||
157 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; | 196 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; |
158 | /* I"m not sure about this but I think that all RDRAM is SECDED */ | 197 | /* I"m not sure about this but I think that all RDRAM is SECDED */ |
159 | mci->edac_cap = EDAC_FLAG_SECDED; | 198 | mci->edac_cap = EDAC_FLAG_SECDED; |
160 | /* adjust FLAGS */ | ||
161 | |||
162 | mci->mod_name = EDAC_MOD_STR; | 199 | mci->mod_name = EDAC_MOD_STR; |
163 | mci->mod_ver = "$Revision: 1.1.2.6 $"; | 200 | mci->mod_ver = I82860_REVISION; |
164 | mci->ctl_name = i82860_devs[dev_idx].ctl_name; | 201 | mci->ctl_name = i82860_devs[dev_idx].ctl_name; |
165 | mci->edac_check = i82860_check; | 202 | mci->edac_check = i82860_check; |
166 | mci->ctl_page_to_phys = NULL; | 203 | mci->ctl_page_to_phys = NULL; |
204 | i82860_init_csrows(mci, pdev); | ||
205 | i82860_get_error_info(mci, &discard); /* clear counters */ | ||
167 | 206 | ||
168 | pci_read_config_word(mci->pdev, I82860_MCHCFG, &mchcfg_ddim); | 207 | /* Here we assume that we will never see multiple instances of this |
169 | mchcfg_ddim = mchcfg_ddim & 0x180; | 208 | * type of memory controller. The ID is therefore hardcoded to 0. |
170 | |||
171 | /* | ||
172 | * The group row boundary (GRA) reg values are boundary address | ||
173 | * for each DRAM row with a granularity of 16MB. GRA regs are | ||
174 | * cumulative; therefore GRA15 will contain the total memory contained | ||
175 | * in all eight rows. | ||
176 | */ | 209 | */ |
177 | for (last_cumul_size = index = 0; index < mci->nr_csrows; index++) { | 210 | if (edac_mc_add_mc(mci,0)) { |
178 | u16 value; | 211 | debugf3("%s(): failed edac_mc_add_mc()\n", __func__); |
179 | u32 cumul_size; | 212 | goto fail; |
180 | struct csrow_info *csrow = &mci->csrows[index]; | ||
181 | |||
182 | pci_read_config_word(mci->pdev, I82860_GBA + index * 2, | ||
183 | &value); | ||
184 | |||
185 | cumul_size = (value & I82860_GBA_MASK) << | ||
186 | (I82860_GBA_SHIFT - PAGE_SHIFT); | ||
187 | debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, | ||
188 | cumul_size); | ||
189 | |||
190 | if (cumul_size == last_cumul_size) | ||
191 | continue; /* not populated */ | ||
192 | |||
193 | csrow->first_page = last_cumul_size; | ||
194 | csrow->last_page = cumul_size - 1; | ||
195 | csrow->nr_pages = cumul_size - last_cumul_size; | ||
196 | last_cumul_size = cumul_size; | ||
197 | csrow->grain = 1 << 12; /* I82860_EAP has 4KiB reolution */ | ||
198 | csrow->mtype = MEM_RMBS; | ||
199 | csrow->dtype = DEV_UNKNOWN; | ||
200 | csrow->edac_mode = mchcfg_ddim ? EDAC_SECDED : EDAC_NONE; | ||
201 | } | 213 | } |
202 | 214 | ||
203 | i82860_get_error_info(mci, &discard); /* clear counters */ | 215 | /* get this far and it's successful */ |
216 | debugf3("%s(): success\n", __func__); | ||
204 | 217 | ||
205 | if (edac_mc_add_mc(mci)) { | 218 | return 0; |
206 | debugf3("%s(): failed edac_mc_add_mc()\n", __func__); | ||
207 | edac_mc_free(mci); | ||
208 | } else { | ||
209 | /* get this far and it's successful */ | ||
210 | debugf3("%s(): success\n", __func__); | ||
211 | rc = 0; | ||
212 | } | ||
213 | 219 | ||
214 | return rc; | 220 | fail: |
221 | edac_mc_free(mci); | ||
222 | return -ENODEV; | ||
215 | } | 223 | } |
216 | 224 | ||
217 | /* returns count (>= 0), or negative on error */ | 225 | /* returns count (>= 0), or negative on error */ |
@@ -240,7 +248,7 @@ static void __devexit i82860_remove_one(struct pci_dev *pdev) | |||
240 | 248 | ||
241 | debugf0("%s()\n", __func__); | 249 | debugf0("%s()\n", __func__); |
242 | 250 | ||
243 | if ((mci = edac_mc_del_mc(pdev)) == NULL) | 251 | if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) |
244 | return; | 252 | return; |
245 | 253 | ||
246 | edac_mc_free(mci); | 254 | edac_mc_free(mci); |
diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c index 0aec92698f17..9423ee5e7edd 100644 --- a/drivers/edac/i82875p_edac.c +++ b/drivers/edac/i82875p_edac.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * Note: E7210 appears same as D82875P - zhenyu.z.wang at intel.com | 13 | * Note: E7210 appears same as D82875P - zhenyu.z.wang at intel.com |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
18 | #include <linux/init.h> | 17 | #include <linux/init.h> |
19 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
@@ -21,6 +20,8 @@ | |||
21 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
22 | #include "edac_mc.h" | 21 | #include "edac_mc.h" |
23 | 22 | ||
23 | #define I82875P_REVISION " Ver: 2.0.0 " __DATE__ | ||
24 | |||
24 | #define i82875p_printk(level, fmt, arg...) \ | 25 | #define i82875p_printk(level, fmt, arg...) \ |
25 | edac_printk(level, "i82875p", fmt, ##arg) | 26 | edac_printk(level, "i82875p", fmt, ##arg) |
26 | 27 | ||
@@ -185,18 +186,22 @@ static int i82875p_registered = 1; | |||
185 | static void i82875p_get_error_info(struct mem_ctl_info *mci, | 186 | static void i82875p_get_error_info(struct mem_ctl_info *mci, |
186 | struct i82875p_error_info *info) | 187 | struct i82875p_error_info *info) |
187 | { | 188 | { |
189 | struct pci_dev *pdev; | ||
190 | |||
191 | pdev = to_pci_dev(mci->dev); | ||
192 | |||
188 | /* | 193 | /* |
189 | * This is a mess because there is no atomic way to read all the | 194 | * This is a mess because there is no atomic way to read all the |
190 | * registers at once and the registers can transition from CE being | 195 | * registers at once and the registers can transition from CE being |
191 | * overwritten by UE. | 196 | * overwritten by UE. |
192 | */ | 197 | */ |
193 | pci_read_config_word(mci->pdev, I82875P_ERRSTS, &info->errsts); | 198 | pci_read_config_word(pdev, I82875P_ERRSTS, &info->errsts); |
194 | pci_read_config_dword(mci->pdev, I82875P_EAP, &info->eap); | 199 | pci_read_config_dword(pdev, I82875P_EAP, &info->eap); |
195 | pci_read_config_byte(mci->pdev, I82875P_DES, &info->des); | 200 | pci_read_config_byte(pdev, I82875P_DES, &info->des); |
196 | pci_read_config_byte(mci->pdev, I82875P_DERRSYN, &info->derrsyn); | 201 | pci_read_config_byte(pdev, I82875P_DERRSYN, &info->derrsyn); |
197 | pci_read_config_word(mci->pdev, I82875P_ERRSTS, &info->errsts2); | 202 | pci_read_config_word(pdev, I82875P_ERRSTS, &info->errsts2); |
198 | 203 | ||
199 | pci_write_bits16(mci->pdev, I82875P_ERRSTS, 0x0081, 0x0081); | 204 | pci_write_bits16(pdev, I82875P_ERRSTS, 0x0081, 0x0081); |
200 | 205 | ||
201 | /* | 206 | /* |
202 | * If the error is the same then we can for both reads then | 207 | * If the error is the same then we can for both reads then |
@@ -208,9 +213,9 @@ static void i82875p_get_error_info(struct mem_ctl_info *mci, | |||
208 | return; | 213 | return; |
209 | 214 | ||
210 | if ((info->errsts ^ info->errsts2) & 0x0081) { | 215 | if ((info->errsts ^ info->errsts2) & 0x0081) { |
211 | pci_read_config_dword(mci->pdev, I82875P_EAP, &info->eap); | 216 | pci_read_config_dword(pdev, I82875P_EAP, &info->eap); |
212 | pci_read_config_byte(mci->pdev, I82875P_DES, &info->des); | 217 | pci_read_config_byte(pdev, I82875P_DES, &info->des); |
213 | pci_read_config_byte(mci->pdev, I82875P_DERRSYN, | 218 | pci_read_config_byte(pdev, I82875P_DERRSYN, |
214 | &info->derrsyn); | 219 | &info->derrsyn); |
215 | } | 220 | } |
216 | } | 221 | } |
@@ -259,116 +264,109 @@ static void i82875p_check(struct mem_ctl_info *mci) | |||
259 | extern int pci_proc_attach_device(struct pci_dev *); | 264 | extern int pci_proc_attach_device(struct pci_dev *); |
260 | #endif | 265 | #endif |
261 | 266 | ||
262 | static int i82875p_probe1(struct pci_dev *pdev, int dev_idx) | 267 | /* Return 0 on success or 1 on failure. */ |
268 | static int i82875p_setup_overfl_dev(struct pci_dev *pdev, | ||
269 | struct pci_dev **ovrfl_pdev, void __iomem **ovrfl_window) | ||
263 | { | 270 | { |
264 | int rc = -ENODEV; | 271 | struct pci_dev *dev; |
265 | int index; | 272 | void __iomem *window; |
266 | struct mem_ctl_info *mci = NULL; | ||
267 | struct i82875p_pvt *pvt = NULL; | ||
268 | unsigned long last_cumul_size; | ||
269 | struct pci_dev *ovrfl_pdev; | ||
270 | void __iomem *ovrfl_window = NULL; | ||
271 | u32 drc; | ||
272 | u32 drc_chan; /* Number of channels 0=1chan,1=2chan */ | ||
273 | u32 nr_chans; | ||
274 | u32 drc_ddim; /* DRAM Data Integrity Mode 0=none,2=edac */ | ||
275 | struct i82875p_error_info discard; | ||
276 | 273 | ||
277 | debugf0("%s()\n", __func__); | 274 | *ovrfl_pdev = NULL; |
278 | ovrfl_pdev = pci_get_device(PCI_VEND_DEV(INTEL, 82875_6), NULL); | 275 | *ovrfl_window = NULL; |
276 | dev = pci_get_device(PCI_VEND_DEV(INTEL, 82875_6), NULL); | ||
279 | 277 | ||
280 | if (!ovrfl_pdev) { | 278 | if (dev == NULL) { |
281 | /* | 279 | /* Intel tells BIOS developers to hide device 6 which |
282 | * Intel tells BIOS developers to hide device 6 which | ||
283 | * configures the overflow device access containing | 280 | * configures the overflow device access containing |
284 | * the DRBs - this is where we expose device 6. | 281 | * the DRBs - this is where we expose device 6. |
285 | * http://www.x86-secret.com/articles/tweak/pat/patsecrets-2.htm | 282 | * http://www.x86-secret.com/articles/tweak/pat/patsecrets-2.htm |
286 | */ | 283 | */ |
287 | pci_write_bits8(pdev, 0xf4, 0x2, 0x2); | 284 | pci_write_bits8(pdev, 0xf4, 0x2, 0x2); |
288 | ovrfl_pdev = | 285 | dev = pci_scan_single_device(pdev->bus, PCI_DEVFN(6, 0)); |
289 | pci_scan_single_device(pdev->bus, PCI_DEVFN(6, 0)); | ||
290 | 286 | ||
291 | if (!ovrfl_pdev) | 287 | if (dev == NULL) |
292 | return -ENODEV; | 288 | return 1; |
293 | } | 289 | } |
294 | 290 | ||
291 | *ovrfl_pdev = dev; | ||
292 | |||
295 | #ifdef CONFIG_PROC_FS | 293 | #ifdef CONFIG_PROC_FS |
296 | if (!ovrfl_pdev->procent && pci_proc_attach_device(ovrfl_pdev)) { | 294 | if ((dev->procent == NULL) && pci_proc_attach_device(dev)) { |
297 | i82875p_printk(KERN_ERR, | 295 | i82875p_printk(KERN_ERR, "%s(): Failed to attach overflow " |
298 | "%s(): Failed to attach overflow device\n", __func__); | 296 | "device\n", __func__); |
299 | return -ENODEV; | 297 | return 1; |
300 | } | 298 | } |
301 | #endif | 299 | #endif /* CONFIG_PROC_FS */ |
302 | /* CONFIG_PROC_FS */ | 300 | if (pci_enable_device(dev)) { |
303 | if (pci_enable_device(ovrfl_pdev)) { | 301 | i82875p_printk(KERN_ERR, "%s(): Failed to enable overflow " |
304 | i82875p_printk(KERN_ERR, | 302 | "device\n", __func__); |
305 | "%s(): Failed to enable overflow device\n", __func__); | 303 | return 1; |
306 | return -ENODEV; | ||
307 | } | 304 | } |
308 | 305 | ||
309 | if (pci_request_regions(ovrfl_pdev, pci_name(ovrfl_pdev))) { | 306 | if (pci_request_regions(dev, pci_name(dev))) { |
310 | #ifdef CORRECT_BIOS | 307 | #ifdef CORRECT_BIOS |
311 | goto fail0; | 308 | goto fail0; |
312 | #endif | 309 | #endif |
313 | } | 310 | } |
314 | 311 | ||
315 | /* cache is irrelevant for PCI bus reads/writes */ | 312 | /* cache is irrelevant for PCI bus reads/writes */ |
316 | ovrfl_window = ioremap_nocache(pci_resource_start(ovrfl_pdev, 0), | 313 | window = ioremap_nocache(pci_resource_start(dev, 0), |
317 | pci_resource_len(ovrfl_pdev, 0)); | 314 | pci_resource_len(dev, 0)); |
318 | 315 | ||
319 | if (!ovrfl_window) { | 316 | if (window == NULL) { |
320 | i82875p_printk(KERN_ERR, "%s(): Failed to ioremap bar6\n", | 317 | i82875p_printk(KERN_ERR, "%s(): Failed to ioremap bar6\n", |
321 | __func__); | 318 | __func__); |
322 | goto fail1; | 319 | goto fail1; |
323 | } | 320 | } |
324 | 321 | ||
325 | /* need to find out the number of channels */ | 322 | *ovrfl_window = window; |
326 | drc = readl(ovrfl_window + I82875P_DRC); | 323 | return 0; |
327 | drc_chan = ((drc >> 21) & 0x1); | ||
328 | nr_chans = drc_chan + 1; | ||
329 | 324 | ||
330 | drc_ddim = (drc >> 18) & 0x1; | 325 | fail1: |
331 | mci = edac_mc_alloc(sizeof(*pvt), I82875P_NR_CSROWS(nr_chans), | 326 | pci_release_regions(dev); |
332 | nr_chans); | ||
333 | 327 | ||
334 | if (!mci) { | 328 | #ifdef CORRECT_BIOS |
335 | rc = -ENOMEM; | 329 | fail0: |
336 | goto fail2; | 330 | pci_disable_device(dev); |
337 | } | 331 | #endif |
332 | /* NOTE: the ovrfl proc entry and pci_dev are intentionally left */ | ||
333 | return 1; | ||
334 | } | ||
338 | 335 | ||
339 | debugf3("%s(): init mci\n", __func__); | ||
340 | mci->pdev = pdev; | ||
341 | mci->mtype_cap = MEM_FLAG_DDR; | ||
342 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; | ||
343 | mci->edac_cap = EDAC_FLAG_UNKNOWN; | ||
344 | /* adjust FLAGS */ | ||
345 | 336 | ||
346 | mci->mod_name = EDAC_MOD_STR; | 337 | /* Return 1 if dual channel mode is active. Else return 0. */ |
347 | mci->mod_ver = "$Revision: 1.5.2.11 $"; | 338 | static inline int dual_channel_active(u32 drc) |
348 | mci->ctl_name = i82875p_devs[dev_idx].ctl_name; | 339 | { |
349 | mci->edac_check = i82875p_check; | 340 | return (drc >> 21) & 0x1; |
350 | mci->ctl_page_to_phys = NULL; | 341 | } |
351 | debugf3("%s(): init pvt\n", __func__); | ||
352 | pvt = (struct i82875p_pvt *) mci->pvt_info; | ||
353 | pvt->ovrfl_pdev = ovrfl_pdev; | ||
354 | pvt->ovrfl_window = ovrfl_window; | ||
355 | 342 | ||
356 | /* | 343 | |
357 | * The dram row boundary (DRB) reg values are boundary address | 344 | static void i82875p_init_csrows(struct mem_ctl_info *mci, |
345 | struct pci_dev *pdev, void __iomem *ovrfl_window, u32 drc) | ||
346 | { | ||
347 | struct csrow_info *csrow; | ||
348 | unsigned long last_cumul_size; | ||
349 | u8 value; | ||
350 | u32 drc_ddim; /* DRAM Data Integrity Mode 0=none,2=edac */ | ||
351 | u32 cumul_size; | ||
352 | int index; | ||
353 | |||
354 | drc_ddim = (drc >> 18) & 0x1; | ||
355 | last_cumul_size = 0; | ||
356 | |||
357 | /* The dram row boundary (DRB) reg values are boundary address | ||
358 | * for each DRAM row with a granularity of 32 or 64MB (single/dual | 358 | * for each DRAM row with a granularity of 32 or 64MB (single/dual |
359 | * channel operation). DRB regs are cumulative; therefore DRB7 will | 359 | * channel operation). DRB regs are cumulative; therefore DRB7 will |
360 | * contain the total memory contained in all eight rows. | 360 | * contain the total memory contained in all eight rows. |
361 | */ | 361 | */ |
362 | for (last_cumul_size = index = 0; index < mci->nr_csrows; index++) { | 362 | |
363 | u8 value; | 363 | for (index = 0; index < mci->nr_csrows; index++) { |
364 | u32 cumul_size; | 364 | csrow = &mci->csrows[index]; |
365 | struct csrow_info *csrow = &mci->csrows[index]; | ||
366 | 365 | ||
367 | value = readb(ovrfl_window + I82875P_DRB + index); | 366 | value = readb(ovrfl_window + I82875P_DRB + index); |
368 | cumul_size = value << (I82875P_DRB_SHIFT - PAGE_SHIFT); | 367 | cumul_size = value << (I82875P_DRB_SHIFT - PAGE_SHIFT); |
369 | debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, | 368 | debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, |
370 | cumul_size); | 369 | cumul_size); |
371 | |||
372 | if (cumul_size == last_cumul_size) | 370 | if (cumul_size == last_cumul_size) |
373 | continue; /* not populated */ | 371 | continue; /* not populated */ |
374 | 372 | ||
@@ -376,35 +374,75 @@ static int i82875p_probe1(struct pci_dev *pdev, int dev_idx) | |||
376 | csrow->last_page = cumul_size - 1; | 374 | csrow->last_page = cumul_size - 1; |
377 | csrow->nr_pages = cumul_size - last_cumul_size; | 375 | csrow->nr_pages = cumul_size - last_cumul_size; |
378 | last_cumul_size = cumul_size; | 376 | last_cumul_size = cumul_size; |
379 | csrow->grain = 1 << 12; /* I82875P_EAP has 4KiB reolution */ | 377 | csrow->grain = 1 << 12; /* I82875P_EAP has 4KiB reolution */ |
380 | csrow->mtype = MEM_DDR; | 378 | csrow->mtype = MEM_DDR; |
381 | csrow->dtype = DEV_UNKNOWN; | 379 | csrow->dtype = DEV_UNKNOWN; |
382 | csrow->edac_mode = drc_ddim ? EDAC_SECDED : EDAC_NONE; | 380 | csrow->edac_mode = drc_ddim ? EDAC_SECDED : EDAC_NONE; |
383 | } | 381 | } |
382 | } | ||
383 | |||
384 | static int i82875p_probe1(struct pci_dev *pdev, int dev_idx) | ||
385 | { | ||
386 | int rc = -ENODEV; | ||
387 | struct mem_ctl_info *mci; | ||
388 | struct i82875p_pvt *pvt; | ||
389 | struct pci_dev *ovrfl_pdev; | ||
390 | void __iomem *ovrfl_window; | ||
391 | u32 drc; | ||
392 | u32 nr_chans; | ||
393 | struct i82875p_error_info discard; | ||
394 | |||
395 | debugf0("%s()\n", __func__); | ||
396 | ovrfl_pdev = pci_get_device(PCI_VEND_DEV(INTEL, 82875_6), NULL); | ||
397 | |||
398 | if (i82875p_setup_overfl_dev(pdev, &ovrfl_pdev, &ovrfl_window)) | ||
399 | return -ENODEV; | ||
400 | drc = readl(ovrfl_window + I82875P_DRC); | ||
401 | nr_chans = dual_channel_active(drc) + 1; | ||
402 | mci = edac_mc_alloc(sizeof(*pvt), I82875P_NR_CSROWS(nr_chans), | ||
403 | nr_chans); | ||
404 | |||
405 | if (!mci) { | ||
406 | rc = -ENOMEM; | ||
407 | goto fail0; | ||
408 | } | ||
384 | 409 | ||
410 | debugf3("%s(): init mci\n", __func__); | ||
411 | mci->dev = &pdev->dev; | ||
412 | mci->mtype_cap = MEM_FLAG_DDR; | ||
413 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; | ||
414 | mci->edac_cap = EDAC_FLAG_UNKNOWN; | ||
415 | mci->mod_name = EDAC_MOD_STR; | ||
416 | mci->mod_ver = I82875P_REVISION; | ||
417 | mci->ctl_name = i82875p_devs[dev_idx].ctl_name; | ||
418 | mci->edac_check = i82875p_check; | ||
419 | mci->ctl_page_to_phys = NULL; | ||
420 | debugf3("%s(): init pvt\n", __func__); | ||
421 | pvt = (struct i82875p_pvt *) mci->pvt_info; | ||
422 | pvt->ovrfl_pdev = ovrfl_pdev; | ||
423 | pvt->ovrfl_window = ovrfl_window; | ||
424 | i82875p_init_csrows(mci, pdev, ovrfl_window, drc); | ||
385 | i82875p_get_error_info(mci, &discard); /* clear counters */ | 425 | i82875p_get_error_info(mci, &discard); /* clear counters */ |
386 | 426 | ||
387 | if (edac_mc_add_mc(mci)) { | 427 | /* Here we assume that we will never see multiple instances of this |
428 | * type of memory controller. The ID is therefore hardcoded to 0. | ||
429 | */ | ||
430 | if (edac_mc_add_mc(mci,0)) { | ||
388 | debugf3("%s(): failed edac_mc_add_mc()\n", __func__); | 431 | debugf3("%s(): failed edac_mc_add_mc()\n", __func__); |
389 | goto fail3; | 432 | goto fail1; |
390 | } | 433 | } |
391 | 434 | ||
392 | /* get this far and it's successful */ | 435 | /* get this far and it's successful */ |
393 | debugf3("%s(): success\n", __func__); | 436 | debugf3("%s(): success\n", __func__); |
394 | return 0; | 437 | return 0; |
395 | 438 | ||
396 | fail3: | 439 | fail1: |
397 | edac_mc_free(mci); | 440 | edac_mc_free(mci); |
398 | 441 | ||
399 | fail2: | 442 | fail0: |
400 | iounmap(ovrfl_window); | 443 | iounmap(ovrfl_window); |
401 | |||
402 | fail1: | ||
403 | pci_release_regions(ovrfl_pdev); | 444 | pci_release_regions(ovrfl_pdev); |
404 | 445 | ||
405 | #ifdef CORRECT_BIOS | ||
406 | fail0: | ||
407 | #endif | ||
408 | pci_disable_device(ovrfl_pdev); | 446 | pci_disable_device(ovrfl_pdev); |
409 | /* NOTE: the ovrfl proc entry and pci_dev are intentionally left */ | 447 | /* NOTE: the ovrfl proc entry and pci_dev are intentionally left */ |
410 | return rc; | 448 | return rc; |
@@ -437,7 +475,7 @@ static void __devexit i82875p_remove_one(struct pci_dev *pdev) | |||
437 | 475 | ||
438 | debugf0("%s()\n", __func__); | 476 | debugf0("%s()\n", __func__); |
439 | 477 | ||
440 | if ((mci = edac_mc_del_mc(pdev)) == NULL) | 478 | if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) |
441 | return; | 479 | return; |
442 | 480 | ||
443 | pvt = (struct i82875p_pvt *) mci->pvt_info; | 481 | pvt = (struct i82875p_pvt *) mci->pvt_info; |
diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c index 2c29fafe67c7..a0e248d11ed9 100644 --- a/drivers/edac/r82600_edac.c +++ b/drivers/edac/r82600_edac.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * references to this document given in [] | 15 | * references to this document given in [] |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/module.h> | 18 | #include <linux/module.h> |
20 | #include <linux/init.h> | 19 | #include <linux/init.h> |
21 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
@@ -23,6 +22,8 @@ | |||
23 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
24 | #include "edac_mc.h" | 23 | #include "edac_mc.h" |
25 | 24 | ||
25 | #define R82600_REVISION " Ver: 2.0.0 " __DATE__ | ||
26 | |||
26 | #define r82600_printk(level, fmt, arg...) \ | 27 | #define r82600_printk(level, fmt, arg...) \ |
27 | edac_printk(level, "r82600", fmt, ##arg) | 28 | edac_printk(level, "r82600", fmt, ##arg) |
28 | 29 | ||
@@ -134,17 +135,20 @@ static unsigned int disable_hardware_scrub = 0; | |||
134 | static void r82600_get_error_info (struct mem_ctl_info *mci, | 135 | static void r82600_get_error_info (struct mem_ctl_info *mci, |
135 | struct r82600_error_info *info) | 136 | struct r82600_error_info *info) |
136 | { | 137 | { |
137 | pci_read_config_dword(mci->pdev, R82600_EAP, &info->eapr); | 138 | struct pci_dev *pdev; |
139 | |||
140 | pdev = to_pci_dev(mci->dev); | ||
141 | pci_read_config_dword(pdev, R82600_EAP, &info->eapr); | ||
138 | 142 | ||
139 | if (info->eapr & BIT(0)) | 143 | if (info->eapr & BIT(0)) |
140 | /* Clear error to allow next error to be reported [p.62] */ | 144 | /* Clear error to allow next error to be reported [p.62] */ |
141 | pci_write_bits32(mci->pdev, R82600_EAP, | 145 | pci_write_bits32(pdev, R82600_EAP, |
142 | ((u32) BIT(0) & (u32) BIT(1)), | 146 | ((u32) BIT(0) & (u32) BIT(1)), |
143 | ((u32) BIT(0) & (u32) BIT(1))); | 147 | ((u32) BIT(0) & (u32) BIT(1))); |
144 | 148 | ||
145 | if (info->eapr & BIT(1)) | 149 | if (info->eapr & BIT(1)) |
146 | /* Clear error to allow next error to be reported [p.62] */ | 150 | /* Clear error to allow next error to be reported [p.62] */ |
147 | pci_write_bits32(mci->pdev, R82600_EAP, | 151 | pci_write_bits32(pdev, R82600_EAP, |
148 | ((u32) BIT(0) & (u32) BIT(1)), | 152 | ((u32) BIT(0) & (u32) BIT(1)), |
149 | ((u32) BIT(0) & (u32) BIT(1))); | 153 | ((u32) BIT(0) & (u32) BIT(1))); |
150 | } | 154 | } |
@@ -200,25 +204,72 @@ static void r82600_check(struct mem_ctl_info *mci) | |||
200 | r82600_process_error_info(mci, &info, 1); | 204 | r82600_process_error_info(mci, &info, 1); |
201 | } | 205 | } |
202 | 206 | ||
203 | static int r82600_probe1(struct pci_dev *pdev, int dev_idx) | 207 | static inline int ecc_enabled(u8 dramcr) |
208 | { | ||
209 | return dramcr & BIT(5); | ||
210 | } | ||
211 | |||
212 | static void r82600_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, | ||
213 | u8 dramcr) | ||
204 | { | 214 | { |
205 | int rc = -ENODEV; | 215 | struct csrow_info *csrow; |
206 | int index; | 216 | int index; |
207 | struct mem_ctl_info *mci = NULL; | 217 | u8 drbar; /* SDRAM Row Boundry Address Register */ |
218 | u32 row_high_limit, row_high_limit_last; | ||
219 | u32 reg_sdram, ecc_on, row_base; | ||
220 | |||
221 | ecc_on = ecc_enabled(dramcr); | ||
222 | reg_sdram = dramcr & BIT(4); | ||
223 | row_high_limit_last = 0; | ||
224 | |||
225 | for (index = 0; index < mci->nr_csrows; index++) { | ||
226 | csrow = &mci->csrows[index]; | ||
227 | |||
228 | /* find the DRAM Chip Select Base address and mask */ | ||
229 | pci_read_config_byte(pdev, R82600_DRBA + index, &drbar); | ||
230 | |||
231 | debugf1("%s() Row=%d DRBA = %#0x\n", __func__, index, drbar); | ||
232 | |||
233 | row_high_limit = ((u32) drbar << 24); | ||
234 | /* row_high_limit = ((u32)drbar << 24) | 0xffffffUL; */ | ||
235 | |||
236 | debugf1("%s() Row=%d, Boundry Address=%#0x, Last = %#0x\n", | ||
237 | __func__, index, row_high_limit, row_high_limit_last); | ||
238 | |||
239 | /* Empty row [p.57] */ | ||
240 | if (row_high_limit == row_high_limit_last) | ||
241 | continue; | ||
242 | |||
243 | row_base = row_high_limit_last; | ||
244 | |||
245 | csrow->first_page = row_base >> PAGE_SHIFT; | ||
246 | csrow->last_page = (row_high_limit >> PAGE_SHIFT) - 1; | ||
247 | csrow->nr_pages = csrow->last_page - csrow->first_page + 1; | ||
248 | /* Error address is top 19 bits - so granularity is * | ||
249 | * 14 bits */ | ||
250 | csrow->grain = 1 << 14; | ||
251 | csrow->mtype = reg_sdram ? MEM_RDDR : MEM_DDR; | ||
252 | /* FIXME - check that this is unknowable with this chipset */ | ||
253 | csrow->dtype = DEV_UNKNOWN; | ||
254 | |||
255 | /* Mode is global on 82600 */ | ||
256 | csrow->edac_mode = ecc_on ? EDAC_SECDED : EDAC_NONE; | ||
257 | row_high_limit_last = row_high_limit; | ||
258 | } | ||
259 | } | ||
260 | |||
261 | static int r82600_probe1(struct pci_dev *pdev, int dev_idx) | ||
262 | { | ||
263 | struct mem_ctl_info *mci; | ||
208 | u8 dramcr; | 264 | u8 dramcr; |
209 | u32 ecc_on; | ||
210 | u32 reg_sdram; | ||
211 | u32 eapr; | 265 | u32 eapr; |
212 | u32 scrub_disabled; | 266 | u32 scrub_disabled; |
213 | u32 sdram_refresh_rate; | 267 | u32 sdram_refresh_rate; |
214 | u32 row_high_limit_last = 0; | ||
215 | struct r82600_error_info discard; | 268 | struct r82600_error_info discard; |
216 | 269 | ||
217 | debugf0("%s()\n", __func__); | 270 | debugf0("%s()\n", __func__); |
218 | pci_read_config_byte(pdev, R82600_DRAMC, &dramcr); | 271 | pci_read_config_byte(pdev, R82600_DRAMC, &dramcr); |
219 | pci_read_config_dword(pdev, R82600_EAP, &eapr); | 272 | pci_read_config_dword(pdev, R82600_EAP, &eapr); |
220 | ecc_on = dramcr & BIT(5); | ||
221 | reg_sdram = dramcr & BIT(4); | ||
222 | scrub_disabled = eapr & BIT(31); | 273 | scrub_disabled = eapr & BIT(31); |
223 | sdram_refresh_rate = dramcr & (BIT(0) | BIT(1)); | 274 | sdram_refresh_rate = dramcr & (BIT(0) | BIT(1)); |
224 | debugf2("%s(): sdram refresh rate = %#0x\n", __func__, | 275 | debugf2("%s(): sdram refresh rate = %#0x\n", __func__, |
@@ -226,13 +277,11 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx) | |||
226 | debugf2("%s(): DRAMC register = %#0x\n", __func__, dramcr); | 277 | debugf2("%s(): DRAMC register = %#0x\n", __func__, dramcr); |
227 | mci = edac_mc_alloc(0, R82600_NR_CSROWS, R82600_NR_CHANS); | 278 | mci = edac_mc_alloc(0, R82600_NR_CSROWS, R82600_NR_CHANS); |
228 | 279 | ||
229 | if (mci == NULL) { | 280 | if (mci == NULL) |
230 | rc = -ENOMEM; | 281 | return -ENOMEM; |
231 | goto fail; | ||
232 | } | ||
233 | 282 | ||
234 | debugf0("%s(): mci = %p\n", __func__, mci); | 283 | debugf0("%s(): mci = %p\n", __func__, mci); |
235 | mci->pdev = pdev; | 284 | mci->dev = &pdev->dev; |
236 | mci->mtype_cap = MEM_FLAG_RDDR | MEM_FLAG_DDR; | 285 | mci->mtype_cap = MEM_FLAG_RDDR | MEM_FLAG_DDR; |
237 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED; | 286 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED; |
238 | /* FIXME try to work out if the chip leads have been used for COM2 | 287 | /* FIXME try to work out if the chip leads have been used for COM2 |
@@ -245,7 +294,7 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx) | |||
245 | * is possible. */ | 294 | * is possible. */ |
246 | mci->edac_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED; | 295 | mci->edac_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED; |
247 | 296 | ||
248 | if (ecc_on) { | 297 | if (ecc_enabled(dramcr)) { |
249 | if (scrub_disabled) | 298 | if (scrub_disabled) |
250 | debugf3("%s(): mci = %p - Scrubbing disabled! EAP: " | 299 | debugf3("%s(): mci = %p - Scrubbing disabled! EAP: " |
251 | "%#0x\n", __func__, mci, eapr); | 300 | "%#0x\n", __func__, mci, eapr); |
@@ -253,53 +302,17 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx) | |||
253 | mci->edac_cap = EDAC_FLAG_NONE; | 302 | mci->edac_cap = EDAC_FLAG_NONE; |
254 | 303 | ||
255 | mci->mod_name = EDAC_MOD_STR; | 304 | mci->mod_name = EDAC_MOD_STR; |
256 | mci->mod_ver = "$Revision: 1.1.2.6 $"; | 305 | mci->mod_ver = R82600_REVISION; |
257 | mci->ctl_name = "R82600"; | 306 | mci->ctl_name = "R82600"; |
258 | mci->edac_check = r82600_check; | 307 | mci->edac_check = r82600_check; |
259 | mci->ctl_page_to_phys = NULL; | 308 | mci->ctl_page_to_phys = NULL; |
260 | 309 | r82600_init_csrows(mci, pdev, dramcr); | |
261 | for (index = 0; index < mci->nr_csrows; index++) { | ||
262 | struct csrow_info *csrow = &mci->csrows[index]; | ||
263 | u8 drbar; /* sDram Row Boundry Address Register */ | ||
264 | u32 row_high_limit; | ||
265 | u32 row_base; | ||
266 | |||
267 | /* find the DRAM Chip Select Base address and mask */ | ||
268 | pci_read_config_byte(mci->pdev, R82600_DRBA + index, &drbar); | ||
269 | |||
270 | debugf1("MC%d: %s() Row=%d DRBA = %#0x\n", mci->mc_idx, | ||
271 | __func__, index, drbar); | ||
272 | |||
273 | row_high_limit = ((u32) drbar << 24); | ||
274 | /* row_high_limit = ((u32)drbar << 24) | 0xffffffUL; */ | ||
275 | |||
276 | debugf1("MC%d: %s() Row=%d, Boundry Address=%#0x, Last = " | ||
277 | "%#0x \n", mci->mc_idx, __func__, index, | ||
278 | row_high_limit, row_high_limit_last); | ||
279 | |||
280 | /* Empty row [p.57] */ | ||
281 | if (row_high_limit == row_high_limit_last) | ||
282 | continue; | ||
283 | |||
284 | row_base = row_high_limit_last; | ||
285 | csrow->first_page = row_base >> PAGE_SHIFT; | ||
286 | csrow->last_page = (row_high_limit >> PAGE_SHIFT) - 1; | ||
287 | csrow->nr_pages = csrow->last_page - csrow->first_page + 1; | ||
288 | /* Error address is top 19 bits - so granularity is * | ||
289 | * 14 bits */ | ||
290 | csrow->grain = 1 << 14; | ||
291 | csrow->mtype = reg_sdram ? MEM_RDDR : MEM_DDR; | ||
292 | /* FIXME - check that this is unknowable with this chipset */ | ||
293 | csrow->dtype = DEV_UNKNOWN; | ||
294 | |||
295 | /* Mode is global on 82600 */ | ||
296 | csrow->edac_mode = ecc_on ? EDAC_SECDED : EDAC_NONE; | ||
297 | row_high_limit_last = row_high_limit; | ||
298 | } | ||
299 | |||
300 | r82600_get_error_info(mci, &discard); /* clear counters */ | 310 | r82600_get_error_info(mci, &discard); /* clear counters */ |
301 | 311 | ||
302 | if (edac_mc_add_mc(mci)) { | 312 | /* Here we assume that we will never see multiple instances of this |
313 | * type of memory controller. The ID is therefore hardcoded to 0. | ||
314 | */ | ||
315 | if (edac_mc_add_mc(mci,0)) { | ||
303 | debugf3("%s(): failed edac_mc_add_mc()\n", __func__); | 316 | debugf3("%s(): failed edac_mc_add_mc()\n", __func__); |
304 | goto fail; | 317 | goto fail; |
305 | } | 318 | } |
@@ -309,17 +322,15 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx) | |||
309 | if (disable_hardware_scrub) { | 322 | if (disable_hardware_scrub) { |
310 | debugf3("%s(): Disabling Hardware Scrub (scrub on error)\n", | 323 | debugf3("%s(): Disabling Hardware Scrub (scrub on error)\n", |
311 | __func__); | 324 | __func__); |
312 | pci_write_bits32(mci->pdev, R82600_EAP, BIT(31), BIT(31)); | 325 | pci_write_bits32(pdev, R82600_EAP, BIT(31), BIT(31)); |
313 | } | 326 | } |
314 | 327 | ||
315 | debugf3("%s(): success\n", __func__); | 328 | debugf3("%s(): success\n", __func__); |
316 | return 0; | 329 | return 0; |
317 | 330 | ||
318 | fail: | 331 | fail: |
319 | if (mci) | 332 | edac_mc_free(mci); |
320 | edac_mc_free(mci); | 333 | return -ENODEV; |
321 | |||
322 | return rc; | ||
323 | } | 334 | } |
324 | 335 | ||
325 | /* returns count (>= 0), or negative on error */ | 336 | /* returns count (>= 0), or negative on error */ |
@@ -338,7 +349,7 @@ static void __devexit r82600_remove_one(struct pci_dev *pdev) | |||
338 | 349 | ||
339 | debugf0("%s()\n", __func__); | 350 | debugf0("%s()\n", __func__); |
340 | 351 | ||
341 | if ((mci = edac_mc_del_mc(pdev)) == NULL) | 352 | if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) |
342 | return; | 353 | return; |
343 | 354 | ||
344 | edac_mc_free(mci); | 355 | edac_mc_free(mci); |
diff --git a/drivers/eisa/virtual_root.c b/drivers/eisa/virtual_root.c index 0f97a0cb0ff4..9b4fcac03ad5 100644 --- a/drivers/eisa/virtual_root.c +++ b/drivers/eisa/virtual_root.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * This code is released under the GPL version 2. | 7 | * This code is released under the GPL version 2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
12 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
13 | #include <linux/eisa.h> | 12 | #include <linux/eisa.h> |
diff --git a/drivers/fc4/fc_syms.c b/drivers/fc4/fc_syms.c index ed85dfcef69a..8700a8076d04 100644 --- a/drivers/fc4/fc_syms.c +++ b/drivers/fc4/fc_syms.c | |||
@@ -2,7 +2,6 @@ | |||
2 | * We should not even be trying to compile this if we are not doing | 2 | * We should not even be trying to compile this if we are not doing |
3 | * a module. | 3 | * a module. |
4 | */ | 4 | */ |
5 | #include <linux/config.h> | ||
6 | #include <linux/module.h> | 5 | #include <linux/module.h> |
7 | 6 | ||
8 | #ifdef CONFIG_MODULES | 7 | #ifdef CONFIG_MODULES |
diff --git a/drivers/firmware/dell_rbu.c b/drivers/firmware/dell_rbu.c index fdb8b042e64d..23b086685453 100644 --- a/drivers/firmware/dell_rbu.c +++ b/drivers/firmware/dell_rbu.c | |||
@@ -34,7 +34,6 @@ | |||
34 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 34 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
35 | * GNU General Public License for more details. | 35 | * GNU General Public License for more details. |
36 | */ | 36 | */ |
37 | #include <linux/config.h> | ||
38 | #include <linux/init.h> | 37 | #include <linux/init.h> |
39 | #include <linux/module.h> | 38 | #include <linux/module.h> |
40 | #include <linux/string.h> | 39 | #include <linux/string.h> |
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index 9b7e4d52ffd4..8ebce1c03ad7 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c | |||
@@ -66,7 +66,6 @@ | |||
66 | */ | 66 | */ |
67 | 67 | ||
68 | #include <linux/capability.h> | 68 | #include <linux/capability.h> |
69 | #include <linux/config.h> | ||
70 | #include <linux/types.h> | 69 | #include <linux/types.h> |
71 | #include <linux/errno.h> | 70 | #include <linux/errno.h> |
72 | #include <linux/init.h> | 71 | #include <linux/init.h> |
diff --git a/drivers/firmware/pcdp.c b/drivers/firmware/pcdp.c index c37baf9448bc..c2ad72fefd9d 100644 --- a/drivers/firmware/pcdp.c +++ b/drivers/firmware/pcdp.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/acpi.h> | 14 | #include <linux/acpi.h> |
16 | #include <linux/console.h> | 15 | #include <linux/console.h> |
17 | #include <linux/efi.h> | 16 | #include <linux/efi.h> |
diff --git a/drivers/hwmon/hwmon-vid.c b/drivers/hwmon/hwmon-vid.c index a6764ff00803..9d67320e6840 100644 --- a/drivers/hwmon/hwmon-vid.c +++ b/drivers/hwmon/hwmon-vid.c | |||
@@ -22,7 +22,6 @@ | |||
22 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 22 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
28 | #include <linux/hwmon-vid.h> | 27 | #include <linux/hwmon-vid.h> |
diff --git a/drivers/hwmon/w83792d.c b/drivers/hwmon/w83792d.c index e407c74bda35..7576ec9426a3 100644 --- a/drivers/hwmon/w83792d.c +++ b/drivers/hwmon/w83792d.c | |||
@@ -35,7 +35,6 @@ | |||
35 | w83792d 9 7 7 3 0x7a 0x5ca3 yes no | 35 | w83792d 9 7 7 3 0x7a 0x5ca3 yes no |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include <linux/config.h> | ||
39 | #include <linux/module.h> | 38 | #include <linux/module.h> |
40 | #include <linux/init.h> | 39 | #include <linux/init.h> |
41 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 8b46ef7d9ff8..7be1d0a3e8f8 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c | |||
@@ -494,8 +494,8 @@ static int __devinit i801_probe(struct pci_dev *dev, const struct pci_device_id | |||
494 | err = pci_request_region(dev, SMBBAR, i801_driver.name); | 494 | err = pci_request_region(dev, SMBBAR, i801_driver.name); |
495 | if (err) { | 495 | if (err) { |
496 | dev_err(&dev->dev, "Failed to request SMBus region " | 496 | dev_err(&dev->dev, "Failed to request SMBus region " |
497 | "0x%lx-0x%lx\n", i801_smba, | 497 | "0x%lx-0x%Lx\n", i801_smba, |
498 | pci_resource_end(dev, SMBBAR)); | 498 | (unsigned long long)pci_resource_end(dev, SMBBAR)); |
499 | goto exit; | 499 | goto exit; |
500 | } | 500 | } |
501 | 501 | ||
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index 87fae937e666..0599bbd65d93 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c | |||
@@ -28,7 +28,6 @@ | |||
28 | * | 28 | * |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | #include <linux/module.h> | 31 | #include <linux/module.h> |
33 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
34 | #include <linux/ioport.h> | 33 | #include <linux/ioport.h> |
diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c index d00a02fc23e4..aca7e1668605 100644 --- a/drivers/i2c/busses/i2c-iop3xx.c +++ b/drivers/i2c/busses/i2c-iop3xx.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * the Free Software Foundation, version 2. | 26 | * the Free Software Foundation, version 2. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
32 | #include <linux/module.h> | 31 | #include <linux/module.h> |
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index 2721e4c8184a..de93601de178 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * warranty of any kind, whether express or implied. | 13 | * warranty of any kind, whether express or implied. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
19 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c index df786eb55295..2a0b3be7cdd0 100644 --- a/drivers/i2c/busses/i2c-powermac.c +++ b/drivers/i2c/busses/i2c-powermac.c | |||
@@ -20,7 +20,6 @@ | |||
20 | 20 | ||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
26 | #include <linux/types.h> | 25 | #include <linux/types.h> |
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index f7d40f8e5f5c..512b8791c328 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | 25 | ||
diff --git a/drivers/i2c/busses/scx200_i2c.c b/drivers/i2c/busses/scx200_i2c.c index 27fbfecc414f..cb3ef5ac99fd 100644 --- a/drivers/i2c/busses/scx200_i2c.c +++ b/drivers/i2c/busses/scx200_i2c.c | |||
@@ -21,7 +21,6 @@ | |||
21 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 21 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c index e6f1ab7b913c..b638ac6e59f4 100644 --- a/drivers/i2c/chips/isp1301_omap.c +++ b/drivers/i2c/chips/isp1301_omap.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #undef DEBUG | 21 | #undef DEBUG |
22 | #undef VERBOSE | 22 | #undef VERBOSE |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/init.h> | 26 | #include <linux/init.h> |
diff --git a/drivers/i2c/chips/tps65010.c b/drivers/i2c/chips/tps65010.c index 179b1e022d80..e27ee12245d3 100644 --- a/drivers/i2c/chips/tps65010.c +++ b/drivers/i2c/chips/tps65010.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | #include <linux/init.h> | 24 | #include <linux/init.h> |
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c index 308897e57e4d..8a1c27f28692 100644 --- a/drivers/ide/arm/icside.c +++ b/drivers/ide/arm/icside.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * Please note that this platform does not support 32-bit IDE IO. | 6 | * Please note that this platform does not support 32-bit IDE IO. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/string.h> | 9 | #include <linux/string.h> |
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/ioport.h> | 11 | #include <linux/ioport.h> |
diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c index cd15e6260510..5797e0b5a132 100644 --- a/drivers/ide/cris/ide-cris.c +++ b/drivers/ide/cris/ide-cris.c | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ | 20 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
25 | #include <linux/timer.h> | 24 | #include <linux/timer.h> |
diff --git a/drivers/ide/h8300/ide-h8300.c b/drivers/ide/h8300/ide-h8300.c index fb91cb8bf2d2..15955996a1f3 100644 --- a/drivers/ide/h8300/ide-h8300.c +++ b/drivers/ide/h8300/ide-h8300.c | |||
@@ -5,7 +5,6 @@ | |||
5 | 5 | ||
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/ide.h> | 7 | #include <linux/ide.h> |
8 | #include <linux/config.h> | ||
9 | 8 | ||
10 | #include <asm/io.h> | 9 | #include <asm/io.h> |
11 | #include <asm/irq.h> | 10 | #include <asm/irq.h> |
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index bfafd4846a08..654d4cd09847 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -301,7 +301,6 @@ | |||
301 | 301 | ||
302 | #define IDECD_VERSION "4.61" | 302 | #define IDECD_VERSION "4.61" |
303 | 303 | ||
304 | #include <linux/config.h> | ||
305 | #include <linux/module.h> | 304 | #include <linux/module.h> |
306 | #include <linux/types.h> | 305 | #include <linux/types.h> |
307 | #include <linux/kernel.h> | 306 | #include <linux/kernel.h> |
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index d0227c39ced1..f712e4cfd9dc 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -47,7 +47,6 @@ | |||
47 | 47 | ||
48 | //#define DEBUG | 48 | //#define DEBUG |
49 | 49 | ||
50 | #include <linux/config.h> | ||
51 | #include <linux/module.h> | 50 | #include <linux/module.h> |
52 | #include <linux/types.h> | 51 | #include <linux/types.h> |
53 | #include <linux/string.h> | 52 | #include <linux/string.h> |
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 783a2475ee8b..98918fb6b2ce 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -74,7 +74,6 @@ | |||
74 | * | 74 | * |
75 | */ | 75 | */ |
76 | 76 | ||
77 | #include <linux/config.h> | ||
78 | #include <linux/module.h> | 77 | #include <linux/module.h> |
79 | #include <linux/types.h> | 78 | #include <linux/types.h> |
80 | #include <linux/kernel.h> | 79 | #include <linux/kernel.h> |
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 68628327c0f5..6ca3476d02c7 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -82,7 +82,6 @@ | |||
82 | 82 | ||
83 | #define IDEFLOPPY_VERSION "0.99.newide" | 83 | #define IDEFLOPPY_VERSION "0.99.newide" |
84 | 84 | ||
85 | #include <linux/config.h> | ||
86 | #include <linux/module.h> | 85 | #include <linux/module.h> |
87 | #include <linux/types.h> | 86 | #include <linux/types.h> |
88 | #include <linux/string.h> | 87 | #include <linux/string.h> |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 26ceab1e90bb..7dba9992ad30 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -24,7 +24,6 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/module.h> | 27 | #include <linux/module.h> |
29 | #include <linux/types.h> | 28 | #include <linux/types.h> |
30 | #include <linux/string.h> | 29 | #include <linux/string.h> |
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 32117f0ec5c0..657165297dc7 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/module.h> | 9 | #include <linux/module.h> |
11 | #include <linux/types.h> | 10 | #include <linux/types.h> |
12 | #include <linux/string.h> | 11 | #include <linux/string.h> |
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index 7ddb11828731..1feff23487d4 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <linux/module.h> | 1 | #include <linux/module.h> |
3 | #include <linux/types.h> | 2 | #include <linux/types.h> |
4 | #include <linux/string.h> | 3 | #include <linux/string.h> |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 0d5038a28560..c5f71ac28d14 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -33,7 +33,6 @@ | |||
33 | 33 | ||
34 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ | 34 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ |
35 | 35 | ||
36 | #include <linux/config.h> | ||
37 | #include <linux/module.h> | 36 | #include <linux/module.h> |
38 | #include <linux/types.h> | 37 | #include <linux/types.h> |
39 | #include <linux/string.h> | 38 | #include <linux/string.h> |
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index 84665e2ba3c8..c12f1b71e934 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | 26 | ||
28 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 4b91101e12b7..7067ab997927 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -424,7 +424,6 @@ | |||
424 | 424 | ||
425 | #define IDETAPE_VERSION "1.19" | 425 | #define IDETAPE_VERSION "1.19" |
426 | 426 | ||
427 | #include <linux/config.h> | ||
428 | #include <linux/module.h> | 427 | #include <linux/module.h> |
429 | #include <linux/types.h> | 428 | #include <linux/types.h> |
430 | #include <linux/string.h> | 429 | #include <linux/string.h> |
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index a839b2a8f6f4..04547eb0833f 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * request. | 27 | * request. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/types.h> | 31 | #include <linux/types.h> |
33 | #include <linux/string.h> | 32 | #include <linux/string.h> |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 1cdf44205162..05fbd9298db7 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -130,7 +130,6 @@ | |||
130 | 130 | ||
131 | #define _IDE_C /* Tell ide.h it's really us */ | 131 | #define _IDE_C /* Tell ide.h it's really us */ |
132 | 132 | ||
133 | #include <linux/config.h> | ||
134 | #include <linux/module.h> | 133 | #include <linux/module.h> |
135 | #include <linux/types.h> | 134 | #include <linux/types.h> |
136 | #include <linux/string.h> | 135 | #include <linux/string.h> |
diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c index fb88711812e6..9c544467cb74 100644 --- a/drivers/ide/legacy/ali14xx.c +++ b/drivers/ide/legacy/ali14xx.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ | 40 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ |
41 | 41 | ||
42 | #include <linux/module.h> | 42 | #include <linux/module.h> |
43 | #include <linux/config.h> | ||
44 | #include <linux/types.h> | 43 | #include <linux/types.h> |
45 | #include <linux/kernel.h> | 44 | #include <linux/kernel.h> |
46 | #include <linux/delay.h> | 45 | #include <linux/delay.h> |
diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c index 20eb5b872ca9..3b1d33baaa2f 100644 --- a/drivers/ide/legacy/dtc2278.c +++ b/drivers/ide/legacy/dtc2278.c | |||
@@ -7,7 +7,6 @@ | |||
7 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ | 7 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/config.h> | ||
11 | #include <linux/types.h> | 10 | #include <linux/types.h> |
12 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
13 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
diff --git a/drivers/ide/legacy/gayle.c b/drivers/ide/legacy/gayle.c index 3fac3e9ec47d..64d42619ab06 100644 --- a/drivers/ide/legacy/gayle.c +++ b/drivers/ide/legacy/gayle.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * more details. | 8 | * more details. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/types.h> | 11 | #include <linux/types.h> |
13 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
14 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c index a77fb249d5cf..c48e87e512d3 100644 --- a/drivers/ide/legacy/ht6560b.c +++ b/drivers/ide/legacy/ht6560b.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ | 39 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ |
40 | 40 | ||
41 | #include <linux/module.h> | 41 | #include <linux/module.h> |
42 | #include <linux/config.h> | ||
43 | #include <linux/types.h> | 42 | #include <linux/types.h> |
44 | #include <linux/kernel.h> | 43 | #include <linux/kernel.h> |
45 | #include <linux/delay.h> | 44 | #include <linux/delay.h> |
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c index 602797a44208..b7e459e4f284 100644 --- a/drivers/ide/legacy/ide-cs.c +++ b/drivers/ide/legacy/ide-cs.c | |||
@@ -146,7 +146,16 @@ static void ide_detach(struct pcmcia_device *link) | |||
146 | kfree(link->priv); | 146 | kfree(link->priv); |
147 | } /* ide_detach */ | 147 | } /* ide_detach */ |
148 | 148 | ||
149 | static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq, struct pcmcia_device *handle) | 149 | static void idecs_mmio_fixup(ide_hwif_t *hwif) |
150 | { | ||
151 | default_hwif_mmiops(hwif); | ||
152 | hwif->mmio = 2; | ||
153 | |||
154 | ide_undecoded_slave(hwif); | ||
155 | } | ||
156 | |||
157 | static int idecs_register(unsigned long io, unsigned long ctl, | ||
158 | unsigned long irq, struct pcmcia_device *handle, int is_mmio) | ||
150 | { | 159 | { |
151 | hw_regs_t hw; | 160 | hw_regs_t hw; |
152 | memset(&hw, 0, sizeof(hw)); | 161 | memset(&hw, 0, sizeof(hw)); |
@@ -154,7 +163,19 @@ static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq | |||
154 | hw.irq = irq; | 163 | hw.irq = irq; |
155 | hw.chipset = ide_pci; | 164 | hw.chipset = ide_pci; |
156 | hw.dev = &handle->dev; | 165 | hw.dev = &handle->dev; |
157 | return ide_register_hw_with_fixup(&hw, NULL, ide_undecoded_slave); | 166 | |
167 | if(is_mmio) | ||
168 | return ide_register_hw_with_fixup(&hw, NULL, idecs_mmio_fixup); | ||
169 | else | ||
170 | return ide_register_hw_with_fixup(&hw, NULL, ide_undecoded_slave); | ||
171 | } | ||
172 | |||
173 | void outb_io(unsigned char value, unsigned long port) { | ||
174 | outb(value, port); | ||
175 | } | ||
176 | |||
177 | void outb_mem(unsigned char value, unsigned long port) { | ||
178 | writeb(value, (void __iomem *) port); | ||
158 | } | 179 | } |
159 | 180 | ||
160 | /*====================================================================== | 181 | /*====================================================================== |
@@ -180,7 +201,8 @@ static int ide_config(struct pcmcia_device *link) | |||
180 | } *stk = NULL; | 201 | } *stk = NULL; |
181 | cistpl_cftable_entry_t *cfg; | 202 | cistpl_cftable_entry_t *cfg; |
182 | int i, pass, last_ret = 0, last_fn = 0, hd, is_kme = 0; | 203 | int i, pass, last_ret = 0, last_fn = 0, hd, is_kme = 0; |
183 | unsigned long io_base, ctl_base; | 204 | unsigned long io_base, ctl_base, is_mmio, try_slave; |
205 | void (*my_outb)(unsigned char, unsigned long); | ||
184 | 206 | ||
185 | DEBUG(0, "ide_config(0x%p)\n", link); | 207 | DEBUG(0, "ide_config(0x%p)\n", link); |
186 | 208 | ||
@@ -210,7 +232,7 @@ static int ide_config(struct pcmcia_device *link) | |||
210 | /* Not sure if this is right... look up the current Vcc */ | 232 | /* Not sure if this is right... look up the current Vcc */ |
211 | CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(link, &stk->conf)); | 233 | CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(link, &stk->conf)); |
212 | 234 | ||
213 | pass = io_base = ctl_base = 0; | 235 | pass = io_base = ctl_base = is_mmio = try_slave = 0; |
214 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; | 236 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; |
215 | tuple.Attributes = 0; | 237 | tuple.Attributes = 0; |
216 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | 238 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); |
@@ -258,11 +280,45 @@ static int ide_config(struct pcmcia_device *link) | |||
258 | goto next_entry; | 280 | goto next_entry; |
259 | io_base = link->io.BasePort1; | 281 | io_base = link->io.BasePort1; |
260 | ctl_base = link->io.BasePort1 + 0x0e; | 282 | ctl_base = link->io.BasePort1 + 0x0e; |
283 | |||
284 | if (io->win[0].len >= 0x20) | ||
285 | try_slave = 1; | ||
286 | |||
261 | } else goto next_entry; | 287 | } else goto next_entry; |
262 | /* If we've got this far, we're done */ | 288 | /* If we've got this far, we're done */ |
263 | break; | 289 | break; |
264 | } | 290 | } |
265 | 291 | ||
292 | if ((cfg->mem.nwin > 0) || (stk->dflt.mem.nwin > 0)) { | ||
293 | win_req_t req; | ||
294 | memreq_t map; | ||
295 | cistpl_mem_t *mem = (cfg->mem.nwin) ? &cfg->mem : &stk->dflt.mem; | ||
296 | |||
297 | if (mem->win[0].len < 16) | ||
298 | goto next_entry; | ||
299 | |||
300 | req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM; | ||
301 | req.Attributes |= WIN_ENABLE; | ||
302 | req.Base = mem->win[0].host_addr; | ||
303 | req.Size = 0; | ||
304 | |||
305 | req.AccessSpeed = 0; | ||
306 | if (pcmcia_request_window(&link, &req, &link->win) != 0) | ||
307 | goto next_entry; | ||
308 | map.Page = 0; map.CardOffset = mem->win[0].card_addr; | ||
309 | if (pcmcia_map_mem_page(link->win, &map) != 0) | ||
310 | goto next_entry; | ||
311 | |||
312 | io_base = (unsigned long) ioremap(req.Base, req.Size); | ||
313 | ctl_base = io_base + 0x0e; | ||
314 | is_mmio = 1; | ||
315 | |||
316 | if (mem->win[0].len >= 0x20) | ||
317 | try_slave = 1; | ||
318 | |||
319 | break; | ||
320 | } | ||
321 | |||
266 | next_entry: | 322 | next_entry: |
267 | if (cfg->flags & CISTPL_CFTABLE_DEFAULT) | 323 | if (cfg->flags & CISTPL_CFTABLE_DEFAULT) |
268 | memcpy(&stk->dflt, cfg, sizeof(stk->dflt)); | 324 | memcpy(&stk->dflt, cfg, sizeof(stk->dflt)); |
@@ -278,21 +334,26 @@ static int ide_config(struct pcmcia_device *link) | |||
278 | CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); | 334 | CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); |
279 | CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); | 335 | CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); |
280 | 336 | ||
337 | if(is_mmio) | ||
338 | my_outb = outb_mem; | ||
339 | else | ||
340 | my_outb = outb_io; | ||
341 | |||
281 | /* disable drive interrupts during IDE probe */ | 342 | /* disable drive interrupts during IDE probe */ |
282 | outb(0x02, ctl_base); | 343 | my_outb(0x02, ctl_base); |
283 | 344 | ||
284 | /* special setup for KXLC005 card */ | 345 | /* special setup for KXLC005 card */ |
285 | if (is_kme) | 346 | if (is_kme) |
286 | outb(0x81, ctl_base+1); | 347 | my_outb(0x81, ctl_base+1); |
287 | 348 | ||
288 | /* retry registration in case device is still spinning up */ | 349 | /* retry registration in case device is still spinning up */ |
289 | for (hd = -1, i = 0; i < 10; i++) { | 350 | for (hd = -1, i = 0; i < 10; i++) { |
290 | hd = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ, link); | 351 | hd = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ, link, is_mmio); |
291 | if (hd >= 0) break; | 352 | if (hd >= 0) break; |
292 | if (link->io.NumPorts1 == 0x20) { | 353 | if (try_slave) { |
293 | outb(0x02, ctl_base + 0x10); | 354 | my_outb(0x02, ctl_base + 0x10); |
294 | hd = idecs_register(io_base + 0x10, ctl_base + 0x10, | 355 | hd = idecs_register(io_base + 0x10, ctl_base + 0x10, |
295 | link->irq.AssignedIRQ, link); | 356 | link->irq.AssignedIRQ, link, is_mmio); |
296 | if (hd >= 0) { | 357 | if (hd >= 0) { |
297 | io_base += 0x10; | 358 | io_base += 0x10; |
298 | ctl_base += 0x10; | 359 | ctl_base += 0x10; |
diff --git a/drivers/ide/legacy/macide.c b/drivers/ide/legacy/macide.c index 90cac609d9cf..d655da749144 100644 --- a/drivers/ide/legacy/macide.c +++ b/drivers/ide/legacy/macide.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * more details. | 11 | * more details. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/types.h> | 14 | #include <linux/types.h> |
16 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
17 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
diff --git a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c index 563fab0098be..d3c3bc2640e7 100644 --- a/drivers/ide/legacy/qd65xx.c +++ b/drivers/ide/legacy/qd65xx.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ | 28 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ |
29 | 29 | ||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/config.h> | ||
32 | #include <linux/types.h> | 31 | #include <linux/types.h> |
33 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
34 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
diff --git a/drivers/ide/legacy/umc8672.c b/drivers/ide/legacy/umc8672.c index cdbdb2ff9f15..6e2c58c5f6a2 100644 --- a/drivers/ide/legacy/umc8672.c +++ b/drivers/ide/legacy/umc8672.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #define REALLY_SLOW_IO /* some systems can safely undef this */ | 40 | #define REALLY_SLOW_IO /* some systems can safely undef this */ |
41 | 41 | ||
42 | #include <linux/module.h> | 42 | #include <linux/module.h> |
43 | #include <linux/config.h> | ||
44 | #include <linux/types.h> | 43 | #include <linux/types.h> |
45 | #include <linux/kernel.h> | 44 | #include <linux/kernel.h> |
46 | #include <linux/delay.h> | 45 | #include <linux/delay.h> |
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index 3edd7060510f..a7c725f8bf64 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c | |||
@@ -6,7 +6,6 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/config.h> | ||
10 | #include <linux/types.h> | 9 | #include <linux/types.h> |
11 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
12 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 8b24b4f2a839..351dab2fcacf 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/types.h> | 31 | #include <linux/types.h> |
33 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c index 85007cb12c52..2b0ea8b6608d 100644 --- a/drivers/ide/pci/amd74xx.c +++ b/drivers/ide/pci/amd74xx.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * the Free Software Foundation. | 16 | * the Free Software Foundation. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/module.h> | 19 | #include <linux/module.h> |
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
22 | #include <linux/ioport.h> | 21 | #include <linux/ioport.h> |
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index 900efd1da587..a574de5f0835 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/types.h> | 9 | #include <linux/types.h> |
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c index 11d035f1983d..61b5f9c0b2f4 100644 --- a/drivers/ide/pci/cmd640.c +++ b/drivers/ide/pci/cmd640.c | |||
@@ -103,7 +103,6 @@ | |||
103 | 103 | ||
104 | //#define CMD640_DUMP_REGS | 104 | //#define CMD640_DUMP_REGS |
105 | 105 | ||
106 | #include <linux/config.h> | ||
107 | #include <linux/types.h> | 106 | #include <linux/types.h> |
108 | #include <linux/kernel.h> | 107 | #include <linux/kernel.h> |
109 | #include <linux/delay.h> | 108 | #include <linux/delay.h> |
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index 92b7b1549b16..20c32716bbc4 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org> | 14 | * Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org> |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
19 | #include <linux/types.h> | 18 | #include <linux/types.h> |
20 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index ea3c52cc8ac1..079f7c86726b 100644 --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c | |||
@@ -32,7 +32,6 @@ | |||
32 | * | 32 | * |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/config.h> | ||
36 | #include <linux/module.h> | 35 | #include <linux/module.h> |
37 | #include <linux/types.h> | 36 | #include <linux/types.h> |
38 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c index 09269e574b3e..380bb28c7c54 100644 --- a/drivers/ide/pci/cs5530.c +++ b/drivers/ide/pci/cs5530.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * CS5530 documentation available from National Semiconductor. | 14 | * CS5530 documentation available from National Semiconductor. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
19 | #include <linux/types.h> | 18 | #include <linux/types.h> |
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c index 6eb305197f3c..5c5aec28e671 100644 --- a/drivers/ide/pci/cs5535.c +++ b/drivers/ide/pci/cs5535.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * CS5535 documentation available from AMD | 23 | * CS5535 documentation available from AMD |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/module.h> | 26 | #include <linux/module.h> |
28 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
29 | #include <linux/ide.h> | 28 | #include <linux/ide.h> |
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c index 9f41ecd56338..120929fbe7a3 100644 --- a/drivers/ide/pci/cy82c693.c +++ b/drivers/ide/pci/cy82c693.c | |||
@@ -44,7 +44,6 @@ | |||
44 | * | 44 | * |
45 | */ | 45 | */ |
46 | 46 | ||
47 | #include <linux/config.h> | ||
48 | #include <linux/module.h> | 47 | #include <linux/module.h> |
49 | #include <linux/types.h> | 48 | #include <linux/types.h> |
50 | #include <linux/pci.h> | 49 | #include <linux/pci.h> |
diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c index 7da550281cf2..b46cb042290a 100644 --- a/drivers/ide/pci/hpt34x.c +++ b/drivers/ide/pci/hpt34x.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * Non-bootable card or HPT343 :: pcicmd == 0x05 | 24 | * Non-bootable card or HPT343 :: pcicmd == 0x05 |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/module.h> | 27 | #include <linux/module.h> |
29 | #include <linux/types.h> | 28 | #include <linux/types.h> |
30 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 940bdd4c5784..e993a51f250e 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -55,7 +55,6 @@ | |||
55 | */ | 55 | */ |
56 | 56 | ||
57 | 57 | ||
58 | #include <linux/config.h> | ||
59 | #include <linux/types.h> | 58 | #include <linux/types.h> |
60 | #include <linux/module.h> | 59 | #include <linux/module.h> |
61 | #include <linux/kernel.h> | 60 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/it8172.c b/drivers/ide/pci/it8172.c index 93462926b9d5..0fc89fafad65 100644 --- a/drivers/ide/pci/it8172.c +++ b/drivers/ide/pci/it8172.c | |||
@@ -28,7 +28,6 @@ | |||
28 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 28 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | #include <linux/module.h> | 31 | #include <linux/module.h> |
33 | #include <linux/types.h> | 32 | #include <linux/types.h> |
34 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c index 38f41b377ff6..7fb3635683dc 100644 --- a/drivers/ide/pci/it821x.c +++ b/drivers/ide/pci/it821x.c | |||
@@ -62,7 +62,6 @@ | |||
62 | * - Move to libata once it grows up | 62 | * - Move to libata once it grows up |
63 | */ | 63 | */ |
64 | 64 | ||
65 | #include <linux/config.h> | ||
66 | #include <linux/types.h> | 65 | #include <linux/types.h> |
67 | #include <linux/module.h> | 66 | #include <linux/module.h> |
68 | #include <linux/pci.h> | 67 | #include <linux/pci.h> |
diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c index fcd5142f5cfe..d95714bcee4e 100644 --- a/drivers/ide/pci/ns87415.c +++ b/drivers/ide/pci/ns87415.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * Inspired by an earlier effort from David S. Miller <davem@redhat.com> | 9 | * Inspired by an earlier effort from David S. Miller <davem@redhat.com> |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c index 5a8334d134fb..6c097e80b4df 100644 --- a/drivers/ide/pci/pdc202xx_new.c +++ b/drivers/ide/pci/pdc202xx_new.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * Released under terms of General Public License | 14 | * Released under terms of General Public License |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
19 | #include <linux/types.h> | 18 | #include <linux/types.h> |
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index 1e209d8f9437..b46022a11bef 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c | |||
@@ -28,7 +28,6 @@ | |||
28 | * Released under terms of General Public License | 28 | * Released under terms of General Public License |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | #include <linux/types.h> | 31 | #include <linux/types.h> |
33 | #include <linux/module.h> | 32 | #include <linux/module.h> |
34 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c index 7fac6f57b5d6..50332ddd5ddb 100644 --- a/drivers/ide/pci/piix.c +++ b/drivers/ide/pci/piix.c | |||
@@ -90,7 +90,6 @@ | |||
90 | * ICH3 errata #18 - Don't use native mode | 90 | * ICH3 errata #18 - Don't use native mode |
91 | */ | 91 | */ |
92 | 92 | ||
93 | #include <linux/config.h> | ||
94 | #include <linux/types.h> | 93 | #include <linux/types.h> |
95 | #include <linux/module.h> | 94 | #include <linux/module.h> |
96 | #include <linux/kernel.h> | 95 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index 778b82ae964d..fc2b5496b6d2 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * Available from National Semiconductor | 11 | * Available from National Semiconductor |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | #include <linux/types.h> | 15 | #include <linux/types.h> |
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index 5100b827a935..03677bff0d72 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c | |||
@@ -29,7 +29,6 @@ | |||
29 | * | 29 | * |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/config.h> | ||
33 | #include <linux/types.h> | 32 | #include <linux/types.h> |
34 | #include <linux/module.h> | 33 | #include <linux/module.h> |
35 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index 72dade14c725..25ceb4a39ed2 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * if neccessary | 27 | * if neccessary |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/types.h> | 30 | #include <linux/types.h> |
32 | #include <linux/module.h> | 31 | #include <linux/module.h> |
33 | #include <linux/pci.h> | 32 | #include <linux/pci.h> |
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index 8e9d87701ce2..8a6c23ac8cc1 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c | |||
@@ -44,7 +44,6 @@ | |||
44 | * 962/963. | 44 | * 962/963. |
45 | */ | 45 | */ |
46 | 46 | ||
47 | #include <linux/config.h> | ||
48 | #include <linux/types.h> | 47 | #include <linux/types.h> |
49 | #include <linux/module.h> | 48 | #include <linux/module.h> |
50 | #include <linux/kernel.h> | 49 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c index 900301e43818..0b4b60498515 100644 --- a/drivers/ide/pci/sl82c105.c +++ b/drivers/ide/pci/sl82c105.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * -- Benjamin Herrenschmidt (01/11/03) benh@kernel.crashing.org | 13 | * -- Benjamin Herrenschmidt (01/11/03) benh@kernel.crashing.org |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/types.h> | 16 | #include <linux/types.h> |
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
19 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c index 0968f6bc669a..4a1853af3bbb 100644 --- a/drivers/ide/pci/slc90e66.c +++ b/drivers/ide/pci/slc90e66.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/types.h> | 11 | #include <linux/types.h> |
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c index f96b56838f33..56d84931d6de 100644 --- a/drivers/ide/pci/triflex.c +++ b/drivers/ide/pci/triflex.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * Not publically available. | 27 | * Not publically available. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/types.h> | 30 | #include <linux/types.h> |
32 | #include <linux/module.h> | 31 | #include <linux/module.h> |
33 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c index fe80295974e1..2a282529bfc1 100644 --- a/drivers/ide/pci/trm290.c +++ b/drivers/ide/pci/trm290.c | |||
@@ -128,7 +128,6 @@ | |||
128 | * | 128 | * |
129 | */ | 129 | */ |
130 | 130 | ||
131 | #include <linux/config.h> | ||
132 | #include <linux/types.h> | 131 | #include <linux/types.h> |
133 | #include <linux/module.h> | 132 | #include <linux/module.h> |
134 | #include <linux/kernel.h> | 133 | #include <linux/kernel.h> |
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index 3e677c4f8c28..afdaee3c15c9 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * the Free Software Foundation. | 26 | * the Free Software Foundation. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
32 | #include <linux/ioport.h> | 31 | #include <linux/ioport.h> |
diff --git a/drivers/ide/ppc/mpc8xx.c b/drivers/ide/ppc/mpc8xx.c index b80c6135ae93..0ac9da3a7378 100644 --- a/drivers/ide/ppc/mpc8xx.c +++ b/drivers/ide/ppc/mpc8xx.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * by Mathew Locke <mattl@mvista.com> | 11 | * by Mathew Locke <mattl@mvista.com> |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
16 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index e8ef3455ec35..ebf961f1718d 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * big table | 22 | * big table |
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | #include <linux/config.h> | ||
26 | #include <linux/types.h> | 25 | #include <linux/types.h> |
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
28 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index c11e3b2e67a6..eb0945284acc 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
@@ -18,7 +18,6 @@ | |||
18 | * configuration of all PCI IDE interfaces present in a system. | 18 | * configuration of all PCI IDE interfaces present in a system. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
diff --git a/drivers/ieee1394/config_roms.c b/drivers/ieee1394/config_roms.c index 1017fd717248..e2de6fa0c9fe 100644 --- a/drivers/ieee1394/config_roms.c +++ b/drivers/ieee1394/config_roms.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * directory of the kernel sources for details. | 9 | * directory of the kernel sources for details. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/types.h> | 12 | #include <linux/types.h> |
14 | 13 | ||
15 | #include "csr1212.h" | 14 | #include "csr1212.h" |
diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c index 85c2d4ca0def..87532dd43374 100644 --- a/drivers/ieee1394/dv1394.c +++ b/drivers/ieee1394/dv1394.c | |||
@@ -83,7 +83,6 @@ | |||
83 | 83 | ||
84 | */ | 84 | */ |
85 | 85 | ||
86 | #include <linux/config.h> | ||
87 | #include <linux/kernel.h> | 86 | #include <linux/kernel.h> |
88 | #include <linux/list.h> | 87 | #include <linux/list.h> |
89 | #include <linux/slab.h> | 88 | #include <linux/slab.h> |
diff --git a/drivers/ieee1394/highlevel.c b/drivers/ieee1394/highlevel.c index 25b22609e793..694da82d820b 100644 --- a/drivers/ieee1394/highlevel.c +++ b/drivers/ieee1394/highlevel.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
22 | #include <linux/list.h> | 21 | #include <linux/list.h> |
23 | #include <linux/bitops.h> | 22 | #include <linux/bitops.h> |
diff --git a/drivers/ieee1394/hosts.c b/drivers/ieee1394/hosts.c index ad49c040b674..2c669287f5bd 100644 --- a/drivers/ieee1394/hosts.c +++ b/drivers/ieee1394/hosts.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * directory of the kernel sources for details. | 10 | * directory of the kernel sources for details. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/types.h> | 14 | #include <linux/types.h> |
16 | #include <linux/list.h> | 15 | #include <linux/list.h> |
diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c index 49354de9fb8a..f43739c5cab2 100644 --- a/drivers/ieee1394/ieee1394_core.c +++ b/drivers/ieee1394/ieee1394_core.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
25 | #include <linux/list.h> | 24 | #include <linux/list.h> |
26 | #include <linux/string.h> | 25 | #include <linux/string.h> |
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index 50c71e17de73..d541b508a159 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | #include <linux/bitmap.h> | 11 | #include <linux/bitmap.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/config.h> | ||
14 | #include <linux/list.h> | 13 | #include <linux/list.h> |
15 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
16 | #include <linux/smp_lock.h> | 15 | #include <linux/smp_lock.h> |
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c index 800c8d518430..8de81ecd3ba6 100644 --- a/drivers/ieee1394/ohci1394.c +++ b/drivers/ieee1394/ohci1394.c | |||
@@ -82,7 +82,6 @@ | |||
82 | * | 82 | * |
83 | */ | 83 | */ |
84 | 84 | ||
85 | #include <linux/config.h> | ||
86 | #include <linux/kernel.h> | 85 | #include <linux/kernel.h> |
87 | #include <linux/list.h> | 86 | #include <linux/list.h> |
88 | #include <linux/slab.h> | 87 | #include <linux/slab.h> |
diff --git a/drivers/ieee1394/oui2c.sh b/drivers/ieee1394/oui2c.sh index d50dc7a2d087..b9d0e8f10abb 100644 --- a/drivers/ieee1394/oui2c.sh +++ b/drivers/ieee1394/oui2c.sh | |||
@@ -3,7 +3,6 @@ | |||
3 | cat <<EOF | 3 | cat <<EOF |
4 | /* Generated file for OUI database */ | 4 | /* Generated file for OUI database */ |
5 | 5 | ||
6 | #include <linux/config.h> | ||
7 | 6 | ||
8 | #ifdef CONFIG_IEEE1394_OUI_DB | 7 | #ifdef CONFIG_IEEE1394_OUI_DB |
9 | struct oui_list_struct { | 8 | struct oui_list_struct { |
diff --git a/drivers/ieee1394/pcilynx.c b/drivers/ieee1394/pcilynx.c index e29dfd280bee..5b48f6ac5c7f 100644 --- a/drivers/ieee1394/pcilynx.c +++ b/drivers/ieee1394/pcilynx.c | |||
@@ -30,7 +30,6 @@ | |||
30 | * Enhancements in async and iso send code | 30 | * Enhancements in async and iso send code |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
35 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
36 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
diff --git a/drivers/ieee1394/pcilynx.h b/drivers/ieee1394/pcilynx.h index d631aa8383ad..ec27321f6724 100644 --- a/drivers/ieee1394/pcilynx.h +++ b/drivers/ieee1394/pcilynx.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef __PCILYNX_H__ | 1 | #ifndef __PCILYNX_H__ |
2 | #define __PCILYNX_H__ | 2 | #define __PCILYNX_H__ |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | 4 | ||
6 | #define PCILYNX_DRIVER_NAME "pcilynx" | 5 | #define PCILYNX_DRIVER_NAME "pcilynx" |
7 | #define PCILYNX_MAJOR 177 | 6 | #define PCILYNX_MAJOR 177 |
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 1d5ceb7ecc83..aaa74f293aaf 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
@@ -38,7 +38,6 @@ | |||
38 | * but the code needs additional debugging. | 38 | * but the code needs additional debugging. |
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include <linux/config.h> | ||
42 | #include <linux/kernel.h> | 41 | #include <linux/kernel.h> |
43 | #include <linux/list.h> | 42 | #include <linux/list.h> |
44 | #include <linux/string.h> | 43 | #include <linux/string.h> |
diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c index 295d0f8c3d06..c6e3f02bc6d7 100644 --- a/drivers/ieee1394/video1394.c +++ b/drivers/ieee1394/video1394.c | |||
@@ -28,7 +28,6 @@ | |||
28 | * ENOTTY for unsupported ioctl request | 28 | * ENOTTY for unsupported ioctl request |
29 | * | 29 | * |
30 | */ | 30 | */ |
31 | #include <linux/config.h> | ||
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
33 | #include <linux/list.h> | 32 | #include <linux/list.h> |
34 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 450adfe0a4f1..3f6705f3083a 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c | |||
@@ -3152,6 +3152,7 @@ static int cm_init_qp_rtr_attr(struct cm_id_private *cm_id_priv, | |||
3152 | } | 3152 | } |
3153 | if (cm_id_priv->alt_av.ah_attr.dlid) { | 3153 | if (cm_id_priv->alt_av.ah_attr.dlid) { |
3154 | *qp_attr_mask |= IB_QP_ALT_PATH; | 3154 | *qp_attr_mask |= IB_QP_ALT_PATH; |
3155 | qp_attr->alt_port_num = cm_id_priv->alt_av.port->port_num; | ||
3155 | qp_attr->alt_ah_attr = cm_id_priv->alt_av.ah_attr; | 3156 | qp_attr->alt_ah_attr = cm_id_priv->alt_av.ah_attr; |
3156 | } | 3157 | } |
3157 | ret = 0; | 3158 | ret = 0; |
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index a908a7bdcd7f..bdf5d5098190 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c | |||
@@ -1963,7 +1963,7 @@ ssize_t ib_uverbs_create_srq(struct ib_uverbs_file *file, | |||
1963 | if (!obj) | 1963 | if (!obj) |
1964 | return -ENOMEM; | 1964 | return -ENOMEM; |
1965 | 1965 | ||
1966 | init_uobj(&obj->uobject, 0, file->ucontext); | 1966 | init_uobj(&obj->uobject, cmd.user_handle, file->ucontext); |
1967 | down_write(&obj->uobject.mutex); | 1967 | down_write(&obj->uobject.mutex); |
1968 | 1968 | ||
1969 | pd = idr_read_pd(cmd.pd_handle, file->ucontext); | 1969 | pd = idr_read_pd(cmd.pd_handle, file->ucontext); |
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index 63de3046aff3..97f142c5be13 100644 --- a/drivers/infiniband/hw/ipath/ipath_fs.c +++ b/drivers/infiniband/hw/ipath/ipath_fs.c | |||
@@ -31,7 +31,6 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/version.h> | 33 | #include <linux/version.h> |
34 | #include <linux/config.h> | ||
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
36 | #include <linux/fs.h> | 35 | #include <linux/fs.h> |
37 | #include <linux/mount.h> | 36 | #include <linux/mount.h> |
diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c index 3e72a1fe3d73..5e31d0de849b 100644 --- a/drivers/infiniband/hw/ipath/ipath_intr.c +++ b/drivers/infiniband/hw/ipath/ipath_intr.c | |||
@@ -397,7 +397,7 @@ static void handle_errors(struct ipath_devdata *dd, ipath_err_t errs) | |||
397 | if ((dd->ipath_maskederrs & ~dd->ipath_ignorederrs) & | 397 | if ((dd->ipath_maskederrs & ~dd->ipath_ignorederrs) & |
398 | ~(INFINIPATH_E_RRCVEGRFULL | INFINIPATH_E_RRCVHDRFULL)) | 398 | ~(INFINIPATH_E_RRCVEGRFULL | INFINIPATH_E_RRCVHDRFULL)) |
399 | ipath_dev_err(dd, "Disabling error(s) %llx because " | 399 | ipath_dev_err(dd, "Disabling error(s) %llx because " |
400 | "occuring too frequently (%s)\n", | 400 | "occurring too frequently (%s)\n", |
401 | (unsigned long long) | 401 | (unsigned long long) |
402 | (dd->ipath_maskederrs & | 402 | (dd->ipath_maskederrs & |
403 | ~dd->ipath_ignorederrs), msg); | 403 | ~dd->ipath_ignorederrs), msg); |
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index 465fd220569c..557cde3a4563 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c | |||
@@ -34,7 +34,6 @@ | |||
34 | * $Id: mthca_main.c 1396 2004-12-28 04:10:27Z roland $ | 34 | * $Id: mthca_main.c 1396 2004-12-28 04:10:27Z roland $ |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/config.h> | ||
38 | #include <linux/module.h> | 37 | #include <linux/module.h> |
39 | #include <linux/init.h> | 38 | #include <linux/init.h> |
40 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
diff --git a/drivers/infiniband/hw/mthca/mthca_reset.c b/drivers/infiniband/hw/mthca/mthca_reset.c index f4fddd5327f5..91934f2d9dba 100644 --- a/drivers/infiniband/hw/mthca/mthca_reset.c +++ b/drivers/infiniband/hw/mthca/mthca_reset.c | |||
@@ -32,7 +32,6 @@ | |||
32 | * $Id: mthca_reset.c 1349 2004-12-16 21:09:43Z roland $ | 32 | * $Id: mthca_reset.c 1349 2004-12-16 21:09:43Z roland $ |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/config.h> | ||
36 | #include <linux/init.h> | 35 | #include <linux/init.h> |
37 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
38 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index 491d2afaf5b4..3f89f5e19036 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h | |||
@@ -42,7 +42,6 @@ | |||
42 | #include <linux/netdevice.h> | 42 | #include <linux/netdevice.h> |
43 | #include <linux/workqueue.h> | 43 | #include <linux/workqueue.h> |
44 | #include <linux/pci.h> | 44 | #include <linux/pci.h> |
45 | #include <linux/config.h> | ||
46 | #include <linux/kref.h> | 45 | #include <linux/kref.h> |
47 | #include <linux/if_infiniband.h> | 46 | #include <linux/if_infiniband.h> |
48 | #include <linux/mutex.h> | 47 | #include <linux/mutex.h> |
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index 4c3f2de2a06e..b2c033edb03c 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c | |||
@@ -54,7 +54,6 @@ | |||
54 | #include <linux/blkdev.h> | 54 | #include <linux/blkdev.h> |
55 | #include <linux/init.h> | 55 | #include <linux/init.h> |
56 | #include <linux/ioctl.h> | 56 | #include <linux/ioctl.h> |
57 | #include <linux/devfs_fs_kernel.h> | ||
58 | #include <linux/cdev.h> | 57 | #include <linux/cdev.h> |
59 | #include <linux/in.h> | 58 | #include <linux/in.h> |
60 | #include <linux/net.h> | 59 | #include <linux/net.h> |
diff --git a/drivers/input/gameport/emu10k1-gp.c b/drivers/input/gameport/emu10k1-gp.c index 462f8d300aae..9793ac36d17f 100644 --- a/drivers/input/gameport/emu10k1-gp.c +++ b/drivers/input/gameport/emu10k1-gp.c | |||
@@ -32,7 +32,6 @@ | |||
32 | 32 | ||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/ioport.h> | 34 | #include <linux/ioport.h> |
35 | #include <linux/config.h> | ||
36 | #include <linux/init.h> | 35 | #include <linux/init.h> |
37 | #include <linux/gameport.h> | 36 | #include <linux/gameport.h> |
38 | #include <linux/slab.h> | 37 | #include <linux/slab.h> |
diff --git a/drivers/input/gameport/ns558.c b/drivers/input/gameport/ns558.c index 3e2d28f263e9..f68dbe6f7f04 100644 --- a/drivers/input/gameport/ns558.c +++ b/drivers/input/gameport/ns558.c | |||
@@ -33,7 +33,6 @@ | |||
33 | 33 | ||
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/ioport.h> | 35 | #include <linux/ioport.h> |
36 | #include <linux/config.h> | ||
37 | #include <linux/init.h> | 36 | #include <linux/init.h> |
38 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
39 | #include <linux/gameport.h> | 38 | #include <linux/gameport.h> |
diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c index 01dc0b195d59..e9a02db36ecc 100644 --- a/drivers/input/joystick/analog.c +++ b/drivers/input/joystick/analog.c | |||
@@ -28,7 +28,6 @@ | |||
28 | * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic | 28 | * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
33 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
34 | #include <linux/module.h> | 33 | #include <linux/module.h> |
diff --git a/drivers/input/joystick/iforce/iforce.h b/drivers/input/joystick/iforce/iforce.h index 668f24535ba0..e9924d6f01b3 100644 --- a/drivers/input/joystick/iforce/iforce.h +++ b/drivers/input/joystick/iforce/iforce.h | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/spinlock.h> | 35 | #include <linux/spinlock.h> |
36 | #include <linux/usb.h> | 36 | #include <linux/usb.h> |
37 | #include <linux/serio.h> | 37 | #include <linux/serio.h> |
38 | #include <linux/config.h> | ||
39 | #include <linux/circ_buf.h> | 38 | #include <linux/circ_buf.h> |
40 | #include <linux/mutex.h> | 39 | #include <linux/mutex.h> |
41 | 40 | ||
diff --git a/drivers/input/keyboard/hilkbd.c b/drivers/input/keyboard/hilkbd.c index 33edd030aa75..d22c7c624296 100644 --- a/drivers/input/keyboard/hilkbd.c +++ b/drivers/input/keyboard/hilkbd.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/pci_ids.h> | 18 | #include <linux/pci_ids.h> |
19 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/config.h> | ||
22 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
23 | #include <linux/input.h> | 22 | #include <linux/input.h> |
24 | #include <linux/init.h> | 23 | #include <linux/init.h> |
diff --git a/drivers/input/keyboard/locomokbd.c b/drivers/input/keyboard/locomokbd.c index 2c510881874a..83906f80ba21 100644 --- a/drivers/input/keyboard/locomokbd.c +++ b/drivers/input/keyboard/locomokbd.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | #include <linux/init.h> | 30 | #include <linux/init.h> |
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c index 42c11fbf3c79..106c94f33b93 100644 --- a/drivers/input/misc/sparcspkr.c +++ b/drivers/input/misc/sparcspkr.c | |||
@@ -4,7 +4,6 @@ | |||
4 | * Copyright (c) 2002 Vojtech Pavlik | 4 | * Copyright (c) 2002 Vojtech Pavlik |
5 | * Copyright (c) 2002, 2006 David S. Miller (davem@davemloft.net) | 5 | * Copyright (c) 2002, 2006 David S. Miller (davem@davemloft.net) |
6 | */ | 6 | */ |
7 | #include <linux/config.h> | ||
8 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
9 | #include <linux/module.h> | 8 | #include <linux/module.h> |
10 | #include <linux/init.h> | 9 | #include <linux/init.h> |
diff --git a/drivers/input/mouse/inport.c b/drivers/input/mouse/inport.c index afc66f56df43..50f1fed10be4 100644 --- a/drivers/input/mouse/inport.c +++ b/drivers/input/mouse/inport.c | |||
@@ -36,7 +36,6 @@ | |||
36 | 36 | ||
37 | #include <linux/module.h> | 37 | #include <linux/module.h> |
38 | #include <linux/moduleparam.h> | 38 | #include <linux/moduleparam.h> |
39 | #include <linux/config.h> | ||
40 | #include <linux/ioport.h> | 39 | #include <linux/ioport.h> |
41 | #include <linux/init.h> | 40 | #include <linux/init.h> |
42 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
diff --git a/drivers/input/mouse/sermouse.c b/drivers/input/mouse/sermouse.c index a89742431717..0023501a5b63 100644 --- a/drivers/input/mouse/sermouse.c +++ b/drivers/input/mouse/sermouse.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
35 | #include <linux/input.h> | 35 | #include <linux/input.h> |
36 | #include <linux/config.h> | ||
37 | #include <linux/serio.h> | 36 | #include <linux/serio.h> |
38 | #include <linux/init.h> | 37 | #include <linux/init.h> |
39 | 38 | ||
diff --git a/drivers/input/mouse/vsxxxaa.c b/drivers/input/mouse/vsxxxaa.c index 7b85bc21ae4a..47edcfd022ba 100644 --- a/drivers/input/mouse/vsxxxaa.c +++ b/drivers/input/mouse/vsxxxaa.c | |||
@@ -81,7 +81,6 @@ | |||
81 | #include <linux/slab.h> | 81 | #include <linux/slab.h> |
82 | #include <linux/interrupt.h> | 82 | #include <linux/interrupt.h> |
83 | #include <linux/input.h> | 83 | #include <linux/input.h> |
84 | #include <linux/config.h> | ||
85 | #include <linux/serio.h> | 84 | #include <linux/serio.h> |
86 | #include <linux/init.h> | 85 | #include <linux/init.h> |
87 | 86 | ||
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index eb721b11ff37..1f851acab30d 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/moduleparam.h> | 19 | #include <linux/moduleparam.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/input.h> | 21 | #include <linux/input.h> |
22 | #include <linux/config.h> | ||
23 | #include <linux/smp_lock.h> | 22 | #include <linux/smp_lock.h> |
24 | #include <linux/random.h> | 23 | #include <linux/random.h> |
25 | #include <linux/major.h> | 24 | #include <linux/major.h> |
diff --git a/drivers/input/power.c b/drivers/input/power.c index 526e6070600c..51a519e24b6d 100644 --- a/drivers/input/power.c +++ b/drivers/input/power.c | |||
@@ -28,7 +28,6 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/config.h> | ||
32 | #include <linux/input.h> | 31 | #include <linux/input.h> |
33 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
34 | #include <linux/init.h> | 33 | #include <linux/init.h> |
diff --git a/drivers/input/serio/ct82c710.c b/drivers/input/serio/ct82c710.c index 1ac739ef2ffa..bc6e87add093 100644 --- a/drivers/input/serio/ct82c710.c +++ b/drivers/input/serio/ct82c710.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/ioport.h> | 33 | #include <linux/ioport.h> |
34 | #include <linux/config.h> | ||
35 | #include <linux/init.h> | 34 | #include <linux/init.h> |
36 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
37 | #include <linux/serio.h> | 36 | #include <linux/serio.h> |
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c index c0b1e4becad3..22d02d53eb16 100644 --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * was usable/enabled ?) | 22 | * was usable/enabled ?) |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/init.h> | 25 | #include <linux/init.h> |
27 | #include <linux/module.h> | 26 | #include <linux/module.h> |
28 | #include <linux/serio.h> | 27 | #include <linux/serio.h> |
diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h index 6d66351805a2..7d9fafea9615 100644 --- a/drivers/input/serio/i8042-sparcio.h +++ b/drivers/input/serio/i8042-sparcio.h | |||
@@ -1,13 +1,10 @@ | |||
1 | #ifndef _I8042_SPARCIO_H | 1 | #ifndef _I8042_SPARCIO_H |
2 | #define _I8042_SPARCIO_H | 2 | #define _I8042_SPARCIO_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <asm/io.h> | 4 | #include <asm/io.h> |
6 | |||
7 | #ifdef CONFIG_PCI | ||
8 | #include <asm/oplib.h> | 5 | #include <asm/oplib.h> |
9 | #include <asm/ebus.h> | 6 | #include <asm/prom.h> |
10 | #endif | 7 | #include <asm/of_device.h> |
11 | 8 | ||
12 | static int i8042_kbd_irq = -1; | 9 | static int i8042_kbd_irq = -1; |
13 | static int i8042_aux_irq = -1; | 10 | static int i8042_aux_irq = -1; |
@@ -48,54 +45,83 @@ static inline void i8042_write_command(int val) | |||
48 | #define OBP_PS2MS_NAME1 "kdmouse" | 45 | #define OBP_PS2MS_NAME1 "kdmouse" |
49 | #define OBP_PS2MS_NAME2 "mouse" | 46 | #define OBP_PS2MS_NAME2 "mouse" |
50 | 47 | ||
48 | static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_device_id *match) | ||
49 | { | ||
50 | struct device_node *dp = op->node; | ||
51 | |||
52 | dp = dp->child; | ||
53 | while (dp) { | ||
54 | if (!strcmp(dp->name, OBP_PS2KBD_NAME1) || | ||
55 | !strcmp(dp->name, OBP_PS2KBD_NAME2)) { | ||
56 | struct of_device *kbd = of_find_device_by_node(dp); | ||
57 | unsigned int irq = kbd->irqs[0]; | ||
58 | if (irq == 0xffffffff) | ||
59 | irq = op->irqs[0]; | ||
60 | i8042_kbd_irq = irq; | ||
61 | kbd_iobase = of_ioremap(&kbd->resource[0], | ||
62 | 0, 8, "kbd"); | ||
63 | } else if (!strcmp(dp->name, OBP_PS2MS_NAME1) || | ||
64 | !strcmp(dp->name, OBP_PS2MS_NAME2)) { | ||
65 | struct of_device *ms = of_find_device_by_node(dp); | ||
66 | unsigned int irq = ms->irqs[0]; | ||
67 | if (irq == 0xffffffff) | ||
68 | irq = op->irqs[0]; | ||
69 | i8042_aux_irq = irq; | ||
70 | } | ||
71 | |||
72 | dp = dp->sibling; | ||
73 | } | ||
74 | |||
75 | return 0; | ||
76 | } | ||
77 | |||
78 | static int __devexit sparc_i8042_remove(struct of_device *op) | ||
79 | { | ||
80 | of_iounmap(kbd_iobase, 8); | ||
81 | |||
82 | return 0; | ||
83 | } | ||
84 | |||
85 | static struct of_device_id sparc_i8042_match[] = { | ||
86 | { | ||
87 | .name = "8042", | ||
88 | }, | ||
89 | {}, | ||
90 | }; | ||
91 | MODULE_DEVICE_TABLE(of, i8042_match); | ||
92 | |||
93 | static struct of_platform_driver sparc_i8042_driver = { | ||
94 | .name = "i8042", | ||
95 | .match_table = sparc_i8042_match, | ||
96 | .probe = sparc_i8042_probe, | ||
97 | .remove = __devexit_p(sparc_i8042_remove), | ||
98 | }; | ||
99 | |||
51 | static int __init i8042_platform_init(void) | 100 | static int __init i8042_platform_init(void) |
52 | { | 101 | { |
53 | #ifndef CONFIG_PCI | 102 | #ifndef CONFIG_PCI |
54 | return -ENODEV; | 103 | return -ENODEV; |
55 | #else | 104 | #else |
56 | char prop[128]; | 105 | struct device_node *root = of_find_node_by_path("/"); |
57 | int len; | ||
58 | 106 | ||
59 | len = prom_getproperty(prom_root_node, "name", prop, sizeof(prop)); | 107 | if (!strcmp(root->name, "SUNW,JavaStation-1")) { |
60 | if (len < 0) { | ||
61 | printk("i8042: Cannot get name property of root OBP node.\n"); | ||
62 | return -ENODEV; | ||
63 | } | ||
64 | if (strncmp(prop, "SUNW,JavaStation-1", len) == 0) { | ||
65 | /* Hardcoded values for MrCoffee. */ | 108 | /* Hardcoded values for MrCoffee. */ |
66 | i8042_kbd_irq = i8042_aux_irq = 13 | 0x20; | 109 | i8042_kbd_irq = i8042_aux_irq = 13 | 0x20; |
67 | kbd_iobase = ioremap(0x71300060, 8); | 110 | kbd_iobase = ioremap(0x71300060, 8); |
68 | if (!kbd_iobase) | 111 | if (!kbd_iobase) |
69 | return -ENODEV; | 112 | return -ENODEV; |
70 | } else { | 113 | } else { |
71 | struct linux_ebus *ebus; | 114 | int err = of_register_driver(&sparc_i8042_driver, |
72 | struct linux_ebus_device *edev; | 115 | &of_bus_type); |
73 | struct linux_ebus_child *child; | 116 | if (err) |
74 | 117 | return err; | |
75 | for_each_ebus(ebus) { | 118 | |
76 | for_each_ebusdev(edev, ebus) { | ||
77 | if (!strcmp(edev->prom_node->name, "8042")) | ||
78 | goto edev_found; | ||
79 | } | ||
80 | } | ||
81 | return -ENODEV; | ||
82 | |||
83 | edev_found: | ||
84 | for_each_edevchild(edev, child) { | ||
85 | if (!strcmp(child->prom_node->name, OBP_PS2KBD_NAME1) || | ||
86 | !strcmp(child->prom_node->name, OBP_PS2KBD_NAME2)) { | ||
87 | i8042_kbd_irq = child->irqs[0]; | ||
88 | kbd_iobase = | ||
89 | ioremap(child->resource[0].start, 8); | ||
90 | } | ||
91 | if (!strcmp(child->prom_node->name, OBP_PS2MS_NAME1) || | ||
92 | !strcmp(child->prom_node->name, OBP_PS2MS_NAME2)) | ||
93 | i8042_aux_irq = child->irqs[0]; | ||
94 | } | ||
95 | if (i8042_kbd_irq == -1 || | 119 | if (i8042_kbd_irq == -1 || |
96 | i8042_aux_irq == -1) { | 120 | i8042_aux_irq == -1) { |
97 | printk("i8042: Error, 8042 device lacks both kbd and " | 121 | if (kbd_iobase) { |
98 | "mouse nodes.\n"); | 122 | of_iounmap(kbd_iobase, 8); |
123 | kbd_iobase = (void __iomem *) NULL; | ||
124 | } | ||
99 | return -ENODEV; | 125 | return -ENODEV; |
100 | } | 126 | } |
101 | } | 127 | } |
@@ -109,7 +135,10 @@ static int __init i8042_platform_init(void) | |||
109 | static inline void i8042_platform_exit(void) | 135 | static inline void i8042_platform_exit(void) |
110 | { | 136 | { |
111 | #ifdef CONFIG_PCI | 137 | #ifdef CONFIG_PCI |
112 | iounmap(kbd_iobase); | 138 | struct device_node *root = of_find_node_by_path("/"); |
139 | |||
140 | if (strcmp(root->name, "SUNW,JavaStation-1")) | ||
141 | of_unregister_driver(&sparc_i8042_driver); | ||
113 | #endif | 142 | #endif |
114 | } | 143 | } |
115 | 144 | ||
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index a7d91d5356a5..7fa4bc222583 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/moduleparam.h> | 15 | #include <linux/moduleparam.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/ioport.h> | 17 | #include <linux/ioport.h> |
18 | #include <linux/config.h> | ||
19 | #include <linux/init.h> | 18 | #include <linux/init.h> |
20 | #include <linux/serio.h> | 19 | #include <linux/serio.h> |
21 | #include <linux/err.h> | 20 | #include <linux/err.h> |
diff --git a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h index cbbf3842da5b..af526ab9ec04 100644 --- a/drivers/input/serio/i8042.h +++ b/drivers/input/serio/i8042.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _I8042_H | 1 | #ifndef _I8042_H |
2 | #define _I8042_H | 2 | #define _I8042_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | 4 | ||
6 | /* | 5 | /* |
7 | * Copyright (c) 1999-2002 Vojtech Pavlik | 6 | * Copyright (c) 1999-2002 Vojtech Pavlik |
diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c index 5f9ecad2ca75..00e3929c6288 100644 --- a/drivers/input/tsdev.c +++ b/drivers/input/tsdev.c | |||
@@ -48,7 +48,6 @@ | |||
48 | #include <linux/init.h> | 48 | #include <linux/init.h> |
49 | #include <linux/input.h> | 49 | #include <linux/input.h> |
50 | #include <linux/major.h> | 50 | #include <linux/major.h> |
51 | #include <linux/config.h> | ||
52 | #include <linux/smp_lock.h> | 51 | #include <linux/smp_lock.h> |
53 | #include <linux/random.h> | 52 | #include <linux/random.h> |
54 | #include <linux/time.h> | 53 | #include <linux/time.h> |
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index a518ec531021..669f76393b5a 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c index e7cf6bc286a6..c1b21552fc03 100644 --- a/drivers/isdn/capi/capiutil.c +++ b/drivers/isdn/capi/capiutil.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/config.h> | ||
21 | #include <linux/isdn/capiutil.h> | 20 | #include <linux/isdn/capiutil.h> |
22 | 21 | ||
23 | /* from CAPI2.0 DDK AVM Berlin GmbH */ | 22 | /* from CAPI2.0 DDK AVM Berlin GmbH */ |
diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c index 1b37d86d5ee1..399b316111f7 100644 --- a/drivers/isdn/divert/divert_procfs.c +++ b/drivers/isdn/divert/divert_procfs.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/poll.h> | 13 | #include <linux/poll.h> |
15 | #include <linux/smp_lock.h> | 14 | #include <linux/smp_lock.h> |
diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h index 1ca3bfdef51d..884bd72c1bf4 100644 --- a/drivers/isdn/gigaset/gigaset.h +++ b/drivers/isdn/gigaset/gigaset.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #ifndef GIGASET_H | 16 | #ifndef GIGASET_H |
17 | #define GIGASET_H | 17 | #define GIGASET_H |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/compiler.h> | 20 | #include <linux/compiler.h> |
22 | #include <linux/types.h> | 21 | #include <linux/types.h> |
diff --git a/drivers/isdn/hardware/avm/b1dma.c b/drivers/isdn/hardware/avm/b1dma.c index 4d64e5cbcdbf..a4beeb46c859 100644 --- a/drivers/isdn/hardware/avm/b1dma.c +++ b/drivers/isdn/hardware/avm/b1dma.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
diff --git a/drivers/isdn/hardware/avm/b1pci.c b/drivers/isdn/hardware/avm/b1pci.c index 5435a6cfb5e7..7edf19b32299 100644 --- a/drivers/isdn/hardware/avm/b1pci.c +++ b/drivers/isdn/hardware/avm/b1pci.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c index f7253b2136ea..e7924a545d49 100644 --- a/drivers/isdn/hardware/avm/c4.c +++ b/drivers/isdn/hardware/avm/c4.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
diff --git a/drivers/isdn/hardware/avm/t1pci.c b/drivers/isdn/hardware/avm/t1pci.c index 2ceec8e8419f..af85511600d0 100644 --- a/drivers/isdn/hardware/avm/t1pci.c +++ b/drivers/isdn/hardware/avm/t1pci.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
diff --git a/drivers/isdn/hardware/eicon/capimain.c b/drivers/isdn/hardware/eicon/capimain.c index 8fe4f3f09353..7a74ed35b1bf 100644 --- a/drivers/isdn/hardware/eicon/capimain.c +++ b/drivers/isdn/hardware/eicon/capimain.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * of the GNU General Public License, incorporated herein by reference. | 10 | * of the GNU General Public License, incorporated herein by reference. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <asm/uaccess.h> | 15 | #include <asm/uaccess.h> |
diff --git a/drivers/isdn/hardware/eicon/diva_didd.c b/drivers/isdn/hardware/eicon/diva_didd.c index 27204f4b111a..14298b8c835f 100644 --- a/drivers/isdn/hardware/eicon/diva_didd.c +++ b/drivers/isdn/hardware/eicon/diva_didd.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * of the GNU General Public License, incorporated herein by reference. | 11 | * of the GNU General Public License, incorporated herein by reference. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
diff --git a/drivers/isdn/hardware/eicon/divamnt.c b/drivers/isdn/hardware/eicon/divamnt.c index b163c5909182..77155d9f399b 100644 --- a/drivers/isdn/hardware/eicon/divamnt.c +++ b/drivers/isdn/hardware/eicon/divamnt.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * of the GNU General Public License, incorporated herein by reference. | 10 | * of the GNU General Public License, incorporated herein by reference. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
diff --git a/drivers/isdn/hardware/eicon/divasi.c b/drivers/isdn/hardware/eicon/divasi.c index 6e7d89a31c1d..fff0d89c806b 100644 --- a/drivers/isdn/hardware/eicon/divasi.c +++ b/drivers/isdn/hardware/eicon/divasi.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * of the GNU General Public License, incorporated herein by reference. | 10 | * of the GNU General Public License, incorporated herein by reference. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c index 9dee6a39104c..b05e35f7ccb1 100644 --- a/drivers/isdn/hardware/eicon/divasmain.c +++ b/drivers/isdn/hardware/eicon/divasmain.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * of the GNU General Public License, incorporated herein by reference. | 9 | * of the GNU General Public License, incorporated herein by reference. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c index c12efa6f8429..6a4373a4f1e8 100644 --- a/drivers/isdn/hardware/eicon/divasproc.c +++ b/drivers/isdn/hardware/eicon/divasproc.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * of the GNU General Public License, incorporated herein by reference. | 10 | * of the GNU General Public License, incorporated herein by reference. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/poll.h> | 15 | #include <linux/poll.h> |
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h index 12b8ff29e976..a66836cf756c 100644 --- a/drivers/isdn/hardware/eicon/platform.h +++ b/drivers/isdn/hardware/eicon/platform.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #define DIVA_BUILD "local" | 18 | #define DIVA_BUILD "local" |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c index 4abe5ff10e72..93f3a5343a74 100644 --- a/drivers/isdn/hisax/avm_pci.c +++ b/drivers/isdn/hisax/avm_pci.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include "hisax.h" | 16 | #include "hisax.h" |
18 | #include "isac.h" | 17 | #include "isac.h" |
diff --git a/drivers/isdn/hisax/bkm_a4t.c b/drivers/isdn/hisax/bkm_a4t.c index dcb308aeb50c..de28cb54817d 100644 --- a/drivers/isdn/hisax/bkm_a4t.c +++ b/drivers/isdn/hisax/bkm_a4t.c | |||
@@ -11,7 +11,6 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include "hisax.h" | 15 | #include "hisax.h" |
17 | #include "isac.h" | 16 | #include "isac.h" |
diff --git a/drivers/isdn/hisax/bkm_a8.c b/drivers/isdn/hisax/bkm_a8.c index 5f21b82c8c8d..9d1abfb93dde 100644 --- a/drivers/isdn/hisax/bkm_a8.c +++ b/drivers/isdn/hisax/bkm_a8.c | |||
@@ -11,7 +11,6 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include "hisax.h" | 15 | #include "hisax.h" |
17 | #include "isac.h" | 16 | #include "isac.h" |
diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c index 27332506f9f7..5333be5d2c47 100644 --- a/drivers/isdn/hisax/config.c +++ b/drivers/isdn/hisax/config.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/stddef.h> | 18 | #include <linux/stddef.h> |
19 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
20 | #include <linux/config.h> | ||
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
22 | #include "hisax.h" | 21 | #include "hisax.h" |
23 | #include <linux/module.h> | 22 | #include <linux/module.h> |
diff --git a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c index b0ff1cc97d7c..fbb9d02e3e29 100644 --- a/drivers/isdn/hisax/diva.c +++ b/drivers/isdn/hisax/diva.c | |||
@@ -16,7 +16,6 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/config.h> | ||
20 | #include "hisax.h" | 19 | #include "hisax.h" |
21 | #include "isac.h" | 20 | #include "isac.h" |
22 | #include "hscx.h" | 21 | #include "hscx.h" |
diff --git a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c index f8ca4b323331..7a5cdb1dee1e 100644 --- a/drivers/isdn/hisax/elsa.c +++ b/drivers/isdn/hisax/elsa.c | |||
@@ -19,7 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/config.h> | ||
23 | #include "hisax.h" | 22 | #include "hisax.h" |
24 | #include "arcofi.h" | 23 | #include "arcofi.h" |
25 | #include "isac.h" | 24 | #include "isac.h" |
diff --git a/drivers/isdn/hisax/elsa_ser.c b/drivers/isdn/hisax/elsa_ser.c index 898ec0916195..0279fb323cb1 100644 --- a/drivers/isdn/hisax/elsa_ser.c +++ b/drivers/isdn/hisax/elsa_ser.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * | 7 | * |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/serial.h> | 10 | #include <linux/serial.h> |
12 | #include <linux/serial_reg.h> | 11 | #include <linux/serial_reg.h> |
13 | 12 | ||
diff --git a/drivers/isdn/hisax/enternow_pci.c b/drivers/isdn/hisax/enternow_pci.c index 3341cf155531..5f4876184691 100644 --- a/drivers/isdn/hisax/enternow_pci.c +++ b/drivers/isdn/hisax/enternow_pci.c | |||
@@ -60,7 +60,6 @@ | |||
60 | */ | 60 | */ |
61 | 61 | ||
62 | 62 | ||
63 | #include <linux/config.h> | ||
64 | #include "hisax.h" | 63 | #include "hisax.h" |
65 | #include "isac.h" | 64 | #include "isac.h" |
66 | #include "isdnl1.h" | 65 | #include "isdnl1.h" |
diff --git a/drivers/isdn/hisax/gazel.c b/drivers/isdn/hisax/gazel.c index 60b04c6d9e7d..82a1d2e86cee 100644 --- a/drivers/isdn/hisax/gazel.c +++ b/drivers/isdn/hisax/gazel.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include "hisax.h" | 15 | #include "hisax.h" |
17 | #include "isac.h" | 16 | #include "isac.h" |
diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c index e3866b0a97fd..913fd27a1f55 100644 --- a/drivers/isdn/hisax/hfc4s8s_l1.c +++ b/drivers/isdn/hisax/hfc4s8s_l1.c | |||
@@ -22,7 +22,6 @@ | |||
22 | 22 | ||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/config.h> | ||
26 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
27 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
28 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c index 3622720f0505..fa9615747e26 100644 --- a/drivers/isdn/hisax/hfc_pci.c +++ b/drivers/isdn/hisax/hfc_pci.c | |||
@@ -16,7 +16,6 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/config.h> | ||
20 | #include "hisax.h" | 19 | #include "hisax.h" |
21 | #include "hfc_pci.h" | 20 | #include "hfc_pci.h" |
22 | #include "isdnl1.h" | 21 | #include "isdnl1.h" |
diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c index 262c44127419..b5e571a52694 100644 --- a/drivers/isdn/hisax/hfc_usb.c +++ b/drivers/isdn/hisax/hfc_usb.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
33 | #include <linux/stddef.h> | 33 | #include <linux/stddef.h> |
34 | #include <linux/timer.h> | 34 | #include <linux/timer.h> |
35 | #include <linux/config.h> | ||
36 | #include <linux/init.h> | 35 | #include <linux/init.h> |
37 | #include <linux/module.h> | 36 | #include <linux/module.h> |
38 | #include <linux/kernel_stat.h> | 37 | #include <linux/kernel_stat.h> |
diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h index 11fe537e2f6f..75920aa0a3c5 100644 --- a/drivers/isdn/hisax/hisax.h +++ b/drivers/isdn/hisax/hisax.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * of the GNU General Public License, incorporated herein by reference. | 6 | * of the GNU General Public License, incorporated herein by reference. |
7 | * | 7 | * |
8 | */ | 8 | */ |
9 | #include <linux/config.h> | ||
10 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
11 | #include <linux/fs.h> | 10 | #include <linux/fs.h> |
12 | #include <linux/major.h> | 11 | #include <linux/major.h> |
diff --git a/drivers/isdn/hisax/hisax_debug.h b/drivers/isdn/hisax/hisax_debug.h index ba518a7a7fb7..ceafecdb1037 100644 --- a/drivers/isdn/hisax/hisax_debug.h +++ b/drivers/isdn/hisax/hisax_debug.h | |||
@@ -22,7 +22,6 @@ | |||
22 | #ifndef __HISAX_DEBUG_H__ | 22 | #ifndef __HISAX_DEBUG_H__ |
23 | #define __HISAX_DEBUG_H__ | 23 | #define __HISAX_DEBUG_H__ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | 25 | ||
27 | #ifdef CONFIG_HISAX_DEBUG | 26 | #ifdef CONFIG_HISAX_DEBUG |
28 | 27 | ||
diff --git a/drivers/isdn/hisax/ipacx.c b/drivers/isdn/hisax/ipacx.c index 2e9afae1254a..df5fc92a89b2 100644 --- a/drivers/isdn/hisax/ipacx.c +++ b/drivers/isdn/hisax/ipacx.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/config.h> | ||
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include "hisax_if.h" | 14 | #include "hisax_if.h" |
16 | #include "hisax.h" | 15 | #include "hisax.h" |
diff --git a/drivers/isdn/hisax/isdnl3.c b/drivers/isdn/hisax/isdnl3.c index c9917cd2132b..281fa27d9f00 100644 --- a/drivers/isdn/hisax/isdnl3.c +++ b/drivers/isdn/hisax/isdnl3.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include "hisax.h" | 19 | #include "hisax.h" |
20 | #include "isdnl3.h" | 20 | #include "isdnl3.h" |
21 | #include <linux/config.h> | ||
22 | 21 | ||
23 | const char *l3_revision = "$Revision: 2.22.2.3 $"; | 22 | const char *l3_revision = "$Revision: 2.22.2.3 $"; |
24 | 23 | ||
diff --git a/drivers/isdn/hisax/l3dss1.c b/drivers/isdn/hisax/l3dss1.c index e96845cdd4f6..99feae8b9210 100644 --- a/drivers/isdn/hisax/l3dss1.c +++ b/drivers/isdn/hisax/l3dss1.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include "isdnl3.h" | 23 | #include "isdnl3.h" |
24 | #include "l3dss1.h" | 24 | #include "l3dss1.h" |
25 | #include <linux/ctype.h> | 25 | #include <linux/ctype.h> |
26 | #include <linux/config.h> | ||
27 | 26 | ||
28 | extern char *HiSax_getrev(const char *revision); | 27 | extern char *HiSax_getrev(const char *revision); |
29 | static const char *dss1_revision = "$Revision: 2.32.2.3 $"; | 28 | static const char *dss1_revision = "$Revision: 2.32.2.3 $"; |
diff --git a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c index 68a2159cbd11..868762cf76c6 100644 --- a/drivers/isdn/hisax/niccy.c +++ b/drivers/isdn/hisax/niccy.c | |||
@@ -14,7 +14,6 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/init.h> | 17 | #include <linux/init.h> |
19 | #include "hisax.h" | 18 | #include "hisax.h" |
20 | #include "isac.h" | 19 | #include "isac.h" |
diff --git a/drivers/isdn/hisax/nj_s.c b/drivers/isdn/hisax/nj_s.c index a7d3cd3f36fd..1b3ac46df52c 100644 --- a/drivers/isdn/hisax/nj_s.c +++ b/drivers/isdn/hisax/nj_s.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/init.h> | 8 | #include <linux/init.h> |
10 | #include "hisax.h" | 9 | #include "hisax.h" |
11 | #include "isac.h" | 10 | #include "isac.h" |
diff --git a/drivers/isdn/hisax/nj_u.c b/drivers/isdn/hisax/nj_u.c index 1ae7cac98a87..7a6010eac60d 100644 --- a/drivers/isdn/hisax/nj_u.c +++ b/drivers/isdn/hisax/nj_u.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/init.h> | 8 | #include <linux/init.h> |
10 | #include "hisax.h" | 9 | #include "hisax.h" |
11 | #include "icc.h" | 10 | #include "icc.h" |
diff --git a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c index 8c044a6a7fe3..11ea456626b6 100644 --- a/drivers/isdn/hisax/sedlbauer.c +++ b/drivers/isdn/hisax/sedlbauer.c | |||
@@ -39,7 +39,6 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include <linux/init.h> | 41 | #include <linux/init.h> |
42 | #include <linux/config.h> | ||
43 | #include "hisax.h" | 42 | #include "hisax.h" |
44 | #include "isac.h" | 43 | #include "isac.h" |
45 | #include "ipac.h" | 44 | #include "ipac.h" |
diff --git a/drivers/isdn/hisax/st5481.h b/drivers/isdn/hisax/st5481.h index 9ffaae7c657a..04416bad611d 100644 --- a/drivers/isdn/hisax/st5481.h +++ b/drivers/isdn/hisax/st5481.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #ifndef _ST5481_H_ | 13 | #ifndef _ST5481_H_ |
14 | #define _ST5481_H_ | 14 | #define _ST5481_H_ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | 16 | ||
18 | // USB IDs, the Product Id is in the range 0x4810-0x481F | 17 | // USB IDs, the Product Id is in the range 0x4810-0x481F |
19 | 18 | ||
diff --git a/drivers/isdn/hisax/st5481_init.c b/drivers/isdn/hisax/st5481_init.c index 99cb0f3d59a1..2716aa5c60f7 100644 --- a/drivers/isdn/hisax/st5481_init.c +++ b/drivers/isdn/hisax/st5481_init.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * clean up debug | 24 | * clean up debug |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/module.h> | 27 | #include <linux/module.h> |
29 | #include <linux/init.h> | 28 | #include <linux/init.h> |
30 | #include <linux/usb.h> | 29 | #include <linux/usb.h> |
diff --git a/drivers/isdn/hisax/telespci.c b/drivers/isdn/hisax/telespci.c index e82ab2251b82..a1bb73e28841 100644 --- a/drivers/isdn/hisax/telespci.c +++ b/drivers/isdn/hisax/telespci.c | |||
@@ -13,7 +13,6 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/config.h> | ||
17 | #include "hisax.h" | 16 | #include "hisax.h" |
18 | #include "isac.h" | 17 | #include "isac.h" |
19 | #include "hscx.h" | 18 | #include "hscx.h" |
diff --git a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c index 0352ee5f706c..00e4fa2aef51 100644 --- a/drivers/isdn/hisax/w6692.c +++ b/drivers/isdn/hisax/w6692.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include "hisax.h" | 14 | #include "hisax.h" |
16 | #include "w6692.h" | 15 | #include "w6692.h" |
diff --git a/drivers/isdn/hysdn/boardergo.c b/drivers/isdn/hysdn/boardergo.c index 48d134be9908..89fd531fbce6 100644 --- a/drivers/isdn/hysdn/boardergo.c +++ b/drivers/isdn/hysdn/boardergo.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
19 | #include <linux/signal.h> | 18 | #include <linux/signal.h> |
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
diff --git a/drivers/isdn/hysdn/hysdn_defs.h b/drivers/isdn/hysdn/hysdn_defs.h index 3a9b29b38bc4..461e831592dd 100644 --- a/drivers/isdn/hysdn/hysdn_defs.h +++ b/drivers/isdn/hysdn/hysdn_defs.h | |||
@@ -14,7 +14,6 @@ | |||
14 | #ifndef HYSDN_DEFS_H | 14 | #ifndef HYSDN_DEFS_H |
15 | #define HYSDN_DEFS_H | 15 | #define HYSDN_DEFS_H |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/hysdn_if.h> | 17 | #include <linux/hysdn_if.h> |
19 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
20 | #include <linux/workqueue.h> | 19 | #include <linux/workqueue.h> |
diff --git a/drivers/isdn/hysdn/hysdn_init.c b/drivers/isdn/hysdn/hysdn_init.c index b75ac5af236a..b702ed27252b 100644 --- a/drivers/isdn/hysdn/hysdn_init.c +++ b/drivers/isdn/hysdn/hysdn_init.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/poll.h> | 15 | #include <linux/poll.h> |
diff --git a/drivers/isdn/hysdn/hysdn_sched.c b/drivers/isdn/hysdn/hysdn_sched.c index 133032920ff8..1c0d54ac12ab 100644 --- a/drivers/isdn/hysdn/hysdn_sched.c +++ b/drivers/isdn/hysdn/hysdn_sched.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
16 | #include <linux/signal.h> | 15 | #include <linux/signal.h> |
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index eb21063e6f63..9f6c6375ff75 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/poll.h> | 16 | #include <linux/poll.h> |
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index 96c115e13389..43da8ae1b2ad 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * http://i4l.zabbadoz.net/i4l/cisco-hdlc.txt | 22 | * http://i4l.zabbadoz.net/i4l/cisco-hdlc.txt |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/isdn.h> | 25 | #include <linux/isdn.h> |
27 | #include <net/arp.h> | 26 | #include <net/arp.h> |
28 | #include <net/dst.h> | 27 | #include <net/dst.h> |
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index 918742271c79..29e7667ec962 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/isdn.h> | 12 | #include <linux/isdn.h> |
14 | #include <linux/poll.h> | 13 | #include <linux/poll.h> |
15 | #include <linux/ppp-comp.h> | 14 | #include <linux/ppp-comp.h> |
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 0a53a990c100..9ab66e8960d5 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c | |||
@@ -11,7 +11,6 @@ | |||
11 | */ | 11 | */ |
12 | #undef ISDN_TTY_STAT_DEBUG | 12 | #undef ISDN_TTY_STAT_DEBUG |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/isdn.h> | 14 | #include <linux/isdn.h> |
16 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
17 | #include "isdn_common.h" | 16 | #include "isdn_common.h" |
diff --git a/drivers/isdn/i4l/isdn_tty.h b/drivers/isdn/i4l/isdn_tty.h index 9f0fa9501f4d..692c74d6b749 100644 --- a/drivers/isdn/i4l/isdn_tty.h +++ b/drivers/isdn/i4l/isdn_tty.h | |||
@@ -10,7 +10,6 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | 13 | ||
15 | #define DLE 0x10 | 14 | #define DLE 0x10 |
16 | #define ETX 0x03 | 15 | #define ETX 0x03 |
diff --git a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c index a67d31af797a..fabbd461603e 100644 --- a/drivers/isdn/isdnloop/isdnloop.c +++ b/drivers/isdn/isdnloop/isdnloop.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c index c75d0ef1609c..d424b4452028 100644 --- a/drivers/leds/led-class.c +++ b/drivers/leds/led-class.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c index 1b1ce6523960..47f0ff196328 100644 --- a/drivers/leds/led-triggers.c +++ b/drivers/leds/led-triggers.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
diff --git a/drivers/leds/leds-corgi.c b/drivers/leds/leds-corgi.c index bb7d84df0121..cf1dcd719a28 100644 --- a/drivers/leds/leds-corgi.c +++ b/drivers/leds/leds-corgi.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
diff --git a/drivers/leds/leds-ixp4xx-gpio.c b/drivers/leds/leds-ixp4xx-gpio.c index 30ced150e4cf..7dcf0b92c460 100644 --- a/drivers/leds/leds-ixp4xx-gpio.c +++ b/drivers/leds/leds-ixp4xx-gpio.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
36 | #include <linux/init.h> | 35 | #include <linux/init.h> |
37 | #include <linux/platform_device.h> | 36 | #include <linux/platform_device.h> |
diff --git a/drivers/leds/leds-locomo.c b/drivers/leds/leds-locomo.c index 8419e29b71f4..3b87951aa555 100644 --- a/drivers/leds/leds-locomo.c +++ b/drivers/leds/leds-locomo.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
14 | #include <linux/device.h> | 13 | #include <linux/device.h> |
diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c index 650cf72dc675..fb1edc1c9edb 100644 --- a/drivers/leds/leds-s3c24xx.c +++ b/drivers/leds/leds-s3c24xx.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
diff --git a/drivers/leds/leds-spitz.c b/drivers/leds/leds-spitz.c index 65bbef4a5e09..126d09cc96ec 100644 --- a/drivers/leds/leds-spitz.c +++ b/drivers/leds/leds-spitz.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
diff --git a/drivers/leds/leds-tosa.c b/drivers/leds/leds-tosa.c index c9e8cc1ec481..fb2416a38303 100644 --- a/drivers/leds/leds-tosa.c +++ b/drivers/leds/leds-tosa.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
18 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
diff --git a/drivers/leds/ledtrig-timer.c b/drivers/leds/ledtrig-timer.c index fbf141ef46ec..179c2876b541 100644 --- a/drivers/leds/ledtrig-timer.c +++ b/drivers/leds/ledtrig-timer.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c index 9f1a049dc226..360f93f6fcdb 100644 --- a/drivers/macintosh/adb.c +++ b/drivers/macintosh/adb.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * - move bus probe to a kernel thread | 16 | * - move bus probe to a kernel thread |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/types.h> | 19 | #include <linux/types.h> |
21 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c index cbfbbe2b150a..545be1ed6927 100644 --- a/drivers/macintosh/adbhid.c +++ b/drivers/macintosh/adbhid.c | |||
@@ -34,7 +34,6 @@ | |||
34 | * Move to syfs | 34 | * Move to syfs |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/config.h> | ||
38 | #include <linux/module.h> | 37 | #include <linux/module.h> |
39 | #include <linux/slab.h> | 38 | #include <linux/slab.h> |
40 | #include <linux/init.h> | 39 | #include <linux/init.h> |
diff --git a/drivers/macintosh/apm_emu.c b/drivers/macintosh/apm_emu.c index e5a2bbf99399..1293876a2ebd 100644 --- a/drivers/macintosh/apm_emu.c +++ b/drivers/macintosh/apm_emu.c | |||
@@ -18,7 +18,6 @@ | |||
18 | * | 18 | * |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
23 | 22 | ||
24 | #include <linux/poll.h> | 23 | #include <linux/poll.h> |
diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c index a66636116f0b..6b129eef7987 100644 --- a/drivers/macintosh/mac_hid.c +++ b/drivers/macintosh/mac_hid.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * This file will soon be removed in favor of an uinput userspace tool. | 8 | * This file will soon be removed in favor of an uinput userspace tool. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/init.h> | 11 | #include <linux/init.h> |
13 | #include <linux/proc_fs.h> | 12 | #include <linux/proc_fs.h> |
14 | #include <linux/sysctl.h> | 13 | #include <linux/sysctl.h> |
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index c687ac703941..d832e109b1b1 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * sub-devices. | 17 | * sub-devices. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/string.h> | 20 | #include <linux/string.h> |
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
23 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c index 7f7d4eaca870..cae24a13526a 100644 --- a/drivers/macintosh/macio_sysfs.c +++ b/drivers/macintosh/macio_sysfs.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
3 | #include <linux/stat.h> | 2 | #include <linux/stat.h> |
4 | #include <asm/macio.h> | 3 | #include <asm/macio.h> |
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c index 53c1c7909413..0acf2f7fd9d7 100644 --- a/drivers/macintosh/mediabay.c +++ b/drivers/macintosh/mediabay.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * as published by the Free Software Foundation; either version | 10 | * as published by the Free Software Foundation; either version |
11 | * 2 of the License, or (at your option) any later version. | 11 | * 2 of the License, or (at your option) any later version. |
12 | */ | 12 | */ |
13 | #include <linux/config.h> | ||
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
15 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index f4516ca7aa3a..030130570e0a 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * the userland interface | 19 | * the userland interface |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
25 | #include <linux/device.h> | 24 | #include <linux/device.h> |
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index 5282fec17075..7f86478bdd36 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/types.h> | 12 | #include <linux/types.h> |
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index 231146f439dd..c1fe0b368f76 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
@@ -97,7 +97,6 @@ | |||
97 | * | 97 | * |
98 | */ | 98 | */ |
99 | 99 | ||
100 | #include <linux/config.h> | ||
101 | #include <linux/types.h> | 100 | #include <linux/types.h> |
102 | #include <linux/module.h> | 101 | #include <linux/module.h> |
103 | #include <linux/errno.h> | 102 | #include <linux/errno.h> |
diff --git a/drivers/macintosh/therm_pm72.h b/drivers/macintosh/therm_pm72.h index c17e61f9c418..fc7e9b7ecaf2 100644 --- a/drivers/macintosh/therm_pm72.h +++ b/drivers/macintosh/therm_pm72.h | |||
@@ -93,7 +93,7 @@ static char * critical_overtemp_path = "/sbin/critical_overtemp"; | |||
93 | * 0. This appear to be safe enough for this first version | 93 | * 0. This appear to be safe enough for this first version |
94 | * of the driver, though I would accept any clean patch | 94 | * of the driver, though I would accept any clean patch |
95 | * doing a better use of the device-tree without turning the | 95 | * doing a better use of the device-tree without turning the |
96 | * while i2c registration mecanism into a racy mess | 96 | * while i2c registration mechanism into a racy mess |
97 | * | 97 | * |
98 | * Note: Xserve changed this. We have some bits on the K2 bus, | 98 | * Note: Xserve changed this. We have some bits on the K2 bus, |
99 | * which I arbitrarily set to 0x200. Ultimately, we really want | 99 | * which I arbitrarily set to 0x200. Ultimately, we really want |
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index 3d9dd2e166aa..c7d1c290cb0c 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/types.h> | 30 | #include <linux/types.h> |
32 | #include <linux/module.h> | 31 | #include <linux/module.h> |
33 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
diff --git a/drivers/macintosh/via-cuda.c b/drivers/macintosh/via-cuda.c index 2d9d79150403..6501db50fb83 100644 --- a/drivers/macintosh/via-cuda.c +++ b/drivers/macintosh/via-cuda.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * Copyright (C) 1996 Paul Mackerras. | 9 | * Copyright (C) 1996 Paul Mackerras. |
10 | */ | 10 | */ |
11 | #include <stdarg.h> | 11 | #include <stdarg.h> |
12 | #include <linux/config.h> | ||
13 | #include <linux/types.h> | 12 | #include <linux/types.h> |
14 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 1ab4f16c08b9..c1193d34ec9e 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -21,7 +21,6 @@ | |||
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | #include <stdarg.h> | 23 | #include <stdarg.h> |
24 | #include <linux/config.h> | ||
25 | #include <linux/types.h> | 24 | #include <linux/types.h> |
26 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
diff --git a/drivers/macintosh/windfarm_cpufreq_clamp.c b/drivers/macintosh/windfarm_cpufreq_clamp.c index 81337cd16e80..900aade06198 100644 --- a/drivers/macintosh/windfarm_cpufreq_clamp.c +++ b/drivers/macintosh/windfarm_cpufreq_clamp.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <linux/types.h> | 1 | #include <linux/types.h> |
3 | #include <linux/errno.h> | 2 | #include <linux/errno.h> |
4 | #include <linux/kernel.h> | 3 | #include <linux/kernel.h> |
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index ebbd2d856256..ecc56765d949 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/config.h> | ||
24 | #include <linux/timer.h> | 23 | #include <linux/timer.h> |
25 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
26 | #include <linux/list.h> | 25 | #include <linux/list.h> |
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 8eea0ddbf5ec..1d0fafda0f76 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c | |||
@@ -7,7 +7,6 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/blkdev.h> | 9 | #include <linux/blkdev.h> |
10 | #include <linux/config.h> | ||
11 | #include <linux/ctype.h> | 10 | #include <linux/ctype.h> |
12 | #include <linux/device-mapper.h> | 11 | #include <linux/device-mapper.h> |
13 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
diff --git a/drivers/md/kcopyd.c b/drivers/md/kcopyd.c index 73ab875fb158..f1db6eff4857 100644 --- a/drivers/md/kcopyd.c +++ b/drivers/md/kcopyd.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <asm/atomic.h> | 12 | #include <asm/atomic.h> |
13 | 13 | ||
14 | #include <linux/blkdev.h> | 14 | #include <linux/blkdev.h> |
15 | #include <linux/config.h> | ||
16 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
18 | #include <linux/list.h> | 17 | #include <linux/list.h> |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 2ec1b3520a0b..2fe32c261922 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -33,7 +33,6 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/config.h> | ||
37 | #include <linux/kthread.h> | 36 | #include <linux/kthread.h> |
38 | #include <linux/linkage.h> | 37 | #include <linux/linkage.h> |
39 | #include <linux/raid/md.h> | 38 | #include <linux/raid/md.h> |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 837ec4eb3d60..7433871f4b3a 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -19,7 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/module.h> | 22 | #include <linux/module.h> |
24 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
25 | #include <linux/highmem.h> | 24 | #include <linux/highmem.h> |
diff --git a/drivers/media/common/saa7146_hlp.c b/drivers/media/common/saa7146_hlp.c index 2092e6c33dd2..d2905720eb74 100644 --- a/drivers/media/common/saa7146_hlp.c +++ b/drivers/media/common/saa7146_hlp.c | |||
@@ -158,7 +158,7 @@ static int calculate_h_scale_registers(struct saa7146_dev *dev, | |||
158 | } | 158 | } |
159 | 159 | ||
160 | /* the horizontal scaling increment controls the UV filter | 160 | /* the horizontal scaling increment controls the UV filter |
161 | to reduce the bandwith to improve the display quality, | 161 | to reduce the bandwidth to improve the display quality, |
162 | so set it ... */ | 162 | so set it ... */ |
163 | if ( xsci == 0x400) | 163 | if ( xsci == 0x400) |
164 | pfuv = 0x00; | 164 | pfuv = 0x00; |
diff --git a/drivers/media/dvb/b2c2/flexcop-common.h b/drivers/media/dvb/b2c2/flexcop-common.h index b3dd0603cd92..5a6c4fe249e7 100644 --- a/drivers/media/dvb/b2c2/flexcop-common.h +++ b/drivers/media/dvb/b2c2/flexcop-common.h | |||
@@ -8,7 +8,6 @@ | |||
8 | #ifndef __FLEXCOP_COMMON_H__ | 8 | #ifndef __FLEXCOP_COMMON_H__ |
9 | #define __FLEXCOP_COMMON_H__ | 9 | #define __FLEXCOP_COMMON_H__ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
13 | #include <linux/mutex.h> | 12 | #include <linux/mutex.h> |
14 | 13 | ||
diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c index 1b8953600425..001c71b6be61 100644 --- a/drivers/media/dvb/cinergyT2/cinergyT2.c +++ b/drivers/media/dvb/cinergyT2/cinergyT2.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/init.h> | 25 | #include <linux/init.h> |
27 | #include <linux/module.h> | 26 | #include <linux/module.h> |
28 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 5e8bb41a088b..59ac35ddd51e 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -570,7 +570,8 @@ static int dvb_frontend_thread(void *data) | |||
570 | dvb_frontend_add_event(fe, s); | 570 | dvb_frontend_add_event(fe, s); |
571 | fepriv->status = s; | 571 | fepriv->status = s; |
572 | } | 572 | } |
573 | } | 573 | } else |
574 | dvb_frontend_swzigzag(fe); | ||
574 | } else | 575 | } else |
575 | dvb_frontend_swzigzag(fe); | 576 | dvb_frontend_swzigzag(fe); |
576 | } | 577 | } |
@@ -975,6 +976,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, | |||
975 | 976 | ||
976 | case FE_SET_FRONTEND_TUNE_MODE: | 977 | case FE_SET_FRONTEND_TUNE_MODE: |
977 | fepriv->tune_mode_flags = (unsigned long) parg; | 978 | fepriv->tune_mode_flags = (unsigned long) parg; |
979 | err = 0; | ||
978 | break; | 980 | break; |
979 | }; | 981 | }; |
980 | 982 | ||
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h index 4cf9f89c51bf..97f8ea962438 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb.h | |||
@@ -8,7 +8,6 @@ | |||
8 | #ifndef __DVB_USB_H__ | 8 | #ifndef __DVB_USB_H__ |
9 | #define __DVB_USB_H__ | 9 | #define __DVB_USB_H__ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/input.h> | 11 | #include <linux/input.h> |
13 | #include <linux/usb.h> | 12 | #include <linux/usb.h> |
14 | #include <linux/firmware.h> | 13 | #include <linux/firmware.h> |
diff --git a/drivers/media/dvb/frontends/cx22700.c b/drivers/media/dvb/frontends/cx22700.c index 3c7c09a362b2..13ad1bfae663 100644 --- a/drivers/media/dvb/frontends/cx22700.c +++ b/drivers/media/dvb/frontends/cx22700.c | |||
@@ -134,6 +134,7 @@ static int cx22700_set_tps (struct cx22700_state *state, struct dvb_ofdm_paramet | |||
134 | return -EINVAL; | 134 | return -EINVAL; |
135 | 135 | ||
136 | if (p->code_rate_LP < FEC_1_2 || p->code_rate_LP > FEC_7_8) | 136 | if (p->code_rate_LP < FEC_1_2 || p->code_rate_LP > FEC_7_8) |
137 | return -EINVAL; | ||
137 | 138 | ||
138 | if (p->code_rate_HP == FEC_4_5 || p->code_rate_LP == FEC_4_5) | 139 | if (p->code_rate_HP == FEC_4_5 || p->code_rate_LP == FEC_4_5) |
139 | return -EINVAL; | 140 | return -EINVAL; |
diff --git a/drivers/media/dvb/frontends/cx24123.c b/drivers/media/dvb/frontends/cx24123.c index f2f795cba56a..274a87b7a5d5 100644 --- a/drivers/media/dvb/frontends/cx24123.c +++ b/drivers/media/dvb/frontends/cx24123.c | |||
@@ -670,10 +670,10 @@ static int cx24123_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage | |||
670 | switch (voltage) { | 670 | switch (voltage) { |
671 | case SEC_VOLTAGE_13: | 671 | case SEC_VOLTAGE_13: |
672 | dprintk("%s: setting voltage 13V\n", __FUNCTION__); | 672 | dprintk("%s: setting voltage 13V\n", __FUNCTION__); |
673 | return cx24123_writereg(state, 0x29, val | 0x80); | 673 | return cx24123_writereg(state, 0x29, val & 0x7f); |
674 | case SEC_VOLTAGE_18: | 674 | case SEC_VOLTAGE_18: |
675 | dprintk("%s: setting voltage 18V\n", __FUNCTION__); | 675 | dprintk("%s: setting voltage 18V\n", __FUNCTION__); |
676 | return cx24123_writereg(state, 0x29, val & 0x7f); | 676 | return cx24123_writereg(state, 0x29, val | 0x80); |
677 | default: | 677 | default: |
678 | return -EINVAL; | 678 | return -EINVAL; |
679 | }; | 679 | }; |
diff --git a/drivers/media/dvb/frontends/dib3000mb.c b/drivers/media/dvb/frontends/dib3000mb.c index 7c6dc7e30900..5302e11883a2 100644 --- a/drivers/media/dvb/frontends/dib3000mb.c +++ b/drivers/media/dvb/frontends/dib3000mb.c | |||
@@ -21,7 +21,6 @@ | |||
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/moduleparam.h> | 26 | #include <linux/moduleparam.h> |
diff --git a/drivers/media/dvb/frontends/dib3000mc.c b/drivers/media/dvb/frontends/dib3000mc.c index 6c3be2529980..98673474a140 100644 --- a/drivers/media/dvb/frontends/dib3000mc.c +++ b/drivers/media/dvb/frontends/dib3000mc.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * see Documentation/dvb/README.dibusb for more information | 20 | * see Documentation/dvb/README.dibusb for more information |
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | #include <linux/config.h> | ||
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | #include <linux/moduleparam.h> | 25 | #include <linux/moduleparam.h> |
diff --git a/drivers/media/dvb/frontends/lgdt330x.c b/drivers/media/dvb/frontends/lgdt330x.c index 6e8ad176e1a1..9a354708bd20 100644 --- a/drivers/media/dvb/frontends/lgdt330x.c +++ b/drivers/media/dvb/frontends/lgdt330x.c | |||
@@ -216,7 +216,7 @@ static int lgdt330x_init(struct dvb_frontend* fe) | |||
216 | AGC_DELAY0, 0x07, | 216 | AGC_DELAY0, 0x07, |
217 | AGC_DELAY2, 0xfe, | 217 | AGC_DELAY2, 0xfe, |
218 | /* Change the value of IAGCBW[15:8] | 218 | /* Change the value of IAGCBW[15:8] |
219 | of inner AGC loop filter bandwith */ | 219 | of inner AGC loop filter bandwidth */ |
220 | AGC_LOOP_BANDWIDTH0, 0x08, | 220 | AGC_LOOP_BANDWIDTH0, 0x08, |
221 | AGC_LOOP_BANDWIDTH1, 0x9a | 221 | AGC_LOOP_BANDWIDTH1, 0x9a |
222 | }; | 222 | }; |
diff --git a/drivers/media/dvb/frontends/tda10021.c b/drivers/media/dvb/frontends/tda10021.c index e83ff2104c9b..9cbd164aa281 100644 --- a/drivers/media/dvb/frontends/tda10021.c +++ b/drivers/media/dvb/frontends/tda10021.c | |||
@@ -21,7 +21,6 @@ | |||
21 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 21 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
26 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
27 | #include <linux/init.h> | 26 | #include <linux/init.h> |
diff --git a/drivers/media/dvb/frontends/ves1820.c b/drivers/media/dvb/frontends/ves1820.c index 6bffe85c161c..9b57576bfeb4 100644 --- a/drivers/media/dvb/frontends/ves1820.c +++ b/drivers/media/dvb/frontends/ves1820.c | |||
@@ -18,7 +18,6 @@ | |||
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
23 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
24 | #include <linux/init.h> | 23 | #include <linux/init.h> |
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index 7a5c99c200e8..500f15c10aaf 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c | |||
@@ -30,7 +30,6 @@ | |||
30 | */ | 30 | */ |
31 | 31 | ||
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | #include <linux/module.h> | 33 | #include <linux/module.h> |
35 | #include <linux/kmod.h> | 34 | #include <linux/kmod.h> |
36 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c index 6163cb03b8f4..5f111d407730 100644 --- a/drivers/media/dvb/ttpci/budget-av.c +++ b/drivers/media/dvb/ttpci/budget-av.c | |||
@@ -1141,6 +1141,15 @@ static void frontend_init(struct budget_av *budget_av) | |||
1141 | break; | 1141 | break; |
1142 | 1142 | ||
1143 | case SUBID_DVBC_KNC1: | 1143 | case SUBID_DVBC_KNC1: |
1144 | budget_av->reinitialise_demod = 1; | ||
1145 | fe = tda10021_attach(&philips_cu1216_config, | ||
1146 | &budget_av->budget.i2c_adap, | ||
1147 | read_pwm(budget_av)); | ||
1148 | if (fe) { | ||
1149 | fe->ops.tuner_ops.set_params = philips_cu1216_tuner_set_params; | ||
1150 | } | ||
1151 | break; | ||
1152 | |||
1144 | case SUBID_DVBC_KNC1_PLUS: | 1153 | case SUBID_DVBC_KNC1_PLUS: |
1145 | case SUBID_DVBC_CINERGY1200: | 1154 | case SUBID_DVBC_CINERGY1200: |
1146 | budget_av->reinitialise_demod = 1; | 1155 | budget_av->reinitialise_demod = 1; |
@@ -1293,11 +1302,7 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio | |||
1293 | 1302 | ||
1294 | budget_av->budget.dvb_adapter.priv = budget_av; | 1303 | budget_av->budget.dvb_adapter.priv = budget_av; |
1295 | frontend_init(budget_av); | 1304 | frontend_init(budget_av); |
1296 | 1305 | ciintf_init(budget_av); | |
1297 | if (!budget_av->has_saa7113) { | ||
1298 | ciintf_init(budget_av); | ||
1299 | } | ||
1300 | |||
1301 | return 0; | 1306 | return 0; |
1302 | } | 1307 | } |
1303 | 1308 | ||
diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c index 336b2fe1a5f2..04cef3023457 100644 --- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | |||
@@ -43,7 +43,7 @@ | |||
43 | is a bit braindead (no matching channel masks or no matching filter mask), | 43 | is a bit braindead (no matching channel masks or no matching filter mask), |
44 | we won't support this - yet. it doesn't event support negative filters, | 44 | we won't support this - yet. it doesn't event support negative filters, |
45 | so the best way is maybe to keep TTUSB_HWSECTIONS undef'd and just | 45 | so the best way is maybe to keep TTUSB_HWSECTIONS undef'd and just |
46 | parse TS data. USB bandwith will be a problem when having large | 46 | parse TS data. USB bandwidth will be a problem when having large |
47 | datastreams, especially for dvb-net, but hey, that's not my problem. | 47 | datastreams, especially for dvb-net, but hey, that's not my problem. |
48 | 48 | ||
49 | TTUSB_DISEQC, TTUSB_TONE: | 49 | TTUSB_DISEQC, TTUSB_TONE: |
diff --git a/drivers/media/radio/radio-gemtek-pci.c b/drivers/media/radio/radio-gemtek-pci.c index 9f249e7e60c9..4c82956390c1 100644 --- a/drivers/media/radio/radio-gemtek-pci.c +++ b/drivers/media/radio/radio-gemtek-pci.c | |||
@@ -37,7 +37,6 @@ | |||
37 | *************************************************************************** | 37 | *************************************************************************** |
38 | */ | 38 | */ |
39 | 39 | ||
40 | #include <linux/config.h> | ||
41 | #include <linux/types.h> | 40 | #include <linux/types.h> |
42 | #include <linux/list.h> | 41 | #include <linux/list.h> |
43 | #include <linux/module.h> | 42 | #include <linux/module.h> |
diff --git a/drivers/media/video/arv.c b/drivers/media/video/arv.c index ae14f5f32039..5c5e682a3004 100644 --- a/drivers/media/video/arv.c +++ b/drivers/media/video/arv.c | |||
@@ -18,7 +18,6 @@ | |||
18 | * 2003-09-01: Support w3cam by Takeo Takahashi | 18 | * 2003-09-01: Support w3cam by Takeo Takahashi |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/init.h> | 21 | #include <linux/init.h> |
23 | #include <linux/module.h> | 22 | #include <linux/module.h> |
24 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c index e68a6d2fff24..de14818d5cc4 100644 --- a/drivers/media/video/bt8xx/bttv-cards.c +++ b/drivers/media/video/bt8xx/bttv-cards.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | #include <linux/moduleparam.h> | 30 | #include <linux/moduleparam.h> |
@@ -3548,11 +3547,6 @@ void __devinit bttv_init_card2(struct bttv *btv) | |||
3548 | /* Hybrid DVB card, DOES have a tda9887 */ | 3547 | /* Hybrid DVB card, DOES have a tda9887 */ |
3549 | if (btv->c.type == BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE) | 3548 | if (btv->c.type == BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE) |
3550 | tda9887 = 1; | 3549 | tda9887 = 1; |
3551 | if((btv->tuner_type == TUNER_PHILIPS_FM1216ME_MK3) || | ||
3552 | (btv->tuner_type == TUNER_PHILIPS_FM1236_MK3) || | ||
3553 | (btv->tuner_type == TUNER_PHILIPS_FM1256_IH3) || | ||
3554 | tda9887) | ||
3555 | request_module("tda9887"); | ||
3556 | if (btv->tuner_type != UNSET) | 3550 | if (btv->tuner_type != UNSET) |
3557 | request_module("tuner"); | 3551 | request_module("tuner"); |
3558 | } | 3552 | } |
diff --git a/drivers/media/video/bt8xx/bttvp.h b/drivers/media/video/bt8xx/bttvp.h index d2956010f763..311c4c541e01 100644 --- a/drivers/media/video/bt8xx/bttvp.h +++ b/drivers/media/video/bt8xx/bttvp.h | |||
@@ -360,7 +360,7 @@ struct bttv { | |||
360 | int mbox_csel; | 360 | int mbox_csel; |
361 | 361 | ||
362 | /* risc memory management data | 362 | /* risc memory management data |
363 | - must aquire s_lock before changing these | 363 | - must acquire s_lock before changing these |
364 | - only the irq handler is supported to touch top + bottom + vcurr */ | 364 | - only the irq handler is supported to touch top + bottom + vcurr */ |
365 | struct btcx_riscmem main; | 365 | struct btcx_riscmem main; |
366 | struct bttv_buffer *screen; /* overlay */ | 366 | struct bttv_buffer *screen; /* overlay */ |
diff --git a/drivers/media/video/compat_ioctl32.c b/drivers/media/video/compat_ioctl32.c index 840fe0177121..353d02b67c33 100644 --- a/drivers/media/video/compat_ioctl32.c +++ b/drivers/media/video/compat_ioctl32.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * ioctls. | 12 | * ioctls. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/compat.h> | 15 | #include <linux/compat.h> |
17 | #include <linux/videodev.h> | 16 | #include <linux/videodev.h> |
18 | #include <linux/videodev2.h> | 17 | #include <linux/videodev2.h> |
diff --git a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c index 95c5aceecc5b..3b31a0dd2f0c 100644 --- a/drivers/media/video/cpia.c +++ b/drivers/media/video/cpia.c | |||
@@ -26,7 +26,6 @@ | |||
26 | /* define _CPIA_DEBUG_ for verbose debug output (see cpia.h) */ | 26 | /* define _CPIA_DEBUG_ for verbose debug output (see cpia.h) */ |
27 | /* #define _CPIA_DEBUG_ 1 */ | 27 | /* #define _CPIA_DEBUG_ 1 */ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | 29 | ||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/moduleparam.h> | 31 | #include <linux/moduleparam.h> |
diff --git a/drivers/media/video/cpia2/cpia2_v4l.c b/drivers/media/video/cpia2/cpia2_v4l.c index d129db57fcd4..d09f49950f2a 100644 --- a/drivers/media/video/cpia2/cpia2_v4l.c +++ b/drivers/media/video/cpia2/cpia2_v4l.c | |||
@@ -31,7 +31,6 @@ | |||
31 | 31 | ||
32 | #include <linux/version.h> | 32 | #include <linux/version.h> |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | 34 | ||
36 | #include <linux/module.h> | 35 | #include <linux/module.h> |
37 | #include <linux/time.h> | 36 | #include <linux/time.h> |
diff --git a/drivers/media/video/cpia_pp.c b/drivers/media/video/cpia_pp.c index 4c89bd395d3e..41f4b8d17559 100644 --- a/drivers/media/video/cpia_pp.c +++ b/drivers/media/video/cpia_pp.c | |||
@@ -25,7 +25,6 @@ | |||
25 | /* define _CPIA_DEBUG_ for verbose debug output (see cpia.h) */ | 25 | /* define _CPIA_DEBUG_ for verbose debug output (see cpia.h) */ |
26 | /* #define _CPIA_DEBUG_ 1 */ | 26 | /* #define _CPIA_DEBUG_ 1 */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | 28 | ||
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | #include <linux/init.h> | 30 | #include <linux/init.h> |
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index 4ff81582ec56..349632b48e93 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c | |||
@@ -686,6 +686,39 @@ static struct videobuf_queue_ops blackbird_qops = { | |||
686 | 686 | ||
687 | /* ------------------------------------------------------------------ */ | 687 | /* ------------------------------------------------------------------ */ |
688 | 688 | ||
689 | static const u32 *ctrl_classes[] = { | ||
690 | cx88_user_ctrls, | ||
691 | cx2341x_mpeg_ctrls, | ||
692 | NULL | ||
693 | }; | ||
694 | |||
695 | static int blackbird_queryctrl(struct cx8802_dev *dev, struct v4l2_queryctrl *qctrl) | ||
696 | { | ||
697 | qctrl->id = v4l2_ctrl_next(ctrl_classes, qctrl->id); | ||
698 | if (qctrl->id == 0) | ||
699 | return -EINVAL; | ||
700 | |||
701 | /* Standard V4L2 controls */ | ||
702 | if (cx8800_ctrl_query(qctrl) == 0) | ||
703 | return 0; | ||
704 | |||
705 | /* MPEG V4L2 controls */ | ||
706 | if (cx2341x_ctrl_query(&dev->params, qctrl)) | ||
707 | qctrl->flags |= V4L2_CTRL_FLAG_DISABLED; | ||
708 | return 0; | ||
709 | } | ||
710 | |||
711 | static int blackbird_querymenu(struct cx8802_dev *dev, struct v4l2_querymenu *qmenu) | ||
712 | { | ||
713 | struct v4l2_queryctrl qctrl; | ||
714 | |||
715 | qctrl.id = qmenu->id; | ||
716 | blackbird_queryctrl(dev, &qctrl); | ||
717 | return v4l2_ctrl_query_menu(qmenu, &qctrl, cx2341x_ctrl_get_menu(qmenu->id)); | ||
718 | } | ||
719 | |||
720 | /* ------------------------------------------------------------------ */ | ||
721 | |||
689 | static int mpeg_do_ioctl(struct inode *inode, struct file *file, | 722 | static int mpeg_do_ioctl(struct inode *inode, struct file *file, |
690 | unsigned int cmd, void *arg) | 723 | unsigned int cmd, void *arg) |
691 | { | 724 | { |
@@ -866,6 +899,16 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file, | |||
866 | core->name); | 899 | core->name); |
867 | return 0; | 900 | return 0; |
868 | } | 901 | } |
902 | case VIDIOC_QUERYMENU: | ||
903 | return blackbird_querymenu(dev, arg); | ||
904 | case VIDIOC_QUERYCTRL: | ||
905 | { | ||
906 | struct v4l2_queryctrl *c = arg; | ||
907 | |||
908 | if (blackbird_queryctrl(dev, c) == 0) | ||
909 | return 0; | ||
910 | return cx88_do_ioctl(inode, file, 0, dev->core, cmd, arg, mpeg_do_ioctl); | ||
911 | } | ||
869 | 912 | ||
870 | default: | 913 | default: |
871 | return cx88_do_ioctl(inode, file, 0, dev->core, cmd, arg, mpeg_do_ioctl); | 914 | return cx88_do_ioctl(inode, file, 0, dev->core, cmd, arg, mpeg_do_ioctl); |
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index f9d68f20dc88..14bd4863d157 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -1194,6 +1194,21 @@ struct cx88_board cx88_boards[] = { | |||
1194 | }}, | 1194 | }}, |
1195 | .dvb = 1, | 1195 | .dvb = 1, |
1196 | }, | 1196 | }, |
1197 | [CX88_BOARD_GENIATECH_DVBS] = { | ||
1198 | .name = "Geniatech DVB-S", | ||
1199 | .tuner_type = TUNER_ABSENT, | ||
1200 | .radio_type = UNSET, | ||
1201 | .tuner_addr = ADDR_UNSET, | ||
1202 | .radio_addr = ADDR_UNSET, | ||
1203 | .input = {{ | ||
1204 | .type = CX88_VMUX_DVB, | ||
1205 | .vmux = 0, | ||
1206 | },{ | ||
1207 | .type = CX88_VMUX_COMPOSITE1, | ||
1208 | .vmux = 1, | ||
1209 | }}, | ||
1210 | .dvb = 1, | ||
1211 | }, | ||
1197 | }; | 1212 | }; |
1198 | const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards); | 1213 | const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards); |
1199 | 1214 | ||
@@ -1439,6 +1454,10 @@ struct cx88_subid cx88_subids[] = { | |||
1439 | .subvendor = 0x18ac, | 1454 | .subvendor = 0x18ac, |
1440 | .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */ | 1455 | .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */ |
1441 | .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q, | 1456 | .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q, |
1457 | },{ | ||
1458 | .subvendor = 0x14f1, | ||
1459 | .subdevice = 0x0084, | ||
1460 | .card = CX88_BOARD_GENIATECH_DVBS, | ||
1442 | }, | 1461 | }, |
1443 | }; | 1462 | }; |
1444 | const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids); | 1463 | const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids); |
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index dce1feddd55d..afde3789d702 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -496,6 +496,26 @@ static int kworld_dvbs_100_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t | |||
496 | return 0; | 496 | return 0; |
497 | } | 497 | } |
498 | 498 | ||
499 | static int geniatech_dvbs_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) | ||
500 | { | ||
501 | struct cx8802_dev *dev= fe->dvb->priv; | ||
502 | struct cx88_core *core = dev->core; | ||
503 | |||
504 | if (voltage == SEC_VOLTAGE_OFF) { | ||
505 | dprintk(1,"LNB Voltage OFF\n"); | ||
506 | cx_write(MO_GP0_IO, 0x0000efff); | ||
507 | } | ||
508 | |||
509 | if (core->prev_set_voltage) | ||
510 | return core->prev_set_voltage(fe, voltage); | ||
511 | return 0; | ||
512 | } | ||
513 | |||
514 | static struct cx24123_config geniatech_dvbs_config = { | ||
515 | .demod_address = 0x55, | ||
516 | .set_ts_params = cx24123_set_ts_param, | ||
517 | }; | ||
518 | |||
499 | static struct cx24123_config hauppauge_novas_config = { | 519 | static struct cx24123_config hauppauge_novas_config = { |
500 | .demod_address = 0x55, | 520 | .demod_address = 0x55, |
501 | .set_ts_params = cx24123_set_ts_param, | 521 | .set_ts_params = cx24123_set_ts_param, |
@@ -760,6 +780,14 @@ static int dvb_register(struct cx8802_dev *dev) | |||
760 | dev->dvb.frontend->ops.set_voltage = kworld_dvbs_100_set_voltage; | 780 | dev->dvb.frontend->ops.set_voltage = kworld_dvbs_100_set_voltage; |
761 | } | 781 | } |
762 | break; | 782 | break; |
783 | case CX88_BOARD_GENIATECH_DVBS: | ||
784 | dev->dvb.frontend = cx24123_attach(&geniatech_dvbs_config, | ||
785 | &dev->core->i2c_adap); | ||
786 | if (dev->dvb.frontend) { | ||
787 | dev->core->prev_set_voltage = dev->dvb.frontend->ops.set_voltage; | ||
788 | dev->dvb.frontend->ops.set_voltage = geniatech_dvbs_set_voltage; | ||
789 | } | ||
790 | break; | ||
763 | #endif | 791 | #endif |
764 | default: | 792 | default: |
765 | printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", | 793 | printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", |
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index 8d5cf474b68e..c538d99ec9f6 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -327,6 +327,51 @@ static struct cx88_ctrl cx8800_ctls[] = { | |||
327 | }; | 327 | }; |
328 | static const int CX8800_CTLS = ARRAY_SIZE(cx8800_ctls); | 328 | static const int CX8800_CTLS = ARRAY_SIZE(cx8800_ctls); |
329 | 329 | ||
330 | const u32 cx88_user_ctrls[] = { | ||
331 | V4L2_CID_USER_CLASS, | ||
332 | V4L2_CID_BRIGHTNESS, | ||
333 | V4L2_CID_CONTRAST, | ||
334 | V4L2_CID_SATURATION, | ||
335 | V4L2_CID_HUE, | ||
336 | V4L2_CID_AUDIO_VOLUME, | ||
337 | V4L2_CID_AUDIO_BALANCE, | ||
338 | V4L2_CID_AUDIO_MUTE, | ||
339 | 0 | ||
340 | }; | ||
341 | EXPORT_SYMBOL(cx88_user_ctrls); | ||
342 | |||
343 | static const u32 *ctrl_classes[] = { | ||
344 | cx88_user_ctrls, | ||
345 | NULL | ||
346 | }; | ||
347 | |||
348 | int cx8800_ctrl_query(struct v4l2_queryctrl *qctrl) | ||
349 | { | ||
350 | int i; | ||
351 | |||
352 | if (qctrl->id < V4L2_CID_BASE || | ||
353 | qctrl->id >= V4L2_CID_LASTP1) | ||
354 | return -EINVAL; | ||
355 | for (i = 0; i < CX8800_CTLS; i++) | ||
356 | if (cx8800_ctls[i].v.id == qctrl->id) | ||
357 | break; | ||
358 | if (i == CX8800_CTLS) { | ||
359 | *qctrl = no_ctl; | ||
360 | return 0; | ||
361 | } | ||
362 | *qctrl = cx8800_ctls[i].v; | ||
363 | return 0; | ||
364 | } | ||
365 | EXPORT_SYMBOL(cx8800_ctrl_query); | ||
366 | |||
367 | static int cx88_queryctrl(struct v4l2_queryctrl *qctrl) | ||
368 | { | ||
369 | qctrl->id = v4l2_ctrl_next(ctrl_classes, qctrl->id); | ||
370 | if (qctrl->id == 0) | ||
371 | return -EINVAL; | ||
372 | return cx8800_ctrl_query(qctrl); | ||
373 | } | ||
374 | |||
330 | /* ------------------------------------------------------------------- */ | 375 | /* ------------------------------------------------------------------- */ |
331 | /* resource management */ | 376 | /* resource management */ |
332 | 377 | ||
@@ -1362,20 +1407,8 @@ int cx88_do_ioctl(struct inode *inode, struct file *file, int radio, | |||
1362 | case VIDIOC_QUERYCTRL: | 1407 | case VIDIOC_QUERYCTRL: |
1363 | { | 1408 | { |
1364 | struct v4l2_queryctrl *c = arg; | 1409 | struct v4l2_queryctrl *c = arg; |
1365 | int i; | ||
1366 | 1410 | ||
1367 | if (c->id < V4L2_CID_BASE || | 1411 | return cx88_queryctrl(c); |
1368 | c->id >= V4L2_CID_LASTP1) | ||
1369 | return -EINVAL; | ||
1370 | for (i = 0; i < CX8800_CTLS; i++) | ||
1371 | if (cx8800_ctls[i].v.id == c->id) | ||
1372 | break; | ||
1373 | if (i == CX8800_CTLS) { | ||
1374 | *c = no_ctl; | ||
1375 | return 0; | ||
1376 | } | ||
1377 | *c = cx8800_ctls[i].v; | ||
1378 | return 0; | ||
1379 | } | 1412 | } |
1380 | case VIDIOC_G_CTRL: | 1413 | case VIDIOC_G_CTRL: |
1381 | return get_control(core,arg); | 1414 | return get_control(core,arg); |
@@ -1893,8 +1926,6 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, | |||
1893 | /* load and configure helper modules */ | 1926 | /* load and configure helper modules */ |
1894 | if (TUNER_ABSENT != core->tuner_type) | 1927 | if (TUNER_ABSENT != core->tuner_type) |
1895 | request_module("tuner"); | 1928 | request_module("tuner"); |
1896 | if (core->tda9887_conf) | ||
1897 | request_module("tda9887"); | ||
1898 | 1929 | ||
1899 | /* register v4l devices */ | 1930 | /* register v4l devices */ |
1900 | dev->video_dev = cx88_vdev_init(core,dev->pci, | 1931 | dev->video_dev = cx88_vdev_init(core,dev->pci, |
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index 9a9a0fc7a41a..e7810955dd4f 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h | |||
@@ -196,6 +196,7 @@ extern struct sram_channel cx88_sram_channels[]; | |||
196 | #define CX88_BOARD_PIXELVIEW_PLAYTV_P7000 49 | 196 | #define CX88_BOARD_PIXELVIEW_PLAYTV_P7000 49 |
197 | #define CX88_BOARD_NPGTECH_REALTV_TOP10FM 50 | 197 | #define CX88_BOARD_NPGTECH_REALTV_TOP10FM 50 |
198 | #define CX88_BOARD_WINFAST_DTV2000H 51 | 198 | #define CX88_BOARD_WINFAST_DTV2000H 51 |
199 | #define CX88_BOARD_GENIATECH_DVBS 52 | ||
199 | 200 | ||
200 | enum cx88_itype { | 201 | enum cx88_itype { |
201 | CX88_VMUX_COMPOSITE1 = 1, | 202 | CX88_VMUX_COMPOSITE1 = 1, |
@@ -590,6 +591,8 @@ int cx8802_resume_common(struct pci_dev *pci_dev); | |||
590 | extern int cx88_do_ioctl(struct inode *inode, struct file *file, int radio, | 591 | extern int cx88_do_ioctl(struct inode *inode, struct file *file, int radio, |
591 | struct cx88_core *core, unsigned int cmd, | 592 | struct cx88_core *core, unsigned int cmd, |
592 | void *arg, v4l2_kioctl driver_ioctl); | 593 | void *arg, v4l2_kioctl driver_ioctl); |
594 | extern const u32 cx88_user_ctrls[]; | ||
595 | extern int cx8800_ctrl_query(struct v4l2_queryctrl *qctrl); | ||
593 | 596 | ||
594 | /* | 597 | /* |
595 | * Local variables: | 598 | * Local variables: |
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 9286090817cd..2a461dde480c 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -1574,8 +1574,6 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev, | |||
1574 | request_module("tvp5150"); | 1574 | request_module("tvp5150"); |
1575 | if (dev->has_tuner) | 1575 | if (dev->has_tuner) |
1576 | request_module("tuner"); | 1576 | request_module("tuner"); |
1577 | if (dev->tda9887_conf) | ||
1578 | request_module("tda9887"); | ||
1579 | #endif | 1577 | #endif |
1580 | errCode = em28xx_config(dev); | 1578 | errCode = em28xx_config(dev); |
1581 | if (errCode) { | 1579 | if (errCode) { |
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c index f68ca7d9f531..ddd62214bee5 100644 --- a/drivers/media/video/meye.c +++ b/drivers/media/video/meye.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * along with this program; if not, write to the Free Software | 26 | * along with this program; if not, write to the Free Software |
27 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 27 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
28 | */ | 28 | */ |
29 | #include <linux/config.h> | ||
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
32 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
diff --git a/drivers/media/video/meye.h b/drivers/media/video/meye.h index 0d09a0e3803c..ea107cb5c845 100644 --- a/drivers/media/video/meye.h +++ b/drivers/media/video/meye.h | |||
@@ -36,7 +36,6 @@ | |||
36 | #define MEYE_DRIVER_VERSION __stringify(MEYE_DRIVER_MAJORVERSION) "." \ | 36 | #define MEYE_DRIVER_VERSION __stringify(MEYE_DRIVER_MAJORVERSION) "." \ |
37 | __stringify(MEYE_DRIVER_MINORVERSION) | 37 | __stringify(MEYE_DRIVER_MINORVERSION) |
38 | 38 | ||
39 | #include <linux/config.h> | ||
40 | #include <linux/types.h> | 39 | #include <linux/types.h> |
41 | #include <linux/pci.h> | 40 | #include <linux/pci.h> |
42 | #include <linux/kfifo.h> | 41 | #include <linux/kfifo.h> |
diff --git a/drivers/media/video/msp3400-driver.h b/drivers/media/video/msp3400-driver.h index 4e451049013d..545e4ac094f2 100644 --- a/drivers/media/video/msp3400-driver.h +++ b/drivers/media/video/msp3400-driver.h | |||
@@ -90,8 +90,8 @@ struct msp_state { | |||
90 | /* thread */ | 90 | /* thread */ |
91 | struct task_struct *kthread; | 91 | struct task_struct *kthread; |
92 | wait_queue_head_t wq; | 92 | wait_queue_head_t wq; |
93 | int restart:1; | 93 | unsigned int restart:1; |
94 | int watch_stereo:1; | 94 | unsigned int watch_stereo:1; |
95 | }; | 95 | }; |
96 | 96 | ||
97 | /* msp3400-driver.c */ | 97 | /* msp3400-driver.c */ |
diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c index a988df226aab..1b07a61c2ebb 100644 --- a/drivers/media/video/ov511.c +++ b/drivers/media/video/ov511.c | |||
@@ -35,7 +35,6 @@ | |||
35 | * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 35 | * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include <linux/config.h> | ||
39 | #include <linux/module.h> | 38 | #include <linux/module.h> |
40 | #include <linux/init.h> | 39 | #include <linux/init.h> |
41 | #include <linux/vmalloc.h> | 40 | #include <linux/vmalloc.h> |
diff --git a/drivers/media/video/pvrusb2/Makefile b/drivers/media/video/pvrusb2/Makefile index fed603ad0a67..02e414210dac 100644 --- a/drivers/media/video/pvrusb2/Makefile +++ b/drivers/media/video/pvrusb2/Makefile | |||
@@ -8,7 +8,7 @@ obj-pvrusb2-24xxx-$(CONFIG_VIDEO_PVRUSB2_24XXX) := \ | |||
8 | pvrusb2-objs := pvrusb2-i2c-core.o pvrusb2-i2c-cmd-v4l2.o \ | 8 | pvrusb2-objs := pvrusb2-i2c-core.o pvrusb2-i2c-cmd-v4l2.o \ |
9 | pvrusb2-audio.o pvrusb2-i2c-chips-v4l2.o \ | 9 | pvrusb2-audio.o pvrusb2-i2c-chips-v4l2.o \ |
10 | pvrusb2-encoder.o pvrusb2-video-v4l.o \ | 10 | pvrusb2-encoder.o pvrusb2-video-v4l.o \ |
11 | pvrusb2-eeprom.o pvrusb2-tuner.o pvrusb2-demod.o \ | 11 | pvrusb2-eeprom.o pvrusb2-tuner.o \ |
12 | pvrusb2-main.o pvrusb2-hdw.o pvrusb2-v4l2.o \ | 12 | pvrusb2-main.o pvrusb2-hdw.o pvrusb2-v4l2.o \ |
13 | pvrusb2-ctrl.o pvrusb2-std.o \ | 13 | pvrusb2-ctrl.o pvrusb2-std.o \ |
14 | pvrusb2-context.o pvrusb2-io.o pvrusb2-ioread.o \ | 14 | pvrusb2-context.o pvrusb2-io.o pvrusb2-ioread.o \ |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-audio.c b/drivers/media/video/pvrusb2/pvrusb2-audio.c index 313d2dcf9e4b..9846c464ec80 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-audio.c +++ b/drivers/media/video/pvrusb2/pvrusb2-audio.c | |||
@@ -145,8 +145,8 @@ static int get_audio_status(struct pvr2_msp3400_handler *ctxt) | |||
145 | 145 | ||
146 | static void pvr2_msp3400_detach(struct pvr2_msp3400_handler *ctxt) | 146 | static void pvr2_msp3400_detach(struct pvr2_msp3400_handler *ctxt) |
147 | { | 147 | { |
148 | ctxt->client->handler = 0; | 148 | ctxt->client->handler = NULL; |
149 | ctxt->hdw->audio_stat = 0; | 149 | ctxt->hdw->audio_stat = NULL; |
150 | kfree(ctxt); | 150 | kfree(ctxt); |
151 | } | 151 | } |
152 | 152 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.c b/drivers/media/video/pvrusb2/pvrusb2-context.c index 40dc59871a45..f129f316d20e 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-context.c +++ b/drivers/media/video/pvrusb2/pvrusb2-context.c | |||
@@ -77,7 +77,7 @@ struct pvr2_context *pvr2_context_create( | |||
77 | const struct usb_device_id *devid, | 77 | const struct usb_device_id *devid, |
78 | void (*setup_func)(struct pvr2_context *)) | 78 | void (*setup_func)(struct pvr2_context *)) |
79 | { | 79 | { |
80 | struct pvr2_context *mp = 0; | 80 | struct pvr2_context *mp = NULL; |
81 | mp = kmalloc(sizeof(*mp),GFP_KERNEL); | 81 | mp = kmalloc(sizeof(*mp),GFP_KERNEL); |
82 | if (!mp) goto done; | 82 | if (!mp) goto done; |
83 | memset(mp,0,sizeof(*mp)); | 83 | memset(mp,0,sizeof(*mp)); |
@@ -87,7 +87,7 @@ struct pvr2_context *pvr2_context_create( | |||
87 | mp->hdw = pvr2_hdw_create(intf,devid); | 87 | mp->hdw = pvr2_hdw_create(intf,devid); |
88 | if (!mp->hdw) { | 88 | if (!mp->hdw) { |
89 | pvr2_context_destroy(mp); | 89 | pvr2_context_destroy(mp); |
90 | mp = 0; | 90 | mp = NULL; |
91 | goto done; | 91 | goto done; |
92 | } | 92 | } |
93 | 93 | ||
@@ -145,7 +145,7 @@ void pvr2_channel_init(struct pvr2_channel *cp,struct pvr2_context *mp) | |||
145 | { | 145 | { |
146 | cp->hdw = mp->hdw; | 146 | cp->hdw = mp->hdw; |
147 | cp->mc_head = mp; | 147 | cp->mc_head = mp; |
148 | cp->mc_next = 0; | 148 | cp->mc_next = NULL; |
149 | cp->mc_prev = mp->mc_last; | 149 | cp->mc_prev = mp->mc_last; |
150 | if (mp->mc_last) { | 150 | if (mp->mc_last) { |
151 | mp->mc_last->mc_next = cp; | 151 | mp->mc_last->mc_next = cp; |
@@ -160,8 +160,8 @@ static void pvr2_channel_disclaim_stream(struct pvr2_channel *cp) | |||
160 | { | 160 | { |
161 | if (!cp->stream) return; | 161 | if (!cp->stream) return; |
162 | pvr2_stream_kill(cp->stream->stream); | 162 | pvr2_stream_kill(cp->stream->stream); |
163 | cp->stream->user = 0; | 163 | cp->stream->user = NULL; |
164 | cp->stream = 0; | 164 | cp->stream = NULL; |
165 | } | 165 | } |
166 | 166 | ||
167 | 167 | ||
@@ -179,7 +179,7 @@ void pvr2_channel_done(struct pvr2_channel *cp) | |||
179 | } else { | 179 | } else { |
180 | mp->mc_first = cp->mc_next; | 180 | mp->mc_first = cp->mc_next; |
181 | } | 181 | } |
182 | cp->hdw = 0; | 182 | cp->hdw = NULL; |
183 | } | 183 | } |
184 | 184 | ||
185 | 185 | ||
@@ -212,7 +212,7 @@ struct pvr2_ioread *pvr2_channel_create_mpeg_stream( | |||
212 | { | 212 | { |
213 | struct pvr2_ioread *cp; | 213 | struct pvr2_ioread *cp; |
214 | cp = pvr2_ioread_create(); | 214 | cp = pvr2_ioread_create(); |
215 | if (!cp) return 0; | 215 | if (!cp) return NULL; |
216 | pvr2_ioread_setup(cp,sp->stream); | 216 | pvr2_ioread_setup(cp,sp->stream); |
217 | pvr2_ioread_set_sync_key(cp,stream_sync_key,sizeof(stream_sync_key)); | 217 | pvr2_ioread_set_sync_key(cp,stream_sync_key,sizeof(stream_sync_key)); |
218 | return cp; | 218 | return cp; |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c index d5df9fbeba2f..fb6198f1df98 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c +++ b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c | |||
@@ -158,7 +158,7 @@ int pvr2_ctrl_get_mask(struct pvr2_ctrl *cptr) | |||
158 | /* Retrieve the control's name */ | 158 | /* Retrieve the control's name */ |
159 | const char *pvr2_ctrl_get_name(struct pvr2_ctrl *cptr) | 159 | const char *pvr2_ctrl_get_name(struct pvr2_ctrl *cptr) |
160 | { | 160 | { |
161 | if (!cptr) return 0; | 161 | if (!cptr) return NULL; |
162 | return cptr->info->name; | 162 | return cptr->info->name; |
163 | } | 163 | } |
164 | 164 | ||
@@ -166,7 +166,7 @@ const char *pvr2_ctrl_get_name(struct pvr2_ctrl *cptr) | |||
166 | /* Retrieve the control's desc */ | 166 | /* Retrieve the control's desc */ |
167 | const char *pvr2_ctrl_get_desc(struct pvr2_ctrl *cptr) | 167 | const char *pvr2_ctrl_get_desc(struct pvr2_ctrl *cptr) |
168 | { | 168 | { |
169 | if (!cptr) return 0; | 169 | if (!cptr) return NULL; |
170 | return cptr->info->desc; | 170 | return cptr->info->desc; |
171 | } | 171 | } |
172 | 172 | ||
@@ -488,7 +488,7 @@ int pvr2_ctrl_sym_to_value(struct pvr2_ctrl *cptr, | |||
488 | 488 | ||
489 | LOCK_TAKE(cptr->hdw->big_lock); do { | 489 | LOCK_TAKE(cptr->hdw->big_lock); do { |
490 | if (cptr->info->type == pvr2_ctl_int) { | 490 | if (cptr->info->type == pvr2_ctl_int) { |
491 | ret = parse_token(ptr,len,valptr,0,0); | 491 | ret = parse_token(ptr,len,valptr,NULL,0); |
492 | if ((ret >= 0) && | 492 | if ((ret >= 0) && |
493 | ((*valptr < cptr->info->def.type_int.min_value) || | 493 | ((*valptr < cptr->info->def.type_int.min_value) || |
494 | (*valptr > cptr->info->def.type_int.max_value))) { | 494 | (*valptr > cptr->info->def.type_int.max_value))) { |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c index 27eadaff75a0..c80c26be6e4d 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c +++ b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c | |||
@@ -139,8 +139,8 @@ static const struct pvr2_v4l_cx2584x_ops decoder_ops[] = { | |||
139 | 139 | ||
140 | static void decoder_detach(struct pvr2_v4l_cx2584x *ctxt) | 140 | static void decoder_detach(struct pvr2_v4l_cx2584x *ctxt) |
141 | { | 141 | { |
142 | ctxt->client->handler = 0; | 142 | ctxt->client->handler = NULL; |
143 | ctxt->hdw->decoder_ctrl = 0; | 143 | ctxt->hdw->decoder_ctrl = NULL; |
144 | kfree(ctxt); | 144 | kfree(ctxt); |
145 | } | 145 | } |
146 | 146 | ||
@@ -221,7 +221,7 @@ static unsigned int decoder_describe(struct pvr2_v4l_cx2584x *ctxt, | |||
221 | static void decoder_reset(struct pvr2_v4l_cx2584x *ctxt) | 221 | static void decoder_reset(struct pvr2_v4l_cx2584x *ctxt) |
222 | { | 222 | { |
223 | int ret; | 223 | int ret; |
224 | ret = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_RESET,0); | 224 | ret = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_RESET,NULL); |
225 | pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx25840 decoder_reset (ret=%d)",ret); | 225 | pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx25840 decoder_reset (ret=%d)",ret); |
226 | } | 226 | } |
227 | 227 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c b/drivers/media/video/pvrusb2/pvrusb2-debugifc.c index 586900e365ff..f985f00d885a 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c +++ b/drivers/media/video/pvrusb2/pvrusb2-debugifc.c | |||
@@ -82,7 +82,7 @@ static unsigned int debugifc_isolate_word(const char *buf,unsigned int count, | |||
82 | unsigned int wlen; | 82 | unsigned int wlen; |
83 | unsigned int scnt; | 83 | unsigned int scnt; |
84 | 84 | ||
85 | wptr = 0; | 85 | wptr = NULL; |
86 | wlen = 0; | 86 | wlen = 0; |
87 | scnt = debugifc_count_whitespace(buf,count); | 87 | scnt = debugifc_count_whitespace(buf,count); |
88 | consume_cnt += scnt; count -= scnt; buf += scnt; | 88 | consume_cnt += scnt; count -= scnt; buf += scnt; |
@@ -337,8 +337,8 @@ int pvr2_debugifc_print_status(struct pvr2_hdw *hdw, | |||
337 | } | 337 | } |
338 | 338 | ||
339 | 339 | ||
340 | int pvr2_debugifc_do1cmd(struct pvr2_hdw *hdw,const char *buf, | 340 | static int pvr2_debugifc_do1cmd(struct pvr2_hdw *hdw,const char *buf, |
341 | unsigned int count) | 341 | unsigned int count) |
342 | { | 342 | { |
343 | const char *wptr; | 343 | const char *wptr; |
344 | unsigned int wlen; | 344 | unsigned int wlen; |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-demod.c b/drivers/media/video/pvrusb2/pvrusb2-demod.c deleted file mode 100644 index 9686569a11f6..000000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-demod.c +++ /dev/null | |||
@@ -1,126 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * $Id$ | ||
4 | * | ||
5 | * Copyright (C) 2005 Mike Isely <isely@pobox.com> | ||
6 | * Copyright (C) 2004 Aurelien Alleaume <slts@free.fr> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #include "pvrusb2.h" | ||
24 | #include "pvrusb2-util.h" | ||
25 | #include "pvrusb2-demod.h" | ||
26 | #include "pvrusb2-hdw-internal.h" | ||
27 | #include "pvrusb2-debug.h" | ||
28 | #include <linux/videodev2.h> | ||
29 | #include <media/tuner.h> | ||
30 | #include <media/v4l2-common.h> | ||
31 | |||
32 | |||
33 | struct pvr2_demod_handler { | ||
34 | struct pvr2_hdw *hdw; | ||
35 | struct pvr2_i2c_client *client; | ||
36 | struct pvr2_i2c_handler i2c_handler; | ||
37 | int type_update_fl; | ||
38 | }; | ||
39 | |||
40 | |||
41 | static void set_config(struct pvr2_demod_handler *ctxt) | ||
42 | { | ||
43 | struct pvr2_hdw *hdw = ctxt->hdw; | ||
44 | int cfg = 0; | ||
45 | |||
46 | switch (hdw->tuner_type) { | ||
47 | case TUNER_PHILIPS_FM1216ME_MK3: | ||
48 | case TUNER_PHILIPS_FM1236_MK3: | ||
49 | cfg = TDA9887_PORT1_ACTIVE|TDA9887_PORT2_ACTIVE; | ||
50 | break; | ||
51 | default: | ||
52 | break; | ||
53 | } | ||
54 | pvr2_trace(PVR2_TRACE_CHIPS,"i2c demod set_config(0x%x)",cfg); | ||
55 | pvr2_i2c_client_cmd(ctxt->client,TDA9887_SET_CONFIG,&cfg); | ||
56 | ctxt->type_update_fl = 0; | ||
57 | } | ||
58 | |||
59 | |||
60 | static int demod_check(struct pvr2_demod_handler *ctxt) | ||
61 | { | ||
62 | struct pvr2_hdw *hdw = ctxt->hdw; | ||
63 | if (hdw->tuner_updated) ctxt->type_update_fl = !0; | ||
64 | return ctxt->type_update_fl != 0; | ||
65 | } | ||
66 | |||
67 | |||
68 | static void demod_update(struct pvr2_demod_handler *ctxt) | ||
69 | { | ||
70 | if (ctxt->type_update_fl) set_config(ctxt); | ||
71 | } | ||
72 | |||
73 | |||
74 | static void demod_detach(struct pvr2_demod_handler *ctxt) | ||
75 | { | ||
76 | ctxt->client->handler = 0; | ||
77 | kfree(ctxt); | ||
78 | } | ||
79 | |||
80 | |||
81 | static unsigned int demod_describe(struct pvr2_demod_handler *ctxt,char *buf,unsigned int cnt) | ||
82 | { | ||
83 | return scnprintf(buf,cnt,"handler: pvrusb2-demod"); | ||
84 | } | ||
85 | |||
86 | |||
87 | const static struct pvr2_i2c_handler_functions tuner_funcs = { | ||
88 | .detach = (void (*)(void *))demod_detach, | ||
89 | .check = (int (*)(void *))demod_check, | ||
90 | .update = (void (*)(void *))demod_update, | ||
91 | .describe = (unsigned int (*)(void *,char *,unsigned int))demod_describe, | ||
92 | }; | ||
93 | |||
94 | |||
95 | int pvr2_i2c_demod_setup(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp) | ||
96 | { | ||
97 | struct pvr2_demod_handler *ctxt; | ||
98 | if (cp->handler) return 0; | ||
99 | |||
100 | ctxt = kmalloc(sizeof(*ctxt),GFP_KERNEL); | ||
101 | if (!ctxt) return 0; | ||
102 | memset(ctxt,0,sizeof(*ctxt)); | ||
103 | |||
104 | ctxt->i2c_handler.func_data = ctxt; | ||
105 | ctxt->i2c_handler.func_table = &tuner_funcs; | ||
106 | ctxt->type_update_fl = !0; | ||
107 | ctxt->client = cp; | ||
108 | ctxt->hdw = hdw; | ||
109 | cp->handler = &ctxt->i2c_handler; | ||
110 | pvr2_trace(PVR2_TRACE_CHIPS,"i2c 0x%x tda9887 V4L2 handler set up", | ||
111 | cp->client->addr); | ||
112 | return !0; | ||
113 | } | ||
114 | |||
115 | |||
116 | |||
117 | |||
118 | /* | ||
119 | Stuff for Emacs to see, in order to encourage consistent editing style: | ||
120 | *** Local Variables: *** | ||
121 | *** mode: c *** | ||
122 | *** fill-column: 70 *** | ||
123 | *** tab-width: 8 *** | ||
124 | *** c-basic-offset: 8 *** | ||
125 | *** End: *** | ||
126 | */ | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-demod.h b/drivers/media/video/pvrusb2/pvrusb2-demod.h deleted file mode 100644 index 4c4e40ffbf03..000000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-demod.h +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * $Id$ | ||
4 | * | ||
5 | * Copyright (C) 2005 Mike Isely <isely@pobox.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | */ | ||
21 | #ifndef __PVRUSB2_DEMOD_H | ||
22 | #define __PVRUSB2_DEMOD_H | ||
23 | |||
24 | #include "pvrusb2-i2c-core.h" | ||
25 | |||
26 | int pvr2_i2c_demod_setup(struct pvr2_hdw *,struct pvr2_i2c_client *); | ||
27 | |||
28 | #endif /* __PVRUSB2_DEMOD_H */ | ||
29 | |||
30 | /* | ||
31 | Stuff for Emacs to see, in order to encourage consistent editing style: | ||
32 | *** Local Variables: *** | ||
33 | *** mode: c *** | ||
34 | *** fill-column: 70 *** | ||
35 | *** tab-width: 8 *** | ||
36 | *** c-basic-offset: 8 *** | ||
37 | *** End: *** | ||
38 | */ | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c b/drivers/media/video/pvrusb2/pvrusb2-eeprom.c index 94d383ff9889..6cff8e75f426 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c +++ b/drivers/media/video/pvrusb2/pvrusb2-eeprom.c | |||
@@ -58,7 +58,7 @@ static u8 *pvr2_eeprom_fetch(struct pvr2_hdw *hdw) | |||
58 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, | 58 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, |
59 | "Failed to allocate memory" | 59 | "Failed to allocate memory" |
60 | " required to read eeprom"); | 60 | " required to read eeprom"); |
61 | return 0; | 61 | return NULL; |
62 | } | 62 | } |
63 | 63 | ||
64 | trace_eeprom("Value for eeprom addr from controller was 0x%x", | 64 | trace_eeprom("Value for eeprom addr from controller was 0x%x", |
@@ -108,7 +108,7 @@ static u8 *pvr2_eeprom_fetch(struct pvr2_hdw *hdw) | |||
108 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, | 108 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, |
109 | "eeprom fetch set offs err=%d",ret); | 109 | "eeprom fetch set offs err=%d",ret); |
110 | kfree(eeprom); | 110 | kfree(eeprom); |
111 | return 0; | 111 | return NULL; |
112 | } | 112 | } |
113 | } | 113 | } |
114 | return eeprom; | 114 | return eeprom; |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-encoder.c b/drivers/media/video/pvrusb2/pvrusb2-encoder.c index 2cc31695b435..18a7073501c6 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-encoder.c +++ b/drivers/media/video/pvrusb2/pvrusb2-encoder.c | |||
@@ -65,7 +65,7 @@ static int pvr2_encoder_write_words(struct pvr2_hdw *hdw, | |||
65 | } | 65 | } |
66 | ret = pvr2_send_request(hdw, | 66 | ret = pvr2_send_request(hdw, |
67 | hdw->cmd_buffer,1+(chunkCnt*7), | 67 | hdw->cmd_buffer,1+(chunkCnt*7), |
68 | 0,0); | 68 | NULL,0); |
69 | if (ret) return ret; | 69 | if (ret) return ret; |
70 | data += chunkCnt; | 70 | data += chunkCnt; |
71 | dlen -= chunkCnt; | 71 | dlen -= chunkCnt; |
@@ -322,7 +322,7 @@ int pvr2_encoder_configure(struct pvr2_hdw *hdw) | |||
322 | } | 322 | } |
323 | 323 | ||
324 | ret = cx2341x_update(hdw,pvr2_encoder_cmd, | 324 | ret = cx2341x_update(hdw,pvr2_encoder_cmd, |
325 | (hdw->enc_cur_valid ? &hdw->enc_cur_state : 0), | 325 | (hdw->enc_cur_valid ? &hdw->enc_cur_state : NULL), |
326 | &hdw->enc_ctl_state); | 326 | &hdw->enc_ctl_state); |
327 | if (ret) { | 327 | if (ret) { |
328 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, | 328 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h index ba2afbfe32c5..0d6dc33ca320 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h | |||
@@ -354,23 +354,6 @@ struct pvr2_hdw { | |||
354 | unsigned int control_cnt; | 354 | unsigned int control_cnt; |
355 | }; | 355 | }; |
356 | 356 | ||
357 | int pvr2_hdw_commit_ctl_internal(struct pvr2_hdw *hdw); | ||
358 | |||
359 | unsigned int pvr2_hdw_get_signal_status_internal(struct pvr2_hdw *); | ||
360 | |||
361 | void pvr2_hdw_subsys_bit_chg_no_lock(struct pvr2_hdw *hdw, | ||
362 | unsigned long msk,unsigned long val); | ||
363 | void pvr2_hdw_subsys_stream_bit_chg_no_lock(struct pvr2_hdw *hdw, | ||
364 | unsigned long msk, | ||
365 | unsigned long val); | ||
366 | |||
367 | void pvr2_hdw_internal_find_stdenum(struct pvr2_hdw *hdw); | ||
368 | void pvr2_hdw_internal_set_std_avail(struct pvr2_hdw *hdw); | ||
369 | |||
370 | int pvr2_i2c_basic_op(struct pvr2_hdw *,u8 i2c_addr, | ||
371 | u8 *wdata,u16 wlen, | ||
372 | u8 *rdata,u16 rlen); | ||
373 | |||
374 | #endif /* __PVRUSB2_HDW_INTERNAL_H */ | 357 | #endif /* __PVRUSB2_HDW_INTERNAL_H */ |
375 | 358 | ||
376 | /* | 359 | /* |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 643c471375da..9b48abcf6089 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -63,7 +63,6 @@ struct pvr2_string_table { | |||
63 | static const char *pvr2_client_24xxx[] = { | 63 | static const char *pvr2_client_24xxx[] = { |
64 | "cx25840", | 64 | "cx25840", |
65 | "tuner", | 65 | "tuner", |
66 | "tda9887", | ||
67 | "wm8775", | 66 | "wm8775", |
68 | }; | 67 | }; |
69 | #endif | 68 | #endif |
@@ -73,7 +72,6 @@ static const char *pvr2_client_29xxx[] = { | |||
73 | "msp3400", | 72 | "msp3400", |
74 | "saa7115", | 73 | "saa7115", |
75 | "tuner", | 74 | "tuner", |
76 | "tda9887", | ||
77 | }; | 75 | }; |
78 | 76 | ||
79 | static struct pvr2_string_table pvr2_client_lists[] = { | 77 | static struct pvr2_string_table pvr2_client_lists[] = { |
@@ -89,8 +87,8 @@ static struct pvr2_string_table pvr2_client_lists[] = { | |||
89 | #endif | 87 | #endif |
90 | }; | 88 | }; |
91 | 89 | ||
92 | static struct pvr2_hdw *unit_pointers[PVR_NUM] = {[ 0 ... PVR_NUM-1 ] = 0}; | 90 | static struct pvr2_hdw *unit_pointers[PVR_NUM] = {[ 0 ... PVR_NUM-1 ] = NULL}; |
93 | DECLARE_MUTEX(pvr2_unit_sem); | 91 | static DECLARE_MUTEX(pvr2_unit_sem); |
94 | 92 | ||
95 | static int ctlchg = 0; | 93 | static int ctlchg = 0; |
96 | static int initusbreset = 1; | 94 | static int initusbreset = 1; |
@@ -263,6 +261,25 @@ static const char *control_values_subsystem[] = { | |||
263 | [PVR2_SUBSYS_B_ENC_RUN] = "enc_run", | 261 | [PVR2_SUBSYS_B_ENC_RUN] = "enc_run", |
264 | }; | 262 | }; |
265 | 263 | ||
264 | static int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl); | ||
265 | static int pvr2_hdw_commit_ctl_internal(struct pvr2_hdw *hdw); | ||
266 | static int pvr2_hdw_get_eeprom_addr(struct pvr2_hdw *hdw); | ||
267 | static unsigned int pvr2_hdw_get_signal_status_internal(struct pvr2_hdw *hdw); | ||
268 | static void pvr2_hdw_internal_find_stdenum(struct pvr2_hdw *hdw); | ||
269 | static void pvr2_hdw_internal_set_std_avail(struct pvr2_hdw *hdw); | ||
270 | static void pvr2_hdw_render_useless_unlocked(struct pvr2_hdw *hdw); | ||
271 | static void pvr2_hdw_subsys_bit_chg_no_lock(struct pvr2_hdw *hdw, | ||
272 | unsigned long msk, | ||
273 | unsigned long val); | ||
274 | static void pvr2_hdw_subsys_stream_bit_chg_no_lock(struct pvr2_hdw *hdw, | ||
275 | unsigned long msk, | ||
276 | unsigned long val); | ||
277 | static int pvr2_send_request_ex(struct pvr2_hdw *hdw, | ||
278 | unsigned int timeout,int probe_fl, | ||
279 | void *write_data,unsigned int write_len, | ||
280 | void *read_data,unsigned int read_len); | ||
281 | static int pvr2_write_u16(struct pvr2_hdw *hdw, u16 data, int res); | ||
282 | static int pvr2_write_u8(struct pvr2_hdw *hdw, u8 data, int res); | ||
266 | 283 | ||
267 | static int ctrl_channelfreq_get(struct pvr2_ctrl *cptr,int *vp) | 284 | static int ctrl_channelfreq_get(struct pvr2_ctrl *cptr,int *vp) |
268 | { | 285 | { |
@@ -405,7 +422,7 @@ static unsigned int ctrl_cx2341x_getv4lflags(struct pvr2_ctrl *cptr) | |||
405 | info = (struct pvr2_ctl_info *)(cptr->info); | 422 | info = (struct pvr2_ctl_info *)(cptr->info); |
406 | if (qctrl.flags & V4L2_CTRL_FLAG_READ_ONLY) { | 423 | if (qctrl.flags & V4L2_CTRL_FLAG_READ_ONLY) { |
407 | if (info->set_value) { | 424 | if (info->set_value) { |
408 | info->set_value = 0; | 425 | info->set_value = NULL; |
409 | } | 426 | } |
410 | } else { | 427 | } else { |
411 | if (!(info->set_value)) { | 428 | if (!(info->set_value)) { |
@@ -836,14 +853,6 @@ unsigned long pvr2_hdw_get_sn(struct pvr2_hdw *hdw) | |||
836 | } | 853 | } |
837 | 854 | ||
838 | 855 | ||
839 | struct pvr2_hdw *pvr2_hdw_find(int unit_number) | ||
840 | { | ||
841 | if (unit_number < 0) return 0; | ||
842 | if (unit_number >= PVR_NUM) return 0; | ||
843 | return unit_pointers[unit_number]; | ||
844 | } | ||
845 | |||
846 | |||
847 | int pvr2_hdw_get_unit_number(struct pvr2_hdw *hdw) | 856 | int pvr2_hdw_get_unit_number(struct pvr2_hdw *hdw) |
848 | { | 857 | { |
849 | return hdw->unit_number; | 858 | return hdw->unit_number; |
@@ -917,9 +926,9 @@ static int pvr2_locate_firmware(struct pvr2_hdw *hdw, | |||
917 | * is not suitable for an usb transaction. | 926 | * is not suitable for an usb transaction. |
918 | * | 927 | * |
919 | */ | 928 | */ |
920 | int pvr2_upload_firmware1(struct pvr2_hdw *hdw) | 929 | static int pvr2_upload_firmware1(struct pvr2_hdw *hdw) |
921 | { | 930 | { |
922 | const struct firmware *fw_entry = 0; | 931 | const struct firmware *fw_entry = NULL; |
923 | void *fw_ptr; | 932 | void *fw_ptr; |
924 | unsigned int pipe; | 933 | unsigned int pipe; |
925 | int ret; | 934 | int ret; |
@@ -1015,7 +1024,7 @@ int pvr2_upload_firmware1(struct pvr2_hdw *hdw) | |||
1015 | 1024 | ||
1016 | int pvr2_upload_firmware2(struct pvr2_hdw *hdw) | 1025 | int pvr2_upload_firmware2(struct pvr2_hdw *hdw) |
1017 | { | 1026 | { |
1018 | const struct firmware *fw_entry = 0; | 1027 | const struct firmware *fw_entry = NULL; |
1019 | void *fw_ptr; | 1028 | void *fw_ptr; |
1020 | unsigned int pipe, fw_len, fw_done; | 1029 | unsigned int pipe, fw_len, fw_done; |
1021 | int actual_length; | 1030 | int actual_length; |
@@ -1166,8 +1175,9 @@ int pvr2_upload_firmware2(struct pvr2_hdw *hdw) | |||
1166 | reconfigure and start over. | 1175 | reconfigure and start over. |
1167 | 1176 | ||
1168 | */ | 1177 | */ |
1169 | void pvr2_hdw_subsys_bit_chg_no_lock(struct pvr2_hdw *hdw, | 1178 | static void pvr2_hdw_subsys_bit_chg_no_lock(struct pvr2_hdw *hdw, |
1170 | unsigned long msk,unsigned long val) | 1179 | unsigned long msk, |
1180 | unsigned long val) | ||
1171 | { | 1181 | { |
1172 | unsigned long nmsk; | 1182 | unsigned long nmsk; |
1173 | unsigned long vmsk; | 1183 | unsigned long vmsk; |
@@ -1318,18 +1328,6 @@ void pvr2_hdw_subsys_bit_chg(struct pvr2_hdw *hdw, | |||
1318 | } | 1328 | } |
1319 | 1329 | ||
1320 | 1330 | ||
1321 | void pvr2_hdw_subsys_bit_set(struct pvr2_hdw *hdw,unsigned long msk) | ||
1322 | { | ||
1323 | pvr2_hdw_subsys_bit_chg(hdw,msk,msk); | ||
1324 | } | ||
1325 | |||
1326 | |||
1327 | void pvr2_hdw_subsys_bit_clr(struct pvr2_hdw *hdw,unsigned long msk) | ||
1328 | { | ||
1329 | pvr2_hdw_subsys_bit_chg(hdw,msk,0); | ||
1330 | } | ||
1331 | |||
1332 | |||
1333 | unsigned long pvr2_hdw_subsys_get(struct pvr2_hdw *hdw) | 1331 | unsigned long pvr2_hdw_subsys_get(struct pvr2_hdw *hdw) |
1334 | { | 1332 | { |
1335 | return hdw->subsys_enabled_mask; | 1333 | return hdw->subsys_enabled_mask; |
@@ -1342,9 +1340,9 @@ unsigned long pvr2_hdw_subsys_stream_get(struct pvr2_hdw *hdw) | |||
1342 | } | 1340 | } |
1343 | 1341 | ||
1344 | 1342 | ||
1345 | void pvr2_hdw_subsys_stream_bit_chg_no_lock(struct pvr2_hdw *hdw, | 1343 | static void pvr2_hdw_subsys_stream_bit_chg_no_lock(struct pvr2_hdw *hdw, |
1346 | unsigned long msk, | 1344 | unsigned long msk, |
1347 | unsigned long val) | 1345 | unsigned long val) |
1348 | { | 1346 | { |
1349 | unsigned long val2; | 1347 | unsigned long val2; |
1350 | msk &= PVR2_SUBSYS_ALL; | 1348 | msk &= PVR2_SUBSYS_ALL; |
@@ -1366,7 +1364,7 @@ void pvr2_hdw_subsys_stream_bit_chg(struct pvr2_hdw *hdw, | |||
1366 | } | 1364 | } |
1367 | 1365 | ||
1368 | 1366 | ||
1369 | int pvr2_hdw_set_streaming_no_lock(struct pvr2_hdw *hdw,int enableFl) | 1367 | static int pvr2_hdw_set_streaming_no_lock(struct pvr2_hdw *hdw,int enableFl) |
1370 | { | 1368 | { |
1371 | if ((!enableFl) == !(hdw->flag_streaming_enabled)) return 0; | 1369 | if ((!enableFl) == !(hdw->flag_streaming_enabled)) return 0; |
1372 | if (enableFl) { | 1370 | if (enableFl) { |
@@ -1400,8 +1398,8 @@ int pvr2_hdw_set_streaming(struct pvr2_hdw *hdw,int enable_flag) | |||
1400 | } | 1398 | } |
1401 | 1399 | ||
1402 | 1400 | ||
1403 | int pvr2_hdw_set_stream_type_no_lock(struct pvr2_hdw *hdw, | 1401 | static int pvr2_hdw_set_stream_type_no_lock(struct pvr2_hdw *hdw, |
1404 | enum pvr2_config config) | 1402 | enum pvr2_config config) |
1405 | { | 1403 | { |
1406 | unsigned long sm = hdw->subsys_enabled_mask; | 1404 | unsigned long sm = hdw->subsys_enabled_mask; |
1407 | if (!hdw->flag_ok) return -EIO; | 1405 | if (!hdw->flag_ok) return -EIO; |
@@ -1741,7 +1739,7 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, | |||
1741 | sizeof(pvr2_device_names)/sizeof(pvr2_device_names[0])) { | 1739 | sizeof(pvr2_device_names)/sizeof(pvr2_device_names[0])) { |
1742 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, | 1740 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, |
1743 | "Bogus device type of %u reported",hdw_type); | 1741 | "Bogus device type of %u reported",hdw_type); |
1744 | return 0; | 1742 | return NULL; |
1745 | } | 1743 | } |
1746 | 1744 | ||
1747 | hdw = kmalloc(sizeof(*hdw),GFP_KERNEL); | 1745 | hdw = kmalloc(sizeof(*hdw),GFP_KERNEL); |
@@ -1922,38 +1920,38 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, | |||
1922 | if (hdw->mpeg_ctrl_info) kfree(hdw->mpeg_ctrl_info); | 1920 | if (hdw->mpeg_ctrl_info) kfree(hdw->mpeg_ctrl_info); |
1923 | kfree(hdw); | 1921 | kfree(hdw); |
1924 | } | 1922 | } |
1925 | return 0; | 1923 | return NULL; |
1926 | } | 1924 | } |
1927 | 1925 | ||
1928 | 1926 | ||
1929 | /* Remove _all_ associations between this driver and the underlying USB | 1927 | /* Remove _all_ associations between this driver and the underlying USB |
1930 | layer. */ | 1928 | layer. */ |
1931 | void pvr2_hdw_remove_usb_stuff(struct pvr2_hdw *hdw) | 1929 | static void pvr2_hdw_remove_usb_stuff(struct pvr2_hdw *hdw) |
1932 | { | 1930 | { |
1933 | if (hdw->flag_disconnected) return; | 1931 | if (hdw->flag_disconnected) return; |
1934 | pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_remove_usb_stuff: hdw=%p",hdw); | 1932 | pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_remove_usb_stuff: hdw=%p",hdw); |
1935 | if (hdw->ctl_read_urb) { | 1933 | if (hdw->ctl_read_urb) { |
1936 | usb_kill_urb(hdw->ctl_read_urb); | 1934 | usb_kill_urb(hdw->ctl_read_urb); |
1937 | usb_free_urb(hdw->ctl_read_urb); | 1935 | usb_free_urb(hdw->ctl_read_urb); |
1938 | hdw->ctl_read_urb = 0; | 1936 | hdw->ctl_read_urb = NULL; |
1939 | } | 1937 | } |
1940 | if (hdw->ctl_write_urb) { | 1938 | if (hdw->ctl_write_urb) { |
1941 | usb_kill_urb(hdw->ctl_write_urb); | 1939 | usb_kill_urb(hdw->ctl_write_urb); |
1942 | usb_free_urb(hdw->ctl_write_urb); | 1940 | usb_free_urb(hdw->ctl_write_urb); |
1943 | hdw->ctl_write_urb = 0; | 1941 | hdw->ctl_write_urb = NULL; |
1944 | } | 1942 | } |
1945 | if (hdw->ctl_read_buffer) { | 1943 | if (hdw->ctl_read_buffer) { |
1946 | kfree(hdw->ctl_read_buffer); | 1944 | kfree(hdw->ctl_read_buffer); |
1947 | hdw->ctl_read_buffer = 0; | 1945 | hdw->ctl_read_buffer = NULL; |
1948 | } | 1946 | } |
1949 | if (hdw->ctl_write_buffer) { | 1947 | if (hdw->ctl_write_buffer) { |
1950 | kfree(hdw->ctl_write_buffer); | 1948 | kfree(hdw->ctl_write_buffer); |
1951 | hdw->ctl_write_buffer = 0; | 1949 | hdw->ctl_write_buffer = NULL; |
1952 | } | 1950 | } |
1953 | pvr2_hdw_render_useless_unlocked(hdw); | 1951 | pvr2_hdw_render_useless_unlocked(hdw); |
1954 | hdw->flag_disconnected = !0; | 1952 | hdw->flag_disconnected = !0; |
1955 | hdw->usb_dev = 0; | 1953 | hdw->usb_dev = NULL; |
1956 | hdw->usb_intf = 0; | 1954 | hdw->usb_intf = NULL; |
1957 | } | 1955 | } |
1958 | 1956 | ||
1959 | 1957 | ||
@@ -1963,11 +1961,11 @@ void pvr2_hdw_destroy(struct pvr2_hdw *hdw) | |||
1963 | pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_destroy: hdw=%p",hdw); | 1961 | pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_destroy: hdw=%p",hdw); |
1964 | if (hdw->fw_buffer) { | 1962 | if (hdw->fw_buffer) { |
1965 | kfree(hdw->fw_buffer); | 1963 | kfree(hdw->fw_buffer); |
1966 | hdw->fw_buffer = 0; | 1964 | hdw->fw_buffer = NULL; |
1967 | } | 1965 | } |
1968 | if (hdw->vid_stream) { | 1966 | if (hdw->vid_stream) { |
1969 | pvr2_stream_destroy(hdw->vid_stream); | 1967 | pvr2_stream_destroy(hdw->vid_stream); |
1970 | hdw->vid_stream = 0; | 1968 | hdw->vid_stream = NULL; |
1971 | } | 1969 | } |
1972 | if (hdw->audio_stat) { | 1970 | if (hdw->audio_stat) { |
1973 | hdw->audio_stat->detach(hdw->audio_stat->ctxt); | 1971 | hdw->audio_stat->detach(hdw->audio_stat->ctxt); |
@@ -1981,7 +1979,7 @@ void pvr2_hdw_destroy(struct pvr2_hdw *hdw) | |||
1981 | if ((hdw->unit_number >= 0) && | 1979 | if ((hdw->unit_number >= 0) && |
1982 | (hdw->unit_number < PVR_NUM) && | 1980 | (hdw->unit_number < PVR_NUM) && |
1983 | (unit_pointers[hdw->unit_number] == hdw)) { | 1981 | (unit_pointers[hdw->unit_number] == hdw)) { |
1984 | unit_pointers[hdw->unit_number] = 0; | 1982 | unit_pointers[hdw->unit_number] = NULL; |
1985 | } | 1983 | } |
1986 | } while (0); up(&pvr2_unit_sem); | 1984 | } while (0); up(&pvr2_unit_sem); |
1987 | if (hdw->controls) kfree(hdw->controls); | 1985 | if (hdw->controls) kfree(hdw->controls); |
@@ -2018,7 +2016,7 @@ void pvr2_hdw_disconnect(struct pvr2_hdw *hdw) | |||
2018 | 2016 | ||
2019 | // Attempt to autoselect an appropriate value for std_enum_cur given | 2017 | // Attempt to autoselect an appropriate value for std_enum_cur given |
2020 | // whatever is currently in std_mask_cur | 2018 | // whatever is currently in std_mask_cur |
2021 | void pvr2_hdw_internal_find_stdenum(struct pvr2_hdw *hdw) | 2019 | static void pvr2_hdw_internal_find_stdenum(struct pvr2_hdw *hdw) |
2022 | { | 2020 | { |
2023 | unsigned int idx; | 2021 | unsigned int idx; |
2024 | for (idx = 1; idx < hdw->std_enum_cnt; idx++) { | 2022 | for (idx = 1; idx < hdw->std_enum_cnt; idx++) { |
@@ -2033,7 +2031,7 @@ void pvr2_hdw_internal_find_stdenum(struct pvr2_hdw *hdw) | |||
2033 | 2031 | ||
2034 | // Calculate correct set of enumerated standards based on currently known | 2032 | // Calculate correct set of enumerated standards based on currently known |
2035 | // set of available standards bits. | 2033 | // set of available standards bits. |
2036 | void pvr2_hdw_internal_set_std_avail(struct pvr2_hdw *hdw) | 2034 | static void pvr2_hdw_internal_set_std_avail(struct pvr2_hdw *hdw) |
2037 | { | 2035 | { |
2038 | struct v4l2_standard *newstd; | 2036 | struct v4l2_standard *newstd; |
2039 | unsigned int std_cnt; | 2037 | unsigned int std_cnt; |
@@ -2043,12 +2041,12 @@ void pvr2_hdw_internal_set_std_avail(struct pvr2_hdw *hdw) | |||
2043 | 2041 | ||
2044 | if (hdw->std_defs) { | 2042 | if (hdw->std_defs) { |
2045 | kfree(hdw->std_defs); | 2043 | kfree(hdw->std_defs); |
2046 | hdw->std_defs = 0; | 2044 | hdw->std_defs = NULL; |
2047 | } | 2045 | } |
2048 | hdw->std_enum_cnt = 0; | 2046 | hdw->std_enum_cnt = 0; |
2049 | if (hdw->std_enum_names) { | 2047 | if (hdw->std_enum_names) { |
2050 | kfree(hdw->std_enum_names); | 2048 | kfree(hdw->std_enum_names); |
2051 | hdw->std_enum_names = 0; | 2049 | hdw->std_enum_names = NULL; |
2052 | } | 2050 | } |
2053 | 2051 | ||
2054 | if (!std_cnt) { | 2052 | if (!std_cnt) { |
@@ -2099,7 +2097,7 @@ unsigned int pvr2_hdw_get_ctrl_count(struct pvr2_hdw *hdw) | |||
2099 | struct pvr2_ctrl *pvr2_hdw_get_ctrl_by_index(struct pvr2_hdw *hdw, | 2097 | struct pvr2_ctrl *pvr2_hdw_get_ctrl_by_index(struct pvr2_hdw *hdw, |
2100 | unsigned int idx) | 2098 | unsigned int idx) |
2101 | { | 2099 | { |
2102 | if (idx >= hdw->control_cnt) return 0; | 2100 | if (idx >= hdw->control_cnt) return NULL; |
2103 | return hdw->controls + idx; | 2101 | return hdw->controls + idx; |
2104 | } | 2102 | } |
2105 | 2103 | ||
@@ -2118,7 +2116,7 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_by_id(struct pvr2_hdw *hdw, | |||
2118 | i = cptr->info->internal_id; | 2116 | i = cptr->info->internal_id; |
2119 | if (i && (i == ctl_id)) return cptr; | 2117 | if (i && (i == ctl_id)) return cptr; |
2120 | } | 2118 | } |
2121 | return 0; | 2119 | return NULL; |
2122 | } | 2120 | } |
2123 | 2121 | ||
2124 | 2122 | ||
@@ -2135,7 +2133,7 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_v4l(struct pvr2_hdw *hdw,unsigned int ctl_id | |||
2135 | i = cptr->info->v4l_id; | 2133 | i = cptr->info->v4l_id; |
2136 | if (i && (i == ctl_id)) return cptr; | 2134 | if (i && (i == ctl_id)) return cptr; |
2137 | } | 2135 | } |
2138 | return 0; | 2136 | return NULL; |
2139 | } | 2137 | } |
2140 | 2138 | ||
2141 | 2139 | ||
@@ -2149,7 +2147,7 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_nextv4l(struct pvr2_hdw *hdw, | |||
2149 | int i; | 2147 | int i; |
2150 | 2148 | ||
2151 | /* This could be made a lot more efficient, but for now... */ | 2149 | /* This could be made a lot more efficient, but for now... */ |
2152 | cp2 = 0; | 2150 | cp2 = NULL; |
2153 | for (idx = 0; idx < hdw->control_cnt; idx++) { | 2151 | for (idx = 0; idx < hdw->control_cnt; idx++) { |
2154 | cptr = hdw->controls + idx; | 2152 | cptr = hdw->controls + idx; |
2155 | i = cptr->info->v4l_id; | 2153 | i = cptr->info->v4l_id; |
@@ -2159,7 +2157,7 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_nextv4l(struct pvr2_hdw *hdw, | |||
2159 | cp2 = cptr; | 2157 | cp2 = cptr; |
2160 | } | 2158 | } |
2161 | return cp2; | 2159 | return cp2; |
2162 | return 0; | 2160 | return NULL; |
2163 | } | 2161 | } |
2164 | 2162 | ||
2165 | 2163 | ||
@@ -2182,7 +2180,7 @@ static const char *get_ctrl_typename(enum pvr2_ctl_type tp) | |||
2182 | state(s) back to their previous value before this function was called. | 2180 | state(s) back to their previous value before this function was called. |
2183 | Thus we can automatically reconfigure affected pieces of the driver as | 2181 | Thus we can automatically reconfigure affected pieces of the driver as |
2184 | controls are changed. */ | 2182 | controls are changed. */ |
2185 | int pvr2_hdw_commit_ctl_internal(struct pvr2_hdw *hdw) | 2183 | static int pvr2_hdw_commit_ctl_internal(struct pvr2_hdw *hdw) |
2186 | { | 2184 | { |
2187 | unsigned long saved_subsys_mask = hdw->subsys_enabled_mask; | 2185 | unsigned long saved_subsys_mask = hdw->subsys_enabled_mask; |
2188 | unsigned long stale_subsys_mask = 0; | 2186 | unsigned long stale_subsys_mask = 0; |
@@ -2321,14 +2319,6 @@ void pvr2_hdw_poll_trigger_unlocked(struct pvr2_hdw *hdw) | |||
2321 | } | 2319 | } |
2322 | 2320 | ||
2323 | 2321 | ||
2324 | void pvr2_hdw_poll_trigger(struct pvr2_hdw *hdw) | ||
2325 | { | ||
2326 | LOCK_TAKE(hdw->big_lock); do { | ||
2327 | pvr2_hdw_poll_trigger_unlocked(hdw); | ||
2328 | } while (0); LOCK_GIVE(hdw->big_lock); | ||
2329 | } | ||
2330 | |||
2331 | |||
2332 | /* Return name for this driver instance */ | 2322 | /* Return name for this driver instance */ |
2333 | const char *pvr2_hdw_get_driver_name(struct pvr2_hdw *hdw) | 2323 | const char *pvr2_hdw_get_driver_name(struct pvr2_hdw *hdw) |
2334 | { | 2324 | { |
@@ -2337,7 +2327,7 @@ const char *pvr2_hdw_get_driver_name(struct pvr2_hdw *hdw) | |||
2337 | 2327 | ||
2338 | 2328 | ||
2339 | /* Return bit mask indicating signal status */ | 2329 | /* Return bit mask indicating signal status */ |
2340 | unsigned int pvr2_hdw_get_signal_status_internal(struct pvr2_hdw *hdw) | 2330 | static unsigned int pvr2_hdw_get_signal_status_internal(struct pvr2_hdw *hdw) |
2341 | { | 2331 | { |
2342 | unsigned int msk = 0; | 2332 | unsigned int msk = 0; |
2343 | switch (hdw->input_val) { | 2333 | switch (hdw->input_val) { |
@@ -2424,7 +2414,7 @@ void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw, int enable_flag) | |||
2424 | pvr2_trace(PVR2_TRACE_FIRMWARE, | 2414 | pvr2_trace(PVR2_TRACE_FIRMWARE, |
2425 | "Cleaning up after CPU firmware fetch"); | 2415 | "Cleaning up after CPU firmware fetch"); |
2426 | kfree(hdw->fw_buffer); | 2416 | kfree(hdw->fw_buffer); |
2427 | hdw->fw_buffer = 0; | 2417 | hdw->fw_buffer = NULL; |
2428 | hdw->fw_size = 0; | 2418 | hdw->fw_size = 0; |
2429 | /* Now release the CPU. It will disconnect and | 2419 | /* Now release the CPU. It will disconnect and |
2430 | reconnect later. */ | 2420 | reconnect later. */ |
@@ -2519,22 +2509,6 @@ void pvr2_hdw_v4l_store_minor_number(struct pvr2_hdw *hdw,int v) | |||
2519 | } | 2509 | } |
2520 | 2510 | ||
2521 | 2511 | ||
2522 | void pvr2_reset_ctl_endpoints(struct pvr2_hdw *hdw) | ||
2523 | { | ||
2524 | if (!hdw->usb_dev) return; | ||
2525 | usb_settoggle(hdw->usb_dev, PVR2_CTL_WRITE_ENDPOINT & 0xf, | ||
2526 | !(PVR2_CTL_WRITE_ENDPOINT & USB_DIR_IN), 0); | ||
2527 | usb_settoggle(hdw->usb_dev, PVR2_CTL_READ_ENDPOINT & 0xf, | ||
2528 | !(PVR2_CTL_READ_ENDPOINT & USB_DIR_IN), 0); | ||
2529 | usb_clear_halt(hdw->usb_dev, | ||
2530 | usb_rcvbulkpipe(hdw->usb_dev, | ||
2531 | PVR2_CTL_READ_ENDPOINT & 0x7f)); | ||
2532 | usb_clear_halt(hdw->usb_dev, | ||
2533 | usb_sndbulkpipe(hdw->usb_dev, | ||
2534 | PVR2_CTL_WRITE_ENDPOINT & 0x7f)); | ||
2535 | } | ||
2536 | |||
2537 | |||
2538 | static void pvr2_ctl_write_complete(struct urb *urb, struct pt_regs *regs) | 2512 | static void pvr2_ctl_write_complete(struct urb *urb, struct pt_regs *regs) |
2539 | { | 2513 | { |
2540 | struct pvr2_hdw *hdw = urb->context; | 2514 | struct pvr2_hdw *hdw = urb->context; |
@@ -2568,10 +2542,10 @@ static void pvr2_ctl_timeout(unsigned long data) | |||
2568 | } | 2542 | } |
2569 | 2543 | ||
2570 | 2544 | ||
2571 | int pvr2_send_request_ex(struct pvr2_hdw *hdw, | 2545 | static int pvr2_send_request_ex(struct pvr2_hdw *hdw, |
2572 | unsigned int timeout,int probe_fl, | 2546 | unsigned int timeout,int probe_fl, |
2573 | void *write_data,unsigned int write_len, | 2547 | void *write_data,unsigned int write_len, |
2574 | void *read_data,unsigned int read_len) | 2548 | void *read_data,unsigned int read_len) |
2575 | { | 2549 | { |
2576 | unsigned int idx; | 2550 | unsigned int idx; |
2577 | int status = 0; | 2551 | int status = 0; |
@@ -2826,7 +2800,7 @@ int pvr2_write_register(struct pvr2_hdw *hdw, u16 reg, u32 data) | |||
2826 | } | 2800 | } |
2827 | 2801 | ||
2828 | 2802 | ||
2829 | int pvr2_read_register(struct pvr2_hdw *hdw, u16 reg, u32 *data) | 2803 | static int pvr2_read_register(struct pvr2_hdw *hdw, u16 reg, u32 *data) |
2830 | { | 2804 | { |
2831 | int ret = 0; | 2805 | int ret = 0; |
2832 | 2806 | ||
@@ -2850,7 +2824,7 @@ int pvr2_read_register(struct pvr2_hdw *hdw, u16 reg, u32 *data) | |||
2850 | } | 2824 | } |
2851 | 2825 | ||
2852 | 2826 | ||
2853 | int pvr2_write_u16(struct pvr2_hdw *hdw, u16 data, int res) | 2827 | static int pvr2_write_u16(struct pvr2_hdw *hdw, u16 data, int res) |
2854 | { | 2828 | { |
2855 | int ret; | 2829 | int ret; |
2856 | 2830 | ||
@@ -2867,7 +2841,7 @@ int pvr2_write_u16(struct pvr2_hdw *hdw, u16 data, int res) | |||
2867 | } | 2841 | } |
2868 | 2842 | ||
2869 | 2843 | ||
2870 | int pvr2_write_u8(struct pvr2_hdw *hdw, u8 data, int res) | 2844 | static int pvr2_write_u8(struct pvr2_hdw *hdw, u8 data, int res) |
2871 | { | 2845 | { |
2872 | int ret; | 2846 | int ret; |
2873 | 2847 | ||
@@ -2883,13 +2857,13 @@ int pvr2_write_u8(struct pvr2_hdw *hdw, u8 data, int res) | |||
2883 | } | 2857 | } |
2884 | 2858 | ||
2885 | 2859 | ||
2886 | void pvr2_hdw_render_useless_unlocked(struct pvr2_hdw *hdw) | 2860 | static void pvr2_hdw_render_useless_unlocked(struct pvr2_hdw *hdw) |
2887 | { | 2861 | { |
2888 | if (!hdw->flag_ok) return; | 2862 | if (!hdw->flag_ok) return; |
2889 | pvr2_trace(PVR2_TRACE_INIT,"render_useless"); | 2863 | pvr2_trace(PVR2_TRACE_INIT,"render_useless"); |
2890 | hdw->flag_ok = 0; | 2864 | hdw->flag_ok = 0; |
2891 | if (hdw->vid_stream) { | 2865 | if (hdw->vid_stream) { |
2892 | pvr2_stream_setup(hdw->vid_stream,0,0,0); | 2866 | pvr2_stream_setup(hdw->vid_stream,NULL,0,0); |
2893 | } | 2867 | } |
2894 | hdw->flag_streaming_enabled = 0; | 2868 | hdw->flag_streaming_enabled = 0; |
2895 | hdw->subsys_enabled_mask = 0; | 2869 | hdw->subsys_enabled_mask = 0; |
@@ -2908,7 +2882,7 @@ void pvr2_hdw_device_reset(struct pvr2_hdw *hdw) | |||
2908 | { | 2882 | { |
2909 | int ret; | 2883 | int ret; |
2910 | pvr2_trace(PVR2_TRACE_INIT,"Performing a device reset..."); | 2884 | pvr2_trace(PVR2_TRACE_INIT,"Performing a device reset..."); |
2911 | ret = usb_lock_device_for_reset(hdw->usb_dev,0); | 2885 | ret = usb_lock_device_for_reset(hdw->usb_dev,NULL); |
2912 | if (ret == 1) { | 2886 | if (ret == 1) { |
2913 | ret = usb_reset_device(hdw->usb_dev); | 2887 | ret = usb_reset_device(hdw->usb_dev); |
2914 | usb_unlock_device(hdw->usb_dev); | 2888 | usb_unlock_device(hdw->usb_dev); |
@@ -2957,7 +2931,7 @@ int pvr2_hdw_cmd_deep_reset(struct pvr2_hdw *hdw) | |||
2957 | pvr2_trace(PVR2_TRACE_INIT,"Requesting uproc hard reset"); | 2931 | pvr2_trace(PVR2_TRACE_INIT,"Requesting uproc hard reset"); |
2958 | hdw->flag_ok = !0; | 2932 | hdw->flag_ok = !0; |
2959 | hdw->cmd_buffer[0] = 0xdd; | 2933 | hdw->cmd_buffer[0] = 0xdd; |
2960 | status = pvr2_send_request(hdw,hdw->cmd_buffer,1,0,0); | 2934 | status = pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0); |
2961 | } while (0); LOCK_GIVE(hdw->ctl_lock); | 2935 | } while (0); LOCK_GIVE(hdw->ctl_lock); |
2962 | return status; | 2936 | return status; |
2963 | } | 2937 | } |
@@ -2969,7 +2943,7 @@ int pvr2_hdw_cmd_powerup(struct pvr2_hdw *hdw) | |||
2969 | LOCK_TAKE(hdw->ctl_lock); do { | 2943 | LOCK_TAKE(hdw->ctl_lock); do { |
2970 | pvr2_trace(PVR2_TRACE_INIT,"Requesting powerup"); | 2944 | pvr2_trace(PVR2_TRACE_INIT,"Requesting powerup"); |
2971 | hdw->cmd_buffer[0] = 0xde; | 2945 | hdw->cmd_buffer[0] = 0xde; |
2972 | status = pvr2_send_request(hdw,hdw->cmd_buffer,1,0,0); | 2946 | status = pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0); |
2973 | } while (0); LOCK_GIVE(hdw->ctl_lock); | 2947 | } while (0); LOCK_GIVE(hdw->ctl_lock); |
2974 | return status; | 2948 | return status; |
2975 | } | 2949 | } |
@@ -2996,12 +2970,12 @@ int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *hdw) | |||
2996 | } | 2970 | } |
2997 | 2971 | ||
2998 | 2972 | ||
2999 | int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl) | 2973 | static int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl) |
3000 | { | 2974 | { |
3001 | int status; | 2975 | int status; |
3002 | LOCK_TAKE(hdw->ctl_lock); do { | 2976 | LOCK_TAKE(hdw->ctl_lock); do { |
3003 | hdw->cmd_buffer[0] = (runFl ? 0x36 : 0x37); | 2977 | hdw->cmd_buffer[0] = (runFl ? 0x36 : 0x37); |
3004 | status = pvr2_send_request(hdw,hdw->cmd_buffer,1,0,0); | 2978 | status = pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0); |
3005 | } while (0); LOCK_GIVE(hdw->ctl_lock); | 2979 | } while (0); LOCK_GIVE(hdw->ctl_lock); |
3006 | if (!status) { | 2980 | if (!status) { |
3007 | hdw->subsys_enabled_mask = | 2981 | hdw->subsys_enabled_mask = |
@@ -3094,7 +3068,7 @@ int pvr2_hdw_gpio_chg_out(struct pvr2_hdw *hdw,u32 msk,u32 val) | |||
3094 | } | 3068 | } |
3095 | 3069 | ||
3096 | 3070 | ||
3097 | int pvr2_hdw_get_eeprom_addr(struct pvr2_hdw *hdw) | 3071 | static int pvr2_hdw_get_eeprom_addr(struct pvr2_hdw *hdw) |
3098 | { | 3072 | { |
3099 | int result; | 3073 | int result; |
3100 | LOCK_TAKE(hdw->ctl_lock); do { | 3074 | LOCK_TAKE(hdw->ctl_lock); do { |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.h b/drivers/media/video/pvrusb2/pvrusb2-hdw.h index 63f529154431..fd931b5da490 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.h +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.h | |||
@@ -91,7 +91,6 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, | |||
91 | void pvr2_hdw_poll(struct pvr2_hdw *); | 91 | void pvr2_hdw_poll(struct pvr2_hdw *); |
92 | 92 | ||
93 | /* Trigger a poll to take place later at a convenient time */ | 93 | /* Trigger a poll to take place later at a convenient time */ |
94 | void pvr2_hdw_poll_trigger(struct pvr2_hdw *); | ||
95 | void pvr2_hdw_poll_trigger_unlocked(struct pvr2_hdw *); | 94 | void pvr2_hdw_poll_trigger_unlocked(struct pvr2_hdw *); |
96 | 95 | ||
97 | /* Register a callback used to trigger a future poll */ | 96 | /* Register a callback used to trigger a future poll */ |
@@ -99,9 +98,6 @@ void pvr2_hdw_setup_poll_trigger(struct pvr2_hdw *, | |||
99 | void (*func)(void *), | 98 | void (*func)(void *), |
100 | void *data); | 99 | void *data); |
101 | 100 | ||
102 | /* Get pointer to structure given unit number */ | ||
103 | struct pvr2_hdw *pvr2_hdw_find(int unit_number); | ||
104 | |||
105 | /* Destroy hardware interaction structure */ | 101 | /* Destroy hardware interaction structure */ |
106 | void pvr2_hdw_destroy(struct pvr2_hdw *); | 102 | void pvr2_hdw_destroy(struct pvr2_hdw *); |
107 | 103 | ||
@@ -180,12 +176,6 @@ int pvr2_hdw_get_stdenum_value(struct pvr2_hdw *hdw,struct v4l2_standard *std, | |||
180 | void pvr2_hdw_subsys_bit_chg(struct pvr2_hdw *hdw, | 176 | void pvr2_hdw_subsys_bit_chg(struct pvr2_hdw *hdw, |
181 | unsigned long msk,unsigned long val); | 177 | unsigned long msk,unsigned long val); |
182 | 178 | ||
183 | /* Shortcut for pvr2_hdw_subsys_bit_chg(hdw,msk,msk) */ | ||
184 | void pvr2_hdw_subsys_bit_set(struct pvr2_hdw *hdw,unsigned long msk); | ||
185 | |||
186 | /* Shortcut for pvr2_hdw_subsys_bit_chg(hdw,msk,0) */ | ||
187 | void pvr2_hdw_subsys_bit_clr(struct pvr2_hdw *hdw,unsigned long msk); | ||
188 | |||
189 | /* Retrieve mask indicating which pieces of hardware are currently enabled | 179 | /* Retrieve mask indicating which pieces of hardware are currently enabled |
190 | / configured. */ | 180 | / configured. */ |
191 | unsigned long pvr2_hdw_subsys_get(struct pvr2_hdw *); | 181 | unsigned long pvr2_hdw_subsys_get(struct pvr2_hdw *); |
@@ -225,34 +215,18 @@ void pvr2_hdw_v4l_store_minor_number(struct pvr2_hdw *,int); | |||
225 | /* The following entry points are all lower level things you normally don't | 215 | /* The following entry points are all lower level things you normally don't |
226 | want to worry about. */ | 216 | want to worry about. */ |
227 | 217 | ||
228 | /* Attempt to recover from a USB foul-up (in practice I find that if you | ||
229 | have to do this, then it's already too late). */ | ||
230 | void pvr2_reset_ctl_endpoints(struct pvr2_hdw *hdw); | ||
231 | |||
232 | /* Issue a command and get a response from the device. LOTS of higher | 218 | /* Issue a command and get a response from the device. LOTS of higher |
233 | level stuff is built on this. */ | 219 | level stuff is built on this. */ |
234 | int pvr2_send_request(struct pvr2_hdw *, | 220 | int pvr2_send_request(struct pvr2_hdw *, |
235 | void *write_ptr,unsigned int write_len, | 221 | void *write_ptr,unsigned int write_len, |
236 | void *read_ptr,unsigned int read_len); | 222 | void *read_ptr,unsigned int read_len); |
237 | 223 | ||
238 | /* Issue a command and get a response from the device. This extended | ||
239 | version includes a probe flag (which if set means that device errors | ||
240 | should not be logged or treated as fatal) and a timeout in jiffies. | ||
241 | This can be used to non-lethally probe the health of endpoint 1. */ | ||
242 | int pvr2_send_request_ex(struct pvr2_hdw *,unsigned int timeout,int probe_fl, | ||
243 | void *write_ptr,unsigned int write_len, | ||
244 | void *read_ptr,unsigned int read_len); | ||
245 | |||
246 | /* Slightly higher level device communication functions. */ | 224 | /* Slightly higher level device communication functions. */ |
247 | int pvr2_write_register(struct pvr2_hdw *, u16, u32); | 225 | int pvr2_write_register(struct pvr2_hdw *, u16, u32); |
248 | int pvr2_read_register(struct pvr2_hdw *, u16, u32 *); | ||
249 | int pvr2_write_u16(struct pvr2_hdw *, u16, int); | ||
250 | int pvr2_write_u8(struct pvr2_hdw *, u8, int); | ||
251 | 226 | ||
252 | /* Call if for any reason we can't talk to the hardware anymore - this will | 227 | /* Call if for any reason we can't talk to the hardware anymore - this will |
253 | cause the driver to stop flailing on the device. */ | 228 | cause the driver to stop flailing on the device. */ |
254 | void pvr2_hdw_render_useless(struct pvr2_hdw *); | 229 | void pvr2_hdw_render_useless(struct pvr2_hdw *); |
255 | void pvr2_hdw_render_useless_unlocked(struct pvr2_hdw *); | ||
256 | 230 | ||
257 | /* Set / clear 8051's reset bit */ | 231 | /* Set / clear 8051's reset bit */ |
258 | void pvr2_hdw_cpureset_assert(struct pvr2_hdw *,int); | 232 | void pvr2_hdw_cpureset_assert(struct pvr2_hdw *,int); |
@@ -271,12 +245,6 @@ int pvr2_hdw_cmd_powerup(struct pvr2_hdw *); | |||
271 | /* Order decoder to reset */ | 245 | /* Order decoder to reset */ |
272 | int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *); | 246 | int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *); |
273 | 247 | ||
274 | /* Stop / start video stream transport */ | ||
275 | int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl); | ||
276 | |||
277 | /* Find I2C address of eeprom */ | ||
278 | int pvr2_hdw_get_eeprom_addr(struct pvr2_hdw *); | ||
279 | |||
280 | /* Direct manipulation of GPIO bits */ | 248 | /* Direct manipulation of GPIO bits */ |
281 | int pvr2_hdw_gpio_get_dir(struct pvr2_hdw *hdw,u32 *); | 249 | int pvr2_hdw_gpio_get_dir(struct pvr2_hdw *hdw,u32 *); |
282 | int pvr2_hdw_gpio_get_out(struct pvr2_hdw *hdw,u32 *); | 250 | int pvr2_hdw_gpio_get_out(struct pvr2_hdw *hdw,u32 *); |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c index 1dd4f6249b99..fbe6039aeb6a 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include "pvrusb2-i2c-cmd-v4l2.h" | 25 | #include "pvrusb2-i2c-cmd-v4l2.h" |
26 | #include "pvrusb2-audio.h" | 26 | #include "pvrusb2-audio.h" |
27 | #include "pvrusb2-tuner.h" | 27 | #include "pvrusb2-tuner.h" |
28 | #include "pvrusb2-demod.h" | ||
29 | #include "pvrusb2-video-v4l.h" | 28 | #include "pvrusb2-video-v4l.h" |
30 | #ifdef CONFIG_VIDEO_PVRUSB2_24XXX | 29 | #ifdef CONFIG_VIDEO_PVRUSB2_24XXX |
31 | #include "pvrusb2-cx2584x-v4l.h" | 30 | #include "pvrusb2-cx2584x-v4l.h" |
@@ -89,11 +88,6 @@ void pvr2_i2c_probe(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp) | |||
89 | return; | 88 | return; |
90 | } | 89 | } |
91 | } | 90 | } |
92 | if (id == I2C_DRIVERID_TDA9887) { | ||
93 | if (pvr2_i2c_demod_setup(hdw,cp)) { | ||
94 | return; | ||
95 | } | ||
96 | } | ||
97 | } | 91 | } |
98 | 92 | ||
99 | 93 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c index 9f81aff2b38a..8a9933dec912 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c | |||
@@ -196,7 +196,7 @@ const struct pvr2_i2c_op pvr2_i2c_op_v4l2_size = { | |||
196 | static void do_log(struct pvr2_hdw *hdw) | 196 | static void do_log(struct pvr2_hdw *hdw) |
197 | { | 197 | { |
198 | pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 do_log()"); | 198 | pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 do_log()"); |
199 | pvr2_i2c_core_cmd(hdw,VIDIOC_LOG_STATUS,0); | 199 | pvr2_i2c_core_cmd(hdw,VIDIOC_LOG_STATUS,NULL); |
200 | 200 | ||
201 | } | 201 | } |
202 | 202 | ||
@@ -217,7 +217,7 @@ const struct pvr2_i2c_op pvr2_i2c_op_v4l2_log = { | |||
217 | void pvr2_v4l2_cmd_stream(struct pvr2_i2c_client *cp,int fl) | 217 | void pvr2_v4l2_cmd_stream(struct pvr2_i2c_client *cp,int fl) |
218 | { | 218 | { |
219 | pvr2_i2c_client_cmd(cp, | 219 | pvr2_i2c_client_cmd(cp, |
220 | (fl ? VIDIOC_STREAMON : VIDIOC_STREAMOFF),0); | 220 | (fl ? VIDIOC_STREAMON : VIDIOC_STREAMOFF),NULL); |
221 | } | 221 | } |
222 | 222 | ||
223 | 223 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c index c8d0bdee3ff1..7fca47982277 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c +++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c | |||
@@ -37,6 +37,10 @@ static unsigned int i2c_scan = 0; | |||
37 | module_param(i2c_scan, int, S_IRUGO|S_IWUSR); | 37 | module_param(i2c_scan, int, S_IRUGO|S_IWUSR); |
38 | MODULE_PARM_DESC(i2c_scan,"scan i2c bus at insmod time"); | 38 | MODULE_PARM_DESC(i2c_scan,"scan i2c bus at insmod time"); |
39 | 39 | ||
40 | static unsigned int pvr2_i2c_client_describe(struct pvr2_i2c_client *cp, | ||
41 | unsigned int detail, | ||
42 | char *buf,unsigned int maxlen); | ||
43 | |||
40 | static int pvr2_i2c_write(struct pvr2_hdw *hdw, /* Context */ | 44 | static int pvr2_i2c_write(struct pvr2_hdw *hdw, /* Context */ |
41 | u8 i2c_addr, /* I2C address we're talking to */ | 45 | u8 i2c_addr, /* I2C address we're talking to */ |
42 | u8 *data, /* Data to write */ | 46 | u8 *data, /* Data to write */ |
@@ -165,12 +169,12 @@ static int pvr2_i2c_read(struct pvr2_hdw *hdw, /* Context */ | |||
165 | 169 | ||
166 | /* This is the common low level entry point for doing I2C operations to the | 170 | /* This is the common low level entry point for doing I2C operations to the |
167 | hardware. */ | 171 | hardware. */ |
168 | int pvr2_i2c_basic_op(struct pvr2_hdw *hdw, | 172 | static int pvr2_i2c_basic_op(struct pvr2_hdw *hdw, |
169 | u8 i2c_addr, | 173 | u8 i2c_addr, |
170 | u8 *wdata, | 174 | u8 *wdata, |
171 | u16 wlen, | 175 | u16 wlen, |
172 | u8 *rdata, | 176 | u8 *rdata, |
173 | u16 rlen) | 177 | u16 rlen) |
174 | { | 178 | { |
175 | if (!rdata) rlen = 0; | 179 | if (!rdata) rlen = 0; |
176 | if (!wdata) wlen = 0; | 180 | if (!wdata) wlen = 0; |
@@ -267,7 +271,7 @@ static int i2c_hack_cx25840(struct pvr2_hdw *hdw, | |||
267 | "WARNING: Disabling further access to the device" | 271 | "WARNING: Disabling further access to the device" |
268 | " to prevent other foul-ups."); | 272 | " to prevent other foul-ups."); |
269 | // This blocks all further communication with the part. | 273 | // This blocks all further communication with the part. |
270 | hdw->i2c_func[0x44] = 0; | 274 | hdw->i2c_func[0x44] = NULL; |
271 | pvr2_hdw_render_useless(hdw); | 275 | pvr2_hdw_render_useless(hdw); |
272 | goto fail; | 276 | goto fail; |
273 | } | 277 | } |
@@ -294,7 +298,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
294 | int num) | 298 | int num) |
295 | { | 299 | { |
296 | int ret = -ENOTSUPP; | 300 | int ret = -ENOTSUPP; |
297 | pvr2_i2c_func funcp = 0; | 301 | pvr2_i2c_func funcp = NULL; |
298 | struct pvr2_hdw *hdw = (struct pvr2_hdw *)(i2c_adap->algo_data); | 302 | struct pvr2_hdw *hdw = (struct pvr2_hdw *)(i2c_adap->algo_data); |
299 | 303 | ||
300 | if (!num) { | 304 | if (!num) { |
@@ -319,7 +323,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
319 | u16 tcnt,bcnt,offs; | 323 | u16 tcnt,bcnt,offs; |
320 | if (!msgs[0].len) { | 324 | if (!msgs[0].len) { |
321 | /* Length == 0 read. This is a probe. */ | 325 | /* Length == 0 read. This is a probe. */ |
322 | if (funcp(hdw,msgs[0].addr,0,0,0,0)) { | 326 | if (funcp(hdw,msgs[0].addr,NULL,0,NULL,0)) { |
323 | ret = -EIO; | 327 | ret = -EIO; |
324 | goto done; | 328 | goto done; |
325 | } | 329 | } |
@@ -336,7 +340,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
336 | if (bcnt > sizeof(hdw->cmd_buffer)-1) { | 340 | if (bcnt > sizeof(hdw->cmd_buffer)-1) { |
337 | bcnt = sizeof(hdw->cmd_buffer)-1; | 341 | bcnt = sizeof(hdw->cmd_buffer)-1; |
338 | } | 342 | } |
339 | if (funcp(hdw,msgs[0].addr,0,0, | 343 | if (funcp(hdw,msgs[0].addr,NULL,0, |
340 | msgs[0].buf+offs,bcnt)) { | 344 | msgs[0].buf+offs,bcnt)) { |
341 | ret = -EIO; | 345 | ret = -EIO; |
342 | goto done; | 346 | goto done; |
@@ -350,7 +354,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
350 | /* Simple write */ | 354 | /* Simple write */ |
351 | ret = 1; | 355 | ret = 1; |
352 | if (funcp(hdw,msgs[0].addr, | 356 | if (funcp(hdw,msgs[0].addr, |
353 | msgs[0].buf,msgs[0].len,0,0)) { | 357 | msgs[0].buf,msgs[0].len,NULL,0)) { |
354 | ret = -EIO; | 358 | ret = -EIO; |
355 | } | 359 | } |
356 | goto done; | 360 | goto done; |
@@ -705,9 +709,9 @@ int pvr2_i2c_core_check_stale(struct pvr2_hdw *hdw) | |||
705 | return (hdw->i2c_pend_types & PVR2_I2C_PEND_ALL) != 0; | 709 | return (hdw->i2c_pend_types & PVR2_I2C_PEND_ALL) != 0; |
706 | } | 710 | } |
707 | 711 | ||
708 | unsigned int pvr2_i2c_client_describe(struct pvr2_i2c_client *cp, | 712 | static unsigned int pvr2_i2c_client_describe(struct pvr2_i2c_client *cp, |
709 | unsigned int detail, | 713 | unsigned int detail, |
710 | char *buf,unsigned int maxlen) | 714 | char *buf,unsigned int maxlen) |
711 | { | 715 | { |
712 | unsigned int ccnt,bcnt; | 716 | unsigned int ccnt,bcnt; |
713 | int spcfl = 0; | 717 | int spcfl = 0; |
@@ -871,7 +875,7 @@ static void do_i2c_scan(struct pvr2_hdw *hdw) | |||
871 | msg[0].addr = 0; | 875 | msg[0].addr = 0; |
872 | msg[0].flags = I2C_M_RD; | 876 | msg[0].flags = I2C_M_RD; |
873 | msg[0].len = 0; | 877 | msg[0].len = 0; |
874 | msg[0].buf = 0; | 878 | msg[0].buf = NULL; |
875 | printk("%s: i2c scan beginning\n",hdw->name); | 879 | printk("%s: i2c scan beginning\n",hdw->name); |
876 | for (i = 0; i < 128; i++) { | 880 | for (i = 0; i < 128; i++) { |
877 | msg[0].addr = i; | 881 | msg[0].addr = i; |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h index e8af5b0ed3ce..6d7e25247576 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h +++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h | |||
@@ -75,9 +75,6 @@ unsigned int pvr2_i2c_report(struct pvr2_hdw *,char *buf,unsigned int maxlen); | |||
75 | PVR2_I2C_DETAIL_DEBUG |\ | 75 | PVR2_I2C_DETAIL_DEBUG |\ |
76 | PVR2_I2C_DETAIL_HANDLER |\ | 76 | PVR2_I2C_DETAIL_HANDLER |\ |
77 | PVR2_I2C_DETAIL_CTLMASK) | 77 | PVR2_I2C_DETAIL_CTLMASK) |
78 | unsigned int pvr2_i2c_client_describe(struct pvr2_i2c_client *, | ||
79 | unsigned int detail_mask, | ||
80 | char *buf,unsigned int maxlen); | ||
81 | 78 | ||
82 | void pvr2_i2c_probe(struct pvr2_hdw *,struct pvr2_i2c_client *); | 79 | void pvr2_i2c_probe(struct pvr2_hdw *,struct pvr2_i2c_client *); |
83 | const struct pvr2_i2c_op *pvr2_i2c_get_op(unsigned int idx); | 80 | const struct pvr2_i2c_op *pvr2_i2c_get_op(unsigned int idx); |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-io.c b/drivers/media/video/pvrusb2/pvrusb2-io.c index a984c91f571c..681f79c8064e 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-io.c +++ b/drivers/media/video/pvrusb2/pvrusb2-io.c | |||
@@ -93,7 +93,7 @@ struct pvr2_buffer { | |||
93 | struct urb *purb; | 93 | struct urb *purb; |
94 | }; | 94 | }; |
95 | 95 | ||
96 | const char *pvr2_buffer_state_decode(enum pvr2_buffer_state st) | 96 | static const char *pvr2_buffer_state_decode(enum pvr2_buffer_state st) |
97 | { | 97 | { |
98 | switch (st) { | 98 | switch (st) { |
99 | case pvr2_buffer_state_none: return "none"; | 99 | case pvr2_buffer_state_none: return "none"; |
@@ -104,7 +104,8 @@ const char *pvr2_buffer_state_decode(enum pvr2_buffer_state st) | |||
104 | return "unknown"; | 104 | return "unknown"; |
105 | } | 105 | } |
106 | 106 | ||
107 | void pvr2_buffer_describe(struct pvr2_buffer *bp,const char *msg) | 107 | #ifdef SANITY_CHECK_BUFFERS |
108 | static void pvr2_buffer_describe(struct pvr2_buffer *bp,const char *msg) | ||
108 | { | 109 | { |
109 | pvr2_trace(PVR2_TRACE_INFO, | 110 | pvr2_trace(PVR2_TRACE_INFO, |
110 | "buffer%s%s %p state=%s id=%d status=%d" | 111 | "buffer%s%s %p state=%s id=%d status=%d" |
@@ -115,10 +116,11 @@ void pvr2_buffer_describe(struct pvr2_buffer *bp,const char *msg) | |||
115 | (bp ? pvr2_buffer_state_decode(bp->state) : "(invalid)"), | 116 | (bp ? pvr2_buffer_state_decode(bp->state) : "(invalid)"), |
116 | (bp ? bp->id : 0), | 117 | (bp ? bp->id : 0), |
117 | (bp ? bp->status : 0), | 118 | (bp ? bp->status : 0), |
118 | (bp ? bp->stream : 0), | 119 | (bp ? bp->stream : NULL), |
119 | (bp ? bp->purb : 0), | 120 | (bp ? bp->purb : NULL), |
120 | (bp ? bp->signature : 0)); | 121 | (bp ? bp->signature : 0)); |
121 | } | 122 | } |
123 | #endif /* SANITY_CHECK_BUFFERS */ | ||
122 | 124 | ||
123 | static void pvr2_buffer_remove(struct pvr2_buffer *bp) | 125 | static void pvr2_buffer_remove(struct pvr2_buffer *bp) |
124 | { | 126 | { |
@@ -284,7 +286,7 @@ static void pvr2_buffer_done(struct pvr2_buffer *bp) | |||
284 | pvr2_buffer_wipe(bp); | 286 | pvr2_buffer_wipe(bp); |
285 | pvr2_buffer_set_none(bp); | 287 | pvr2_buffer_set_none(bp); |
286 | bp->signature = 0; | 288 | bp->signature = 0; |
287 | bp->stream = 0; | 289 | bp->stream = NULL; |
288 | if (bp->purb) usb_free_urb(bp->purb); | 290 | if (bp->purb) usb_free_urb(bp->purb); |
289 | pvr2_trace(PVR2_TRACE_BUF_POOL,"/*---TRACE_FLOW---*/" | 291 | pvr2_trace(PVR2_TRACE_BUF_POOL,"/*---TRACE_FLOW---*/" |
290 | " bufferDone %p",bp); | 292 | " bufferDone %p",bp); |
@@ -339,13 +341,13 @@ static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt) | |||
339 | struct pvr2_buffer *bp; | 341 | struct pvr2_buffer *bp; |
340 | bp = sp->buffers[sp->buffer_total_count - 1]; | 342 | bp = sp->buffers[sp->buffer_total_count - 1]; |
341 | /* Paranoia */ | 343 | /* Paranoia */ |
342 | sp->buffers[sp->buffer_total_count - 1] = 0; | 344 | sp->buffers[sp->buffer_total_count - 1] = NULL; |
343 | (sp->buffer_total_count)--; | 345 | (sp->buffer_total_count)--; |
344 | pvr2_buffer_done(bp); | 346 | pvr2_buffer_done(bp); |
345 | kfree(bp); | 347 | kfree(bp); |
346 | } | 348 | } |
347 | if (scnt < sp->buffer_slot_count) { | 349 | if (scnt < sp->buffer_slot_count) { |
348 | struct pvr2_buffer **nb = 0; | 350 | struct pvr2_buffer **nb = NULL; |
349 | if (scnt) { | 351 | if (scnt) { |
350 | nb = kmalloc(scnt * sizeof(*nb),GFP_KERNEL); | 352 | nb = kmalloc(scnt * sizeof(*nb),GFP_KERNEL); |
351 | if (!nb) return -ENOMEM; | 353 | if (!nb) return -ENOMEM; |
@@ -513,10 +515,6 @@ void pvr2_stream_set_callback(struct pvr2_stream *sp, | |||
513 | } | 515 | } |
514 | 516 | ||
515 | /* Query / set the nominal buffer count */ | 517 | /* Query / set the nominal buffer count */ |
516 | int pvr2_stream_get_buffer_count(struct pvr2_stream *sp) | ||
517 | { | ||
518 | return sp->buffer_target_count; | ||
519 | } | ||
520 | 518 | ||
521 | int pvr2_stream_set_buffer_count(struct pvr2_stream *sp,unsigned int cnt) | 519 | int pvr2_stream_set_buffer_count(struct pvr2_stream *sp,unsigned int cnt) |
522 | { | 520 | { |
@@ -532,21 +530,21 @@ int pvr2_stream_set_buffer_count(struct pvr2_stream *sp,unsigned int cnt) | |||
532 | struct pvr2_buffer *pvr2_stream_get_idle_buffer(struct pvr2_stream *sp) | 530 | struct pvr2_buffer *pvr2_stream_get_idle_buffer(struct pvr2_stream *sp) |
533 | { | 531 | { |
534 | struct list_head *lp = sp->idle_list.next; | 532 | struct list_head *lp = sp->idle_list.next; |
535 | if (lp == &sp->idle_list) return 0; | 533 | if (lp == &sp->idle_list) return NULL; |
536 | return list_entry(lp,struct pvr2_buffer,list_overhead); | 534 | return list_entry(lp,struct pvr2_buffer,list_overhead); |
537 | } | 535 | } |
538 | 536 | ||
539 | struct pvr2_buffer *pvr2_stream_get_ready_buffer(struct pvr2_stream *sp) | 537 | struct pvr2_buffer *pvr2_stream_get_ready_buffer(struct pvr2_stream *sp) |
540 | { | 538 | { |
541 | struct list_head *lp = sp->ready_list.next; | 539 | struct list_head *lp = sp->ready_list.next; |
542 | if (lp == &sp->ready_list) return 0; | 540 | if (lp == &sp->ready_list) return NULL; |
543 | return list_entry(lp,struct pvr2_buffer,list_overhead); | 541 | return list_entry(lp,struct pvr2_buffer,list_overhead); |
544 | } | 542 | } |
545 | 543 | ||
546 | struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id) | 544 | struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id) |
547 | { | 545 | { |
548 | if (id < 0) return 0; | 546 | if (id < 0) return NULL; |
549 | if (id >= sp->buffer_total_count) return 0; | 547 | if (id >= sp->buffer_total_count) return NULL; |
550 | return sp->buffers[id]; | 548 | return sp->buffers[id]; |
551 | } | 549 | } |
552 | 550 | ||
@@ -555,17 +553,6 @@ int pvr2_stream_get_ready_count(struct pvr2_stream *sp) | |||
555 | return sp->r_count; | 553 | return sp->r_count; |
556 | } | 554 | } |
557 | 555 | ||
558 | int pvr2_stream_get_idle_count(struct pvr2_stream *sp) | ||
559 | { | ||
560 | return sp->i_count; | ||
561 | } | ||
562 | |||
563 | void pvr2_stream_flush(struct pvr2_stream *sp) | ||
564 | { | ||
565 | mutex_lock(&sp->mutex); do { | ||
566 | pvr2_stream_internal_flush(sp); | ||
567 | } while(0); mutex_unlock(&sp->mutex); | ||
568 | } | ||
569 | 556 | ||
570 | void pvr2_stream_kill(struct pvr2_stream *sp) | 557 | void pvr2_stream_kill(struct pvr2_stream *sp) |
571 | { | 558 | { |
@@ -620,20 +607,6 @@ int pvr2_buffer_queue(struct pvr2_buffer *bp) | |||
620 | return ret; | 607 | return ret; |
621 | } | 608 | } |
622 | 609 | ||
623 | int pvr2_buffer_idle(struct pvr2_buffer *bp) | ||
624 | { | ||
625 | struct pvr2_stream *sp; | ||
626 | if (!bp) return -EINVAL; | ||
627 | sp = bp->stream; | ||
628 | mutex_lock(&sp->mutex); do { | ||
629 | pvr2_buffer_wipe(bp); | ||
630 | pvr2_buffer_set_idle(bp); | ||
631 | if (sp->buffer_total_count != sp->buffer_target_count) { | ||
632 | pvr2_stream_achieve_buffer_count(sp); | ||
633 | } | ||
634 | } while(0); mutex_unlock(&sp->mutex); | ||
635 | return 0; | ||
636 | } | ||
637 | 610 | ||
638 | int pvr2_buffer_set_buffer(struct pvr2_buffer *bp,void *ptr,unsigned int cnt) | 611 | int pvr2_buffer_set_buffer(struct pvr2_buffer *bp,void *ptr,unsigned int cnt) |
639 | { | 612 | { |
@@ -673,10 +646,6 @@ int pvr2_buffer_get_status(struct pvr2_buffer *bp) | |||
673 | return bp->status; | 646 | return bp->status; |
674 | } | 647 | } |
675 | 648 | ||
676 | enum pvr2_buffer_state pvr2_buffer_get_state(struct pvr2_buffer *bp) | ||
677 | { | ||
678 | return bp->state; | ||
679 | } | ||
680 | 649 | ||
681 | int pvr2_buffer_get_id(struct pvr2_buffer *bp) | 650 | int pvr2_buffer_get_id(struct pvr2_buffer *bp) |
682 | { | 651 | { |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-io.h b/drivers/media/video/pvrusb2/pvrusb2-io.h index 65e11385b2b3..96285ad234a6 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-io.h +++ b/drivers/media/video/pvrusb2/pvrusb2-io.h | |||
@@ -36,8 +36,6 @@ enum pvr2_buffer_state { | |||
36 | struct pvr2_stream; | 36 | struct pvr2_stream; |
37 | struct pvr2_buffer; | 37 | struct pvr2_buffer; |
38 | 38 | ||
39 | const char *pvr2_buffer_state_decode(enum pvr2_buffer_state); | ||
40 | |||
41 | /* Initialize / tear down stream structure */ | 39 | /* Initialize / tear down stream structure */ |
42 | struct pvr2_stream *pvr2_stream_create(void); | 40 | struct pvr2_stream *pvr2_stream_create(void); |
43 | void pvr2_stream_destroy(struct pvr2_stream *); | 41 | void pvr2_stream_destroy(struct pvr2_stream *); |
@@ -49,7 +47,6 @@ void pvr2_stream_set_callback(struct pvr2_stream *, | |||
49 | void *data); | 47 | void *data); |
50 | 48 | ||
51 | /* Query / set the nominal buffer count */ | 49 | /* Query / set the nominal buffer count */ |
52 | int pvr2_stream_get_buffer_count(struct pvr2_stream *); | ||
53 | int pvr2_stream_set_buffer_count(struct pvr2_stream *,unsigned int); | 50 | int pvr2_stream_set_buffer_count(struct pvr2_stream *,unsigned int); |
54 | 51 | ||
55 | /* Get a pointer to a buffer that is either idle, ready, or is specified | 52 | /* Get a pointer to a buffer that is either idle, ready, or is specified |
@@ -59,12 +56,8 @@ struct pvr2_buffer *pvr2_stream_get_ready_buffer(struct pvr2_stream *); | |||
59 | struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id); | 56 | struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id); |
60 | 57 | ||
61 | /* Find out how many buffers are idle or ready */ | 58 | /* Find out how many buffers are idle or ready */ |
62 | int pvr2_stream_get_idle_count(struct pvr2_stream *); | ||
63 | int pvr2_stream_get_ready_count(struct pvr2_stream *); | 59 | int pvr2_stream_get_ready_count(struct pvr2_stream *); |
64 | 60 | ||
65 | /* Kill all pending operations */ | ||
66 | void pvr2_stream_flush(struct pvr2_stream *); | ||
67 | |||
68 | /* Kill all pending buffers and throw away any ready buffers as well */ | 61 | /* Kill all pending buffers and throw away any ready buffers as well */ |
69 | void pvr2_stream_kill(struct pvr2_stream *); | 62 | void pvr2_stream_kill(struct pvr2_stream *); |
70 | 63 | ||
@@ -77,18 +70,12 @@ unsigned int pvr2_buffer_get_count(struct pvr2_buffer *); | |||
77 | /* Retrieve completion code for given ready buffer */ | 70 | /* Retrieve completion code for given ready buffer */ |
78 | int pvr2_buffer_get_status(struct pvr2_buffer *); | 71 | int pvr2_buffer_get_status(struct pvr2_buffer *); |
79 | 72 | ||
80 | /* Retrieve state of given buffer */ | ||
81 | enum pvr2_buffer_state pvr2_buffer_get_state(struct pvr2_buffer *); | ||
82 | |||
83 | /* Retrieve ID of given buffer */ | 73 | /* Retrieve ID of given buffer */ |
84 | int pvr2_buffer_get_id(struct pvr2_buffer *); | 74 | int pvr2_buffer_get_id(struct pvr2_buffer *); |
85 | 75 | ||
86 | /* Start reading into given buffer (kill it if needed) */ | 76 | /* Start reading into given buffer (kill it if needed) */ |
87 | int pvr2_buffer_queue(struct pvr2_buffer *); | 77 | int pvr2_buffer_queue(struct pvr2_buffer *); |
88 | 78 | ||
89 | /* Move buffer back to idle pool (kill it if needed) */ | ||
90 | int pvr2_buffer_idle(struct pvr2_buffer *); | ||
91 | |||
92 | #endif /* __PVRUSB2_IO_H */ | 79 | #endif /* __PVRUSB2_IO_H */ |
93 | 80 | ||
94 | /* | 81 | /* |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ioread.c b/drivers/media/video/pvrusb2/pvrusb2-ioread.c index 49da062e3271..f7a2e225a002 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-ioread.c +++ b/drivers/media/video/pvrusb2/pvrusb2-ioread.c | |||
@@ -54,7 +54,7 @@ static int pvr2_ioread_init(struct pvr2_ioread *cp) | |||
54 | { | 54 | { |
55 | unsigned int idx; | 55 | unsigned int idx; |
56 | 56 | ||
57 | cp->stream = 0; | 57 | cp->stream = NULL; |
58 | mutex_init(&cp->mutex); | 58 | mutex_init(&cp->mutex); |
59 | 59 | ||
60 | for (idx = 0; idx < BUFFER_COUNT; idx++) { | 60 | for (idx = 0; idx < BUFFER_COUNT; idx++) { |
@@ -77,7 +77,7 @@ static void pvr2_ioread_done(struct pvr2_ioread *cp) | |||
77 | { | 77 | { |
78 | unsigned int idx; | 78 | unsigned int idx; |
79 | 79 | ||
80 | pvr2_ioread_setup(cp,0); | 80 | pvr2_ioread_setup(cp,NULL); |
81 | for (idx = 0; idx < BUFFER_COUNT; idx++) { | 81 | for (idx = 0; idx < BUFFER_COUNT; idx++) { |
82 | if (!(cp->buffer_storage[idx])) continue; | 82 | if (!(cp->buffer_storage[idx])) continue; |
83 | kfree(cp->buffer_storage[idx]); | 83 | kfree(cp->buffer_storage[idx]); |
@@ -88,12 +88,12 @@ struct pvr2_ioread *pvr2_ioread_create(void) | |||
88 | { | 88 | { |
89 | struct pvr2_ioread *cp; | 89 | struct pvr2_ioread *cp; |
90 | cp = kmalloc(sizeof(*cp),GFP_KERNEL); | 90 | cp = kmalloc(sizeof(*cp),GFP_KERNEL); |
91 | if (!cp) return 0; | 91 | if (!cp) return NULL; |
92 | pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_create id=%p",cp); | 92 | pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_create id=%p",cp); |
93 | memset(cp,0,sizeof(*cp)); | 93 | memset(cp,0,sizeof(*cp)); |
94 | if (pvr2_ioread_init(cp) < 0) { | 94 | if (pvr2_ioread_init(cp) < 0) { |
95 | kfree(cp); | 95 | kfree(cp); |
96 | return 0; | 96 | return NULL; |
97 | } | 97 | } |
98 | return cp; | 98 | return cp; |
99 | } | 99 | } |
@@ -105,7 +105,7 @@ void pvr2_ioread_destroy(struct pvr2_ioread *cp) | |||
105 | pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_destroy id=%p",cp); | 105 | pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_destroy id=%p",cp); |
106 | if (cp->sync_key_ptr) { | 106 | if (cp->sync_key_ptr) { |
107 | kfree(cp->sync_key_ptr); | 107 | kfree(cp->sync_key_ptr); |
108 | cp->sync_key_ptr = 0; | 108 | cp->sync_key_ptr = NULL; |
109 | } | 109 | } |
110 | kfree(cp); | 110 | kfree(cp); |
111 | } | 111 | } |
@@ -124,7 +124,7 @@ void pvr2_ioread_set_sync_key(struct pvr2_ioread *cp, | |||
124 | if (sync_key_len != cp->sync_key_len) { | 124 | if (sync_key_len != cp->sync_key_len) { |
125 | if (cp->sync_key_ptr) { | 125 | if (cp->sync_key_ptr) { |
126 | kfree(cp->sync_key_ptr); | 126 | kfree(cp->sync_key_ptr); |
127 | cp->sync_key_ptr = 0; | 127 | cp->sync_key_ptr = NULL; |
128 | } | 128 | } |
129 | cp->sync_key_len = 0; | 129 | cp->sync_key_len = 0; |
130 | if (sync_key_len) { | 130 | if (sync_key_len) { |
@@ -144,8 +144,8 @@ static void pvr2_ioread_stop(struct pvr2_ioread *cp) | |||
144 | pvr2_trace(PVR2_TRACE_START_STOP, | 144 | pvr2_trace(PVR2_TRACE_START_STOP, |
145 | "/*---TRACE_READ---*/ pvr2_ioread_stop id=%p",cp); | 145 | "/*---TRACE_READ---*/ pvr2_ioread_stop id=%p",cp); |
146 | pvr2_stream_kill(cp->stream); | 146 | pvr2_stream_kill(cp->stream); |
147 | cp->c_buf = 0; | 147 | cp->c_buf = NULL; |
148 | cp->c_data_ptr = 0; | 148 | cp->c_data_ptr = NULL; |
149 | cp->c_data_len = 0; | 149 | cp->c_data_len = 0; |
150 | cp->c_data_offs = 0; | 150 | cp->c_data_offs = 0; |
151 | cp->enabled = 0; | 151 | cp->enabled = 0; |
@@ -179,8 +179,8 @@ static int pvr2_ioread_start(struct pvr2_ioread *cp) | |||
179 | } | 179 | } |
180 | } | 180 | } |
181 | cp->enabled = !0; | 181 | cp->enabled = !0; |
182 | cp->c_buf = 0; | 182 | cp->c_buf = NULL; |
183 | cp->c_data_ptr = 0; | 183 | cp->c_data_ptr = NULL; |
184 | cp->c_data_len = 0; | 184 | cp->c_data_len = 0; |
185 | cp->c_data_offs = 0; | 185 | cp->c_data_offs = 0; |
186 | cp->stream_running = 0; | 186 | cp->stream_running = 0; |
@@ -214,7 +214,7 @@ int pvr2_ioread_setup(struct pvr2_ioread *cp,struct pvr2_stream *sp) | |||
214 | pvr2_ioread_stop(cp); | 214 | pvr2_ioread_stop(cp); |
215 | pvr2_stream_kill(cp->stream); | 215 | pvr2_stream_kill(cp->stream); |
216 | pvr2_stream_set_buffer_count(cp->stream,0); | 216 | pvr2_stream_set_buffer_count(cp->stream,0); |
217 | cp->stream = 0; | 217 | cp->stream = NULL; |
218 | } | 218 | } |
219 | if (sp) { | 219 | if (sp) { |
220 | pvr2_trace(PVR2_TRACE_START_STOP, | 220 | pvr2_trace(PVR2_TRACE_START_STOP, |
@@ -251,12 +251,8 @@ int pvr2_ioread_set_enabled(struct pvr2_ioread *cp,int fl) | |||
251 | return ret; | 251 | return ret; |
252 | } | 252 | } |
253 | 253 | ||
254 | int pvr2_ioread_get_enabled(struct pvr2_ioread *cp) | ||
255 | { | ||
256 | return cp->enabled != 0; | ||
257 | } | ||
258 | 254 | ||
259 | int pvr2_ioread_get_buffer(struct pvr2_ioread *cp) | 255 | static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp) |
260 | { | 256 | { |
261 | int stat; | 257 | int stat; |
262 | 258 | ||
@@ -274,8 +270,8 @@ int pvr2_ioread_get_buffer(struct pvr2_ioread *cp) | |||
274 | pvr2_ioread_stop(cp); | 270 | pvr2_ioread_stop(cp); |
275 | return 0; | 271 | return 0; |
276 | } | 272 | } |
277 | cp->c_buf = 0; | 273 | cp->c_buf = NULL; |
278 | cp->c_data_ptr = 0; | 274 | cp->c_data_ptr = NULL; |
279 | cp->c_data_len = 0; | 275 | cp->c_data_len = 0; |
280 | cp->c_data_offs = 0; | 276 | cp->c_data_offs = 0; |
281 | } | 277 | } |
@@ -307,7 +303,7 @@ int pvr2_ioread_get_buffer(struct pvr2_ioread *cp) | |||
307 | return !0; | 303 | return !0; |
308 | } | 304 | } |
309 | 305 | ||
310 | void pvr2_ioread_filter(struct pvr2_ioread *cp) | 306 | static void pvr2_ioread_filter(struct pvr2_ioread *cp) |
311 | { | 307 | { |
312 | unsigned int idx; | 308 | unsigned int idx; |
313 | if (!cp->enabled) return; | 309 | if (!cp->enabled) return; |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ioread.h b/drivers/media/video/pvrusb2/pvrusb2-ioread.h index 6b002597f5de..1d362f833588 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-ioread.h +++ b/drivers/media/video/pvrusb2/pvrusb2-ioread.h | |||
@@ -33,7 +33,6 @@ void pvr2_ioread_set_sync_key(struct pvr2_ioread *, | |||
33 | const char *sync_key_ptr, | 33 | const char *sync_key_ptr, |
34 | unsigned int sync_key_len); | 34 | unsigned int sync_key_len); |
35 | int pvr2_ioread_set_enabled(struct pvr2_ioread *,int fl); | 35 | int pvr2_ioread_set_enabled(struct pvr2_ioread *,int fl); |
36 | int pvr2_ioread_get_enabled(struct pvr2_ioread *); | ||
37 | int pvr2_ioread_read(struct pvr2_ioread *,void __user *buf,unsigned int cnt); | 36 | int pvr2_ioread_read(struct pvr2_ioread *,void __user *buf,unsigned int cnt); |
38 | int pvr2_ioread_avail(struct pvr2_ioread *); | 37 | int pvr2_ioread_avail(struct pvr2_ioread *); |
39 | 38 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-main.c b/drivers/media/video/pvrusb2/pvrusb2-main.c index b95248274ed0..8f1a5afdd34e 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-main.c +++ b/drivers/media/video/pvrusb2/pvrusb2-main.c | |||
@@ -54,7 +54,7 @@ module_param_named(debug,pvrusb2_debug,int,S_IRUGO|S_IWUSR); | |||
54 | MODULE_PARM_DESC(debug, "Debug trace mask"); | 54 | MODULE_PARM_DESC(debug, "Debug trace mask"); |
55 | 55 | ||
56 | #ifdef CONFIG_VIDEO_PVRUSB2_SYSFS | 56 | #ifdef CONFIG_VIDEO_PVRUSB2_SYSFS |
57 | static struct pvr2_sysfs_class *class_ptr = 0; | 57 | static struct pvr2_sysfs_class *class_ptr = NULL; |
58 | #endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ | 58 | #endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ |
59 | 59 | ||
60 | static void pvr_setup_attach(struct pvr2_context *pvr) | 60 | static void pvr_setup_attach(struct pvr2_context *pvr) |
@@ -104,10 +104,10 @@ static void pvr_disconnect(struct usb_interface *intf) | |||
104 | } | 104 | } |
105 | 105 | ||
106 | static struct usb_driver pvr_driver = { | 106 | static struct usb_driver pvr_driver = { |
107 | name: "pvrusb2", | 107 | .name = "pvrusb2", |
108 | id_table: pvr2_device_table, | 108 | .id_table = pvr2_device_table, |
109 | probe: pvr_probe, | 109 | .probe = pvr_probe, |
110 | disconnect: pvr_disconnect | 110 | .disconnect = pvr_disconnect |
111 | }; | 111 | }; |
112 | 112 | ||
113 | /* | 113 | /* |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.c b/drivers/media/video/pvrusb2/pvrusb2-std.c index 134063693643..f95c598ff627 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-std.c +++ b/drivers/media/video/pvrusb2/pvrusb2-std.c | |||
@@ -121,7 +121,7 @@ static const struct std_name *find_std_name(const struct std_name *arrPtr, | |||
121 | if (strlen(p->name) != bufSize) continue; | 121 | if (strlen(p->name) != bufSize) continue; |
122 | if (!memcmp(bufPtr,p->name,bufSize)) return p; | 122 | if (!memcmp(bufPtr,p->name,bufSize)) return p; |
123 | } | 123 | } |
124 | return 0; | 124 | return NULL; |
125 | } | 125 | } |
126 | 126 | ||
127 | 127 | ||
@@ -289,7 +289,7 @@ static struct v4l2_standard *match_std(v4l2_std_id id) | |||
289 | return generic_standards + idx; | 289 | return generic_standards + idx; |
290 | } | 290 | } |
291 | } | 291 | } |
292 | return 0; | 292 | return NULL; |
293 | } | 293 | } |
294 | 294 | ||
295 | static int pvr2_std_fill(struct v4l2_standard *std,v4l2_std_id id) | 295 | static int pvr2_std_fill(struct v4l2_standard *std,v4l2_std_id id) |
@@ -364,7 +364,7 @@ struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr, | |||
364 | 364 | ||
365 | pvr2_trace(PVR2_TRACE_INIT,"Setting up %u unique standard(s)", | 365 | pvr2_trace(PVR2_TRACE_INIT,"Setting up %u unique standard(s)", |
366 | std_cnt); | 366 | std_cnt); |
367 | if (!std_cnt) return 0; // paranoia | 367 | if (!std_cnt) return NULL; // paranoia |
368 | 368 | ||
369 | stddefs = kmalloc(sizeof(struct v4l2_standard) * std_cnt, | 369 | stddefs = kmalloc(sizeof(struct v4l2_standard) * std_cnt, |
370 | GFP_KERNEL); | 370 | GFP_KERNEL); |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c index c6e6523d74b4..6af55a8b6f05 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c +++ b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c | |||
@@ -504,7 +504,7 @@ static void pvr2_sysfs_add_control(struct pvr2_sysfs *sfp,int ctl_id) | |||
504 | cip->cptr = cptr; | 504 | cip->cptr = cptr; |
505 | 505 | ||
506 | cip->chptr = sfp; | 506 | cip->chptr = sfp; |
507 | cip->item_next = 0; | 507 | cip->item_next = NULL; |
508 | if (sfp->item_last) { | 508 | if (sfp->item_last) { |
509 | sfp->item_last->item_next = cip; | 509 | sfp->item_last->item_next = cip; |
510 | } else { | 510 | } else { |
@@ -625,7 +625,7 @@ static void pvr2_sysfs_tear_down_debugifc(struct pvr2_sysfs *sfp) | |||
625 | &sfp->debugifc->attr_debuginfo); | 625 | &sfp->debugifc->attr_debuginfo); |
626 | class_device_remove_file(sfp->class_dev,&sfp->debugifc->attr_debugcmd); | 626 | class_device_remove_file(sfp->class_dev,&sfp->debugifc->attr_debugcmd); |
627 | kfree(sfp->debugifc); | 627 | kfree(sfp->debugifc); |
628 | sfp->debugifc = 0; | 628 | sfp->debugifc = NULL; |
629 | } | 629 | } |
630 | #endif /* CONFIG_VIDEO_PVRUSB2_DEBUGIFC */ | 630 | #endif /* CONFIG_VIDEO_PVRUSB2_DEBUGIFC */ |
631 | 631 | ||
@@ -678,9 +678,9 @@ static void class_dev_destroy(struct pvr2_sysfs *sfp) | |||
678 | class_device_remove_file(sfp->class_dev,&sfp->attr_v4l_minor_number); | 678 | class_device_remove_file(sfp->class_dev,&sfp->attr_v4l_minor_number); |
679 | class_device_remove_file(sfp->class_dev,&sfp->attr_unit_number); | 679 | class_device_remove_file(sfp->class_dev,&sfp->attr_unit_number); |
680 | pvr2_sysfs_trace("Destroying class_dev id=%p",sfp->class_dev); | 680 | pvr2_sysfs_trace("Destroying class_dev id=%p",sfp->class_dev); |
681 | sfp->class_dev->class_data = 0; | 681 | sfp->class_dev->class_data = NULL; |
682 | class_device_unregister(sfp->class_dev); | 682 | class_device_unregister(sfp->class_dev); |
683 | sfp->class_dev = 0; | 683 | sfp->class_dev = NULL; |
684 | } | 684 | } |
685 | 685 | ||
686 | 686 | ||
@@ -739,13 +739,13 @@ static void class_dev_create(struct pvr2_sysfs *sfp, | |||
739 | sfp->attr_v4l_minor_number.attr.name = "v4l_minor_number"; | 739 | sfp->attr_v4l_minor_number.attr.name = "v4l_minor_number"; |
740 | sfp->attr_v4l_minor_number.attr.mode = S_IRUGO; | 740 | sfp->attr_v4l_minor_number.attr.mode = S_IRUGO; |
741 | sfp->attr_v4l_minor_number.show = v4l_minor_number_show; | 741 | sfp->attr_v4l_minor_number.show = v4l_minor_number_show; |
742 | sfp->attr_v4l_minor_number.store = 0; | 742 | sfp->attr_v4l_minor_number.store = NULL; |
743 | class_device_create_file(sfp->class_dev,&sfp->attr_v4l_minor_number); | 743 | class_device_create_file(sfp->class_dev,&sfp->attr_v4l_minor_number); |
744 | sfp->attr_unit_number.attr.owner = THIS_MODULE; | 744 | sfp->attr_unit_number.attr.owner = THIS_MODULE; |
745 | sfp->attr_unit_number.attr.name = "unit_number"; | 745 | sfp->attr_unit_number.attr.name = "unit_number"; |
746 | sfp->attr_unit_number.attr.mode = S_IRUGO; | 746 | sfp->attr_unit_number.attr.mode = S_IRUGO; |
747 | sfp->attr_unit_number.show = unit_number_show; | 747 | sfp->attr_unit_number.show = unit_number_show; |
748 | sfp->attr_unit_number.store = 0; | 748 | sfp->attr_unit_number.store = NULL; |
749 | class_device_create_file(sfp->class_dev,&sfp->attr_unit_number); | 749 | class_device_create_file(sfp->class_dev,&sfp->attr_unit_number); |
750 | 750 | ||
751 | pvr2_sysfs_add_controls(sfp); | 751 | pvr2_sysfs_add_controls(sfp); |
@@ -806,7 +806,7 @@ struct pvr2_sysfs_class *pvr2_sysfs_class_create(void) | |||
806 | pvr2_sysfs_trace( | 806 | pvr2_sysfs_trace( |
807 | "Registration failed for pvr2_sysfs_class id=%p",clp); | 807 | "Registration failed for pvr2_sysfs_class id=%p",clp); |
808 | kfree(clp); | 808 | kfree(clp); |
809 | clp = 0; | 809 | clp = NULL; |
810 | } | 810 | } |
811 | return clp; | 811 | return clp; |
812 | } | 812 | } |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-tuner.c b/drivers/media/video/pvrusb2/pvrusb2-tuner.c index f4aba8144ce0..af9f246f8d3f 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-tuner.c +++ b/drivers/media/video/pvrusb2/pvrusb2-tuner.c | |||
@@ -69,7 +69,7 @@ static void tuner_update(struct pvr2_tuner_handler *ctxt) | |||
69 | 69 | ||
70 | static void pvr2_tuner_detach(struct pvr2_tuner_handler *ctxt) | 70 | static void pvr2_tuner_detach(struct pvr2_tuner_handler *ctxt) |
71 | { | 71 | { |
72 | ctxt->client->handler = 0; | 72 | ctxt->client->handler = NULL; |
73 | kfree(ctxt); | 73 | kfree(ctxt); |
74 | } | 74 | } |
75 | 75 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 961951010c27..0caf70b8c0de 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c | |||
@@ -81,7 +81,7 @@ static int video_nr[PVR_NUM] = {[0 ... PVR_NUM-1] = -1}; | |||
81 | module_param_array(video_nr, int, NULL, 0444); | 81 | module_param_array(video_nr, int, NULL, 0444); |
82 | MODULE_PARM_DESC(video_nr, "Offset for device's minor"); | 82 | MODULE_PARM_DESC(video_nr, "Offset for device's minor"); |
83 | 83 | ||
84 | struct v4l2_capability pvr_capability ={ | 84 | static struct v4l2_capability pvr_capability ={ |
85 | .driver = "pvrusb2", | 85 | .driver = "pvrusb2", |
86 | .card = "Hauppauge WinTV pvr-usb2", | 86 | .card = "Hauppauge WinTV pvr-usb2", |
87 | .bus_info = "usb", | 87 | .bus_info = "usb", |
@@ -111,7 +111,7 @@ static struct v4l2_tuner pvr_v4l2_tuners[]= { | |||
111 | } | 111 | } |
112 | }; | 112 | }; |
113 | 113 | ||
114 | struct v4l2_fmtdesc pvr_fmtdesc [] = { | 114 | static struct v4l2_fmtdesc pvr_fmtdesc [] = { |
115 | { | 115 | { |
116 | .index = 0, | 116 | .index = 0, |
117 | .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, | 117 | .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, |
@@ -127,7 +127,7 @@ struct v4l2_fmtdesc pvr_fmtdesc [] = { | |||
127 | #define PVR_FORMAT_PIX 0 | 127 | #define PVR_FORMAT_PIX 0 |
128 | #define PVR_FORMAT_VBI 1 | 128 | #define PVR_FORMAT_VBI 1 |
129 | 129 | ||
130 | struct v4l2_format pvr_format [] = { | 130 | static struct v4l2_format pvr_format [] = { |
131 | [PVR_FORMAT_PIX] = { | 131 | [PVR_FORMAT_PIX] = { |
132 | .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, | 132 | .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, |
133 | .fmt = { | 133 | .fmt = { |
@@ -701,9 +701,8 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file, | |||
701 | 701 | ||
702 | static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip) | 702 | static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip) |
703 | { | 703 | { |
704 | pvr2_trace(PVR2_TRACE_INIT, | 704 | printk(KERN_INFO "pvrusb2: unregistering device video%d [%s]\n", |
705 | "unregistering device video%d [%s]", | 705 | dip->vdev->minor,pvr2_config_get_name(dip->config)); |
706 | dip->vdev->minor,pvr2_config_get_name(dip->config)); | ||
707 | if (dip->ctxt_idx >= 0) { | 706 | if (dip->ctxt_idx >= 0) { |
708 | mutex_lock(&device_lock); | 707 | mutex_lock(&device_lock); |
709 | devices[dip->ctxt_idx] = NULL; | 708 | devices[dip->ctxt_idx] = NULL; |
@@ -725,7 +724,7 @@ static void pvr2_v4l2_destroy_no_lock(struct pvr2_v4l2 *vp) | |||
725 | } | 724 | } |
726 | 725 | ||
727 | 726 | ||
728 | void pvr2_v4l2_internal_check(struct pvr2_channel *chp) | 727 | static void pvr2_v4l2_internal_check(struct pvr2_channel *chp) |
729 | { | 728 | { |
730 | struct pvr2_v4l2 *vp; | 729 | struct pvr2_v4l2 *vp; |
731 | vp = container_of(chp,struct pvr2_v4l2,channel); | 730 | vp = container_of(chp,struct pvr2_v4l2,channel); |
@@ -735,8 +734,8 @@ void pvr2_v4l2_internal_check(struct pvr2_channel *chp) | |||
735 | } | 734 | } |
736 | 735 | ||
737 | 736 | ||
738 | int pvr2_v4l2_ioctl(struct inode *inode, struct file *file, | 737 | static int pvr2_v4l2_ioctl(struct inode *inode, struct file *file, |
739 | unsigned int cmd, unsigned long arg) | 738 | unsigned int cmd, unsigned long arg) |
740 | { | 739 | { |
741 | 740 | ||
742 | /* Temporary hack : use ivtv api until a v4l2 one is available. */ | 741 | /* Temporary hack : use ivtv api until a v4l2 one is available. */ |
@@ -747,7 +746,7 @@ int pvr2_v4l2_ioctl(struct inode *inode, struct file *file, | |||
747 | } | 746 | } |
748 | 747 | ||
749 | 748 | ||
750 | int pvr2_v4l2_release(struct inode *inode, struct file *file) | 749 | static int pvr2_v4l2_release(struct inode *inode, struct file *file) |
751 | { | 750 | { |
752 | struct pvr2_v4l2_fh *fhp = file->private_data; | 751 | struct pvr2_v4l2_fh *fhp = file->private_data; |
753 | struct pvr2_v4l2 *vp = fhp->vhead; | 752 | struct pvr2_v4l2 *vp = fhp->vhead; |
@@ -761,9 +760,9 @@ int pvr2_v4l2_release(struct inode *inode, struct file *file) | |||
761 | hdw = fhp->channel.mc_head->hdw; | 760 | hdw = fhp->channel.mc_head->hdw; |
762 | pvr2_hdw_set_streaming(hdw,0); | 761 | pvr2_hdw_set_streaming(hdw,0); |
763 | sp = pvr2_ioread_get_stream(fhp->rhp); | 762 | sp = pvr2_ioread_get_stream(fhp->rhp); |
764 | if (sp) pvr2_stream_set_callback(sp,0,0); | 763 | if (sp) pvr2_stream_set_callback(sp,NULL,NULL); |
765 | pvr2_ioread_destroy(fhp->rhp); | 764 | pvr2_ioread_destroy(fhp->rhp); |
766 | fhp->rhp = 0; | 765 | fhp->rhp = NULL; |
767 | } | 766 | } |
768 | v4l2_prio_close(&vp->prio, &fhp->prio); | 767 | v4l2_prio_close(&vp->prio, &fhp->prio); |
769 | file->private_data = NULL; | 768 | file->private_data = NULL; |
@@ -779,9 +778,9 @@ int pvr2_v4l2_release(struct inode *inode, struct file *file) | |||
779 | } else { | 778 | } else { |
780 | vp->vfirst = fhp->vnext; | 779 | vp->vfirst = fhp->vnext; |
781 | } | 780 | } |
782 | fhp->vnext = 0; | 781 | fhp->vnext = NULL; |
783 | fhp->vprev = 0; | 782 | fhp->vprev = NULL; |
784 | fhp->vhead = 0; | 783 | fhp->vhead = NULL; |
785 | pvr2_channel_done(&fhp->channel); | 784 | pvr2_channel_done(&fhp->channel); |
786 | pvr2_trace(PVR2_TRACE_STRUCT, | 785 | pvr2_trace(PVR2_TRACE_STRUCT, |
787 | "Destroying pvr_v4l2_fh id=%p",fhp); | 786 | "Destroying pvr_v4l2_fh id=%p",fhp); |
@@ -794,9 +793,9 @@ int pvr2_v4l2_release(struct inode *inode, struct file *file) | |||
794 | } | 793 | } |
795 | 794 | ||
796 | 795 | ||
797 | int pvr2_v4l2_open(struct inode *inode, struct file *file) | 796 | static int pvr2_v4l2_open(struct inode *inode, struct file *file) |
798 | { | 797 | { |
799 | struct pvr2_v4l2_dev *dip = 0; /* Our own context pointer */ | 798 | struct pvr2_v4l2_dev *dip = NULL; /* Our own context pointer */ |
800 | struct pvr2_v4l2_fh *fhp; | 799 | struct pvr2_v4l2_fh *fhp; |
801 | struct pvr2_v4l2 *vp; | 800 | struct pvr2_v4l2 *vp; |
802 | struct pvr2_hdw *hdw; | 801 | struct pvr2_hdw *hdw; |
@@ -854,7 +853,7 @@ int pvr2_v4l2_open(struct inode *inode, struct file *file) | |||
854 | pvr2_context_enter(vp->channel.mc_head); do { | 853 | pvr2_context_enter(vp->channel.mc_head); do { |
855 | pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_v4l2_fh id=%p",fhp); | 854 | pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_v4l2_fh id=%p",fhp); |
856 | pvr2_channel_init(&fhp->channel,vp->channel.mc_head); | 855 | pvr2_channel_init(&fhp->channel,vp->channel.mc_head); |
857 | fhp->vnext = 0; | 856 | fhp->vnext = NULL; |
858 | fhp->vprev = vp->vlast; | 857 | fhp->vprev = vp->vlast; |
859 | if (vp->vlast) { | 858 | if (vp->vlast) { |
860 | vp->vlast->vnext = fhp; | 859 | vp->vlast->vnext = fhp; |
@@ -897,7 +896,7 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh) | |||
897 | 896 | ||
898 | fh->rhp = pvr2_channel_create_mpeg_stream(fh->dev_info->stream); | 897 | fh->rhp = pvr2_channel_create_mpeg_stream(fh->dev_info->stream); |
899 | if (!fh->rhp) { | 898 | if (!fh->rhp) { |
900 | pvr2_channel_claim_stream(&fh->channel,0); | 899 | pvr2_channel_claim_stream(&fh->channel,NULL); |
901 | return -ENOMEM; | 900 | return -ENOMEM; |
902 | } | 901 | } |
903 | 902 | ||
@@ -1078,9 +1077,8 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip, | |||
1078 | (video_register_device(dip->vdev, v4l_type, -1) < 0)) { | 1077 | (video_register_device(dip->vdev, v4l_type, -1) < 0)) { |
1079 | err("Failed to register pvrusb2 v4l video device"); | 1078 | err("Failed to register pvrusb2 v4l video device"); |
1080 | } else { | 1079 | } else { |
1081 | pvr2_trace(PVR2_TRACE_INIT, | 1080 | printk(KERN_INFO "pvrusb2: registered device video%d [%s]\n", |
1082 | "registered device video%d [%s]", | 1081 | dip->vdev->minor,pvr2_config_get_name(dip->config)); |
1083 | dip->vdev->minor,pvr2_config_get_name(dip->config)); | ||
1084 | } | 1082 | } |
1085 | 1083 | ||
1086 | if ((dip->vdev->minor < sizeof(devices)/sizeof(devices[0])) && | 1084 | if ((dip->vdev->minor < sizeof(devices)/sizeof(devices[0])) && |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c index e4ec7f25194c..05f2cddeb47b 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c +++ b/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c | |||
@@ -126,8 +126,8 @@ static const struct pvr2_v4l_decoder_ops decoder_ops[] = { | |||
126 | 126 | ||
127 | static void decoder_detach(struct pvr2_v4l_decoder *ctxt) | 127 | static void decoder_detach(struct pvr2_v4l_decoder *ctxt) |
128 | { | 128 | { |
129 | ctxt->client->handler = 0; | 129 | ctxt->client->handler = NULL; |
130 | ctxt->hdw->decoder_ctrl = 0; | 130 | ctxt->hdw->decoder_ctrl = NULL; |
131 | kfree(ctxt); | 131 | kfree(ctxt); |
132 | } | 132 | } |
133 | 133 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c index fcad346e3955..2413e5198e16 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c +++ b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c | |||
@@ -89,7 +89,7 @@ static unsigned int wm8775_describe(struct pvr2_v4l_wm8775 *ctxt, | |||
89 | 89 | ||
90 | static void wm8775_detach(struct pvr2_v4l_wm8775 *ctxt) | 90 | static void wm8775_detach(struct pvr2_v4l_wm8775 *ctxt) |
91 | { | 91 | { |
92 | ctxt->client->handler = 0; | 92 | ctxt->client->handler = NULL; |
93 | kfree(ctxt); | 93 | kfree(ctxt); |
94 | } | 94 | } |
95 | 95 | ||
diff --git a/drivers/media/video/pwc/pwc-uncompress.h b/drivers/media/video/pwc/pwc-uncompress.h index 041227f65246..43028e74e9e0 100644 --- a/drivers/media/video/pwc/pwc-uncompress.h +++ b/drivers/media/video/pwc/pwc-uncompress.h | |||
@@ -30,7 +30,6 @@ | |||
30 | #ifndef PWC_UNCOMPRESS_H | 30 | #ifndef PWC_UNCOMPRESS_H |
31 | #define PWC_UNCOMPRESS_H | 31 | #define PWC_UNCOMPRESS_H |
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | 33 | ||
35 | #include <media/pwc-ioctl.h> | 34 | #include <media/pwc-ioctl.h> |
36 | 35 | ||
diff --git a/drivers/media/video/pwc/pwc.h b/drivers/media/video/pwc/pwc.h index 629f79e44fb6..7e9c4237d1e8 100644 --- a/drivers/media/video/pwc/pwc.h +++ b/drivers/media/video/pwc/pwc.h | |||
@@ -25,7 +25,6 @@ | |||
25 | #ifndef PWC_H | 25 | #ifndef PWC_H |
26 | #define PWC_H | 26 | #define PWC_H |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/usb.h> | 29 | #include <linux/usb.h> |
31 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index da3007d2f411..535172f643b9 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/init.h> | 23 | #include <linux/init.h> |
25 | #include <linux/list.h> | 24 | #include <linux/list.h> |
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
@@ -942,8 +941,6 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, | |||
942 | /* load i2c helpers */ | 941 | /* load i2c helpers */ |
943 | if (TUNER_ABSENT != dev->tuner_type) | 942 | if (TUNER_ABSENT != dev->tuner_type) |
944 | request_module("tuner"); | 943 | request_module("tuner"); |
945 | if (dev->tda9887_conf) | ||
946 | request_module("tda9887"); | ||
947 | if (card_is_empress(dev)) { | 944 | if (card_is_empress(dev)) { |
948 | request_module("saa6752hs"); | 945 | request_module("saa6752hs"); |
949 | request_module_depend("saa7134-empress",&need_empress); | 946 | request_module_depend("saa7134-empress",&need_empress); |
diff --git a/drivers/media/video/se401.c b/drivers/media/video/se401.c index a846ebc78cd7..67987baee77a 100644 --- a/drivers/media/video/se401.c +++ b/drivers/media/video/se401.c | |||
@@ -27,7 +27,6 @@ | |||
27 | 27 | ||
28 | static const char version[] = "0.24"; | 28 | static const char version[] = "0.24"; |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/init.h> | 31 | #include <linux/init.h> |
33 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
diff --git a/drivers/media/video/stv680.c b/drivers/media/video/stv680.c index 351b182d921f..2ba2991a214f 100644 --- a/drivers/media/video/stv680.c +++ b/drivers/media/video/stv680.c | |||
@@ -58,7 +58,6 @@ | |||
58 | * Fixed proc entry removal bug. | 58 | * Fixed proc entry removal bug. |
59 | */ | 59 | */ |
60 | 60 | ||
61 | #include <linux/config.h> | ||
62 | #include <linux/module.h> | 61 | #include <linux/module.h> |
63 | #include <linux/init.h> | 62 | #include <linux/init.h> |
64 | #include <linux/vmalloc.h> | 63 | #include <linux/vmalloc.h> |
diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c index 2fadabf99688..8dab481d384a 100644 --- a/drivers/media/video/tda9887.c +++ b/drivers/media/video/tda9887.c | |||
@@ -590,8 +590,8 @@ int tda9887_tuner_init(struct i2c_client *c) | |||
590 | t->set_tv_freq = tda9887_set_freq; | 590 | t->set_tv_freq = tda9887_set_freq; |
591 | t->set_radio_freq = tda9887_set_freq; | 591 | t->set_radio_freq = tda9887_set_freq; |
592 | t->standby = tda9887_standby; | 592 | t->standby = tda9887_standby; |
593 | t->tuner_status=tda9887_tuner_status; | 593 | t->tuner_status = tda9887_tuner_status; |
594 | t->get_afc=tda9887_get_afc; | 594 | t->get_afc = tda9887_get_afc; |
595 | 595 | ||
596 | return 0; | 596 | return 0; |
597 | } | 597 | } |
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 011413cf34a8..f7eb402d5f2b 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -416,7 +416,7 @@ static void tuner_status(struct i2c_client *client) | |||
416 | 416 | ||
417 | /* ---------------------------------------------------------------------- */ | 417 | /* ---------------------------------------------------------------------- */ |
418 | 418 | ||
419 | /* static var Used only in tuner_attach and tuner_probe */ | 419 | /* static vars: used only in tuner_attach and tuner_probe */ |
420 | static unsigned default_mode_mask; | 420 | static unsigned default_mode_mask; |
421 | 421 | ||
422 | /* During client attach, set_type is called by adapter's attach_inform callback. | 422 | /* During client attach, set_type is called by adapter's attach_inform callback. |
@@ -608,13 +608,13 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
608 | tuner_dbg("VIDIOCSAUDIO not implemented.\n"); | 608 | tuner_dbg("VIDIOCSAUDIO not implemented.\n"); |
609 | break; | 609 | break; |
610 | case TDA9887_SET_CONFIG: | 610 | case TDA9887_SET_CONFIG: |
611 | { | 611 | if (t->type == TUNER_TDA9887) { |
612 | int *i = arg; | 612 | int *i = arg; |
613 | 613 | ||
614 | t->tda9887_config = *i; | 614 | t->tda9887_config = *i; |
615 | set_freq(client, t->tv_freq); | 615 | set_freq(client, t->tv_freq); |
616 | } | ||
616 | break; | 617 | break; |
617 | } | ||
618 | /* --- v4l ioctls --- */ | 618 | /* --- v4l ioctls --- */ |
619 | /* take care: bttv does userspace copying, we'll get a | 619 | /* take care: bttv does userspace copying, we'll get a |
620 | kernel pointer here... */ | 620 | kernel pointer here... */ |
diff --git a/drivers/media/video/tuner-simple.c b/drivers/media/video/tuner-simple.c index 6da6f82b8c88..d071c5cbf013 100644 --- a/drivers/media/video/tuner-simple.c +++ b/drivers/media/video/tuner-simple.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/i2c.h> | 7 | #include <linux/i2c.h> |
8 | #include <linux/videodev.h> | 8 | #include <linux/videodev.h> |
9 | #include <media/tuner.h> | 9 | #include <media/tuner.h> |
10 | #include <media/v4l2-common.h> | ||
10 | 11 | ||
11 | static int offset = 0; | 12 | static int offset = 0; |
12 | module_param(offset, int, 0666); | 13 | module_param(offset, int, 0666); |
@@ -128,6 +129,7 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq) | |||
128 | u8 buffer[4]; | 129 | u8 buffer[4]; |
129 | int rc, IFPCoff, i, j; | 130 | int rc, IFPCoff, i, j; |
130 | enum param_type desired_type; | 131 | enum param_type desired_type; |
132 | struct tuner_params *params; | ||
131 | 133 | ||
132 | tun = &tuners[t->type]; | 134 | tun = &tuners[t->type]; |
133 | 135 | ||
@@ -169,19 +171,20 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq) | |||
169 | IFPCoff,t->type); | 171 | IFPCoff,t->type); |
170 | j = 0; | 172 | j = 0; |
171 | } | 173 | } |
174 | params = &tun->params[j]; | ||
172 | 175 | ||
173 | for (i = 0; i < tun->params[j].count; i++) { | 176 | for (i = 0; i < params->count; i++) { |
174 | if (freq > tun->params[j].ranges[i].limit) | 177 | if (freq > params->ranges[i].limit) |
175 | continue; | 178 | continue; |
176 | break; | 179 | break; |
177 | } | 180 | } |
178 | if (i == tun->params[j].count) { | 181 | if (i == params->count) { |
179 | tuner_dbg("TV frequency out of range (%d > %d)", | 182 | tuner_dbg("TV frequency out of range (%d > %d)", |
180 | freq, tun->params[j].ranges[i - 1].limit); | 183 | freq, params->ranges[i - 1].limit); |
181 | freq = tun->params[j].ranges[--i].limit; | 184 | freq = params->ranges[--i].limit; |
182 | } | 185 | } |
183 | config = tun->params[j].ranges[i].config; | 186 | config = params->ranges[i].config; |
184 | cb = tun->params[j].ranges[i].cb; | 187 | cb = params->ranges[i].cb; |
185 | /* i == 0 -> VHF_LO | 188 | /* i == 0 -> VHF_LO |
186 | * i == 1 -> VHF_HI | 189 | * i == 1 -> VHF_HI |
187 | * i == 2 -> UHF */ | 190 | * i == 2 -> UHF */ |
@@ -281,7 +284,7 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq) | |||
281 | break; | 284 | break; |
282 | } | 285 | } |
283 | 286 | ||
284 | if (tuners[t->type].params->cb_first_if_lower_freq && div < t->last_div) { | 287 | if (params->cb_first_if_lower_freq && div < t->last_div) { |
285 | buffer[0] = config; | 288 | buffer[0] = config; |
286 | buffer[1] = cb; | 289 | buffer[1] = cb; |
287 | buffer[2] = (div>>8) & 0x7f; | 290 | buffer[2] = (div>>8) & 0x7f; |
@@ -293,6 +296,43 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq) | |||
293 | buffer[3] = cb; | 296 | buffer[3] = cb; |
294 | } | 297 | } |
295 | t->last_div = div; | 298 | t->last_div = div; |
299 | if (params->has_tda9887) { | ||
300 | int config = 0; | ||
301 | int is_secam_l = (t->std & (V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC)) && | ||
302 | !(t->std & ~(V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC)); | ||
303 | |||
304 | if (t->std == V4L2_STD_SECAM_LC) { | ||
305 | if (params->port1_active ^ params->port1_invert_for_secam_lc) | ||
306 | config |= TDA9887_PORT1_ACTIVE; | ||
307 | if (params->port2_active ^ params->port2_invert_for_secam_lc) | ||
308 | config |= TDA9887_PORT2_ACTIVE; | ||
309 | } | ||
310 | else { | ||
311 | if (params->port1_active) | ||
312 | config |= TDA9887_PORT1_ACTIVE; | ||
313 | if (params->port2_active) | ||
314 | config |= TDA9887_PORT2_ACTIVE; | ||
315 | } | ||
316 | if (params->intercarrier_mode) | ||
317 | config |= TDA9887_INTERCARRIER; | ||
318 | if (is_secam_l) { | ||
319 | if (i == 0 && params->default_top_secam_low) | ||
320 | config |= TDA9887_TOP(params->default_top_secam_low); | ||
321 | else if (i == 1 && params->default_top_secam_mid) | ||
322 | config |= TDA9887_TOP(params->default_top_secam_mid); | ||
323 | else if (params->default_top_secam_high) | ||
324 | config |= TDA9887_TOP(params->default_top_secam_high); | ||
325 | } | ||
326 | else { | ||
327 | if (i == 0 && params->default_top_low) | ||
328 | config |= TDA9887_TOP(params->default_top_low); | ||
329 | else if (i == 1 && params->default_top_mid) | ||
330 | config |= TDA9887_TOP(params->default_top_mid); | ||
331 | else if (params->default_top_high) | ||
332 | config |= TDA9887_TOP(params->default_top_high); | ||
333 | } | ||
334 | i2c_clients_command(c->adapter, TDA9887_SET_CONFIG, &config); | ||
335 | } | ||
296 | tuner_dbg("tv 0x%02x 0x%02x 0x%02x 0x%02x\n", | 336 | tuner_dbg("tv 0x%02x 0x%02x 0x%02x 0x%02x\n", |
297 | buffer[0],buffer[1],buffer[2],buffer[3]); | 337 | buffer[0],buffer[1],buffer[2],buffer[3]); |
298 | 338 | ||
@@ -339,6 +379,7 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq) | |||
339 | u16 div; | 379 | u16 div; |
340 | int rc, j; | 380 | int rc, j; |
341 | enum param_type desired_type = TUNER_PARAM_TYPE_RADIO; | 381 | enum param_type desired_type = TUNER_PARAM_TYPE_RADIO; |
382 | struct tuner_params *params; | ||
342 | 383 | ||
343 | tun = &tuners[t->type]; | 384 | tun = &tuners[t->type]; |
344 | 385 | ||
@@ -352,7 +393,8 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq) | |||
352 | j = 0; | 393 | j = 0; |
353 | 394 | ||
354 | div = (20 * freq / 16000) + (int)(20*10.7); /* IF 10.7 MHz */ | 395 | div = (20 * freq / 16000) + (int)(20*10.7); /* IF 10.7 MHz */ |
355 | buffer[2] = (tun->params[j].ranges[0].config & ~TUNER_RATIO_MASK) | TUNER_RATIO_SELECT_50; /* 50 kHz step */ | 396 | params = &tun->params[j]; |
397 | buffer[2] = (params->ranges[0].config & ~TUNER_RATIO_MASK) | TUNER_RATIO_SELECT_50; /* 50 kHz step */ | ||
356 | 398 | ||
357 | switch (t->type) { | 399 | switch (t->type) { |
358 | case TUNER_TENA_9533_DI: | 400 | case TUNER_TENA_9533_DI: |
@@ -384,7 +426,7 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq) | |||
384 | } | 426 | } |
385 | buffer[0] = (div>>8) & 0x7f; | 427 | buffer[0] = (div>>8) & 0x7f; |
386 | buffer[1] = div & 0xff; | 428 | buffer[1] = div & 0xff; |
387 | if (tuners[t->type].params->cb_first_if_lower_freq && div < t->last_div) { | 429 | if (params->cb_first_if_lower_freq && div < t->last_div) { |
388 | buffer[0] = buffer[2]; | 430 | buffer[0] = buffer[2]; |
389 | buffer[1] = buffer[3]; | 431 | buffer[1] = buffer[3]; |
390 | buffer[2] = (div>>8) & 0x7f; | 432 | buffer[2] = (div>>8) & 0x7f; |
@@ -398,6 +440,18 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq) | |||
398 | buffer[0],buffer[1],buffer[2],buffer[3]); | 440 | buffer[0],buffer[1],buffer[2],buffer[3]); |
399 | t->last_div = div; | 441 | t->last_div = div; |
400 | 442 | ||
443 | if (params->has_tda9887) { | ||
444 | int config = 0; | ||
445 | if (params->port1_active && !params->port1_fm_high_sensitivity) | ||
446 | config |= TDA9887_PORT1_ACTIVE; | ||
447 | if (params->port2_active && !params->port2_fm_high_sensitivity) | ||
448 | config |= TDA9887_PORT2_ACTIVE; | ||
449 | if (params->intercarrier_mode) | ||
450 | config |= TDA9887_INTERCARRIER; | ||
451 | /* if (params->port1_set_for_fm_mono) | ||
452 | config &= ~TDA9887_PORT1_ACTIVE;*/ | ||
453 | i2c_clients_command(c->adapter, TDA9887_SET_CONFIG, &config); | ||
454 | } | ||
401 | if (4 != (rc = i2c_master_send(c,buffer,4))) | 455 | if (4 != (rc = i2c_master_send(c,buffer,4))) |
402 | tuner_warn("i2c i/o error: rc == %d (should be 4)\n",rc); | 456 | tuner_warn("i2c i/o error: rc == %d (should be 4)\n",rc); |
403 | } | 457 | } |
diff --git a/drivers/media/video/tuner-types.c b/drivers/media/video/tuner-types.c index 9d9226cb6393..a167e17c6dcd 100644 --- a/drivers/media/video/tuner-types.c +++ b/drivers/media/video/tuner-types.c | |||
@@ -380,6 +380,10 @@ static struct tuner_params tuner_philips_fq1216me_params[] = { | |||
380 | .type = TUNER_PARAM_TYPE_PAL, | 380 | .type = TUNER_PARAM_TYPE_PAL, |
381 | .ranges = tuner_lg_pal_ranges, | 381 | .ranges = tuner_lg_pal_ranges, |
382 | .count = ARRAY_SIZE(tuner_lg_pal_ranges), | 382 | .count = ARRAY_SIZE(tuner_lg_pal_ranges), |
383 | .has_tda9887 = 1, | ||
384 | .port1_active = 1, | ||
385 | .port2_active = 1, | ||
386 | .port2_invert_for_secam_lc = 1, | ||
383 | }, | 387 | }, |
384 | }; | 388 | }; |
385 | 389 | ||
@@ -542,6 +546,14 @@ static struct tuner_params tuner_fm1216me_mk3_params[] = { | |||
542 | .ranges = tuner_fm1216me_mk3_pal_ranges, | 546 | .ranges = tuner_fm1216me_mk3_pal_ranges, |
543 | .count = ARRAY_SIZE(tuner_fm1216me_mk3_pal_ranges), | 547 | .count = ARRAY_SIZE(tuner_fm1216me_mk3_pal_ranges), |
544 | .cb_first_if_lower_freq = 1, | 548 | .cb_first_if_lower_freq = 1, |
549 | .has_tda9887 = 1, | ||
550 | .port1_active = 1, | ||
551 | .port2_active = 1, | ||
552 | .port2_invert_for_secam_lc = 1, | ||
553 | .port1_fm_high_sensitivity = 1, | ||
554 | .default_top_mid = -2, | ||
555 | .default_top_secam_mid = -2, | ||
556 | .default_top_secam_high = -2, | ||
545 | }, | 557 | }, |
546 | }; | 558 | }; |
547 | 559 | ||
@@ -612,6 +624,10 @@ static struct tuner_params tuner_fm1236_mk3_params[] = { | |||
612 | .ranges = tuner_fm1236_mk3_ntsc_ranges, | 624 | .ranges = tuner_fm1236_mk3_ntsc_ranges, |
613 | .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges), | 625 | .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges), |
614 | .cb_first_if_lower_freq = 1, | 626 | .cb_first_if_lower_freq = 1, |
627 | .has_tda9887 = 1, | ||
628 | .port1_active = 1, | ||
629 | .port2_active = 1, | ||
630 | .port1_fm_high_sensitivity = 1, | ||
615 | }, | 631 | }, |
616 | }; | 632 | }; |
617 | 633 | ||
@@ -632,6 +648,8 @@ static struct tuner_params tuner_microtune_4049_fm5_params[] = { | |||
632 | .type = TUNER_PARAM_TYPE_PAL, | 648 | .type = TUNER_PARAM_TYPE_PAL, |
633 | .ranges = tuner_temic_4009f_5_pal_ranges, | 649 | .ranges = tuner_temic_4009f_5_pal_ranges, |
634 | .count = ARRAY_SIZE(tuner_temic_4009f_5_pal_ranges), | 650 | .count = ARRAY_SIZE(tuner_temic_4009f_5_pal_ranges), |
651 | .has_tda9887 = 1, | ||
652 | .port1_invert_for_secam_lc = 1, | ||
635 | }, | 653 | }, |
636 | }; | 654 | }; |
637 | 655 | ||
@@ -648,6 +666,8 @@ static struct tuner_params tuner_panasonic_vp27_params[] = { | |||
648 | .type = TUNER_PARAM_TYPE_NTSC, | 666 | .type = TUNER_PARAM_TYPE_NTSC, |
649 | .ranges = tuner_panasonic_vp27_ntsc_ranges, | 667 | .ranges = tuner_panasonic_vp27_ntsc_ranges, |
650 | .count = ARRAY_SIZE(tuner_panasonic_vp27_ntsc_ranges), | 668 | .count = ARRAY_SIZE(tuner_panasonic_vp27_ntsc_ranges), |
669 | .has_tda9887 = 1, | ||
670 | .intercarrier_mode = 1, | ||
651 | }, | 671 | }, |
652 | }; | 672 | }; |
653 | 673 | ||
@@ -782,6 +802,13 @@ static struct tuner_params tuner_philips_fq1216ame_mk4_params[] = { | |||
782 | .type = TUNER_PARAM_TYPE_PAL, | 802 | .type = TUNER_PARAM_TYPE_PAL, |
783 | .ranges = tuner_philips_fq12_6a___mk4_pal_ranges, | 803 | .ranges = tuner_philips_fq12_6a___mk4_pal_ranges, |
784 | .count = ARRAY_SIZE(tuner_philips_fq12_6a___mk4_pal_ranges), | 804 | .count = ARRAY_SIZE(tuner_philips_fq12_6a___mk4_pal_ranges), |
805 | .has_tda9887 = 1, | ||
806 | .port1_active = 1, | ||
807 | .port2_invert_for_secam_lc = 1, | ||
808 | .default_top_mid = -2, | ||
809 | .default_top_secam_low = -2, | ||
810 | .default_top_secam_mid = -2, | ||
811 | .default_top_secam_high = -2, | ||
785 | }, | 812 | }, |
786 | }; | 813 | }; |
787 | 814 | ||
@@ -870,6 +897,12 @@ static struct tuner_params tuner_philips_fmd1216me_mk3_params[] = { | |||
870 | .type = TUNER_PARAM_TYPE_PAL, | 897 | .type = TUNER_PARAM_TYPE_PAL, |
871 | .ranges = tuner_philips_fmd1216me_mk3_pal_ranges, | 898 | .ranges = tuner_philips_fmd1216me_mk3_pal_ranges, |
872 | .count = ARRAY_SIZE(tuner_philips_fmd1216me_mk3_pal_ranges), | 899 | .count = ARRAY_SIZE(tuner_philips_fmd1216me_mk3_pal_ranges), |
900 | .has_tda9887 = 1, | ||
901 | .port1_active = 1, | ||
902 | .port2_active = 1, | ||
903 | .port2_fm_high_sensitivity = 1, | ||
904 | .port2_invert_for_secam_lc = 1, | ||
905 | .port1_set_for_fm_mono = 1, | ||
873 | }, | 906 | }, |
874 | }; | 907 | }; |
875 | 908 | ||
@@ -1005,6 +1038,7 @@ static struct tuner_params tuner_samsung_tcpn_2121p30a_params[] = { | |||
1005 | .type = TUNER_PARAM_TYPE_NTSC, | 1038 | .type = TUNER_PARAM_TYPE_NTSC, |
1006 | .ranges = tuner_samsung_tcpn_2121p30a_ntsc_ranges, | 1039 | .ranges = tuner_samsung_tcpn_2121p30a_ntsc_ranges, |
1007 | .count = ARRAY_SIZE(tuner_samsung_tcpn_2121p30a_ntsc_ranges), | 1040 | .count = ARRAY_SIZE(tuner_samsung_tcpn_2121p30a_ntsc_ranges), |
1041 | .has_tda9887 = 1, | ||
1008 | }, | 1042 | }, |
1009 | }; | 1043 | }; |
1010 | 1044 | ||
@@ -1037,6 +1071,10 @@ static struct tuner_params tuner_samsung_tcpg_6121p30a_params[] = { | |||
1037 | .type = TUNER_PARAM_TYPE_PAL, | 1071 | .type = TUNER_PARAM_TYPE_PAL, |
1038 | .ranges = tuner_samsung_tcpg_6121p30a_pal_ranges, | 1072 | .ranges = tuner_samsung_tcpg_6121p30a_pal_ranges, |
1039 | .count = ARRAY_SIZE(tuner_samsung_tcpg_6121p30a_pal_ranges), | 1073 | .count = ARRAY_SIZE(tuner_samsung_tcpg_6121p30a_pal_ranges), |
1074 | .has_tda9887 = 1, | ||
1075 | .port1_active = 1, | ||
1076 | .port2_active = 1, | ||
1077 | .port2_invert_for_secam_lc = 1, | ||
1040 | }, | 1078 | }, |
1041 | }; | 1079 | }; |
1042 | 1080 | ||
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c index c2b756107548..936e3f746fba 100644 --- a/drivers/media/video/tvaudio.c +++ b/drivers/media/video/tvaudio.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
19 | #include <linux/moduleparam.h> | 18 | #include <linux/moduleparam.h> |
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index 30f8d80ddcaa..d95529e8e513 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c | |||
@@ -73,14 +73,14 @@ static struct HAUPPAUGE_TUNER_FMT | |||
73 | } | 73 | } |
74 | hauppauge_tuner_fmt[] = | 74 | hauppauge_tuner_fmt[] = |
75 | { | 75 | { |
76 | { V4L2_STD_UNKNOWN," UNKNOWN" }, | 76 | { V4L2_STD_UNKNOWN, " UNKNOWN" }, |
77 | { V4L2_STD_UNKNOWN," FM" }, | 77 | { V4L2_STD_UNKNOWN, " FM" }, |
78 | { V4L2_STD_PAL_BG, " PAL(B/G)" }, | 78 | { V4L2_STD_B|V4L2_STD_GH, " PAL(B/G)" }, |
79 | { V4L2_STD_NTSC_M, " NTSC(M)" }, | 79 | { V4L2_STD_MN, " NTSC(M)" }, |
80 | { V4L2_STD_PAL_I, " PAL(I)" }, | 80 | { V4L2_STD_PAL_I, " PAL(I)" }, |
81 | { V4L2_STD_SECAM_L," SECAM(L/L')" }, | 81 | { V4L2_STD_SECAM_L|V4L2_STD_SECAM_LC, " SECAM(L/L')" }, |
82 | { V4L2_STD_PAL_DK, " PAL(D/D1/K)" }, | 82 | { V4L2_STD_DK, " PAL(D/D1/K)" }, |
83 | { V4L2_STD_ATSC, " ATSC/DVB Digital" }, | 83 | { V4L2_STD_ATSC, " ATSC/DVB Digital" }, |
84 | }; | 84 | }; |
85 | 85 | ||
86 | /* This is the full list of possible tuners. Many thanks to Hauppauge for | 86 | /* This is the full list of possible tuners. Many thanks to Hauppauge for |
@@ -219,7 +219,7 @@ hauppauge_tuner[] = | |||
219 | { TUNER_ABSENT, "Thompson DTT75105"}, | 219 | { TUNER_ABSENT, "Thompson DTT75105"}, |
220 | { TUNER_ABSENT, "Conexant_CX24109"}, | 220 | { TUNER_ABSENT, "Conexant_CX24109"}, |
221 | { TUNER_TCL_2002N, "TCL M2523_5N_E"}, | 221 | { TUNER_TCL_2002N, "TCL M2523_5N_E"}, |
222 | { TUNER_ABSENT, "TCL M2523_3DB_E"}, | 222 | { TUNER_TCL_2002MB, "TCL M2523_3DB_E"}, |
223 | { TUNER_ABSENT, "Philips 8275A"}, | 223 | { TUNER_ABSENT, "Philips 8275A"}, |
224 | { TUNER_ABSENT, "Microtune MT2060"}, | 224 | { TUNER_ABSENT, "Microtune MT2060"}, |
225 | { TUNER_ABSENT, "Philips FM1236 MK5"}, | 225 | { TUNER_ABSENT, "Philips FM1236 MK5"}, |
diff --git a/drivers/media/video/usbvideo/usbvideo.h b/drivers/media/video/usbvideo/usbvideo.h index 49dbee5f5628..051775d4c726 100644 --- a/drivers/media/video/usbvideo/usbvideo.h +++ b/drivers/media/video/usbvideo/usbvideo.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #ifndef usbvideo_h | 16 | #ifndef usbvideo_h |
17 | #define usbvideo_h | 17 | #define usbvideo_h |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/videodev.h> | 19 | #include <linux/videodev.h> |
21 | #include <media/v4l2-common.h> | 20 | #include <media/v4l2-common.h> |
22 | #include <linux/usb.h> | 21 | #include <linux/usb.h> |
diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c index 19d3c20dc7ef..d83a2c84d233 100644 --- a/drivers/media/video/v4l1-compat.c +++ b/drivers/media/video/v4l1-compat.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * | 16 | * |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | 19 | ||
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 97f946db8597..f06dc19e504a 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -44,7 +44,6 @@ | |||
44 | * Added Gerd Knorrs v4l1 enhancements (Justin Schoeman) | 44 | * Added Gerd Knorrs v4l1 enhancements (Justin Schoeman) |
45 | */ | 45 | */ |
46 | 46 | ||
47 | #include <linux/config.h> | ||
48 | #include <linux/module.h> | 47 | #include <linux/module.h> |
49 | #include <linux/types.h> | 48 | #include <linux/types.h> |
50 | #include <linux/kernel.h> | 49 | #include <linux/kernel.h> |
diff --git a/drivers/media/video/videocodec.c b/drivers/media/video/videocodec.c index 8f271de57fd6..2ae3fb250630 100644 --- a/drivers/media/video/videocodec.c +++ b/drivers/media/video/videocodec.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
37 | 37 | ||
38 | // kernel config is here (procfs flag) | 38 | // kernel config is here (procfs flag) |
39 | #include <linux/config.h> | ||
40 | 39 | ||
41 | #ifdef CONFIG_PROC_FS | 40 | #ifdef CONFIG_PROC_FS |
42 | #include <linux/proc_fs.h> | 41 | #include <linux/proc_fs.h> |
diff --git a/drivers/media/video/videocodec.h b/drivers/media/video/videocodec.h index 8c233720b6a5..97a3bbeda505 100644 --- a/drivers/media/video/videocodec.h +++ b/drivers/media/video/videocodec.h | |||
@@ -222,14 +222,14 @@ M zr36055[1] 0001 0000c001 00000000 (zr36050[1]) | |||
222 | /* ========================= */ | 222 | /* ========================= */ |
223 | 223 | ||
224 | struct vfe_polarity { | 224 | struct vfe_polarity { |
225 | int vsync_pol:1; | 225 | unsigned int vsync_pol:1; |
226 | int hsync_pol:1; | 226 | unsigned int hsync_pol:1; |
227 | int field_pol:1; | 227 | unsigned int field_pol:1; |
228 | int blank_pol:1; | 228 | unsigned int blank_pol:1; |
229 | int subimg_pol:1; | 229 | unsigned int subimg_pol:1; |
230 | int poe_pol:1; | 230 | unsigned int poe_pol:1; |
231 | int pvalid_pol:1; | 231 | unsigned int pvalid_pol:1; |
232 | int vclk_pol:1; | 232 | unsigned int vclk_pol:1; |
233 | }; | 233 | }; |
234 | 234 | ||
235 | struct vfe_settings { | 235 | struct vfe_settings { |
diff --git a/drivers/media/video/w9968cf.h b/drivers/media/video/w9968cf.h index 2836b45ec206..ec7696e8f1fa 100644 --- a/drivers/media/video/w9968cf.h +++ b/drivers/media/video/w9968cf.h | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/spinlock.h> | 28 | #include <linux/spinlock.h> |
29 | #include <linux/list.h> | 29 | #include <linux/list.h> |
30 | #include <linux/wait.h> | 30 | #include <linux/wait.h> |
31 | #include <linux/config.h> | ||
32 | #include <linux/param.h> | 31 | #include <linux/param.h> |
33 | #include <linux/types.h> | 32 | #include <linux/types.h> |
34 | #include <linux/rwsem.h> | 33 | #include <linux/rwsem.h> |
diff --git a/drivers/media/video/zoran_card.c b/drivers/media/video/zoran_card.c index 958c1e6fc852..33b32f3cf84e 100644 --- a/drivers/media/video/zoran_card.c +++ b/drivers/media/video/zoran_card.c | |||
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
31 | 31 | ||
32 | #include <linux/config.h> | ||
33 | #include <linux/types.h> | 32 | #include <linux/types.h> |
34 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
diff --git a/drivers/media/video/zoran_device.c b/drivers/media/video/zoran_device.c index 02168d9c2187..3cbac2e8aed3 100644 --- a/drivers/media/video/zoran_device.c +++ b/drivers/media/video/zoran_device.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 27 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/types.h> | 30 | #include <linux/types.h> |
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
33 | #include <linux/module.h> | 32 | #include <linux/module.h> |
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c index 9711f6248ef7..d9a5876eb386 100644 --- a/drivers/media/video/zoran_driver.c +++ b/drivers/media/video/zoran_driver.c | |||
@@ -44,7 +44,6 @@ | |||
44 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 44 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
45 | */ | 45 | */ |
46 | 46 | ||
47 | #include <linux/config.h> | ||
48 | #include <linux/version.h> | 47 | #include <linux/version.h> |
49 | #include <linux/init.h> | 48 | #include <linux/init.h> |
50 | #include <linux/module.h> | 49 | #include <linux/module.h> |
diff --git a/drivers/media/video/zoran_procfs.c b/drivers/media/video/zoran_procfs.c index f4ffe79bdc5b..c7f6f6488360 100644 --- a/drivers/media/video/zoran_procfs.c +++ b/drivers/media/video/zoran_procfs.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 27 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/types.h> | 30 | #include <linux/types.h> |
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
33 | #include <linux/module.h> | 32 | #include <linux/module.h> |
diff --git a/drivers/media/video/zr36120_mem.c b/drivers/media/video/zr36120_mem.c index c87113d6cc60..416eaa93b8a4 100644 --- a/drivers/media/video/zr36120_mem.c +++ b/drivers/media/video/zr36120_mem.c | |||
@@ -18,7 +18,6 @@ | |||
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
23 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
24 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 12dd8d493ee2..2544fc7af0f6 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -46,7 +46,6 @@ | |||
46 | */ | 46 | */ |
47 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 47 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
48 | 48 | ||
49 | #include <linux/config.h> | ||
50 | #include <linux/kernel.h> | 49 | #include <linux/kernel.h> |
51 | #include <linux/module.h> | 50 | #include <linux/module.h> |
52 | #include <linux/errno.h> | 51 | #include <linux/errno.h> |
@@ -5592,7 +5591,7 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag) | |||
5592 | 5591 | ||
5593 | /* The SCSI driver needs to adjust timeouts on all current | 5592 | /* The SCSI driver needs to adjust timeouts on all current |
5594 | * commands prior to the diagnostic reset being issued. | 5593 | * commands prior to the diagnostic reset being issued. |
5595 | * Prevents timeouts occuring during a diagnostic reset...very bad. | 5594 | * Prevents timeouts occurring during a diagnostic reset...very bad. |
5596 | * For all other protocol drivers, this is a no-op. | 5595 | * For all other protocol drivers, this is a no-op. |
5597 | */ | 5596 | */ |
5598 | { | 5597 | { |
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index 4720f9ae86aa..32ae4d664545 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h | |||
@@ -49,7 +49,6 @@ | |||
49 | #define MPTBASE_H_INCLUDED | 49 | #define MPTBASE_H_INCLUDED |
50 | /*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 50 | /*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
51 | 51 | ||
52 | #include <linux/config.h> | ||
53 | #include <linux/kernel.h> | 52 | #include <linux/kernel.h> |
54 | #include <linux/pci.h> | 53 | #include <linux/pci.h> |
55 | 54 | ||
diff --git a/drivers/message/i2o/debug.c b/drivers/message/i2o/debug.c index 5a6cca8e8c45..8abe45e49ad7 100644 --- a/drivers/message/i2o/debug.c +++ b/drivers/message/i2o/debug.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <linux/module.h> | 1 | #include <linux/module.h> |
3 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
4 | #include <linux/pci.h> | 3 | #include <linux/pci.h> |
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c index c8426a9bf273..6fe2ff5a63db 100644 --- a/drivers/mfd/ucb1x00-core.c +++ b/drivers/mfd/ucb1x00-core.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * Note that all locks are private to this file. Nothing else may | 16 | * Note that all locks are private to this file. Nothing else may |
17 | * touch them. | 17 | * touch them. |
18 | */ | 18 | */ |
19 | #include <linux/config.h> | ||
20 | #include <linux/module.h> | 19 | #include <linux/module.h> |
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
22 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c index 79fd062ccb34..02776814443e 100644 --- a/drivers/mfd/ucb1x00-ts.c +++ b/drivers/mfd/ucb1x00-ts.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * pin should provide pulses even when the LCD is blanked, otherwise | 17 | * pin should provide pulses even when the LCD is blanked, otherwise |
18 | * a pen touch needed to unblank the LCD will never be read. | 18 | * a pen touch needed to unblank the LCD will never be read. |
19 | */ | 19 | */ |
20 | #include <linux/config.h> | ||
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/moduleparam.h> | 21 | #include <linux/moduleparam.h> |
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
diff --git a/drivers/misc/ibmasm/ibmasm.h b/drivers/misc/ibmasm/ibmasm.h index 6aba41954448..634d538ccd14 100644 --- a/drivers/misc/ibmasm/ibmasm.h +++ b/drivers/misc/ibmasm/ibmasm.h | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/wait.h> | 29 | #include <linux/wait.h> |
30 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
32 | #include <linux/config.h> | ||
33 | #include <linux/module.h> | 32 | #include <linux/module.h> |
34 | #include <linux/interrupt.h> | 33 | #include <linux/interrupt.h> |
35 | #include <linux/device.h> | 34 | #include <linux/device.h> |
diff --git a/drivers/mmc/at91_mci.c b/drivers/mmc/at91_mci.c index 3228516b7d19..075a2a07924e 100644 --- a/drivers/mmc/at91_mci.c +++ b/drivers/mmc/at91_mci.c | |||
@@ -53,7 +53,6 @@ | |||
53 | Gets the status of the write protect pin, if available. | 53 | Gets the status of the write protect pin, if available. |
54 | */ | 54 | */ |
55 | 55 | ||
56 | #include <linux/config.h> | ||
57 | #include <linux/module.h> | 56 | #include <linux/module.h> |
58 | #include <linux/moduleparam.h> | 57 | #include <linux/moduleparam.h> |
59 | #include <linux/init.h> | 58 | #include <linux/init.h> |
diff --git a/drivers/mmc/au1xmmc.c b/drivers/mmc/au1xmmc.c index 5dc4bee7abeb..41069908f4a7 100644 --- a/drivers/mmc/au1xmmc.c +++ b/drivers/mmc/au1xmmc.c | |||
@@ -34,7 +34,6 @@ | |||
34 | * So we use the timer to check the status manually. | 34 | * So we use the timer to check the status manually. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/config.h> | ||
38 | #include <linux/module.h> | 37 | #include <linux/module.h> |
39 | #include <linux/init.h> | 38 | #include <linux/init.h> |
40 | #include <linux/platform_device.h> | 39 | #include <linux/platform_device.h> |
diff --git a/drivers/mmc/imxmmc.c b/drivers/mmc/imxmmc.c index 5c62f4e6ad06..7ca9e95bdf89 100644 --- a/drivers/mmc/imxmmc.c +++ b/drivers/mmc/imxmmc.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * deficiencies | 25 | * deficiencies |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | #include <linux/config.h> | ||
29 | 28 | ||
30 | #ifdef CONFIG_MMC_DEBUG | 29 | #ifdef CONFIG_MMC_DEBUG |
31 | #define DEBUG | 30 | #define DEBUG |
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 6201f3086a02..247ff2f23ac9 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c index 8576a65ca1c3..9dfb34a857e3 100644 --- a/drivers/mmc/mmci.c +++ b/drivers/mmc/mmci.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/config.h> | ||
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/moduleparam.h> | 11 | #include <linux/moduleparam.h> |
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
diff --git a/drivers/mmc/omap.c b/drivers/mmc/omap.c index c25244b3657b..7a4840ec53b7 100644 --- a/drivers/mmc/omap.c +++ b/drivers/mmc/omap.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | #include <linux/moduleparam.h> | 15 | #include <linux/moduleparam.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
diff --git a/drivers/mmc/pxamci.c b/drivers/mmc/pxamci.c index b49368fd96b8..ef350908478c 100644 --- a/drivers/mmc/pxamci.c +++ b/drivers/mmc/pxamci.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * 1 and 3 byte data transfers not supported | 16 | * 1 and 3 byte data transfers not supported |
17 | * max block length up to 1023 | 17 | * max block length up to 1023 |
18 | */ | 18 | */ |
19 | #include <linux/config.h> | ||
20 | #include <linux/module.h> | 19 | #include <linux/module.h> |
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
22 | #include <linux/ioport.h> | 21 | #include <linux/ioport.h> |
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c index 8167332d4013..3fcd86c08ebd 100644 --- a/drivers/mmc/wbsd.c +++ b/drivers/mmc/wbsd.c | |||
@@ -21,7 +21,6 @@ | |||
21 | * - On APIC systems the FIFO empty interrupt is sometimes lost. | 21 | * - On APIC systems the FIFO empty interrupt is sometimes lost. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | #include <linux/moduleparam.h> | 25 | #include <linux/moduleparam.h> |
27 | #include <linux/init.h> | 26 | #include <linux/init.h> |
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index 1e01ad38b26e..9885726a16e4 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c | |||
@@ -21,7 +21,6 @@ | |||
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | #include <linux/types.h> | 25 | #include <linux/types.h> |
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c index 4bf9f8cac0dd..60e11a0ada97 100644 --- a/drivers/mtd/chips/cfi_probe.c +++ b/drivers/mtd/chips/cfi_probe.c | |||
@@ -4,7 +4,6 @@ | |||
4 | $Id: cfi_probe.c,v 1.86 2005/11/29 14:48:31 gleixner Exp $ | 4 | $Id: cfi_probe.c,v 1.86 2005/11/29 14:48:31 gleixner Exp $ |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/config.h> | ||
8 | #include <linux/module.h> | 7 | #include <linux/module.h> |
9 | #include <linux/types.h> | 8 | #include <linux/types.h> |
10 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
diff --git a/drivers/mtd/chips/chipreg.c b/drivers/mtd/chips/chipreg.c index c2127840a183..2174c97549f0 100644 --- a/drivers/mtd/chips/chipreg.c +++ b/drivers/mtd/chips/chipreg.c | |||
@@ -6,7 +6,6 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/config.h> | ||
10 | #include <linux/module.h> | 9 | #include <linux/module.h> |
11 | #include <linux/kmod.h> | 10 | #include <linux/kmod.h> |
12 | #include <linux/spinlock.h> | 11 | #include <linux/spinlock.h> |
diff --git a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c index 517ea33e7260..8f39d0a31438 100644 --- a/drivers/mtd/chips/jedec_probe.c +++ b/drivers/mtd/chips/jedec_probe.c | |||
@@ -8,7 +8,6 @@ | |||
8 | Occasionally maintained by Thayne Harbaugh tharbaugh at lnxi dot com | 8 | Occasionally maintained by Thayne Harbaugh tharbaugh at lnxi dot com |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index be3f1c136d02..ede3561be870 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * | 8 | * |
9 | * Licence: GPL | 9 | * Licence: GPL |
10 | */ | 10 | */ |
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
14 | #include <linux/blkdev.h> | 13 | #include <linux/blkdev.h> |
diff --git a/drivers/mtd/devices/docprobe.c b/drivers/mtd/devices/docprobe.c index 593bb033a3fa..78872c3f3760 100644 --- a/drivers/mtd/devices/docprobe.c +++ b/drivers/mtd/devices/docprobe.c | |||
@@ -40,7 +40,6 @@ | |||
40 | */ | 40 | */ |
41 | #define DOC_SINGLE_DRIVER | 41 | #define DOC_SINGLE_DRIVER |
42 | 42 | ||
43 | #include <linux/config.h> | ||
44 | #include <linux/kernel.h> | 43 | #include <linux/kernel.h> |
45 | #include <linux/module.h> | 44 | #include <linux/module.h> |
46 | #include <asm/errno.h> | 45 | #include <asm/errno.h> |
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 04271d02b6b6..5db716045927 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * as published by the Free Software Foundation; either version | 9 | * as published by the Free Software Foundation; either version |
10 | * 2 of the License, or (at your option) any later version. | 10 | * 2 of the License, or (at your option) any later version. |
11 | */ | 11 | */ |
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c index b4438eacfd80..e427c82d5f4c 100644 --- a/drivers/mtd/devices/mtdram.c +++ b/drivers/mtd/devices/mtdram.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
16 | #include <linux/ioport.h> | 15 | #include <linux/ioport.h> |
diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c index 30f07b473ae2..6f9bbf6fee4d 100644 --- a/drivers/mtd/devices/pmc551.c +++ b/drivers/mtd/devices/pmc551.c | |||
@@ -82,7 +82,6 @@ | |||
82 | * * Comb the init routine. It's still a bit cludgy on a few things. | 82 | * * Comb the init routine. It's still a bit cludgy on a few things. |
83 | */ | 83 | */ |
84 | 84 | ||
85 | #include <linux/config.h> | ||
86 | #include <linux/kernel.h> | 85 | #include <linux/kernel.h> |
87 | #include <linux/module.h> | 86 | #include <linux/module.h> |
88 | #include <asm/uaccess.h> | 87 | #include <asm/uaccess.h> |
diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c index 1e21a2c3dd29..4116535805f1 100644 --- a/drivers/mtd/inftlcore.c +++ b/drivers/mtd/inftlcore.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
diff --git a/drivers/mtd/maps/alchemy-flash.c b/drivers/mtd/maps/alchemy-flash.c index b933a2a27b18..7fc8097e41d2 100644 --- a/drivers/mtd/maps/alchemy-flash.c +++ b/drivers/mtd/maps/alchemy-flash.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * | 7 | * |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/init.h> | 10 | #include <linux/init.h> |
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/types.h> | 12 | #include <linux/types.h> |
diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c index a50587005263..447955be18af 100644 --- a/drivers/mtd/maps/amd76xrom.c +++ b/drivers/mtd/maps/amd76xrom.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/mtd/map.h> | 14 | #include <linux/mtd/map.h> |
15 | #include <linux/mtd/cfi.h> | 15 | #include <linux/mtd/cfi.h> |
16 | #include <linux/mtd/flashchip.h> | 16 | #include <linux/mtd/flashchip.h> |
17 | #include <linux/config.h> | ||
18 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
19 | #include <linux/pci_ids.h> | 18 | #include <linux/pci_ids.h> |
20 | #include <linux/list.h> | 19 | #include <linux/list.h> |
diff --git a/drivers/mtd/maps/ceiva.c b/drivers/mtd/maps/ceiva.c index 5a95ab370a97..0402c21e291d 100644 --- a/drivers/mtd/maps/ceiva.c +++ b/drivers/mtd/maps/ceiva.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * $Id: ceiva.c,v 1.11 2004/09/16 23:27:12 gleixner Exp $ | 14 | * $Id: ceiva.c,v 1.11 2004/09/16 23:27:12 gleixner Exp $ |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
19 | #include <linux/types.h> | 18 | #include <linux/types.h> |
20 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
diff --git a/drivers/mtd/maps/cstm_mips_ixx.c b/drivers/mtd/maps/cstm_mips_ixx.c index a370953c1513..aa56defb94c8 100644 --- a/drivers/mtd/maps/cstm_mips_ixx.c +++ b/drivers/mtd/maps/cstm_mips_ixx.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <linux/mtd/mtd.h> | 38 | #include <linux/mtd/mtd.h> |
39 | #include <linux/mtd/map.h> | 39 | #include <linux/mtd/map.h> |
40 | #include <linux/mtd/partitions.h> | 40 | #include <linux/mtd/partitions.h> |
41 | #include <linux/config.h> | ||
42 | #include <linux/delay.h> | 41 | #include <linux/delay.h> |
43 | 42 | ||
44 | #if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) | 43 | #if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) |
diff --git a/drivers/mtd/maps/dbox2-flash.c b/drivers/mtd/maps/dbox2-flash.c index 85c2a9e22b1e..92a9c7fac993 100644 --- a/drivers/mtd/maps/dbox2-flash.c +++ b/drivers/mtd/maps/dbox2-flash.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/mtd/mtd.h> | 12 | #include <linux/mtd/mtd.h> |
13 | #include <linux/mtd/map.h> | 13 | #include <linux/mtd/map.h> |
14 | #include <linux/mtd/partitions.h> | 14 | #include <linux/mtd/partitions.h> |
15 | #include <linux/config.h> | ||
16 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
17 | 16 | ||
18 | /* partition_info gives details on the logical partitions that the split the | 17 | /* partition_info gives details on the logical partitions that the split the |
diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c index 8b3784e2de89..b32bb9347d71 100644 --- a/drivers/mtd/maps/dc21285.c +++ b/drivers/mtd/maps/dc21285.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * | 7 | * |
8 | * $Id: dc21285.c,v 1.24 2005/11/07 11:14:26 gleixner Exp $ | 8 | * $Id: dc21285.c,v 1.24 2005/11/07 11:14:26 gleixner Exp $ |
9 | */ | 9 | */ |
10 | #include <linux/config.h> | ||
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/types.h> | 11 | #include <linux/types.h> |
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
diff --git a/drivers/mtd/maps/dilnetpc.c b/drivers/mtd/maps/dilnetpc.c index c299d10b33e6..b1104fe1f207 100644 --- a/drivers/mtd/maps/dilnetpc.c +++ b/drivers/mtd/maps/dilnetpc.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * and http://www.ssv-embedded.de/ssv/pc104/p170.htm | 25 | * and http://www.ssv-embedded.de/ssv/pc104/p170.htm |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/types.h> | 29 | #include <linux/types.h> |
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
diff --git a/drivers/mtd/maps/dmv182.c b/drivers/mtd/maps/dmv182.c index 2bb3c0f0f970..a43c49905cac 100644 --- a/drivers/mtd/maps/dmv182.c +++ b/drivers/mtd/maps/dmv182.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * option) any later version. | 16 | * option) any later version. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/module.h> | 19 | #include <linux/module.h> |
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
22 | #include <linux/types.h> | 21 | #include <linux/types.h> |
diff --git a/drivers/mtd/maps/ebony.c b/drivers/mtd/maps/ebony.c index 60a6e51d662f..641e1dd8479e 100644 --- a/drivers/mtd/maps/ebony.c +++ b/drivers/mtd/maps/ebony.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/mtd/mtd.h> | 20 | #include <linux/mtd/mtd.h> |
21 | #include <linux/mtd/map.h> | 21 | #include <linux/mtd/map.h> |
22 | #include <linux/mtd/partitions.h> | 22 | #include <linux/mtd/partitions.h> |
23 | #include <linux/config.h> | ||
24 | #include <asm/io.h> | 23 | #include <asm/io.h> |
25 | #include <asm/ibm44x.h> | 24 | #include <asm/ibm44x.h> |
26 | #include <platforms/4xx/ebony.h> | 25 | #include <platforms/4xx/ebony.h> |
diff --git a/drivers/mtd/maps/edb7312.c b/drivers/mtd/maps/edb7312.c index b48a3473ffc1..1c5b97c89685 100644 --- a/drivers/mtd/maps/edb7312.c +++ b/drivers/mtd/maps/edb7312.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <linux/mtd/mtd.h> | 18 | #include <linux/mtd/mtd.h> |
19 | #include <linux/mtd/map.h> | 19 | #include <linux/mtd/map.h> |
20 | #include <linux/config.h> | ||
21 | 20 | ||
22 | #ifdef CONFIG_MTD_PARTITIONS | 21 | #ifdef CONFIG_MTD_PARTITIONS |
23 | #include <linux/mtd/partitions.h> | 22 | #include <linux/mtd/partitions.h> |
diff --git a/drivers/mtd/maps/h720x-flash.c b/drivers/mtd/maps/h720x-flash.c index 0667101ccbe1..6dde3182d64a 100644 --- a/drivers/mtd/maps/h720x-flash.c +++ b/drivers/mtd/maps/h720x-flash.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * 2003 Thomas Gleixner <tglx@linutronix.de> | 8 | * 2003 Thomas Gleixner <tglx@linutronix.de> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/types.h> | 12 | #include <linux/types.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
diff --git a/drivers/mtd/maps/ichxrom.c b/drivers/mtd/maps/ichxrom.c index 16732794edf3..db4b570d874a 100644 --- a/drivers/mtd/maps/ichxrom.c +++ b/drivers/mtd/maps/ichxrom.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/mtd/map.h> | 14 | #include <linux/mtd/map.h> |
15 | #include <linux/mtd/cfi.h> | 15 | #include <linux/mtd/cfi.h> |
16 | #include <linux/mtd/flashchip.h> | 16 | #include <linux/mtd/flashchip.h> |
17 | #include <linux/config.h> | ||
18 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
19 | #include <linux/pci_ids.h> | 18 | #include <linux/pci_ids.h> |
20 | #include <linux/list.h> | 19 | #include <linux/list.h> |
diff --git a/drivers/mtd/maps/impa7.c b/drivers/mtd/maps/impa7.c index ba7f40311a7e..a0b4dc7155dc 100644 --- a/drivers/mtd/maps/impa7.c +++ b/drivers/mtd/maps/impa7.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <linux/mtd/mtd.h> | 18 | #include <linux/mtd/mtd.h> |
19 | #include <linux/mtd/map.h> | 19 | #include <linux/mtd/map.h> |
20 | #include <linux/config.h> | ||
21 | 20 | ||
22 | #ifdef CONFIG_MTD_PARTITIONS | 21 | #ifdef CONFIG_MTD_PARTITIONS |
23 | #include <linux/mtd/partitions.h> | 22 | #include <linux/mtd/partitions.h> |
diff --git a/drivers/mtd/maps/integrator-flash.c b/drivers/mtd/maps/integrator-flash.c index a3ba52fbd868..c8db01b3e45f 100644 --- a/drivers/mtd/maps/integrator-flash.c +++ b/drivers/mtd/maps/integrator-flash.c | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | ======================================================================*/ | 27 | ======================================================================*/ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | #include <linux/types.h> | 30 | #include <linux/types.h> |
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
diff --git a/drivers/mtd/maps/ipaq-flash.c b/drivers/mtd/maps/ipaq-flash.c index b8ccb0a95789..f27c132794c3 100644 --- a/drivers/mtd/maps/ipaq-flash.c +++ b/drivers/mtd/maps/ipaq-flash.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * $Id: ipaq-flash.c,v 1.5 2005/11/07 11:14:27 gleixner Exp $ | 8 | * $Id: ipaq-flash.c,v 1.5 2005/11/07 11:14:27 gleixner Exp $ |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/types.h> | 12 | #include <linux/types.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
diff --git a/drivers/mtd/maps/l440gx.c b/drivers/mtd/maps/l440gx.c index 851bf9576052..6b784ef5ee70 100644 --- a/drivers/mtd/maps/l440gx.c +++ b/drivers/mtd/maps/l440gx.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
14 | #include <linux/mtd/mtd.h> | 14 | #include <linux/mtd/mtd.h> |
15 | #include <linux/mtd/map.h> | 15 | #include <linux/mtd/map.h> |
16 | #include <linux/config.h> | ||
17 | 16 | ||
18 | #define PIIXE_IOBASE_RESOURCE 11 | 17 | #define PIIXE_IOBASE_RESOURCE 11 |
19 | 18 | ||
diff --git a/drivers/mtd/maps/lasat.c b/drivers/mtd/maps/lasat.c index c658d4045ef2..1c13d2dc0cdf 100644 --- a/drivers/mtd/maps/lasat.c +++ b/drivers/mtd/maps/lasat.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/mtd/mtd.h> | 19 | #include <linux/mtd/mtd.h> |
20 | #include <linux/mtd/map.h> | 20 | #include <linux/mtd/map.h> |
21 | #include <linux/mtd/partitions.h> | 21 | #include <linux/mtd/partitions.h> |
22 | #include <linux/config.h> | ||
23 | #include <asm/lasat/lasat.h> | 22 | #include <asm/lasat/lasat.h> |
24 | 23 | ||
25 | static struct mtd_info *lasat_mtd; | 24 | static struct mtd_info *lasat_mtd; |
diff --git a/drivers/mtd/maps/mpc1211.c b/drivers/mtd/maps/mpc1211.c index 4685e8e13460..45a00fac88ac 100644 --- a/drivers/mtd/maps/mpc1211.c +++ b/drivers/mtd/maps/mpc1211.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/mtd/mtd.h> | 15 | #include <linux/mtd/mtd.h> |
16 | #include <linux/mtd/map.h> | 16 | #include <linux/mtd/map.h> |
17 | #include <linux/mtd/partitions.h> | 17 | #include <linux/mtd/partitions.h> |
18 | #include <linux/config.h> | ||
19 | 18 | ||
20 | static struct mtd_info *flash_mtd; | 19 | static struct mtd_info *flash_mtd; |
21 | static struct mtd_partition *parsed_parts; | 20 | static struct mtd_partition *parsed_parts; |
diff --git a/drivers/mtd/maps/mtx-1_flash.c b/drivers/mtd/maps/mtx-1_flash.c index 5c25d4e552c6..d884f2be28f6 100644 --- a/drivers/mtd/maps/mtx-1_flash.c +++ b/drivers/mtd/maps/mtx-1_flash.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/types.h> | 12 | #include <linux/types.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
diff --git a/drivers/mtd/maps/ocotea.c b/drivers/mtd/maps/ocotea.c index a21fcd195ab4..2f07602ba940 100644 --- a/drivers/mtd/maps/ocotea.c +++ b/drivers/mtd/maps/ocotea.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/mtd/mtd.h> | 18 | #include <linux/mtd/mtd.h> |
19 | #include <linux/mtd/map.h> | 19 | #include <linux/mtd/map.h> |
20 | #include <linux/mtd/partitions.h> | 20 | #include <linux/mtd/partitions.h> |
21 | #include <linux/config.h> | ||
22 | #include <asm/io.h> | 21 | #include <asm/io.h> |
23 | #include <asm/ibm44x.h> | 22 | #include <asm/ibm44x.h> |
24 | #include <platforms/4xx/ocotea.h> | 23 | #include <platforms/4xx/ocotea.h> |
diff --git a/drivers/mtd/maps/omap-toto-flash.c b/drivers/mtd/maps/omap-toto-flash.c index dc3765270057..e6e391efbeb6 100644 --- a/drivers/mtd/maps/omap-toto-flash.c +++ b/drivers/mtd/maps/omap-toto-flash.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * $Id: omap-toto-flash.c,v 1.5 2005/11/07 11:14:27 gleixner Exp $ | 8 | * $Id: omap-toto-flash.c,v 1.5 2005/11/07 11:14:27 gleixner Exp $ |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/types.h> | 12 | #include <linux/types.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c index d6301f08906d..7799a25a7f2a 100644 --- a/drivers/mtd/maps/physmap.c +++ b/drivers/mtd/maps/physmap.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/mtd/mtd.h> | 19 | #include <linux/mtd/mtd.h> |
20 | #include <linux/mtd/map.h> | 20 | #include <linux/mtd/map.h> |
21 | #include <linux/config.h> | ||
22 | #include <linux/mtd/partitions.h> | 21 | #include <linux/mtd/partitions.h> |
23 | #include <linux/mtd/physmap.h> | 22 | #include <linux/mtd/physmap.h> |
24 | #include <asm/io.h> | 23 | #include <asm/io.h> |
diff --git a/drivers/mtd/maps/redwood.c b/drivers/mtd/maps/redwood.c index 50b14033613f..ec8fdae1dd99 100644 --- a/drivers/mtd/maps/redwood.c +++ b/drivers/mtd/maps/redwood.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * or implied. | 13 | * or implied. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
18 | #include <linux/types.h> | 17 | #include <linux/types.h> |
19 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c index 5cefb015633c..950bf1c57841 100644 --- a/drivers/mtd/maps/sa1100-flash.c +++ b/drivers/mtd/maps/sa1100-flash.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * | 5 | * |
6 | * $Id: sa1100-flash.c,v 1.51 2005/11/07 11:14:28 gleixner Exp $ | 6 | * $Id: sa1100-flash.c,v 1.51 2005/11/07 11:14:28 gleixner Exp $ |
7 | */ | 7 | */ |
8 | #include <linux/config.h> | ||
9 | #include <linux/module.h> | 8 | #include <linux/module.h> |
10 | #include <linux/types.h> | 9 | #include <linux/types.h> |
11 | #include <linux/ioport.h> | 10 | #include <linux/ioport.h> |
diff --git a/drivers/mtd/maps/sbc8240.c b/drivers/mtd/maps/sbc8240.c index 350286dc1d2e..7d0fcf8f4f33 100644 --- a/drivers/mtd/maps/sbc8240.c +++ b/drivers/mtd/maps/sbc8240.c | |||
@@ -18,7 +18,6 @@ | |||
18 | * Both parts are JEDEC compatible. | 18 | * Both parts are JEDEC compatible. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
diff --git a/drivers/mtd/maps/sc520cdp.c b/drivers/mtd/maps/sc520cdp.c index e8c130e1efd3..9b50cfc355b1 100644 --- a/drivers/mtd/maps/sc520cdp.c +++ b/drivers/mtd/maps/sc520cdp.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * For details see http://www.amd.com/products/epd/desiging/evalboards/18.elansc520/520_cdp_brief/index.html | 25 | * For details see http://www.amd.com/products/epd/desiging/evalboards/18.elansc520/520_cdp_brief/index.html |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/types.h> | 29 | #include <linux/types.h> |
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
diff --git a/drivers/mtd/maps/scb2_flash.c b/drivers/mtd/maps/scb2_flash.c index 97a8dfd69258..dcfb85840d1e 100644 --- a/drivers/mtd/maps/scb2_flash.c +++ b/drivers/mtd/maps/scb2_flash.c | |||
@@ -53,7 +53,6 @@ | |||
53 | #include <linux/mtd/mtd.h> | 53 | #include <linux/mtd/mtd.h> |
54 | #include <linux/mtd/map.h> | 54 | #include <linux/mtd/map.h> |
55 | #include <linux/mtd/cfi.h> | 55 | #include <linux/mtd/cfi.h> |
56 | #include <linux/config.h> | ||
57 | #include <linux/pci.h> | 56 | #include <linux/pci.h> |
58 | #include <linux/pci_ids.h> | 57 | #include <linux/pci_ids.h> |
59 | 58 | ||
diff --git a/drivers/mtd/maps/scx200_docflash.c b/drivers/mtd/maps/scx200_docflash.c index 331a15859d71..7391fd544e86 100644 --- a/drivers/mtd/maps/scx200_docflash.c +++ b/drivers/mtd/maps/scx200_docflash.c | |||
@@ -8,7 +8,6 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/config.h> | ||
12 | #include <linux/types.h> | 11 | #include <linux/types.h> |
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
diff --git a/drivers/mtd/maps/solutionengine.c b/drivers/mtd/maps/solutionengine.c index c53c2c369c9d..d76ceef453ce 100644 --- a/drivers/mtd/maps/solutionengine.c +++ b/drivers/mtd/maps/solutionengine.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/mtd/mtd.h> | 16 | #include <linux/mtd/mtd.h> |
17 | #include <linux/mtd/map.h> | 17 | #include <linux/mtd/map.h> |
18 | #include <linux/mtd/partitions.h> | 18 | #include <linux/mtd/partitions.h> |
19 | #include <linux/config.h> | ||
20 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
21 | 20 | ||
22 | static struct mtd_info *flash_mtd; | 21 | static struct mtd_info *flash_mtd; |
diff --git a/drivers/mtd/maps/tqm834x.c b/drivers/mtd/maps/tqm834x.c index c7ae9a515c1a..58e5912bd381 100644 --- a/drivers/mtd/maps/tqm834x.c +++ b/drivers/mtd/maps/tqm834x.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/types.h> | 16 | #include <linux/types.h> |
diff --git a/drivers/mtd/maps/tqm8xxl.c b/drivers/mtd/maps/tqm8xxl.c index a43517053e7c..19578ba84ee8 100644 --- a/drivers/mtd/maps/tqm8xxl.c +++ b/drivers/mtd/maps/tqm8xxl.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Thus, we choose CONFIG_MTD_CFI_I2 & CONFIG_MTD_CFI_B4 at | 22 | * Thus, we choose CONFIG_MTD_CFI_I2 & CONFIG_MTD_CFI_B4 at |
23 | * kernel configuration. | 23 | * kernel configuration. |
24 | */ | 24 | */ |
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/types.h> | 26 | #include <linux/types.h> |
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
diff --git a/drivers/mtd/maps/ts5500_flash.c b/drivers/mtd/maps/ts5500_flash.c index a7422c200567..b47270e850bc 100644 --- a/drivers/mtd/maps/ts5500_flash.c +++ b/drivers/mtd/maps/ts5500_flash.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * $Id: ts5500_flash.c,v 1.5 2005/11/07 11:14:28 gleixner Exp $ | 26 | * $Id: ts5500_flash.c,v 1.5 2005/11/07 11:14:28 gleixner Exp $ |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | #include <linux/init.h> | 29 | #include <linux/init.h> |
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c index f7264dc2ac9b..389fea28b9a6 100644 --- a/drivers/mtd/maps/uclinux.c +++ b/drivers/mtd/maps/uclinux.c | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | /****************************************************************************/ | 11 | /****************************************************************************/ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/types.h> | 14 | #include <linux/types.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
diff --git a/drivers/mtd/maps/walnut.c b/drivers/mtd/maps/walnut.c index f46bec66150f..ec80eec376bf 100644 --- a/drivers/mtd/maps/walnut.c +++ b/drivers/mtd/maps/walnut.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/mtd/mtd.h> | 20 | #include <linux/mtd/mtd.h> |
21 | #include <linux/mtd/map.h> | 21 | #include <linux/mtd/map.h> |
22 | #include <linux/mtd/partitions.h> | 22 | #include <linux/mtd/partitions.h> |
23 | #include <linux/config.h> | ||
24 | #include <asm/io.h> | 23 | #include <asm/io.h> |
25 | #include <asm/ibm4xx.h> | 24 | #include <asm/ibm4xx.h> |
26 | #include <platforms/4xx/walnut.h> | 25 | #include <platforms/4xx/walnut.h> |
diff --git a/drivers/mtd/maps/wr_sbc82xx_flash.c b/drivers/mtd/maps/wr_sbc82xx_flash.c index 60c197ec455b..ac5b8105b6ef 100644 --- a/drivers/mtd/maps/wr_sbc82xx_flash.c +++ b/drivers/mtd/maps/wr_sbc82xx_flash.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <linux/mtd/mtd.h> | 18 | #include <linux/mtd/mtd.h> |
19 | #include <linux/mtd/map.h> | 19 | #include <linux/mtd/map.h> |
20 | #include <linux/config.h> | ||
21 | #include <linux/mtd/partitions.h> | 20 | #include <linux/mtd/partitions.h> |
22 | 21 | ||
23 | #include <asm/immap_cpm2.h> | 22 | #include <asm/immap_cpm2.h> |
diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c index e5c78463ebfd..04ed34694b14 100644 --- a/drivers/mtd/mtdblock.c +++ b/drivers/mtd/mtdblock.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> | 7 | * (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/fs.h> | 10 | #include <linux/fs.h> |
12 | #include <linux/init.h> | 11 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 9a4b59d92525..fb8b4f7e48d3 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/device.h> | 8 | #include <linux/device.h> |
10 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
11 | #include <linux/init.h> | 10 | #include <linux/init.h> |
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 16a952dd486a..168d3ba063c3 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/module.h> | 9 | #include <linux/module.h> |
11 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
12 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index 77a7123a5c56..06a930372b7a 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/list.h> | 18 | #include <linux/list.h> |
19 | #include <linux/config.h> | ||
20 | #include <linux/kmod.h> | 19 | #include <linux/kmod.h> |
21 | #include <linux/mtd/mtd.h> | 20 | #include <linux/mtd/mtd.h> |
22 | #include <linux/mtd/partitions.h> | 21 | #include <linux/mtd/partitions.h> |
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index ebd64abc8be8..545ff252d81e 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * $Id: nandsim.c,v 1.8 2005/03/19 15:33:56 dedekind Exp $ | 25 | * $Id: nandsim.c,v 1.8 2005/03/19 15:33:56 dedekind Exp $ |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/init.h> | 28 | #include <linux/init.h> |
30 | #include <linux/types.h> | 29 | #include <linux/types.h> |
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c index dc7573501d8c..dd5cea8b4a7a 100644 --- a/drivers/mtd/nftlcore.c +++ b/drivers/mtd/nftlcore.c | |||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | #define PRERELEASE | 12 | #define PRERELEASE |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <asm/errno.h> | 16 | #include <asm/errno.h> |
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c index dc845f36fe49..cbdae54f715f 100644 --- a/drivers/net/3c509.c +++ b/drivers/net/3c509.c | |||
@@ -68,7 +68,6 @@ | |||
68 | /* Maximum events (Rx packets, etc.) to handle at each interrupt. */ | 68 | /* Maximum events (Rx packets, etc.) to handle at each interrupt. */ |
69 | static int max_interrupt_work = 10; | 69 | static int max_interrupt_work = 10; |
70 | 70 | ||
71 | #include <linux/config.h> | ||
72 | #include <linux/module.h> | 71 | #include <linux/module.h> |
73 | #ifdef CONFIG_MCA | 72 | #ifdef CONFIG_MCA |
74 | #include <linux/mca.h> | 73 | #include <linux/mca.h> |
diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c index 91d1c4c24d9b..ac60f3f62db8 100644 --- a/drivers/net/3c515.c +++ b/drivers/net/3c515.c | |||
@@ -57,7 +57,6 @@ static int max_interrupt_work = 20; | |||
57 | #define RX_RING_SIZE 16 | 57 | #define RX_RING_SIZE 16 |
58 | #define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer. */ | 58 | #define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer. */ |
59 | 59 | ||
60 | #include <linux/config.h> | ||
61 | #include <linux/module.h> | 60 | #include <linux/module.h> |
62 | #include <linux/isapnp.h> | 61 | #include <linux/isapnp.h> |
63 | #include <linux/kernel.h> | 62 | #include <linux/kernel.h> |
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index d2f808979a2b..45125db44177 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -236,7 +236,6 @@ static int vortex_debug = VORTEX_DEBUG; | |||
236 | static int vortex_debug = 1; | 236 | static int vortex_debug = 1; |
237 | #endif | 237 | #endif |
238 | 238 | ||
239 | #include <linux/config.h> | ||
240 | #include <linux/module.h> | 239 | #include <linux/module.h> |
241 | #include <linux/kernel.h> | 240 | #include <linux/kernel.h> |
242 | #include <linux/string.h> | 241 | #include <linux/string.h> |
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index d26dd6a7062d..1d7af760c2b1 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
@@ -52,7 +52,6 @@ | |||
52 | #define DRV_RELDATE "Mar 22, 2004" | 52 | #define DRV_RELDATE "Mar 22, 2004" |
53 | 53 | ||
54 | 54 | ||
55 | #include <linux/config.h> | ||
56 | #include <linux/module.h> | 55 | #include <linux/module.h> |
57 | #include <linux/moduleparam.h> | 56 | #include <linux/moduleparam.h> |
58 | #include <linux/kernel.h> | 57 | #include <linux/kernel.h> |
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index ed2e3c03bc88..d21e98f5adbc 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
@@ -93,7 +93,6 @@ | |||
93 | #define DRV_VERSION "0.9.27" | 93 | #define DRV_VERSION "0.9.27" |
94 | 94 | ||
95 | 95 | ||
96 | #include <linux/config.h> | ||
97 | #include <linux/module.h> | 96 | #include <linux/module.h> |
98 | #include <linux/kernel.h> | 97 | #include <linux/kernel.h> |
99 | #include <linux/compiler.h> | 98 | #include <linux/compiler.h> |
diff --git a/drivers/net/82596.c b/drivers/net/82596.c index 8a9f7d61b9b1..7e2ca9571467 100644 --- a/drivers/net/82596.c +++ b/drivers/net/82596.c | |||
@@ -40,7 +40,6 @@ | |||
40 | 40 | ||
41 | */ | 41 | */ |
42 | 42 | ||
43 | #include <linux/config.h> | ||
44 | #include <linux/module.h> | 43 | #include <linux/module.h> |
45 | #include <linux/kernel.h> | 44 | #include <linux/kernel.h> |
46 | #include <linux/string.h> | 45 | #include <linux/string.h> |
diff --git a/drivers/net/8390.h b/drivers/net/8390.h index 51e39dcd0603..a9a58f518f45 100644 --- a/drivers/net/8390.h +++ b/drivers/net/8390.h | |||
@@ -7,7 +7,6 @@ | |||
7 | #ifndef _8390_h | 7 | #ifndef _8390_h |
8 | #define _8390_h | 8 | #define _8390_h |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/if_ether.h> | 10 | #include <linux/if_ether.h> |
12 | #include <linux/ioport.h> | 11 | #include <linux/ioport.h> |
13 | #include <linux/skbuff.h> | 12 | #include <linux/skbuff.h> |
diff --git a/drivers/net/Space.c b/drivers/net/Space.c index 60304f7e7e5b..a8c245a82261 100644 --- a/drivers/net/Space.c +++ b/drivers/net/Space.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * as published by the Free Software Foundation; either version | 27 | * as published by the Free Software Foundation; either version |
28 | * 2 of the License, or (at your option) any later version. | 28 | * 2 of the License, or (at your option) any later version. |
29 | */ | 29 | */ |
30 | #include <linux/config.h> | ||
31 | #include <linux/netdevice.h> | 30 | #include <linux/netdevice.h> |
32 | #include <linux/etherdevice.h> | 31 | #include <linux/etherdevice.h> |
33 | #include <linux/trdevice.h> | 32 | #include <linux/trdevice.h> |
diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c index 71165ac0257a..519390c033c3 100644 --- a/drivers/net/a2065.c +++ b/drivers/net/a2065.c | |||
@@ -48,7 +48,6 @@ | |||
48 | #include <linux/skbuff.h> | 48 | #include <linux/skbuff.h> |
49 | #include <linux/slab.h> | 49 | #include <linux/slab.h> |
50 | #include <linux/string.h> | 50 | #include <linux/string.h> |
51 | #include <linux/config.h> | ||
52 | #include <linux/init.h> | 51 | #include <linux/init.h> |
53 | #include <linux/crc32.h> | 52 | #include <linux/crc32.h> |
54 | #include <linux/zorro.h> | 53 | #include <linux/zorro.h> |
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c index 23ff22ba5d31..c290b5ae63b2 100644 --- a/drivers/net/acenic.c +++ b/drivers/net/acenic.c | |||
@@ -50,7 +50,6 @@ | |||
50 | * Grant Grundler <grundler@cup.hp.com>: PCI write posting fixes. | 50 | * Grant Grundler <grundler@cup.hp.com>: PCI write posting fixes. |
51 | */ | 51 | */ |
52 | 52 | ||
53 | #include <linux/config.h> | ||
54 | #include <linux/module.h> | 53 | #include <linux/module.h> |
55 | #include <linux/moduleparam.h> | 54 | #include <linux/moduleparam.h> |
56 | #include <linux/version.h> | 55 | #include <linux/version.h> |
diff --git a/drivers/net/acenic.h b/drivers/net/acenic.h index a97107023495..62ec8ceee698 100644 --- a/drivers/net/acenic.h +++ b/drivers/net/acenic.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _ACENIC_H_ | 1 | #ifndef _ACENIC_H_ |
2 | #define _ACENIC_H_ | 2 | #define _ACENIC_H_ |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | 4 | ||
6 | /* | 5 | /* |
7 | * Generate TX index update each time, when TX ring is closed. | 6 | * Generate TX index update each time, when TX ring is closed. |
diff --git a/drivers/net/acenic_firmware.h b/drivers/net/acenic_firmware.h index d7882dd783c8..ec146f60d77b 100644 --- a/drivers/net/acenic_firmware.h +++ b/drivers/net/acenic_firmware.h | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | /* | 1 | /* |
3 | * Declare these here even if Tigon I support is disabled to avoid | 2 | * Declare these here even if Tigon I support is disabled to avoid |
4 | * the compiler complaining about undefined symbols. | 3 | * the compiler complaining about undefined symbols. |
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index d9ba8be72af8..c017c4f6b3b5 100644 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c | |||
@@ -69,7 +69,6 @@ Revision History: | |||
69 | */ | 69 | */ |
70 | 70 | ||
71 | 71 | ||
72 | #include <linux/config.h> | ||
73 | #include <linux/module.h> | 72 | #include <linux/module.h> |
74 | #include <linux/kernel.h> | 73 | #include <linux/kernel.h> |
75 | #include <linux/types.h> | 74 | #include <linux/types.h> |
diff --git a/drivers/net/appletalk/cops.c b/drivers/net/appletalk/cops.c index 9edaa183227a..1d01ac0000e4 100644 --- a/drivers/net/appletalk/cops.c +++ b/drivers/net/appletalk/cops.c | |||
@@ -48,7 +48,6 @@ static const char *version = | |||
48 | * the driver figure it out. | 48 | * the driver figure it out. |
49 | */ | 49 | */ |
50 | 50 | ||
51 | #include <linux/config.h> | ||
52 | #include <linux/module.h> | 51 | #include <linux/module.h> |
53 | #include <linux/kernel.h> | 52 | #include <linux/kernel.h> |
54 | #include <linux/types.h> | 53 | #include <linux/types.h> |
diff --git a/drivers/net/appletalk/cops_ffdrv.h b/drivers/net/appletalk/cops_ffdrv.h index 31cf8c9c947f..b02005087c1b 100644 --- a/drivers/net/appletalk/cops_ffdrv.h +++ b/drivers/net/appletalk/cops_ffdrv.h | |||
@@ -24,7 +24,6 @@ | |||
24 | * - Jay Schulist <jschlst@samba.org> | 24 | * - Jay Schulist <jschlst@samba.org> |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | 27 | ||
29 | #ifdef CONFIG_COPS_DAYNA | 28 | #ifdef CONFIG_COPS_DAYNA |
30 | 29 | ||
diff --git a/drivers/net/appletalk/cops_ltdrv.h b/drivers/net/appletalk/cops_ltdrv.h index 4afb8e18ba65..c699b1ad31da 100644 --- a/drivers/net/appletalk/cops_ltdrv.h +++ b/drivers/net/appletalk/cops_ltdrv.h | |||
@@ -23,7 +23,6 @@ | |||
23 | * - Jay Schulist <jschlst@samba.org> | 23 | * - Jay Schulist <jschlst@samba.org> |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | 26 | ||
28 | #ifdef CONFIG_COPS_TANGENT | 27 | #ifdef CONFIG_COPS_TANGENT |
29 | 28 | ||
diff --git a/drivers/net/appletalk/ipddp.c b/drivers/net/appletalk/ipddp.c index 1a44a79ed064..7f7dd450226a 100644 --- a/drivers/net/appletalk/ipddp.c +++ b/drivers/net/appletalk/ipddp.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * of the GNU General Public License, incorporated herein by reference. | 23 | * of the GNU General Public License, incorporated herein by reference. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/module.h> | 26 | #include <linux/module.h> |
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
29 | #include <linux/init.h> | 28 | #include <linux/init.h> |
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c index fabc0607b0f1..5a95005253fa 100644 --- a/drivers/net/arcnet/arcnet.c +++ b/drivers/net/arcnet/arcnet.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #define VERSION "arcnet: v3.93 BETA 2000/04/29 - by Avery Pennarun et al.\n" | 44 | #define VERSION "arcnet: v3.93 BETA 2000/04/29 - by Avery Pennarun et al.\n" |
45 | 45 | ||
46 | #include <linux/module.h> | 46 | #include <linux/module.h> |
47 | #include <linux/config.h> | ||
48 | #include <linux/types.h> | 47 | #include <linux/types.h> |
49 | #include <linux/delay.h> | 48 | #include <linux/delay.h> |
50 | #include <linux/netdevice.h> | 49 | #include <linux/netdevice.h> |
diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c index 613005a0285d..85493b7b924f 100644 --- a/drivers/net/arm/at91_ether.c +++ b/drivers/net/arm/at91_ether.c | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/config.h> | ||
23 | #include <linux/mii.h> | 22 | #include <linux/mii.h> |
24 | #include <linux/netdevice.h> | 23 | #include <linux/netdevice.h> |
25 | #include <linux/etherdevice.h> | 24 | #include <linux/etherdevice.h> |
diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c index e613cc289749..5d7929c79bce 100644 --- a/drivers/net/at1700.c +++ b/drivers/net/at1700.c | |||
@@ -35,7 +35,6 @@ | |||
35 | response to inb()s from other device probes! | 35 | response to inb()s from other device probes! |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include <linux/config.h> | ||
39 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
40 | #include <linux/netdevice.h> | 39 | #include <linux/netdevice.h> |
41 | #include <linux/etherdevice.h> | 40 | #include <linux/etherdevice.h> |
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index 038d5fcb15e6..55f6e3f65b53 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c | |||
@@ -35,7 +35,6 @@ | |||
35 | * | 35 | * |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include <linux/config.h> | ||
39 | #include <linux/module.h> | 38 | #include <linux/module.h> |
40 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
41 | #include <linux/sched.h> | 40 | #include <linux/sched.h> |
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c index bbca8ae8018c..6fad83f24c4f 100644 --- a/drivers/net/bmac.c +++ b/drivers/net/bmac.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * May 1999, Al Viro: proper release of /proc/net/bmac entry, switched to | 7 | * May 1999, Al Viro: proper release of /proc/net/bmac entry, switched to |
8 | * dynamic procfs inode. | 8 | * dynamic procfs inode. |
9 | */ | 9 | */ |
10 | #include <linux/config.h> | ||
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
13 | #include <linux/netdevice.h> | 12 | #include <linux/netdevice.h> |
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 7635736cc791..7e32d4ea71e2 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * Written by: Michael Chan (mchan@broadcom.com) | 9 | * Written by: Michael Chan (mchan@broadcom.com) |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | 12 | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/moduleparam.h> | 14 | #include <linux/moduleparam.h> |
@@ -57,8 +56,8 @@ | |||
57 | 56 | ||
58 | #define DRV_MODULE_NAME "bnx2" | 57 | #define DRV_MODULE_NAME "bnx2" |
59 | #define PFX DRV_MODULE_NAME ": " | 58 | #define PFX DRV_MODULE_NAME ": " |
60 | #define DRV_MODULE_VERSION "1.4.42" | 59 | #define DRV_MODULE_VERSION "1.4.43" |
61 | #define DRV_MODULE_RELDATE "June 12, 2006" | 60 | #define DRV_MODULE_RELDATE "June 28, 2006" |
62 | 61 | ||
63 | #define RUN_AT(x) (jiffies + (x)) | 62 | #define RUN_AT(x) (jiffies + (x)) |
64 | 63 | ||
@@ -1676,7 +1675,7 @@ bnx2_tx_int(struct bnx2 *bp) | |||
1676 | 1675 | ||
1677 | tx_free_bd += last + 1; | 1676 | tx_free_bd += last + 1; |
1678 | 1677 | ||
1679 | dev_kfree_skb_irq(skb); | 1678 | dev_kfree_skb(skb); |
1680 | 1679 | ||
1681 | hw_cons = bp->hw_tx_cons = | 1680 | hw_cons = bp->hw_tx_cons = |
1682 | sblk->status_tx_quick_consumer_index0; | 1681 | sblk->status_tx_quick_consumer_index0; |
@@ -1824,7 +1823,7 @@ reuse_rx: | |||
1824 | if ((len > (bp->dev->mtu + ETH_HLEN)) && | 1823 | if ((len > (bp->dev->mtu + ETH_HLEN)) && |
1825 | (ntohs(skb->protocol) != 0x8100)) { | 1824 | (ntohs(skb->protocol) != 0x8100)) { |
1826 | 1825 | ||
1827 | dev_kfree_skb_irq(skb); | 1826 | dev_kfree_skb(skb); |
1828 | goto next_rx; | 1827 | goto next_rx; |
1829 | 1828 | ||
1830 | } | 1829 | } |
@@ -3643,7 +3642,7 @@ bnx2_free_tx_skbs(struct bnx2 *bp) | |||
3643 | skb_shinfo(skb)->frags[j].size, | 3642 | skb_shinfo(skb)->frags[j].size, |
3644 | PCI_DMA_TODEVICE); | 3643 | PCI_DMA_TODEVICE); |
3645 | } | 3644 | } |
3646 | dev_kfree_skb_any(skb); | 3645 | dev_kfree_skb(skb); |
3647 | i += j + 1; | 3646 | i += j + 1; |
3648 | } | 3647 | } |
3649 | 3648 | ||
@@ -3669,7 +3668,7 @@ bnx2_free_rx_skbs(struct bnx2 *bp) | |||
3669 | 3668 | ||
3670 | rx_buf->skb = NULL; | 3669 | rx_buf->skb = NULL; |
3671 | 3670 | ||
3672 | dev_kfree_skb_any(skb); | 3671 | dev_kfree_skb(skb); |
3673 | } | 3672 | } |
3674 | } | 3673 | } |
3675 | 3674 | ||
@@ -3999,7 +3998,7 @@ bnx2_run_loopback(struct bnx2 *bp, int loopback_mode) | |||
3999 | udelay(5); | 3998 | udelay(5); |
4000 | 3999 | ||
4001 | pci_unmap_single(bp->pdev, map, pkt_size, PCI_DMA_TODEVICE); | 4000 | pci_unmap_single(bp->pdev, map, pkt_size, PCI_DMA_TODEVICE); |
4002 | dev_kfree_skb_irq(skb); | 4001 | dev_kfree_skb(skb); |
4003 | 4002 | ||
4004 | if (bp->status_blk->status_tx_quick_consumer_index0 != bp->tx_prod) { | 4003 | if (bp->status_blk->status_tx_quick_consumer_index0 != bp->tx_prod) { |
4005 | goto loopback_test_done; | 4004 | goto loopback_test_done; |
@@ -4541,7 +4540,7 @@ bnx2_close(struct net_device *dev) | |||
4541 | bnx2_netif_stop(bp); | 4540 | bnx2_netif_stop(bp); |
4542 | del_timer_sync(&bp->timer); | 4541 | del_timer_sync(&bp->timer); |
4543 | if (bp->flags & NO_WOL_FLAG) | 4542 | if (bp->flags & NO_WOL_FLAG) |
4544 | reset_code = BNX2_DRV_MSG_CODE_UNLOAD; | 4543 | reset_code = BNX2_DRV_MSG_CODE_UNLOAD_LNK_DN; |
4545 | else if (bp->wol) | 4544 | else if (bp->wol) |
4546 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_WOL; | 4545 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_WOL; |
4547 | else | 4546 | else |
@@ -5128,6 +5127,16 @@ bnx2_set_rx_csum(struct net_device *dev, u32 data) | |||
5128 | return 0; | 5127 | return 0; |
5129 | } | 5128 | } |
5130 | 5129 | ||
5130 | static int | ||
5131 | bnx2_set_tso(struct net_device *dev, u32 data) | ||
5132 | { | ||
5133 | if (data) | ||
5134 | dev->features |= NETIF_F_TSO | NETIF_F_TSO_ECN; | ||
5135 | else | ||
5136 | dev->features &= ~(NETIF_F_TSO | NETIF_F_TSO_ECN); | ||
5137 | return 0; | ||
5138 | } | ||
5139 | |||
5131 | #define BNX2_NUM_STATS 46 | 5140 | #define BNX2_NUM_STATS 46 |
5132 | 5141 | ||
5133 | static struct { | 5142 | static struct { |
@@ -5445,7 +5454,7 @@ static struct ethtool_ops bnx2_ethtool_ops = { | |||
5445 | .set_sg = ethtool_op_set_sg, | 5454 | .set_sg = ethtool_op_set_sg, |
5446 | #ifdef BCM_TSO | 5455 | #ifdef BCM_TSO |
5447 | .get_tso = ethtool_op_get_tso, | 5456 | .get_tso = ethtool_op_get_tso, |
5448 | .set_tso = ethtool_op_set_tso, | 5457 | .set_tso = bnx2_set_tso, |
5449 | #endif | 5458 | #endif |
5450 | .self_test_count = bnx2_self_test_count, | 5459 | .self_test_count = bnx2_self_test_count, |
5451 | .self_test = bnx2_self_test, | 5460 | .self_test = bnx2_self_test, |
@@ -5926,7 +5935,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
5926 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 5935 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
5927 | #endif | 5936 | #endif |
5928 | #ifdef BCM_TSO | 5937 | #ifdef BCM_TSO |
5929 | dev->features |= NETIF_F_TSO; | 5938 | dev->features |= NETIF_F_TSO | NETIF_F_TSO_ECN; |
5930 | #endif | 5939 | #endif |
5931 | 5940 | ||
5932 | netif_carrier_off(bp->dev); | 5941 | netif_carrier_off(bp->dev); |
@@ -5968,7 +5977,7 @@ bnx2_suspend(struct pci_dev *pdev, pm_message_t state) | |||
5968 | netif_device_detach(dev); | 5977 | netif_device_detach(dev); |
5969 | del_timer_sync(&bp->timer); | 5978 | del_timer_sync(&bp->timer); |
5970 | if (bp->flags & NO_WOL_FLAG) | 5979 | if (bp->flags & NO_WOL_FLAG) |
5971 | reset_code = BNX2_DRV_MSG_CODE_UNLOAD; | 5980 | reset_code = BNX2_DRV_MSG_CODE_UNLOAD_LNK_DN; |
5972 | else if (bp->wol) | 5981 | else if (bp->wol) |
5973 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_WOL; | 5982 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_WOL; |
5974 | else | 5983 | else |
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index 5845e334941b..658c5ee95c73 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h | |||
@@ -4174,6 +4174,7 @@ struct fw_info { | |||
4174 | #define BNX2_DRV_MSG_CODE_PULSE 0x06000000 | 4174 | #define BNX2_DRV_MSG_CODE_PULSE 0x06000000 |
4175 | #define BNX2_DRV_MSG_CODE_DIAG 0x07000000 | 4175 | #define BNX2_DRV_MSG_CODE_DIAG 0x07000000 |
4176 | #define BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL 0x09000000 | 4176 | #define BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL 0x09000000 |
4177 | #define BNX2_DRV_MSG_CODE_UNLOAD_LNK_DN 0x0b000000 | ||
4177 | 4178 | ||
4178 | #define BNX2_DRV_MSG_DATA 0x00ff0000 | 4179 | #define BNX2_DRV_MSG_DATA 0x00ff0000 |
4179 | #define BNX2_DRV_MSG_DATA_WAIT0 0x00010000 | 4180 | #define BNX2_DRV_MSG_DATA_WAIT0 0x00010000 |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 8171cae06688..8b951238f3a2 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -33,7 +33,6 @@ | |||
33 | 33 | ||
34 | //#define BONDING_DEBUG 1 | 34 | //#define BONDING_DEBUG 1 |
35 | 35 | ||
36 | #include <linux/config.h> | ||
37 | #include <linux/kernel.h> | 36 | #include <linux/kernel.h> |
38 | #include <linux/module.h> | 37 | #include <linux/module.h> |
39 | #include <linux/sched.h> | 38 | #include <linux/sched.h> |
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 5a9bd95884be..cfe4dc3a93a3 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * file called LICENSE. | 20 | * file called LICENSE. |
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | #include <linux/config.h> | ||
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 565a54f1d06a..b89c7bb2c591 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -66,7 +66,6 @@ | |||
66 | * by default, the selective clear mask is set up to process rx packets. | 66 | * by default, the selective clear mask is set up to process rx packets. |
67 | */ | 67 | */ |
68 | 68 | ||
69 | #include <linux/config.h> | ||
70 | 69 | ||
71 | #include <linux/module.h> | 70 | #include <linux/module.h> |
72 | #include <linux/kernel.h> | 71 | #include <linux/kernel.h> |
diff --git a/drivers/net/chelsio/common.h b/drivers/net/chelsio/common.h index bf3e7b6a7a18..5d9dd14427c5 100644 --- a/drivers/net/chelsio/common.h +++ b/drivers/net/chelsio/common.h | |||
@@ -39,7 +39,6 @@ | |||
39 | #ifndef _CXGB_COMMON_H_ | 39 | #ifndef _CXGB_COMMON_H_ |
40 | #define _CXGB_COMMON_H_ | 40 | #define _CXGB_COMMON_H_ |
41 | 41 | ||
42 | #include <linux/config.h> | ||
43 | #include <linux/module.h> | 42 | #include <linux/module.h> |
44 | #include <linux/netdevice.h> | 43 | #include <linux/netdevice.h> |
45 | #include <linux/types.h> | 44 | #include <linux/types.h> |
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c index 7fe2638ae06d..c490a862e79c 100644 --- a/drivers/net/chelsio/cxgb2.c +++ b/drivers/net/chelsio/cxgb2.c | |||
@@ -37,7 +37,6 @@ | |||
37 | ****************************************************************************/ | 37 | ****************************************************************************/ |
38 | 38 | ||
39 | #include "common.h" | 39 | #include "common.h" |
40 | #include <linux/config.h> | ||
41 | #include <linux/module.h> | 40 | #include <linux/module.h> |
42 | #include <linux/init.h> | 41 | #include <linux/init.h> |
43 | #include <linux/pci.h> | 42 | #include <linux/pci.h> |
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c index 53efff6da784..87f94d939ff8 100644 --- a/drivers/net/chelsio/sge.c +++ b/drivers/net/chelsio/sge.c | |||
@@ -39,7 +39,6 @@ | |||
39 | 39 | ||
40 | #include "common.h" | 40 | #include "common.h" |
41 | 41 | ||
42 | #include <linux/config.h> | ||
43 | #include <linux/types.h> | 42 | #include <linux/types.h> |
44 | #include <linux/errno.h> | 43 | #include <linux/errno.h> |
45 | #include <linux/pci.h> | 44 | #include <linux/pci.h> |
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c index 64105e4eaf31..d3654fd71604 100644 --- a/drivers/net/cris/eth_v10.c +++ b/drivers/net/cris/eth_v10.c | |||
@@ -218,7 +218,6 @@ | |||
218 | * | 218 | * |
219 | */ | 219 | */ |
220 | 220 | ||
221 | #include <linux/config.h> | ||
222 | 221 | ||
223 | #include <linux/module.h> | 222 | #include <linux/module.h> |
224 | 223 | ||
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index ef54ebeb29b8..47eecce35fa4 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -100,7 +100,6 @@ | |||
100 | 100 | ||
101 | /* Always include 'config.h' first in case the user wants to turn on | 101 | /* Always include 'config.h' first in case the user wants to turn on |
102 | or override something. */ | 102 | or override something. */ |
103 | #include <linux/config.h> | ||
104 | #include <linux/module.h> | 103 | #include <linux/module.h> |
105 | 104 | ||
106 | /* | 105 | /* |
diff --git a/drivers/net/cs89x0.h b/drivers/net/cs89x0.h index bd954aaa636f..968fe11a0bf0 100644 --- a/drivers/net/cs89x0.h +++ b/drivers/net/cs89x0.h | |||
@@ -14,7 +14,6 @@ | |||
14 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 14 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | 17 | ||
19 | #define PP_ChipID 0x0000 /* offset 0h -> Corp -ID */ | 18 | #define PP_ChipID 0x0000 /* offset 0h -> Corp -ID */ |
20 | /* offset 2h -> Model/Product Number */ | 19 | /* offset 2h -> Model/Product Number */ |
diff --git a/drivers/net/declance.c b/drivers/net/declance.c index d3d958e7ac56..2038ca7e49ce 100644 --- a/drivers/net/declance.c +++ b/drivers/net/declance.c | |||
@@ -42,7 +42,6 @@ | |||
42 | * bits. macro | 42 | * bits. macro |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <linux/config.h> | ||
46 | #include <linux/crc32.h> | 45 | #include <linux/crc32.h> |
47 | #include <linux/delay.h> | 46 | #include <linux/delay.h> |
48 | #include <linux/errno.h> | 47 | #include <linux/errno.h> |
diff --git a/drivers/net/depca.c b/drivers/net/depca.c index e946c43d3b10..b1cbe99249c1 100644 --- a/drivers/net/depca.c +++ b/drivers/net/depca.c | |||
@@ -235,7 +235,6 @@ | |||
235 | ========================================================================= | 235 | ========================================================================= |
236 | */ | 236 | */ |
237 | 237 | ||
238 | #include <linux/config.h> | ||
239 | #include <linux/module.h> | 238 | #include <linux/module.h> |
240 | #include <linux/kernel.h> | 239 | #include <linux/kernel.h> |
241 | #include <linux/string.h> | 240 | #include <linux/string.h> |
diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c index 038447fb5c5e..29778055223b 100644 --- a/drivers/net/dl2k.c +++ b/drivers/net/dl2k.c | |||
@@ -390,7 +390,7 @@ parse_eeprom (struct net_device *dev) | |||
390 | for (i = 0; i < 6; i++) | 390 | for (i = 0; i < 6; i++) |
391 | dev->dev_addr[i] = psrom->mac_addr[i]; | 391 | dev->dev_addr[i] = psrom->mac_addr[i]; |
392 | 392 | ||
393 | /* Parse Software Infomation Block */ | 393 | /* Parse Software Information Block */ |
394 | i = 0x30; | 394 | i = 0x30; |
395 | psib = (u8 *) sromdata; | 395 | psib = (u8 *) sromdata; |
396 | do { | 396 | do { |
diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c index dd8c15ac5c77..36d511729f71 100644 --- a/drivers/net/dummy.c +++ b/drivers/net/dummy.c | |||
@@ -28,7 +28,6 @@ | |||
28 | Alan Cox, 30th May 1994 | 28 | Alan Cox, 30th May 1994 |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | #include <linux/module.h> | 31 | #include <linux/module.h> |
33 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
34 | #include <linux/netdevice.h> | 33 | #include <linux/netdevice.h> |
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 93a286570923..a1d676a0df7c 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -138,7 +138,6 @@ | |||
138 | * - Stratus87247: protect MDI control register manipulations | 138 | * - Stratus87247: protect MDI control register manipulations |
139 | */ | 139 | */ |
140 | 140 | ||
141 | #include <linux/config.h> | ||
142 | #include <linux/module.h> | 141 | #include <linux/module.h> |
143 | #include <linux/moduleparam.h> | 142 | #include <linux/moduleparam.h> |
144 | #include <linux/kernel.h> | 143 | #include <linux/kernel.h> |
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index 2bc34fbfa69c..3042d33e2d4d 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h | |||
@@ -34,7 +34,6 @@ | |||
34 | #define _E1000_H_ | 34 | #define _E1000_H_ |
35 | 35 | ||
36 | #include <linux/stddef.h> | 36 | #include <linux/stddef.h> |
37 | #include <linux/config.h> | ||
38 | #include <linux/module.h> | 37 | #include <linux/module.h> |
39 | #include <linux/types.h> | 38 | #include <linux/types.h> |
40 | #include <asm/byteorder.h> | 39 | #include <asm/byteorder.h> |
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c index ecf5ad85a684..1e2fbbbb966e 100644 --- a/drivers/net/eepro100.c +++ b/drivers/net/eepro100.c | |||
@@ -87,7 +87,6 @@ static int options[] = {-1, -1, -1, -1, -1, -1, -1, -1}; | |||
87 | /* Size of an pre-allocated Rx buffer: <Ethernet MTU> + slack.*/ | 87 | /* Size of an pre-allocated Rx buffer: <Ethernet MTU> + slack.*/ |
88 | #define PKT_BUF_SZ 1536 | 88 | #define PKT_BUF_SZ 1536 |
89 | 89 | ||
90 | #include <linux/config.h> | ||
91 | #include <linux/module.h> | 90 | #include <linux/module.h> |
92 | 91 | ||
93 | #include <linux/kernel.h> | 92 | #include <linux/kernel.h> |
diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c index a74b20715755..33291bcf6d4c 100644 --- a/drivers/net/eexpress.c +++ b/drivers/net/eexpress.c | |||
@@ -97,7 +97,6 @@ | |||
97 | #define LOCKUP16 0 | 97 | #define LOCKUP16 0 |
98 | #endif | 98 | #endif |
99 | 99 | ||
100 | #include <linux/config.h> | ||
101 | #include <linux/module.h> | 100 | #include <linux/module.h> |
102 | #include <linux/kernel.h> | 101 | #include <linux/kernel.h> |
103 | #include <linux/types.h> | 102 | #include <linux/types.h> |
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c index ee34a16eb4e2..b160abed8dd7 100644 --- a/drivers/net/epic100.c +++ b/drivers/net/epic100.c | |||
@@ -114,7 +114,6 @@ static int rx_copybreak; | |||
114 | #define TX_FIFO_THRESH 256 | 114 | #define TX_FIFO_THRESH 256 |
115 | #define RX_FIFO_THRESH 1 /* 0-3, 0==32, 64,96, or 3==128 bytes */ | 115 | #define RX_FIFO_THRESH 1 /* 0-3, 0==32, 64,96, or 3==128 bytes */ |
116 | 116 | ||
117 | #include <linux/config.h> | ||
118 | #include <linux/module.h> | 117 | #include <linux/module.h> |
119 | #include <linux/kernel.h> | 118 | #include <linux/kernel.h> |
120 | #include <linux/string.h> | 119 | #include <linux/string.h> |
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index db694c832989..9b4030031744 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * Copyright (c) 2004-2006 Macq Electronique SA. | 25 | * Copyright (c) 2004-2006 Macq Electronique SA. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
31 | #include <linux/string.h> | 30 | #include <linux/string.h> |
diff --git a/drivers/net/fec_8xx/fec_8xx-netta.c b/drivers/net/fec_8xx/fec_8xx-netta.c index 29c275e1d566..790d9dbe42dd 100644 --- a/drivers/net/fec_8xx/fec_8xx-netta.c +++ b/drivers/net/fec_8xx/fec_8xx-netta.c | |||
@@ -2,7 +2,6 @@ | |||
2 | * FEC instantatiation file for NETTA | 2 | * FEC instantatiation file for NETTA |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/config.h> | ||
6 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
7 | #include <linux/types.h> | 6 | #include <linux/types.h> |
8 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
diff --git a/drivers/net/fec_8xx/fec_main.c b/drivers/net/fec_8xx/fec_main.c index 7e4338097139..282b1452c39a 100644 --- a/drivers/net/fec_8xx/fec_main.c +++ b/drivers/net/fec_8xx/fec_main.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * Released under the GPL | 10 | * Released under the GPL |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/types.h> | 15 | #include <linux/types.h> |
diff --git a/drivers/net/fec_8xx/fec_mii.c b/drivers/net/fec_8xx/fec_mii.c index 3b44ac1a7bfe..d3c16b85d9a4 100644 --- a/drivers/net/fec_8xx/fec_mii.c +++ b/drivers/net/fec_8xx/fec_mii.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * Released under the GPL | 10 | * Released under the GPL |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/types.h> | 14 | #include <linux/types.h> |
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index 196298f33db8..e96a93c94941 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * kind, whether express or implied. | 15 | * kind, whether express or implied. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/module.h> | 18 | #include <linux/module.h> |
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/types.h> | 20 | #include <linux/types.h> |
diff --git a/drivers/net/fs_enet/fs_enet-mii.c b/drivers/net/fs_enet/fs_enet-mii.c index 0cd07150bf4a..b7e6e21725cb 100644 --- a/drivers/net/fs_enet/fs_enet-mii.c +++ b/drivers/net/fs_enet/fs_enet-mii.c | |||
@@ -16,7 +16,6 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/module.h> | 19 | #include <linux/module.h> |
21 | #include <linux/types.h> | 20 | #include <linux/types.h> |
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c index 95e2bb8dd7b4..64e20982c1fe 100644 --- a/drivers/net/fs_enet/mac-fcc.c +++ b/drivers/net/fs_enet/mac-fcc.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * kind, whether express or implied. | 12 | * kind, whether express or implied. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/types.h> | 17 | #include <linux/types.h> |
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c index 3dad69dfdb2c..e09547077529 100644 --- a/drivers/net/fs_enet/mac-fec.c +++ b/drivers/net/fs_enet/mac-fec.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * kind, whether express or implied. | 12 | * kind, whether express or implied. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/types.h> | 17 | #include <linux/types.h> |
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index a772b286f96d..eaa24fab645f 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * kind, whether express or implied. | 12 | * kind, whether express or implied. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/types.h> | 17 | #include <linux/types.h> |
diff --git a/drivers/net/fs_enet/mii-bitbang.c b/drivers/net/fs_enet/mii-bitbang.c index 24a5e2e23d18..48f9cf83ab6f 100644 --- a/drivers/net/fs_enet/mii-bitbang.c +++ b/drivers/net/fs_enet/mii-bitbang.c | |||
@@ -13,7 +13,6 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
18 | #include <linux/types.h> | 17 | #include <linux/types.h> |
19 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
diff --git a/drivers/net/fs_enet/mii-fixed.c b/drivers/net/fs_enet/mii-fixed.c index b3e192d612e5..ae4a9c3bb393 100644 --- a/drivers/net/fs_enet/mii-fixed.c +++ b/drivers/net/fs_enet/mii-fixed.c | |||
@@ -13,7 +13,6 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
18 | #include <linux/types.h> | 17 | #include <linux/types.h> |
19 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 218d31764c52..ebbbd6ca6204 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -64,7 +64,6 @@ | |||
64 | * The driver then cleans up the buffer. | 64 | * The driver then cleans up the buffer. |
65 | */ | 65 | */ |
66 | 66 | ||
67 | #include <linux/config.h> | ||
68 | #include <linux/kernel.h> | 67 | #include <linux/kernel.h> |
69 | #include <linux/sched.h> | 68 | #include <linux/sched.h> |
70 | #include <linux/string.h> | 69 | #include <linux/string.h> |
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h index 127c98cf3336..f87bbc408dae 100644 --- a/drivers/net/gianfar.h +++ b/drivers/net/gianfar.h | |||
@@ -22,7 +22,6 @@ | |||
22 | #ifndef __GIANFAR_H | 22 | #ifndef __GIANFAR_H |
23 | #define __GIANFAR_H | 23 | #define __GIANFAR_H |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
27 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
28 | #include <linux/string.h> | 27 | #include <linux/string.h> |
diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c index d69698c695ef..e0f505285e50 100644 --- a/drivers/net/gianfar_ethtool.c +++ b/drivers/net/gianfar_ethtool.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * by reference. | 15 | * by reference. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
20 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
21 | #include <linux/string.h> | 20 | #include <linux/string.h> |
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c index c6b725529af5..c92e65984fd0 100644 --- a/drivers/net/gianfar_mii.c +++ b/drivers/net/gianfar_mii.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * | 16 | * |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
22 | #include <linux/string.h> | 21 | #include <linux/string.h> |
diff --git a/drivers/net/gianfar_sysfs.c b/drivers/net/gianfar_sysfs.c index a6d5c43199cb..e8a18f18d08c 100644 --- a/drivers/net/gianfar_sysfs.c +++ b/drivers/net/gianfar_sysfs.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * Sysfs file creation and management | 19 | * Sysfs file creation and management |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
24 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
25 | #include <linux/string.h> | 24 | #include <linux/string.h> |
diff --git a/drivers/net/gt96100eth.h b/drivers/net/gt96100eth.h index 395869c5ed3e..2a8331938b84 100644 --- a/drivers/net/gt96100eth.h +++ b/drivers/net/gt96100eth.h | |||
@@ -27,7 +27,6 @@ | |||
27 | #ifndef _GT96100ETH_H | 27 | #ifndef _GT96100ETH_H |
28 | #define _GT96100ETH_H | 28 | #define _GT96100ETH_H |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <asm/galileo-boards/gt96100.h> | 30 | #include <asm/galileo-boards/gt96100.h> |
32 | 31 | ||
33 | #define dbg(lvl, format, arg...) \ | 32 | #define dbg(lvl, format, arg...) \ |
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index d12605f0ac7c..86b3bb9bec2d 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> | 12 | * Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <asm/system.h> | 16 | #include <asm/system.h> |
18 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index cb43a9d28774..0641f54fc638 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c | |||
@@ -54,7 +54,6 @@ | |||
54 | * BPQ 004 Joerg(DL1BKE) Fixed to not lock up on ifconfig. | 54 | * BPQ 004 Joerg(DL1BKE) Fixed to not lock up on ifconfig. |
55 | */ | 55 | */ |
56 | 56 | ||
57 | #include <linux/config.h> | ||
58 | #include <linux/errno.h> | 57 | #include <linux/errno.h> |
59 | #include <linux/types.h> | 58 | #include <linux/types.h> |
60 | #include <linux/socket.h> | 59 | #include <linux/socket.h> |
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index 3ebbbe56b6e9..d8715b200c17 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * Copyright (C) 2004, 05 Ralf Baechle DL5RB <ralf@linux-mips.org> | 16 | * Copyright (C) 2004, 05 Ralf Baechle DL5RB <ralf@linux-mips.org> |
17 | * Copyright (C) 2004, 05 Thomas Osterried DL9SAU <thomas@x-berg.in-berlin.de> | 17 | * Copyright (C) 2004, 05 Thomas Osterried DL9SAU <thomas@x-berg.in-berlin.de> |
18 | */ | 18 | */ |
19 | #include <linux/config.h> | ||
20 | #include <linux/module.h> | 19 | #include <linux/module.h> |
21 | #include <asm/system.h> | 20 | #include <asm/system.h> |
22 | #include <linux/bitops.h> | 21 | #include <linux/bitops.h> |
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index 5927784df3f9..b9b10caa031c 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c | |||
@@ -148,7 +148,6 @@ | |||
148 | 148 | ||
149 | /* ----------------------------------------------------------------------- */ | 149 | /* ----------------------------------------------------------------------- */ |
150 | 150 | ||
151 | #include <linux/config.h> | ||
152 | #include <linux/module.h> | 151 | #include <linux/module.h> |
153 | #include <linux/errno.h> | 152 | #include <linux/errno.h> |
154 | #include <linux/signal.h> | 153 | #include <linux/signal.h> |
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index b49884048caa..dd2f11c98530 100644 --- a/drivers/net/hamradio/yam.c +++ b/drivers/net/hamradio/yam.c | |||
@@ -42,7 +42,6 @@ | |||
42 | 42 | ||
43 | /*****************************************************************************/ | 43 | /*****************************************************************************/ |
44 | 44 | ||
45 | #include <linux/config.h> | ||
46 | #include <linux/module.h> | 45 | #include <linux/module.h> |
47 | #include <linux/types.h> | 46 | #include <linux/types.h> |
48 | #include <linux/net.h> | 47 | #include <linux/net.h> |
diff --git a/drivers/net/ibm_emac/ibm_emac.h b/drivers/net/ibm_emac/ibm_emac.h index c2dae6092c4c..97ed22bb4320 100644 --- a/drivers/net/ibm_emac/ibm_emac.h +++ b/drivers/net/ibm_emac/ibm_emac.h | |||
@@ -20,7 +20,6 @@ | |||
20 | #ifndef __IBM_EMAC_H_ | 20 | #ifndef __IBM_EMAC_H_ |
21 | #define __IBM_EMAC_H_ | 21 | #define __IBM_EMAC_H_ |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/types.h> | 23 | #include <linux/types.h> |
25 | 24 | ||
26 | /* This is a simple check to prevent use of this driver on non-tested SoCs */ | 25 | /* This is a simple check to prevent use of this driver on non-tested SoCs */ |
diff --git a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c index 7e49522b8b3c..82468e2dc799 100644 --- a/drivers/net/ibm_emac/ibm_emac_core.c +++ b/drivers/net/ibm_emac/ibm_emac_core.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/module.h> | 22 | #include <linux/module.h> |
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
25 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
diff --git a/drivers/net/ibm_emac/ibm_emac_core.h b/drivers/net/ibm_emac/ibm_emac_core.h index f61273b2e94f..dabb94afeb98 100644 --- a/drivers/net/ibm_emac/ibm_emac_core.h +++ b/drivers/net/ibm_emac/ibm_emac_core.h | |||
@@ -20,7 +20,6 @@ | |||
20 | #ifndef __IBM_EMAC_CORE_H_ | 20 | #ifndef __IBM_EMAC_CORE_H_ |
21 | #define __IBM_EMAC_CORE_H_ | 21 | #define __IBM_EMAC_CORE_H_ |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/netdevice.h> | 23 | #include <linux/netdevice.h> |
25 | #include <linux/dma-mapping.h> | 24 | #include <linux/dma-mapping.h> |
26 | #include <asm/ocp.h> | 25 | #include <asm/ocp.h> |
diff --git a/drivers/net/ibm_emac/ibm_emac_debug.c b/drivers/net/ibm_emac/ibm_emac_debug.c index c7e1ecfa08fe..c3645908034d 100644 --- a/drivers/net/ibm_emac/ibm_emac_debug.c +++ b/drivers/net/ibm_emac/ibm_emac_debug.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * option) any later version. | 12 | * option) any later version. |
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | #include <linux/config.h> | ||
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
18 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
diff --git a/drivers/net/ibm_emac/ibm_emac_debug.h b/drivers/net/ibm_emac/ibm_emac_debug.h index e85fbe0a8da9..5761389495d0 100644 --- a/drivers/net/ibm_emac/ibm_emac_debug.h +++ b/drivers/net/ibm_emac/ibm_emac_debug.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #ifndef __IBM_EMAC_DEBUG_H_ | 15 | #ifndef __IBM_EMAC_DEBUG_H_ |
16 | #define __IBM_EMAC_DEBUG_H_ | 16 | #define __IBM_EMAC_DEBUG_H_ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/init.h> | 18 | #include <linux/init.h> |
20 | #include "ibm_emac_core.h" | 19 | #include "ibm_emac_core.h" |
21 | #include "ibm_emac_mal.h" | 20 | #include "ibm_emac_mal.h" |
diff --git a/drivers/net/ibm_emac/ibm_emac_mal.c b/drivers/net/ibm_emac/ibm_emac_mal.c index da88d43081cc..af50e7b2e0d7 100644 --- a/drivers/net/ibm_emac/ibm_emac_mal.c +++ b/drivers/net/ibm_emac/ibm_emac_mal.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * option) any later version. | 19 | * option) any later version. |
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | #include <linux/config.h> | ||
23 | #include <linux/module.h> | 22 | #include <linux/module.h> |
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
25 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
diff --git a/drivers/net/ibm_emac/ibm_emac_mal.h b/drivers/net/ibm_emac/ibm_emac_mal.h index 2a2d3b24b037..f73f10a0a562 100644 --- a/drivers/net/ibm_emac/ibm_emac_mal.h +++ b/drivers/net/ibm_emac/ibm_emac_mal.h | |||
@@ -19,7 +19,6 @@ | |||
19 | #ifndef __IBM_EMAC_MAL_H_ | 19 | #ifndef __IBM_EMAC_MAL_H_ |
20 | #define __IBM_EMAC_MAL_H_ | 20 | #define __IBM_EMAC_MAL_H_ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
24 | #include <linux/list.h> | 23 | #include <linux/list.h> |
25 | #include <linux/netdevice.h> | 24 | #include <linux/netdevice.h> |
diff --git a/drivers/net/ibm_emac/ibm_emac_phy.c b/drivers/net/ibm_emac/ibm_emac_phy.c index 67935dd33a65..4a97024061e5 100644 --- a/drivers/net/ibm_emac/ibm_emac_phy.c +++ b/drivers/net/ibm_emac/ibm_emac_phy.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * (c) 2004-2005, Eugene Surovegin <ebs@ebshome.net> | 12 | * (c) 2004-2005, Eugene Surovegin <ebs@ebshome.net> |
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | #include <linux/config.h> | ||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/types.h> | 17 | #include <linux/types.h> |
diff --git a/drivers/net/ibm_emac/ibm_emac_rgmii.c b/drivers/net/ibm_emac/ibm_emac_rgmii.c index f0b1ffb2dbbf..53d281cb9a16 100644 --- a/drivers/net/ibm_emac/ibm_emac_rgmii.c +++ b/drivers/net/ibm_emac/ibm_emac_rgmii.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * option) any later version. | 16 | * option) any later version. |
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | #include <linux/config.h> | ||
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/ethtool.h> | 20 | #include <linux/ethtool.h> |
22 | #include <asm/io.h> | 21 | #include <asm/io.h> |
diff --git a/drivers/net/ibm_emac/ibm_emac_rgmii.h b/drivers/net/ibm_emac/ibm_emac_rgmii.h index 7f03d536c9a3..94abde55e2e9 100644 --- a/drivers/net/ibm_emac/ibm_emac_rgmii.h +++ b/drivers/net/ibm_emac/ibm_emac_rgmii.h | |||
@@ -21,7 +21,6 @@ | |||
21 | #ifndef _IBM_EMAC_RGMII_H_ | 21 | #ifndef _IBM_EMAC_RGMII_H_ |
22 | #define _IBM_EMAC_RGMII_H_ | 22 | #define _IBM_EMAC_RGMII_H_ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | 24 | ||
26 | /* RGMII bridge */ | 25 | /* RGMII bridge */ |
27 | struct rgmii_regs { | 26 | struct rgmii_regs { |
diff --git a/drivers/net/ibm_emac/ibm_emac_tah.c b/drivers/net/ibm_emac/ibm_emac_tah.c index af08afc22f9f..e287b451bb44 100644 --- a/drivers/net/ibm_emac/ibm_emac_tah.c +++ b/drivers/net/ibm_emac/ibm_emac_tah.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * Free Software Foundation; either version 2 of the License, or (at your | 13 | * Free Software Foundation; either version 2 of the License, or (at your |
14 | * option) any later version. | 14 | * option) any later version. |
15 | */ | 15 | */ |
16 | #include <linux/config.h> | ||
17 | #include <asm/io.h> | 16 | #include <asm/io.h> |
18 | 17 | ||
19 | #include "ibm_emac_core.h" | 18 | #include "ibm_emac_core.h" |
diff --git a/drivers/net/ibm_emac/ibm_emac_tah.h b/drivers/net/ibm_emac/ibm_emac_tah.h index 9299b5dd7eb1..38153945a240 100644 --- a/drivers/net/ibm_emac/ibm_emac_tah.h +++ b/drivers/net/ibm_emac/ibm_emac_tah.h | |||
@@ -17,7 +17,6 @@ | |||
17 | #ifndef _IBM_EMAC_TAH_H | 17 | #ifndef _IBM_EMAC_TAH_H |
18 | #define _IBM_EMAC_TAH_H | 18 | #define _IBM_EMAC_TAH_H |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
22 | #include <asm/ocp.h> | 21 | #include <asm/ocp.h> |
23 | 22 | ||
diff --git a/drivers/net/ibm_emac/ibm_emac_zmii.c b/drivers/net/ibm_emac/ibm_emac_zmii.c index e129e0aaa045..37dc8f342868 100644 --- a/drivers/net/ibm_emac/ibm_emac_zmii.c +++ b/drivers/net/ibm_emac/ibm_emac_zmii.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * option) any later version. | 16 | * option) any later version. |
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | #include <linux/config.h> | ||
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/ethtool.h> | 20 | #include <linux/ethtool.h> |
22 | #include <asm/io.h> | 21 | #include <asm/io.h> |
diff --git a/drivers/net/ibm_emac/ibm_emac_zmii.h b/drivers/net/ibm_emac/ibm_emac_zmii.h index 92c854410753..972e3a44a09f 100644 --- a/drivers/net/ibm_emac/ibm_emac_zmii.h +++ b/drivers/net/ibm_emac/ibm_emac_zmii.h | |||
@@ -19,7 +19,6 @@ | |||
19 | #ifndef _IBM_EMAC_ZMII_H_ | 19 | #ifndef _IBM_EMAC_ZMII_H_ |
20 | #define _IBM_EMAC_ZMII_H_ | 20 | #define _IBM_EMAC_ZMII_H_ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
24 | #include <asm/ocp.h> | 23 | #include <asm/ocp.h> |
25 | 24 | ||
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c index 4c2e7279ba34..0464e78f733a 100644 --- a/drivers/net/ibmveth.c +++ b/drivers/net/ibmveth.c | |||
@@ -33,7 +33,6 @@ | |||
33 | - possibly remove procfs support | 33 | - possibly remove procfs support |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/config.h> | ||
37 | #include <linux/module.h> | 36 | #include <linux/module.h> |
38 | #include <linux/types.h> | 37 | #include <linux/types.h> |
39 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c index 2e222ef91e22..3a42afab5036 100644 --- a/drivers/net/ifb.c +++ b/drivers/net/ifb.c | |||
@@ -27,7 +27,6 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
33 | #include <linux/netdevice.h> | 32 | #include <linux/netdevice.h> |
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c index e76e6e7be0b1..dbf67750d899 100644 --- a/drivers/net/ioc3-eth.c +++ b/drivers/net/ioc3-eth.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #define IOC3_NAME "ioc3-eth" | 30 | #define IOC3_NAME "ioc3-eth" |
31 | #define IOC3_VERSION "2.6.3-3" | 31 | #define IOC3_VERSION "2.6.3-3" |
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | #include <linux/init.h> | 33 | #include <linux/init.h> |
35 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
36 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig index d2ce4896abff..e9e6d99a9add 100644 --- a/drivers/net/irda/Kconfig +++ b/drivers/net/irda/Kconfig | |||
@@ -350,7 +350,7 @@ config TOSHIBA_FIR | |||
350 | 350 | ||
351 | config AU1000_FIR | 351 | config AU1000_FIR |
352 | tristate "Alchemy Au1000 SIR/FIR" | 352 | tristate "Alchemy Au1000 SIR/FIR" |
353 | depends on MIPS_AU1000 && IRDA | 353 | depends on SOC_AU1000 && IRDA |
354 | 354 | ||
355 | config SMC_IRCC_FIR | 355 | config SMC_IRCC_FIR |
356 | tristate "SMSC IrCC (EXPERIMENTAL)" | 356 | tristate "SMSC IrCC (EXPERIMENTAL)" |
diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c index e6b1985767c2..7b2b4135bb23 100644 --- a/drivers/net/irda/au1k_ir.c +++ b/drivers/net/irda/au1k_ir.c | |||
@@ -18,7 +18,6 @@ | |||
18 | * with this program; if not, write to the Free Software Foundation, Inc., | 18 | * with this program; if not, write to the Free Software Foundation, Inc., |
19 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | 19 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. |
20 | */ | 20 | */ |
21 | #include <linux/config.h> | ||
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | #include <linux/init.h> | 23 | #include <linux/init.h> |
diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c index 754297fc8f22..47f6f64d604c 100644 --- a/drivers/net/irda/mcs7780.c +++ b/drivers/net/irda/mcs7780.c | |||
@@ -101,7 +101,7 @@ static int transceiver_type = MCS_TSC_VISHAY; | |||
101 | module_param(transceiver_type, int, 0444); | 101 | module_param(transceiver_type, int, 0444); |
102 | MODULE_PARM_DESC(transceiver_type, "IR transceiver type, see mcs7780.h."); | 102 | MODULE_PARM_DESC(transceiver_type, "IR transceiver type, see mcs7780.h."); |
103 | 103 | ||
104 | struct usb_driver mcs_driver = { | 104 | static struct usb_driver mcs_driver = { |
105 | .name = "mcs7780", | 105 | .name = "mcs7780", |
106 | .probe = mcs_probe, | 106 | .probe = mcs_probe, |
107 | .disconnect = mcs_disconnect, | 107 | .disconnect = mcs_disconnect, |
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c index e1aa9910503b..afb19e8d95c8 100644 --- a/drivers/net/irda/pxaficp_ir.c +++ b/drivers/net/irda/pxaficp_ir.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * Infra-red driver (SIR/FIR) for the PXA2xx embedded microprocessor | 12 | * Infra-red driver (SIR/FIR) for the PXA2xx embedded microprocessor |
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | #include <linux/config.h> | ||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/types.h> | 16 | #include <linux/types.h> |
18 | #include <linux/init.h> | 17 | #include <linux/init.h> |
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c index f530686bd09f..8d5a288d7976 100644 --- a/drivers/net/irda/sa1100_ir.c +++ b/drivers/net/irda/sa1100_ir.c | |||
@@ -18,7 +18,6 @@ | |||
18 | * power_leve:level - set the transmitter power level | 18 | * power_leve:level - set the transmitter power level |
19 | * tx_lpm:0|1 - set transmit low power mode | 19 | * tx_lpm:0|1 - set transmit low power mode |
20 | */ | 20 | */ |
21 | #include <linux/config.h> | ||
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
23 | #include <linux/moduleparam.h> | 22 | #include <linux/moduleparam.h> |
24 | #include <linux/types.h> | 23 | #include <linux/types.h> |
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c index d70b9e8d6e60..b9f28b14b3ae 100644 --- a/drivers/net/irda/vlsi_ir.c +++ b/drivers/net/irda/vlsi_ir.c | |||
@@ -21,7 +21,6 @@ | |||
21 | * | 21 | * |
22 | ********************************************************************/ | 22 | ********************************************************************/ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | 25 | ||
27 | #define DRIVER_NAME "vlsi_ir" | 26 | #define DRIVER_NAME "vlsi_ir" |
diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c index 93394d76587a..cdc14401cdbe 100644 --- a/drivers/net/iseries_veth.c +++ b/drivers/net/iseries_veth.c | |||
@@ -56,7 +56,6 @@ | |||
56 | * number of packets outstanding to a remote partition at a time. | 56 | * number of packets outstanding to a remote partition at a time. |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <linux/config.h> | ||
60 | #include <linux/module.h> | 59 | #include <linux/module.h> |
61 | #include <linux/types.h> | 60 | #include <linux/types.h> |
62 | #include <linux/errno.h> | 61 | #include <linux/errno.h> |
diff --git a/drivers/net/ixgb/ixgb.h b/drivers/net/ixgb/ixgb.h index a83ef28dadb0..82b67af54c94 100644 --- a/drivers/net/ixgb/ixgb.h +++ b/drivers/net/ixgb/ixgb.h | |||
@@ -30,7 +30,6 @@ | |||
30 | #define _IXGB_H_ | 30 | #define _IXGB_H_ |
31 | 31 | ||
32 | #include <linux/stddef.h> | 32 | #include <linux/stddef.h> |
33 | #include <linux/config.h> | ||
34 | #include <linux/module.h> | 33 | #include <linux/module.h> |
35 | #include <linux/types.h> | 34 | #include <linux/types.h> |
36 | #include <asm/byteorder.h> | 35 | #include <asm/byteorder.h> |
diff --git a/drivers/net/ixp2000/caleb.c b/drivers/net/ixp2000/caleb.c index 3595e107df22..7dea5b95012c 100644 --- a/drivers/net/ixp2000/caleb.c +++ b/drivers/net/ixp2000/caleb.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * (at your option) any later version. | 9 | * (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
15 | #include <asm/io.h> | 14 | #include <asm/io.h> |
diff --git a/drivers/net/ixp2000/enp2611.c b/drivers/net/ixp2000/enp2611.c index b67f586d7392..d3f4235c585d 100644 --- a/drivers/net/ixp2000/enp2611.c +++ b/drivers/net/ixp2000/enp2611.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * (at your option) any later version. | 9 | * (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/netdevice.h> | 14 | #include <linux/netdevice.h> |
diff --git a/drivers/net/ixp2000/ixp2400-msf.c b/drivers/net/ixp2000/ixp2400-msf.c index 48a3a891d3a4..9ec38eebfb56 100644 --- a/drivers/net/ixp2000/ixp2400-msf.c +++ b/drivers/net/ixp2000/ixp2400-msf.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * License, or (at your option) any later version. | 11 | * License, or (at your option) any later version. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <asm/hardware.h> | 16 | #include <asm/hardware.h> |
diff --git a/drivers/net/ixp2000/ixpdev.c b/drivers/net/ixp2000/ixpdev.c index fbc2d21020f4..99229a0456d9 100644 --- a/drivers/net/ixp2000/ixpdev.c +++ b/drivers/net/ixp2000/ixpdev.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * (at your option) any later version. | 9 | * (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/netdevice.h> | 14 | #include <linux/netdevice.h> |
diff --git a/drivers/net/ixp2000/pm3386.c b/drivers/net/ixp2000/pm3386.c index 5224651c9aac..e08d3f9863b8 100644 --- a/drivers/net/ixp2000/pm3386.c +++ b/drivers/net/ixp2000/pm3386.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * (at your option) any later version. | 9 | * (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
15 | #include <linux/netdevice.h> | 14 | #include <linux/netdevice.h> |
diff --git a/drivers/net/mace.c b/drivers/net/mace.c index 77792b286027..f2c0bf89f0c7 100644 --- a/drivers/net/mace.c +++ b/drivers/net/mace.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * Copyright (C) 1996 Paul Mackerras. | 5 | * Copyright (C) 1996 Paul Mackerras. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/module.h> | 8 | #include <linux/module.h> |
10 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
11 | #include <linux/netdevice.h> | 10 | #include <linux/netdevice.h> |
diff --git a/drivers/net/mv643xx_eth.h b/drivers/net/mv643xx_eth.h index 4262c1da6d4a..33c5fafdbbd3 100644 --- a/drivers/net/mv643xx_eth.h +++ b/drivers/net/mv643xx_eth.h | |||
@@ -258,7 +258,7 @@ struct pkt_info { | |||
258 | struct sk_buff *return_info; /* User resource return information */ | 258 | struct sk_buff *return_info; /* User resource return information */ |
259 | }; | 259 | }; |
260 | 260 | ||
261 | /* Ethernet port specific infomation */ | 261 | /* Ethernet port specific information */ |
262 | 262 | ||
263 | struct mv643xx_mib_counters { | 263 | struct mv643xx_mib_counters { |
264 | u64 good_octets_received; | 264 | u64 good_octets_received; |
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index d9f616fea3d9..19981065efb4 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c | |||
@@ -7,7 +7,6 @@ static char version[] = | |||
7 | "myri_sbus.c:v2.0 June 23, 2006 David S. Miller (davem@davemloft.net)\n"; | 7 | "myri_sbus.c:v2.0 June 23, 2006 David S. Miller (davem@davemloft.net)\n"; |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/config.h> | ||
11 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
12 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
13 | #include <linux/types.h> | 12 | #include <linux/types.h> |
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c index 5657049c2160..438c63f940b9 100644 --- a/drivers/net/natsemi.c +++ b/drivers/net/natsemi.c | |||
@@ -138,7 +138,6 @@ | |||
138 | * big endian support with CFG:BEM instead of cpu_to_le32 | 138 | * big endian support with CFG:BEM instead of cpu_to_le32 |
139 | */ | 139 | */ |
140 | 140 | ||
141 | #include <linux/config.h> | ||
142 | #include <linux/module.h> | 141 | #include <linux/module.h> |
143 | #include <linux/kernel.h> | 142 | #include <linux/kernel.h> |
144 | #include <linux/string.h> | 143 | #include <linux/string.h> |
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index 706aed7d717f..deedd7b2af5d 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c | |||
@@ -96,7 +96,6 @@ | |||
96 | //#define dprintk printk | 96 | //#define dprintk printk |
97 | #define dprintk(x...) do { } while (0) | 97 | #define dprintk(x...) do { } while (0) |
98 | 98 | ||
99 | #include <linux/config.h> | ||
100 | #include <linux/module.h> | 99 | #include <linux/module.h> |
101 | #include <linux/moduleparam.h> | 100 | #include <linux/moduleparam.h> |
102 | #include <linux/types.h> | 101 | #include <linux/types.h> |
diff --git a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c index a7bb54df75a8..978b95afc721 100644 --- a/drivers/net/pci-skeleton.c +++ b/drivers/net/pci-skeleton.c | |||
@@ -85,7 +85,6 @@ IVc. Errata | |||
85 | 85 | ||
86 | */ | 86 | */ |
87 | 87 | ||
88 | #include <linux/config.h> | ||
89 | #include <linux/module.h> | 88 | #include <linux/module.h> |
90 | #include <linux/kernel.h> | 89 | #include <linux/kernel.h> |
91 | #include <linux/pci.h> | 90 | #include <linux/pci.h> |
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c index 441de824ab6b..48434d7924eb 100644 --- a/drivers/net/pcmcia/com20020_cs.c +++ b/drivers/net/pcmcia/com20020_cs.c | |||
@@ -387,7 +387,10 @@ static int com20020_resume(struct pcmcia_device *link) | |||
387 | } | 387 | } |
388 | 388 | ||
389 | static struct pcmcia_device_id com20020_ids[] = { | 389 | static struct pcmcia_device_id com20020_ids[] = { |
390 | PCMCIA_DEVICE_PROD_ID12("Contemporary Control Systems, Inc.", "PCM20 Arcnet Adapter", 0x59991666, 0x95dfffaf), | 390 | PCMCIA_DEVICE_PROD_ID12("Contemporary Control Systems, Inc.", |
391 | "PCM20 Arcnet Adapter", 0x59991666, 0x95dfffaf), | ||
392 | PCMCIA_DEVICE_PROD_ID12("SoHard AG", | ||
393 | "SH ARC PCMCIA", 0xf8991729, 0x69dff0c7), | ||
391 | PCMCIA_DEVICE_NULL | 394 | PCMCIA_DEVICE_NULL |
392 | }; | 395 | }; |
393 | MODULE_DEVICE_TABLE(pcmcia, com20020_ids); | 396 | MODULE_DEVICE_TABLE(pcmcia, com20020_ids); |
diff --git a/drivers/net/phy/cicada.c b/drivers/net/phy/cicada.c index 7d8d534255c0..3efb715c28dc 100644 --- a/drivers/net/phy/cicada.c +++ b/drivers/net/phy/cicada.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * option) any later version. | 13 | * option) any later version. |
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | #include <linux/config.h> | ||
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
19 | #include <linux/string.h> | 18 | #include <linux/string.h> |
diff --git a/drivers/net/phy/davicom.c b/drivers/net/phy/davicom.c index 5e9002e444c5..aa7983f55838 100644 --- a/drivers/net/phy/davicom.c +++ b/drivers/net/phy/davicom.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * option) any later version. | 13 | * option) any later version. |
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | #include <linux/config.h> | ||
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
19 | #include <linux/string.h> | 18 | #include <linux/string.h> |
diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c index 3f702c503afe..69d2325f848c 100644 --- a/drivers/net/phy/lxt.c +++ b/drivers/net/phy/lxt.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * option) any later version. | 13 | * option) any later version. |
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | #include <linux/config.h> | ||
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
19 | #include <linux/string.h> | 18 | #include <linux/string.h> |
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index a2d6386d13bc..0ad253282d0d 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * option) any later version. | 13 | * option) any later version. |
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | #include <linux/config.h> | ||
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
19 | #include <linux/string.h> | 18 | #include <linux/string.h> |
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 1b236bdf6b92..1dde390c164d 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * option) any later version. | 13 | * option) any later version. |
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | #include <linux/config.h> | ||
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
19 | #include <linux/string.h> | 18 | #include <linux/string.h> |
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 33cec2dab942..44bcd3eb2b83 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * option) any later version. | 14 | * option) any later version. |
15 | * | 15 | * |
16 | */ | 16 | */ |
17 | #include <linux/config.h> | ||
18 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
19 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
20 | #include <linux/string.h> | 19 | #include <linux/string.h> |
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 7da0e3dd5fe3..1bc1e032c5d6 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * option) any later version. | 14 | * option) any later version. |
15 | * | 15 | * |
16 | */ | 16 | */ |
17 | #include <linux/config.h> | ||
18 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
19 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
20 | #include <linux/string.h> | 19 | #include <linux/string.h> |
diff --git a/drivers/net/phy/qsemi.c b/drivers/net/phy/qsemi.c index 65d995b02b25..2b50e1739aa5 100644 --- a/drivers/net/phy/qsemi.c +++ b/drivers/net/phy/qsemi.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * option) any later version. | 13 | * option) any later version. |
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | #include <linux/config.h> | ||
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
19 | #include <linux/string.h> | 18 | #include <linux/string.h> |
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 425ff5b117f1..0ec6e9d57b94 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * ==FILEVERSION 20041108== | 22 | * ==FILEVERSION 20041108== |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
28 | #include <linux/kmod.h> | 27 | #include <linux/kmod.h> |
diff --git a/drivers/net/ppp_mppe.c b/drivers/net/ppp_mppe.c index 1985d1b57c45..51ff9a9d1bb5 100644 --- a/drivers/net/ppp_mppe.c +++ b/drivers/net/ppp_mppe.c | |||
@@ -43,7 +43,6 @@ | |||
43 | * deprecated in 2.6 | 43 | * deprecated in 2.6 |
44 | */ | 44 | */ |
45 | 45 | ||
46 | #include <linux/config.h> | ||
47 | #include <linux/module.h> | 46 | #include <linux/module.h> |
48 | #include <linux/kernel.h> | 47 | #include <linux/kernel.h> |
49 | #include <linux/version.h> | 48 | #include <linux/version.h> |
diff --git a/drivers/net/rrunner.c b/drivers/net/rrunner.c index 19c2df9c86fe..757c542ac40a 100644 --- a/drivers/net/rrunner.c +++ b/drivers/net/rrunner.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #define RX_DMA_SKBUFF 1 | 28 | #define RX_DMA_SKBUFF 1 |
29 | #define PKT_COPY_THRESHOLD 512 | 29 | #define PKT_COPY_THRESHOLD 512 |
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | #include <linux/module.h> | 31 | #include <linux/module.h> |
33 | #include <linux/types.h> | 32 | #include <linux/types.h> |
34 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
diff --git a/drivers/net/rrunner.h b/drivers/net/rrunner.h index 10baae55953a..2c3c91ebd99f 100644 --- a/drivers/net/rrunner.h +++ b/drivers/net/rrunner.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _RRUNNER_H_ | 1 | #ifndef _RRUNNER_H_ |
2 | #define _RRUNNER_H_ | 2 | #define _RRUNNER_H_ |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/interrupt.h> | 4 | #include <linux/interrupt.h> |
6 | 5 | ||
7 | #if ((BITS_PER_LONG != 32) && (BITS_PER_LONG != 64)) | 6 | #if ((BITS_PER_LONG != 32) && (BITS_PER_LONG != 64)) |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 3defe5d4f7d3..001344c0763e 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -44,7 +44,6 @@ | |||
44 | * aggregated as a single large packet | 44 | * aggregated as a single large packet |
45 | ************************************************************************/ | 45 | ************************************************************************/ |
46 | 46 | ||
47 | #include <linux/config.h> | ||
48 | #include <linux/module.h> | 47 | #include <linux/module.h> |
49 | #include <linux/types.h> | 48 | #include <linux/types.h> |
50 | #include <linux/errno.h> | 49 | #include <linux/errno.h> |
@@ -3960,7 +3959,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3960 | txdp->Control_2 = 0; | 3959 | txdp->Control_2 = 0; |
3961 | #ifdef NETIF_F_TSO | 3960 | #ifdef NETIF_F_TSO |
3962 | mss = skb_shinfo(skb)->gso_size; | 3961 | mss = skb_shinfo(skb)->gso_size; |
3963 | if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV4) { | 3962 | if (skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)) { |
3964 | txdp->Control_1 |= TXD_TCP_LSO_EN; | 3963 | txdp->Control_1 |= TXD_TCP_LSO_EN; |
3965 | txdp->Control_1 |= TXD_TCP_LSO_MSS(mss); | 3964 | txdp->Control_1 |= TXD_TCP_LSO_MSS(mss); |
3966 | } | 3965 | } |
@@ -3980,7 +3979,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3980 | } | 3979 | } |
3981 | 3980 | ||
3982 | frg_len = skb->len - skb->data_len; | 3981 | frg_len = skb->len - skb->data_len; |
3983 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) { | 3982 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP) { |
3984 | int ufo_size; | 3983 | int ufo_size; |
3985 | 3984 | ||
3986 | ufo_size = skb_shinfo(skb)->gso_size; | 3985 | ufo_size = skb_shinfo(skb)->gso_size; |
@@ -4009,7 +4008,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4009 | txdp->Host_Control = (unsigned long) skb; | 4008 | txdp->Host_Control = (unsigned long) skb; |
4010 | txdp->Control_1 |= TXD_BUFFER0_SIZE(frg_len); | 4009 | txdp->Control_1 |= TXD_BUFFER0_SIZE(frg_len); |
4011 | 4010 | ||
4012 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) | 4011 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP) |
4013 | txdp->Control_1 |= TXD_UFO_EN; | 4012 | txdp->Control_1 |= TXD_UFO_EN; |
4014 | 4013 | ||
4015 | frg_cnt = skb_shinfo(skb)->nr_frags; | 4014 | frg_cnt = skb_shinfo(skb)->nr_frags; |
@@ -4024,12 +4023,12 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4024 | (sp->pdev, frag->page, frag->page_offset, | 4023 | (sp->pdev, frag->page, frag->page_offset, |
4025 | frag->size, PCI_DMA_TODEVICE); | 4024 | frag->size, PCI_DMA_TODEVICE); |
4026 | txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size); | 4025 | txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size); |
4027 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) | 4026 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP) |
4028 | txdp->Control_1 |= TXD_UFO_EN; | 4027 | txdp->Control_1 |= TXD_UFO_EN; |
4029 | } | 4028 | } |
4030 | txdp->Control_1 |= TXD_GATHER_CODE_LAST; | 4029 | txdp->Control_1 |= TXD_GATHER_CODE_LAST; |
4031 | 4030 | ||
4032 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) | 4031 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP) |
4033 | frg_cnt++; /* as Txd0 was used for inband header */ | 4032 | frg_cnt++; /* as Txd0 was used for inband header */ |
4034 | 4033 | ||
4035 | tx_fifo = mac_control->tx_FIFO_start[queue]; | 4034 | tx_fifo = mac_control->tx_FIFO_start[queue]; |
@@ -4043,7 +4042,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4043 | if (mss) | 4042 | if (mss) |
4044 | val64 |= TX_FIFO_SPECIAL_FUNC; | 4043 | val64 |= TX_FIFO_SPECIAL_FUNC; |
4045 | #endif | 4044 | #endif |
4046 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) | 4045 | if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP) |
4047 | val64 |= TX_FIFO_SPECIAL_FUNC; | 4046 | val64 |= TX_FIFO_SPECIAL_FUNC; |
4048 | writeq(val64, &tx_fifo->List_Control); | 4047 | writeq(val64, &tx_fifo->List_Control); |
4049 | 4048 | ||
@@ -7021,6 +7020,9 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
7021 | #ifdef NETIF_F_TSO | 7020 | #ifdef NETIF_F_TSO |
7022 | dev->features |= NETIF_F_TSO; | 7021 | dev->features |= NETIF_F_TSO; |
7023 | #endif | 7022 | #endif |
7023 | #ifdef NETIF_F_TSO6 | ||
7024 | dev->features |= NETIF_F_TSO6; | ||
7025 | #endif | ||
7024 | if (sp->device_type & XFRAME_II_DEVICE) { | 7026 | if (sp->device_type & XFRAME_II_DEVICE) { |
7025 | dev->features |= NETIF_F_UFO; | 7027 | dev->features |= NETIF_F_UFO; |
7026 | dev->features |= NETIF_F_HW_CSUM; | 7028 | dev->features |= NETIF_F_HW_CSUM; |
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h index 3203732a668d..c43f52179708 100644 --- a/drivers/net/s2io.h +++ b/drivers/net/s2io.h | |||
@@ -652,7 +652,7 @@ typedef struct fifo_info { | |||
652 | nic_t *nic; | 652 | nic_t *nic; |
653 | }fifo_info_t; | 653 | }fifo_info_t; |
654 | 654 | ||
655 | /* Infomation related to the Tx and Rx FIFOs and Rings of Xena | 655 | /* Information related to the Tx and Rx FIFOs and Rings of Xena |
656 | * is maintained in this structure. | 656 | * is maintained in this structure. |
657 | */ | 657 | */ |
658 | typedef struct mac_info { | 658 | typedef struct mac_info { |
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c index f2be9f83f091..c7b5f0004e54 100644 --- a/drivers/net/sb1250-mac.c +++ b/drivers/net/sb1250-mac.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/etherdevice.h> | 31 | #include <linux/etherdevice.h> |
32 | #include <linux/skbuff.h> | 32 | #include <linux/skbuff.h> |
33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
34 | #include <linux/config.h> | ||
35 | #include <linux/bitops.h> | 34 | #include <linux/bitops.h> |
36 | #include <asm/processor.h> /* Processor type for cache alignment. */ | 35 | #include <asm/processor.h> /* Processor type for cache alignment. */ |
37 | #include <asm/io.h> | 36 | #include <asm/io.h> |
diff --git a/drivers/net/shaper.c b/drivers/net/shaper.c index 88e212043a43..c7832e69f177 100644 --- a/drivers/net/shaper.c +++ b/drivers/net/shaper.c | |||
@@ -69,7 +69,6 @@ | |||
69 | * 2000/03 Andi Kleen | 69 | * 2000/03 Andi Kleen |
70 | */ | 70 | */ |
71 | 71 | ||
72 | #include <linux/config.h> | ||
73 | #include <linux/module.h> | 72 | #include <linux/module.h> |
74 | #include <linux/kernel.h> | 73 | #include <linux/kernel.h> |
75 | #include <linux/fcntl.h> | 74 | #include <linux/fcntl.h> |
diff --git a/drivers/net/sk98lin/skvpd.c b/drivers/net/sk98lin/skvpd.c index 17786056c66a..1e662aaebf84 100644 --- a/drivers/net/sk98lin/skvpd.c +++ b/drivers/net/sk98lin/skvpd.c | |||
@@ -22,7 +22,7 @@ | |||
22 | ******************************************************************************/ | 22 | ******************************************************************************/ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | Please refer skvpd.txt for infomation how to include this module | 25 | Please refer skvpd.txt for information how to include this module |
26 | */ | 26 | */ |
27 | static const char SysKonnectFileId[] = | 27 | static const char SysKonnectFileId[] = |
28 | "@(#)$Id: skvpd.c,v 1.37 2003/01/13 10:42:45 rschmidt Exp $ (C) SK"; | 28 | "@(#)$Id: skvpd.c,v 1.37 2003/01/13 10:42:45 rschmidt Exp $ (C) SK"; |
diff --git a/drivers/net/skfp/h/sba.h b/drivers/net/skfp/h/sba.h index df716cd5784a..638cf0283bc4 100644 --- a/drivers/net/skfp/h/sba.h +++ b/drivers/net/skfp/h/sba.h | |||
@@ -13,7 +13,7 @@ | |||
13 | ******************************************************************************/ | 13 | ******************************************************************************/ |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * Synchronous Bandwith Allocation (SBA) structs | 16 | * Synchronous Bandwidth Allocation (SBA) structs |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #ifndef _SBA_ | 19 | #ifndef _SBA_ |
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 1608efab4e3d..82df13be3d40 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/in.h> | 27 | #include <linux/in.h> |
29 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index e122007e16da..3f1b0fef13e7 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/crc32.h> | 26 | #include <linux/crc32.h> |
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
29 | #include <linux/version.h> | 28 | #include <linux/version.h> |
diff --git a/drivers/net/slhc.c b/drivers/net/slhc.c index c6fbb1ede0ed..3a1b7131681c 100644 --- a/drivers/net/slhc.c +++ b/drivers/net/slhc.c | |||
@@ -50,7 +50,6 @@ | |||
50 | * driver code belonging close to PPP and SLIP | 50 | * driver code belonging close to PPP and SLIP |
51 | */ | 51 | */ |
52 | 52 | ||
53 | #include <linux/config.h> | ||
54 | #include <linux/module.h> | 53 | #include <linux/module.h> |
55 | #include <linux/types.h> | 54 | #include <linux/types.h> |
56 | #include <linux/string.h> | 55 | #include <linux/string.h> |
diff --git a/drivers/net/slip.c b/drivers/net/slip.c index b2e18d28850d..1588cb7f6c83 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c | |||
@@ -55,7 +55,6 @@ | |||
55 | */ | 55 | */ |
56 | 56 | ||
57 | #define SL_CHECK_TRANSMIT | 57 | #define SL_CHECK_TRANSMIT |
58 | #include <linux/config.h> | ||
59 | #include <linux/module.h> | 58 | #include <linux/module.h> |
60 | #include <linux/moduleparam.h> | 59 | #include <linux/moduleparam.h> |
61 | 60 | ||
diff --git a/drivers/net/slip.h b/drivers/net/slip.h index ab3efe66a642..29d87dd45a24 100644 --- a/drivers/net/slip.h +++ b/drivers/net/slip.h | |||
@@ -22,7 +22,6 @@ | |||
22 | #ifndef _LINUX_SLIP_H | 22 | #ifndef _LINUX_SLIP_H |
23 | #define _LINUX_SLIP_H | 23 | #define _LINUX_SLIP_H |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | 25 | ||
27 | #if defined(CONFIG_INET) && defined(CONFIG_SLIP_COMPRESSED) | 26 | #if defined(CONFIG_INET) && defined(CONFIG_SLIP_COMPRESSED) |
28 | # define SL_INCLUDE_CSLIP | 27 | # define SL_INCLUDE_CSLIP |
diff --git a/drivers/net/smc-ultra.c b/drivers/net/smc-ultra.c index 5b4e8529d4ab..45449353a958 100644 --- a/drivers/net/smc-ultra.c +++ b/drivers/net/smc-ultra.c | |||
@@ -57,7 +57,6 @@ | |||
57 | static const char version[] = | 57 | static const char version[] = |
58 | "smc-ultra.c:v2.02 2/3/98 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n"; | 58 | "smc-ultra.c:v2.02 2/3/98 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n"; |
59 | 59 | ||
60 | #include <linux/config.h> | ||
61 | #include <linux/module.h> | 60 | #include <linux/module.h> |
62 | #include <linux/kernel.h> | 61 | #include <linux/kernel.h> |
63 | #include <linux/errno.h> | 62 | #include <linux/errno.h> |
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index 0e9833adf9fe..3d8dcb6c8758 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
@@ -66,7 +66,6 @@ static const char version[] = | |||
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | 68 | ||
69 | #include <linux/config.h> | ||
70 | #include <linux/init.h> | 69 | #include <linux/init.h> |
71 | #include <linux/module.h> | 70 | #include <linux/module.h> |
72 | #include <linux/kernel.h> | 71 | #include <linux/kernel.h> |
diff --git a/drivers/net/sonic.h b/drivers/net/sonic.h index cede969a8baa..7f5c4ebcc17a 100644 --- a/drivers/net/sonic.h +++ b/drivers/net/sonic.h | |||
@@ -22,7 +22,6 @@ | |||
22 | #ifndef SONIC_H | 22 | #ifndef SONIC_H |
23 | #define SONIC_H | 23 | #define SONIC_H |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | 25 | ||
27 | /* | 26 | /* |
28 | * SONIC register offsets | 27 | * SONIC register offsets |
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index 394339d5e87c..e0b72676922c 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -21,7 +21,6 @@ | |||
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/compiler.h> | 24 | #include <linux/compiler.h> |
26 | #include <linux/crc32.h> | 25 | #include <linux/crc32.h> |
27 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index c158eedc7813..f91be95356a4 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c | |||
@@ -146,7 +146,6 @@ TODO: - fix forced speed/duplexing code (broken a long time ago, when | |||
146 | #define DRV_VERSION "1.03+LK1.4.2.1" | 146 | #define DRV_VERSION "1.03+LK1.4.2.1" |
147 | #define DRV_RELDATE "October 3, 2005" | 147 | #define DRV_RELDATE "October 3, 2005" |
148 | 148 | ||
149 | #include <linux/config.h> | ||
150 | #include <linux/module.h> | 149 | #include <linux/module.h> |
151 | #include <linux/kernel.h> | 150 | #include <linux/kernel.h> |
152 | #include <linux/pci.h> | 151 | #include <linux/pci.h> |
diff --git a/drivers/net/stnic.c b/drivers/net/stnic.c index b6dfdf8f44da..74228348995d 100644 --- a/drivers/net/stnic.c +++ b/drivers/net/stnic.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * Copyright (C) 1999 kaz Kojima | 7 | * Copyright (C) 1999 kaz Kojima |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
13 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c index 9282b4b0c022..278c7cb22216 100644 --- a/drivers/net/sungem_phy.c +++ b/drivers/net/sungem_phy.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * of darwin, still need to reverse engineer that | 19 | * of darwin, still need to reverse engineer that |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | 22 | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | 24 | ||
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index c33ead3470db..d85b83204f6b 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * argument : macaddr=0x00,0x10,0x20,0x30,0x40,0x50 | 13 | * argument : macaddr=0x00,0x10,0x20,0x30,0x40,0x50 |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
18 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
19 | #include <linux/types.h> | 18 | #include <linux/types.h> |
@@ -2523,7 +2522,7 @@ static struct ethtool_ops hme_ethtool_ops = { | |||
2523 | static int hme_version_printed; | 2522 | static int hme_version_printed; |
2524 | 2523 | ||
2525 | #ifdef CONFIG_SBUS | 2524 | #ifdef CONFIG_SBUS |
2526 | void __init quattro_get_ranges(struct quattro *qp) | 2525 | void __devinit quattro_get_ranges(struct quattro *qp) |
2527 | { | 2526 | { |
2528 | struct sbus_dev *sdev = qp->quattro_dev; | 2527 | struct sbus_dev *sdev = qp->quattro_dev; |
2529 | int err; | 2528 | int err; |
@@ -2539,7 +2538,7 @@ void __init quattro_get_ranges(struct quattro *qp) | |||
2539 | qp->nranges = (err / sizeof(struct linux_prom_ranges)); | 2538 | qp->nranges = (err / sizeof(struct linux_prom_ranges)); |
2540 | } | 2539 | } |
2541 | 2540 | ||
2542 | static void __init quattro_apply_ranges(struct quattro *qp, struct happy_meal *hp) | 2541 | static void __devinit quattro_apply_ranges(struct quattro *qp, struct happy_meal *hp) |
2543 | { | 2542 | { |
2544 | struct sbus_dev *sdev = hp->happy_dev; | 2543 | struct sbus_dev *sdev = hp->happy_dev; |
2545 | int rng; | 2544 | int rng; |
@@ -2566,7 +2565,7 @@ static void __init quattro_apply_ranges(struct quattro *qp, struct happy_meal *h | |||
2566 | * | 2565 | * |
2567 | * Return NULL on failure. | 2566 | * Return NULL on failure. |
2568 | */ | 2567 | */ |
2569 | static struct quattro * __init quattro_sbus_find(struct sbus_dev *goal_sdev) | 2568 | static struct quattro * __devinit quattro_sbus_find(struct sbus_dev *goal_sdev) |
2570 | { | 2569 | { |
2571 | struct sbus_dev *sdev; | 2570 | struct sbus_dev *sdev; |
2572 | struct quattro *qp; | 2571 | struct quattro *qp; |
@@ -2618,7 +2617,7 @@ static void __init quattro_sbus_register_irqs(void) | |||
2618 | } | 2617 | } |
2619 | } | 2618 | } |
2620 | 2619 | ||
2621 | static void __devexit quattro_sbus_free_irqs(void) | 2620 | static void quattro_sbus_free_irqs(void) |
2622 | { | 2621 | { |
2623 | struct quattro *qp; | 2622 | struct quattro *qp; |
2624 | 2623 | ||
@@ -2662,7 +2661,7 @@ static struct quattro * __init quattro_pci_find(struct pci_dev *pdev) | |||
2662 | #endif /* CONFIG_PCI */ | 2661 | #endif /* CONFIG_PCI */ |
2663 | 2662 | ||
2664 | #ifdef CONFIG_SBUS | 2663 | #ifdef CONFIG_SBUS |
2665 | static int __init happy_meal_sbus_probe_one(struct sbus_dev *sdev, int is_qfe) | 2664 | static int __devinit happy_meal_sbus_probe_one(struct sbus_dev *sdev, int is_qfe) |
2666 | { | 2665 | { |
2667 | struct device_node *dp = sdev->ofdev.node; | 2666 | struct device_node *dp = sdev->ofdev.node; |
2668 | struct quattro *qp = NULL; | 2667 | struct quattro *qp = NULL; |
diff --git a/drivers/net/sunhme.h b/drivers/net/sunhme.h index 9b7ccaeeee89..90f446db9ba2 100644 --- a/drivers/net/sunhme.h +++ b/drivers/net/sunhme.h | |||
@@ -8,7 +8,6 @@ | |||
8 | #ifndef _SUNHME_H | 8 | #ifndef _SUNHME_H |
9 | #define _SUNHME_H | 9 | #define _SUNHME_H |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
13 | 12 | ||
14 | /* Happy Meal global registers. */ | 13 | /* Happy Meal global registers. */ |
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index 2c239ab63a80..5b0b60f4d20e 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
@@ -71,7 +71,6 @@ | |||
71 | 71 | ||
72 | static char lancestr[] = "LANCE"; | 72 | static char lancestr[] = "LANCE"; |
73 | 73 | ||
74 | #include <linux/config.h> | ||
75 | #include <linux/module.h> | 74 | #include <linux/module.h> |
76 | #include <linux/kernel.h> | 75 | #include <linux/kernel.h> |
77 | #include <linux/types.h> | 76 | #include <linux/types.h> |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 35f931638750..953255e92633 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * notice is accompanying it. | 15 | * notice is accompanying it. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | 18 | ||
20 | #include <linux/module.h> | 19 | #include <linux/module.h> |
21 | #include <linux/moduleparam.h> | 20 | #include <linux/moduleparam.h> |
@@ -69,8 +68,8 @@ | |||
69 | 68 | ||
70 | #define DRV_MODULE_NAME "tg3" | 69 | #define DRV_MODULE_NAME "tg3" |
71 | #define PFX DRV_MODULE_NAME ": " | 70 | #define PFX DRV_MODULE_NAME ": " |
72 | #define DRV_MODULE_VERSION "3.60" | 71 | #define DRV_MODULE_VERSION "3.61" |
73 | #define DRV_MODULE_RELDATE "June 17, 2006" | 72 | #define DRV_MODULE_RELDATE "June 29, 2006" |
74 | 73 | ||
75 | #define TG3_DEF_MAC_MODE 0 | 74 | #define TG3_DEF_MAC_MODE 0 |
76 | #define TG3_DEF_RX_MODE 0 | 75 | #define TG3_DEF_RX_MODE 0 |
@@ -3195,7 +3194,7 @@ static int tg3_vlan_rx(struct tg3 *tp, struct sk_buff *skb, u16 vlan_tag) | |||
3195 | */ | 3194 | */ |
3196 | static int tg3_rx(struct tg3 *tp, int budget) | 3195 | static int tg3_rx(struct tg3 *tp, int budget) |
3197 | { | 3196 | { |
3198 | u32 work_mask; | 3197 | u32 work_mask, rx_std_posted = 0; |
3199 | u32 sw_idx = tp->rx_rcb_ptr; | 3198 | u32 sw_idx = tp->rx_rcb_ptr; |
3200 | u16 hw_idx; | 3199 | u16 hw_idx; |
3201 | int received; | 3200 | int received; |
@@ -3222,6 +3221,7 @@ static int tg3_rx(struct tg3 *tp, int budget) | |||
3222 | mapping); | 3221 | mapping); |
3223 | skb = tp->rx_std_buffers[desc_idx].skb; | 3222 | skb = tp->rx_std_buffers[desc_idx].skb; |
3224 | post_ptr = &tp->rx_std_ptr; | 3223 | post_ptr = &tp->rx_std_ptr; |
3224 | rx_std_posted++; | ||
3225 | } else if (opaque_key == RXD_OPAQUE_RING_JUMBO) { | 3225 | } else if (opaque_key == RXD_OPAQUE_RING_JUMBO) { |
3226 | dma_addr = pci_unmap_addr(&tp->rx_jumbo_buffers[desc_idx], | 3226 | dma_addr = pci_unmap_addr(&tp->rx_jumbo_buffers[desc_idx], |
3227 | mapping); | 3227 | mapping); |
@@ -3309,6 +3309,15 @@ static int tg3_rx(struct tg3 *tp, int budget) | |||
3309 | 3309 | ||
3310 | next_pkt: | 3310 | next_pkt: |
3311 | (*post_ptr)++; | 3311 | (*post_ptr)++; |
3312 | |||
3313 | if (unlikely(rx_std_posted >= tp->rx_std_max_post)) { | ||
3314 | u32 idx = *post_ptr % TG3_RX_RING_SIZE; | ||
3315 | |||
3316 | tw32_rx_mbox(MAILBOX_RCV_STD_PROD_IDX + | ||
3317 | TG3_64BIT_REG_LOW, idx); | ||
3318 | work_mask &= ~RXD_OPAQUE_RING_STD; | ||
3319 | rx_std_posted = 0; | ||
3320 | } | ||
3312 | next_pkt_nopost: | 3321 | next_pkt_nopost: |
3313 | sw_idx++; | 3322 | sw_idx++; |
3314 | sw_idx %= TG3_RX_RCB_RING_SIZE(tp); | 3323 | sw_idx %= TG3_RX_RCB_RING_SIZE(tp); |
@@ -3870,6 +3879,40 @@ out_unlock: | |||
3870 | return NETDEV_TX_OK; | 3879 | return NETDEV_TX_OK; |
3871 | } | 3880 | } |
3872 | 3881 | ||
3882 | #if TG3_TSO_SUPPORT != 0 | ||
3883 | static int tg3_start_xmit_dma_bug(struct sk_buff *, struct net_device *); | ||
3884 | |||
3885 | /* Use GSO to workaround a rare TSO bug that may be triggered when the | ||
3886 | * TSO header is greater than 80 bytes. | ||
3887 | */ | ||
3888 | static int tg3_tso_bug(struct tg3 *tp, struct sk_buff *skb) | ||
3889 | { | ||
3890 | struct sk_buff *segs, *nskb; | ||
3891 | |||
3892 | /* Estimate the number of fragments in the worst case */ | ||
3893 | if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->gso_segs * 3))) { | ||
3894 | netif_stop_queue(tp->dev); | ||
3895 | return NETDEV_TX_BUSY; | ||
3896 | } | ||
3897 | |||
3898 | segs = skb_gso_segment(skb, tp->dev->features & ~NETIF_F_TSO); | ||
3899 | if (unlikely(IS_ERR(segs))) | ||
3900 | goto tg3_tso_bug_end; | ||
3901 | |||
3902 | do { | ||
3903 | nskb = segs; | ||
3904 | segs = segs->next; | ||
3905 | nskb->next = NULL; | ||
3906 | tg3_start_xmit_dma_bug(nskb, tp->dev); | ||
3907 | } while (segs); | ||
3908 | |||
3909 | tg3_tso_bug_end: | ||
3910 | dev_kfree_skb(skb); | ||
3911 | |||
3912 | return NETDEV_TX_OK; | ||
3913 | } | ||
3914 | #endif | ||
3915 | |||
3873 | /* hard_start_xmit for devices that have the 4G bug and/or 40-bit bug and | 3916 | /* hard_start_xmit for devices that have the 4G bug and/or 40-bit bug and |
3874 | * support TG3_FLG2_HW_TSO_1 or firmware TSO only. | 3917 | * support TG3_FLG2_HW_TSO_1 or firmware TSO only. |
3875 | */ | 3918 | */ |
@@ -3906,7 +3949,7 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) | |||
3906 | mss = 0; | 3949 | mss = 0; |
3907 | if (skb->len > (tp->dev->mtu + ETH_HLEN) && | 3950 | if (skb->len > (tp->dev->mtu + ETH_HLEN) && |
3908 | (mss = skb_shinfo(skb)->gso_size) != 0) { | 3951 | (mss = skb_shinfo(skb)->gso_size) != 0) { |
3909 | int tcp_opt_len, ip_tcp_len; | 3952 | int tcp_opt_len, ip_tcp_len, hdr_len; |
3910 | 3953 | ||
3911 | if (skb_header_cloned(skb) && | 3954 | if (skb_header_cloned(skb) && |
3912 | pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) { | 3955 | pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) { |
@@ -3917,11 +3960,16 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) | |||
3917 | tcp_opt_len = ((skb->h.th->doff - 5) * 4); | 3960 | tcp_opt_len = ((skb->h.th->doff - 5) * 4); |
3918 | ip_tcp_len = (skb->nh.iph->ihl * 4) + sizeof(struct tcphdr); | 3961 | ip_tcp_len = (skb->nh.iph->ihl * 4) + sizeof(struct tcphdr); |
3919 | 3962 | ||
3963 | hdr_len = ip_tcp_len + tcp_opt_len; | ||
3964 | if (unlikely((ETH_HLEN + hdr_len) > 80) && | ||
3965 | (tp->tg3_flags2 & TG3_FLG2_HW_TSO_1_BUG)) | ||
3966 | return (tg3_tso_bug(tp, skb)); | ||
3967 | |||
3920 | base_flags |= (TXD_FLAG_CPU_PRE_DMA | | 3968 | base_flags |= (TXD_FLAG_CPU_PRE_DMA | |
3921 | TXD_FLAG_CPU_POST_DMA); | 3969 | TXD_FLAG_CPU_POST_DMA); |
3922 | 3970 | ||
3923 | skb->nh.iph->check = 0; | 3971 | skb->nh.iph->check = 0; |
3924 | skb->nh.iph->tot_len = htons(mss + ip_tcp_len + tcp_opt_len); | 3972 | skb->nh.iph->tot_len = htons(mss + hdr_len); |
3925 | if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) { | 3973 | if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) { |
3926 | skb->h.th->check = 0; | 3974 | skb->h.th->check = 0; |
3927 | base_flags &= ~TXD_FLAG_TCPUDP_CSUM; | 3975 | base_flags &= ~TXD_FLAG_TCPUDP_CSUM; |
@@ -5981,7 +6029,13 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) | |||
5981 | } | 6029 | } |
5982 | 6030 | ||
5983 | /* Setup replenish threshold. */ | 6031 | /* Setup replenish threshold. */ |
5984 | tw32(RCVBDI_STD_THRESH, tp->rx_pending / 8); | 6032 | val = tp->rx_pending / 8; |
6033 | if (val == 0) | ||
6034 | val = 1; | ||
6035 | else if (val > tp->rx_std_max_post) | ||
6036 | val = tp->rx_std_max_post; | ||
6037 | |||
6038 | tw32(RCVBDI_STD_THRESH, val); | ||
5985 | 6039 | ||
5986 | /* Initialize TG3_BDINFO's at: | 6040 | /* Initialize TG3_BDINFO's at: |
5987 | * RCVDBDI_STD_BD: standard eth size rx ring | 6041 | * RCVDBDI_STD_BD: standard eth size rx ring |
@@ -6141,8 +6195,12 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) | |||
6141 | #endif | 6195 | #endif |
6142 | 6196 | ||
6143 | /* Receive/send statistics. */ | 6197 | /* Receive/send statistics. */ |
6144 | if ((rdmac_mode & RDMAC_MODE_FIFO_SIZE_128) && | 6198 | if (tp->tg3_flags2 & TG3_FLG2_5750_PLUS) { |
6145 | (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE)) { | 6199 | val = tr32(RCVLPC_STATS_ENABLE); |
6200 | val &= ~RCVLPC_STATSENAB_DACK_FIX; | ||
6201 | tw32(RCVLPC_STATS_ENABLE, val); | ||
6202 | } else if ((rdmac_mode & RDMAC_MODE_FIFO_SIZE_128) && | ||
6203 | (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE)) { | ||
6146 | val = tr32(RCVLPC_STATS_ENABLE); | 6204 | val = tr32(RCVLPC_STATS_ENABLE); |
6147 | val &= ~RCVLPC_STATSENAB_LNGBRST_RFIX; | 6205 | val &= ~RCVLPC_STATSENAB_LNGBRST_RFIX; |
6148 | tw32(RCVLPC_STATS_ENABLE, val); | 6206 | tw32(RCVLPC_STATS_ENABLE, val); |
@@ -8738,6 +8796,9 @@ static void tg3_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) | |||
8738 | { | 8796 | { |
8739 | struct tg3 *tp = netdev_priv(dev); | 8797 | struct tg3 *tp = netdev_priv(dev); |
8740 | 8798 | ||
8799 | if (netif_running(dev)) | ||
8800 | tg3_netif_stop(tp); | ||
8801 | |||
8741 | tg3_full_lock(tp, 0); | 8802 | tg3_full_lock(tp, 0); |
8742 | 8803 | ||
8743 | tp->vlgrp = grp; | 8804 | tp->vlgrp = grp; |
@@ -8746,16 +8807,25 @@ static void tg3_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) | |||
8746 | __tg3_set_rx_mode(dev); | 8807 | __tg3_set_rx_mode(dev); |
8747 | 8808 | ||
8748 | tg3_full_unlock(tp); | 8809 | tg3_full_unlock(tp); |
8810 | |||
8811 | if (netif_running(dev)) | ||
8812 | tg3_netif_start(tp); | ||
8749 | } | 8813 | } |
8750 | 8814 | ||
8751 | static void tg3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | 8815 | static void tg3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) |
8752 | { | 8816 | { |
8753 | struct tg3 *tp = netdev_priv(dev); | 8817 | struct tg3 *tp = netdev_priv(dev); |
8754 | 8818 | ||
8819 | if (netif_running(dev)) | ||
8820 | tg3_netif_stop(tp); | ||
8821 | |||
8755 | tg3_full_lock(tp, 0); | 8822 | tg3_full_lock(tp, 0); |
8756 | if (tp->vlgrp) | 8823 | if (tp->vlgrp) |
8757 | tp->vlgrp->vlan_devices[vid] = NULL; | 8824 | tp->vlgrp->vlan_devices[vid] = NULL; |
8758 | tg3_full_unlock(tp); | 8825 | tg3_full_unlock(tp); |
8826 | |||
8827 | if (netif_running(dev)) | ||
8828 | tg3_netif_start(tp); | ||
8759 | } | 8829 | } |
8760 | #endif | 8830 | #endif |
8761 | 8831 | ||
@@ -10160,8 +10230,14 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
10160 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) { | 10230 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) { |
10161 | tp->tg3_flags2 |= TG3_FLG2_HW_TSO_2; | 10231 | tp->tg3_flags2 |= TG3_FLG2_HW_TSO_2; |
10162 | tp->tg3_flags2 |= TG3_FLG2_1SHOT_MSI; | 10232 | tp->tg3_flags2 |= TG3_FLG2_1SHOT_MSI; |
10163 | } else | 10233 | } else { |
10164 | tp->tg3_flags2 |= TG3_FLG2_HW_TSO_1; | 10234 | tp->tg3_flags2 |= TG3_FLG2_HW_TSO_1 | |
10235 | TG3_FLG2_HW_TSO_1_BUG; | ||
10236 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == | ||
10237 | ASIC_REV_5750 && | ||
10238 | tp->pci_chip_rev_id >= CHIPREV_ID_5750_C2) | ||
10239 | tp->tg3_flags2 &= ~TG3_FLG2_HW_TSO_1_BUG; | ||
10240 | } | ||
10165 | } | 10241 | } |
10166 | 10242 | ||
10167 | if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && | 10243 | if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && |
@@ -10533,6 +10609,16 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
10533 | (tp->tg3_flags & TG3_FLAG_PCIX_MODE) != 0) | 10609 | (tp->tg3_flags & TG3_FLAG_PCIX_MODE) != 0) |
10534 | tp->rx_offset = 0; | 10610 | tp->rx_offset = 0; |
10535 | 10611 | ||
10612 | tp->rx_std_max_post = TG3_RX_RING_SIZE; | ||
10613 | |||
10614 | /* Increment the rx prod index on the rx std ring by at most | ||
10615 | * 8 for these chips to workaround hw errata. | ||
10616 | */ | ||
10617 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750 || | ||
10618 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752 || | ||
10619 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) | ||
10620 | tp->rx_std_max_post = 8; | ||
10621 | |||
10536 | /* By default, disable wake-on-lan. User can change this | 10622 | /* By default, disable wake-on-lan. User can change this |
10537 | * using ETHTOOL_SWOL. | 10623 | * using ETHTOOL_SWOL. |
10538 | */ | 10624 | */ |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 8209da5dd15f..ba2c98711c88 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -125,6 +125,7 @@ | |||
125 | #define CHIPREV_ID_5750_A0 0x4000 | 125 | #define CHIPREV_ID_5750_A0 0x4000 |
126 | #define CHIPREV_ID_5750_A1 0x4001 | 126 | #define CHIPREV_ID_5750_A1 0x4001 |
127 | #define CHIPREV_ID_5750_A3 0x4003 | 127 | #define CHIPREV_ID_5750_A3 0x4003 |
128 | #define CHIPREV_ID_5750_C2 0x4202 | ||
128 | #define CHIPREV_ID_5752_A0_HW 0x5000 | 129 | #define CHIPREV_ID_5752_A0_HW 0x5000 |
129 | #define CHIPREV_ID_5752_A0 0x6000 | 130 | #define CHIPREV_ID_5752_A0 0x6000 |
130 | #define CHIPREV_ID_5752_A1 0x6001 | 131 | #define CHIPREV_ID_5752_A1 0x6001 |
@@ -760,6 +761,7 @@ | |||
760 | #define RCVLPC_STATSCTRL_ENABLE 0x00000001 | 761 | #define RCVLPC_STATSCTRL_ENABLE 0x00000001 |
761 | #define RCVLPC_STATSCTRL_FASTUPD 0x00000002 | 762 | #define RCVLPC_STATSCTRL_FASTUPD 0x00000002 |
762 | #define RCVLPC_STATS_ENABLE 0x00002018 | 763 | #define RCVLPC_STATS_ENABLE 0x00002018 |
764 | #define RCVLPC_STATSENAB_DACK_FIX 0x00040000 | ||
763 | #define RCVLPC_STATSENAB_LNGBRST_RFIX 0x00400000 | 765 | #define RCVLPC_STATSENAB_LNGBRST_RFIX 0x00400000 |
764 | #define RCVLPC_STATS_INCMASK 0x0000201c | 766 | #define RCVLPC_STATS_INCMASK 0x0000201c |
765 | /* 0x2020 --> 0x2100 unused */ | 767 | /* 0x2020 --> 0x2100 unused */ |
@@ -2137,6 +2139,7 @@ struct tg3 { | |||
2137 | struct tg3_rx_buffer_desc *rx_std; | 2139 | struct tg3_rx_buffer_desc *rx_std; |
2138 | struct ring_info *rx_std_buffers; | 2140 | struct ring_info *rx_std_buffers; |
2139 | dma_addr_t rx_std_mapping; | 2141 | dma_addr_t rx_std_mapping; |
2142 | u32 rx_std_max_post; | ||
2140 | 2143 | ||
2141 | struct tg3_rx_buffer_desc *rx_jumbo; | 2144 | struct tg3_rx_buffer_desc *rx_jumbo; |
2142 | struct ring_info *rx_jumbo_buffers; | 2145 | struct ring_info *rx_jumbo_buffers; |
@@ -2191,7 +2194,7 @@ struct tg3 { | |||
2191 | #define TG3_FLAG_INIT_COMPLETE 0x80000000 | 2194 | #define TG3_FLAG_INIT_COMPLETE 0x80000000 |
2192 | u32 tg3_flags2; | 2195 | u32 tg3_flags2; |
2193 | #define TG3_FLG2_RESTART_TIMER 0x00000001 | 2196 | #define TG3_FLG2_RESTART_TIMER 0x00000001 |
2194 | /* 0x00000002 available */ | 2197 | #define TG3_FLG2_HW_TSO_1_BUG 0x00000002 |
2195 | #define TG3_FLG2_NO_ETH_WIRE_SPEED 0x00000004 | 2198 | #define TG3_FLG2_NO_ETH_WIRE_SPEED 0x00000004 |
2196 | #define TG3_FLG2_IS_5788 0x00000008 | 2199 | #define TG3_FLG2_IS_5788 0x00000008 |
2197 | #define TG3_FLG2_MAX_RXPEND_64 0x00000010 | 2200 | #define TG3_FLG2_MAX_RXPEND_64 0x00000010 |
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c index 41e0cd8f4786..77bb298129d7 100644 --- a/drivers/net/tokenring/3c359.c +++ b/drivers/net/tokenring/3c359.c | |||
@@ -42,7 +42,6 @@ | |||
42 | 42 | ||
43 | #define XL_DEBUG 0 | 43 | #define XL_DEBUG 0 |
44 | 44 | ||
45 | #include <linux/config.h> | ||
46 | #include <linux/module.h> | 45 | #include <linux/module.h> |
47 | #include <linux/kernel.h> | 46 | #include <linux/kernel.h> |
48 | #include <linux/errno.h> | 47 | #include <linux/errno.h> |
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c index c58a4c31d0dd..30dcdaebf41a 100644 --- a/drivers/net/tokenring/lanstreamer.c +++ b/drivers/net/tokenring/lanstreamer.c | |||
@@ -100,7 +100,6 @@ | |||
100 | 100 | ||
101 | #define STREAMER_IOCTL 0 | 101 | #define STREAMER_IOCTL 0 |
102 | 102 | ||
103 | #include <linux/config.h> | ||
104 | #include <linux/module.h> | 103 | #include <linux/module.h> |
105 | #include <linux/kernel.h> | 104 | #include <linux/kernel.h> |
106 | #include <linux/errno.h> | 105 | #include <linux/errno.h> |
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c index c3cb8d26cfe3..d7a30d99ae8f 100644 --- a/drivers/net/tokenring/olympic.c +++ b/drivers/net/tokenring/olympic.c | |||
@@ -80,7 +80,6 @@ | |||
80 | #define OLYMPIC_DEBUG 0 | 80 | #define OLYMPIC_DEBUG 0 |
81 | 81 | ||
82 | 82 | ||
83 | #include <linux/config.h> | ||
84 | #include <linux/module.h> | 83 | #include <linux/module.h> |
85 | #include <linux/kernel.h> | 84 | #include <linux/kernel.h> |
86 | #include <linux/errno.h> | 85 | #include <linux/errno.h> |
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c index 67d2b596ce22..f2807ab5a2be 100644 --- a/drivers/net/tokenring/smctr.c +++ b/drivers/net/tokenring/smctr.c | |||
@@ -29,7 +29,6 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/config.h> | ||
33 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
34 | #include <linux/types.h> | 33 | #include <linux/types.h> |
35 | #include <linux/fcntl.h> | 34 | #include <linux/fcntl.h> |
diff --git a/drivers/net/tokenring/smctr_firmware.h b/drivers/net/tokenring/smctr_firmware.h index 48994b043b7c..292e50ddf01a 100644 --- a/drivers/net/tokenring/smctr_firmware.h +++ b/drivers/net/tokenring/smctr_firmware.h | |||
@@ -17,7 +17,6 @@ | |||
17 | * - Jay Schulist <jschlst@samba.org> | 17 | * - Jay Schulist <jschlst@samba.org> |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | 20 | ||
22 | #if defined(CONFIG_SMCTR) || defined(CONFIG_SMCTR_MODULE) | 21 | #if defined(CONFIG_SMCTR) || defined(CONFIG_SMCTR_MODULE) |
23 | 22 | ||
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index fc2468ecce0b..354294c6271e 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #define DRV_VERSION "0.7" | 31 | #define DRV_VERSION "0.7" |
32 | #define DRV_RELDATE "Mar 17, 2004" | 32 | #define DRV_RELDATE "Mar 17, 2004" |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
36 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
37 | #include <linux/netdevice.h> | 36 | #include <linux/netdevice.h> |
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index da8bd0d62a3f..2647a5bc5211 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c | |||
@@ -443,7 +443,6 @@ | |||
443 | ========================================================================= | 443 | ========================================================================= |
444 | */ | 444 | */ |
445 | 445 | ||
446 | #include <linux/config.h> | ||
447 | #include <linux/module.h> | 446 | #include <linux/module.h> |
448 | #include <linux/kernel.h> | 447 | #include <linux/kernel.h> |
449 | #include <linux/string.h> | 448 | #include <linux/string.h> |
diff --git a/drivers/net/tulip/interrupt.c b/drivers/net/tulip/interrupt.c index da4f7593c50f..99ccf2ebb342 100644 --- a/drivers/net/tulip/interrupt.c +++ b/drivers/net/tulip/interrupt.c | |||
@@ -16,7 +16,6 @@ | |||
16 | 16 | ||
17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
18 | #include "tulip.h" | 18 | #include "tulip.h" |
19 | #include <linux/config.h> | ||
20 | #include <linux/etherdevice.h> | 19 | #include <linux/etherdevice.h> |
21 | 20 | ||
22 | int tulip_rx_copybreak; | 21 | int tulip_rx_copybreak; |
diff --git a/drivers/net/tulip/tulip.h b/drivers/net/tulip/tulip.h index d25020da6798..3bcfbf3d23ed 100644 --- a/drivers/net/tulip/tulip.h +++ b/drivers/net/tulip/tulip.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #ifndef __NET_TULIP_H__ | 16 | #ifndef __NET_TULIP_H__ |
17 | #define __NET_TULIP_H__ | 17 | #define __NET_TULIP_H__ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/types.h> | 20 | #include <linux/types.h> |
22 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index 53fd9b56d0bd..8f4f4840fc12 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -14,7 +14,6 @@ | |||
14 | 14 | ||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | 17 | ||
19 | #define DRV_NAME "tulip" | 18 | #define DRV_NAME "tulip" |
20 | #ifdef CONFIG_TULIP_NAPI | 19 | #ifdef CONFIG_TULIP_NAPI |
diff --git a/drivers/net/tulip/xircom_tulip_cb.c b/drivers/net/tulip/xircom_tulip_cb.c index 887d7245fe7b..aecafdabbc91 100644 --- a/drivers/net/tulip/xircom_tulip_cb.c +++ b/drivers/net/tulip/xircom_tulip_cb.c | |||
@@ -98,7 +98,6 @@ static int csr0 = 0x00A00000 | 0x4800; | |||
98 | /* PCI registers */ | 98 | /* PCI registers */ |
99 | #define PCI_POWERMGMT 0x40 | 99 | #define PCI_POWERMGMT 0x40 |
100 | 100 | ||
101 | #include <linux/config.h> | ||
102 | #include <linux/module.h> | 101 | #include <linux/module.h> |
103 | #include <linux/moduleparam.h> | 102 | #include <linux/moduleparam.h> |
104 | #include <linux/kernel.h> | 103 | #include <linux/kernel.h> |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 732c5edec2e5..329d9feb9b89 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #define DRV_DESCRIPTION "Universal TUN/TAP device driver" | 39 | #define DRV_DESCRIPTION "Universal TUN/TAP device driver" |
40 | #define DRV_COPYRIGHT "(C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>" | 40 | #define DRV_COPYRIGHT "(C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>" |
41 | 41 | ||
42 | #include <linux/config.h> | ||
43 | #include <linux/module.h> | 42 | #include <linux/module.h> |
44 | #include <linux/errno.h> | 43 | #include <linux/errno.h> |
45 | #include <linux/kernel.h> | 44 | #include <linux/kernel.h> |
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index 09e05fe40c38..857d71c3c017 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
@@ -47,7 +47,6 @@ | |||
47 | 47 | ||
48 | #include <linux/module.h> | 48 | #include <linux/module.h> |
49 | #include <linux/types.h> | 49 | #include <linux/types.h> |
50 | #include <linux/config.h> | ||
51 | #include <linux/init.h> | 50 | #include <linux/init.h> |
52 | #include <linux/mm.h> | 51 | #include <linux/mm.h> |
53 | #include <linux/errno.h> | 52 | #include <linux/errno.h> |
@@ -65,7 +64,6 @@ | |||
65 | #include <linux/wait.h> | 64 | #include <linux/wait.h> |
66 | #include <asm/io.h> | 65 | #include <asm/io.h> |
67 | #include <linux/if.h> | 66 | #include <linux/if.h> |
68 | #include <linux/config.h> | ||
69 | #include <asm/uaccess.h> | 67 | #include <asm/uaccess.h> |
70 | #include <linux/proc_fs.h> | 68 | #include <linux/proc_fs.h> |
71 | #include <linux/inetdevice.h> | 69 | #include <linux/inetdevice.h> |
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c index be5e33814cb1..1f95b4864ea1 100644 --- a/drivers/net/wan/cosa.c +++ b/drivers/net/wan/cosa.c | |||
@@ -79,7 +79,6 @@ | |||
79 | 79 | ||
80 | /* ---------- Headers, macros, data structures ---------- */ | 80 | /* ---------- Headers, macros, data structures ---------- */ |
81 | 81 | ||
82 | #include <linux/config.h> | ||
83 | #include <linux/module.h> | 82 | #include <linux/module.h> |
84 | #include <linux/kernel.h> | 83 | #include <linux/kernel.h> |
85 | #include <linux/slab.h> | 84 | #include <linux/slab.h> |
diff --git a/drivers/net/wan/hdlc_generic.c b/drivers/net/wan/hdlc_generic.c index 57f9538b8fb5..b7da55140fbd 100644 --- a/drivers/net/wan/hdlc_generic.c +++ b/drivers/net/wan/hdlc_generic.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * - proto.start() and stop() are called with spin_lock_irq held. | 22 | * - proto.start() and stop() are called with spin_lock_irq held. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
28 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
diff --git a/drivers/net/wan/lmc/lmc_media.c b/drivers/net/wan/lmc/lmc_media.c index af8b55fdd9d9..ae01555d24cf 100644 --- a/drivers/net/wan/lmc/lmc_media.c +++ b/drivers/net/wan/lmc/lmc_media.c | |||
@@ -1,6 +1,5 @@ | |||
1 | /* $Id: lmc_media.c,v 1.13 2000/04/11 05:25:26 asj Exp $ */ | 1 | /* $Id: lmc_media.c,v 1.13 2000/04/11 05:25:26 asj Exp $ */ |
2 | 2 | ||
3 | #include <linux/config.h> | ||
4 | #include <linux/kernel.h> | 3 | #include <linux/kernel.h> |
5 | #include <linux/string.h> | 4 | #include <linux/string.h> |
6 | #include <linux/timer.h> | 5 | #include <linux/timer.h> |
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c index 175ba13bce41..f2d071272cee 100644 --- a/drivers/net/wan/sbni.c +++ b/drivers/net/wan/sbni.c | |||
@@ -37,7 +37,6 @@ | |||
37 | * Known problem: this driver wasn't tested on multiprocessor machine. | 37 | * Known problem: this driver wasn't tested on multiprocessor machine. |
38 | */ | 38 | */ |
39 | 39 | ||
40 | #include <linux/config.h> | ||
41 | #include <linux/module.h> | 40 | #include <linux/module.h> |
42 | #include <linux/kernel.h> | 41 | #include <linux/kernel.h> |
43 | #include <linux/ptrace.h> | 42 | #include <linux/ptrace.h> |
diff --git a/drivers/net/wan/syncppp.c b/drivers/net/wan/syncppp.c index 2d1bba06a085..c13b459a0137 100644 --- a/drivers/net/wan/syncppp.c +++ b/drivers/net/wan/syncppp.c | |||
@@ -37,7 +37,6 @@ | |||
37 | */ | 37 | */ |
38 | #undef DEBUG | 38 | #undef DEBUG |
39 | 39 | ||
40 | #include <linux/config.h> | ||
41 | #include <linux/module.h> | 40 | #include <linux/module.h> |
42 | #include <linux/kernel.h> | 41 | #include <linux/kernel.h> |
43 | #include <linux/errno.h> | 42 | #include <linux/errno.h> |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 4069b79d8259..89328d119efa 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | ======================================================================*/ | 20 | ======================================================================*/ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
24 | 23 | ||
25 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index af0cbb6c5c0c..ac9437d497f0 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c | |||
@@ -20,7 +20,6 @@ | |||
20 | 20 | ||
21 | ======================================================================*/ | 21 | ======================================================================*/ |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #ifdef __IN_PCMCIA_PACKAGE__ | 23 | #ifdef __IN_PCMCIA_PACKAGE__ |
25 | #include <pcmcia/k_compat.h> | 24 | #include <pcmcia/k_compat.h> |
26 | #endif | 25 | #endif |
diff --git a/drivers/net/wireless/airport.c b/drivers/net/wireless/airport.c index 7b321f7cf358..38fac3bbcd82 100644 --- a/drivers/net/wireless/airport.c +++ b/drivers/net/wireless/airport.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #define DRIVER_NAME "airport" | 14 | #define DRIVER_NAME "airport" |
15 | #define PFX DRIVER_NAME ": " | 15 | #define PFX DRIVER_NAME ": " |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
19 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
20 | #include <linux/init.h> | 19 | #include <linux/init.h> |
diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c index bed6823d9809..bb6bea4f3233 100644 --- a/drivers/net/wireless/arlan-main.c +++ b/drivers/net/wireless/arlan-main.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * This module provides support for the Arlan 655 card made by Aironet | 5 | * This module provides support for the Arlan 655 card made by Aironet |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include "arlan.h" | 8 | #include "arlan.h" |
10 | 9 | ||
11 | #if BITS_PER_LONG != 32 | 10 | #if BITS_PER_LONG != 32 |
diff --git a/drivers/net/wireless/arlan-proc.c b/drivers/net/wireless/arlan-proc.c index a2cca521f444..5fa985435ffa 100644 --- a/drivers/net/wireless/arlan-proc.c +++ b/drivers/net/wireless/arlan-proc.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include "arlan.h" | 1 | #include "arlan.h" |
3 | 2 | ||
4 | #include <linux/sysctl.h> | 3 | #include <linux/sysctl.h> |
diff --git a/drivers/net/wireless/arlan.h b/drivers/net/wireless/arlan.h index 70a6d7b83c4a..3ed1df75900f 100644 --- a/drivers/net/wireless/arlan.h +++ b/drivers/net/wireless/arlan.h | |||
@@ -5,7 +5,6 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/config.h> | ||
9 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
10 | #include <linux/types.h> | 9 | #include <linux/types.h> |
11 | #include <linux/skbuff.h> | 10 | #include <linux/skbuff.h> |
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 8606c88886fc..54e31fa2d402 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
@@ -39,7 +39,6 @@ | |||
39 | 39 | ||
40 | ******************************************************************************/ | 40 | ******************************************************************************/ |
41 | 41 | ||
42 | #include <linux/config.h> | ||
43 | #include <linux/init.h> | 42 | #include <linux/init.h> |
44 | 43 | ||
45 | #include <linux/kernel.h> | 44 | #include <linux/kernel.h> |
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index 26bf1127524d..785664090bb4 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c | |||
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | ******************************************************************************/ | 30 | ******************************************************************************/ |
31 | 31 | ||
32 | #include <linux/config.h> | ||
33 | #ifdef __IN_PCMCIA_PACKAGE__ | 32 | #ifdef __IN_PCMCIA_PACKAGE__ |
34 | #include <pcmcia/k_compat.h> | 33 | #include <pcmcia/k_compat.h> |
35 | #endif | 34 | #endif |
diff --git a/drivers/net/wireless/atmel_pci.c b/drivers/net/wireless/atmel_pci.c index a61b3bc6cccf..d425c3cefded 100644 --- a/drivers/net/wireless/atmel_pci.c +++ b/drivers/net/wireless/atmel_pci.c | |||
@@ -19,7 +19,6 @@ | |||
19 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | 20 | ||
21 | ******************************************************************************/ | 21 | ******************************************************************************/ |
22 | #include <linux/config.h> | ||
23 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
diff --git a/drivers/net/wireless/hermes.c b/drivers/net/wireless/hermes.c index 2aa2f389c0d5..29d39105f5b8 100644 --- a/drivers/net/wireless/hermes.c +++ b/drivers/net/wireless/hermes.c | |||
@@ -38,7 +38,6 @@ | |||
38 | * under either the MPL or the GPL. | 38 | * under either the MPL or the GPL. |
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include <linux/config.h> | ||
42 | #include <linux/module.h> | 41 | #include <linux/module.h> |
43 | #include <linux/kernel.h> | 42 | #include <linux/kernel.h> |
44 | #include <linux/init.h> | 43 | #include <linux/init.h> |
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index db03dc2646df..52e6df5c1a92 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -1,6 +1,5 @@ | |||
1 | #define PRISM2_PCCARD | 1 | #define PRISM2_PCCARD |
2 | 2 | ||
3 | #include <linux/config.h> | ||
4 | #include <linux/module.h> | 3 | #include <linux/module.h> |
5 | #include <linux/init.h> | 4 | #include <linux/init.h> |
6 | #include <linux/if.h> | 5 | #include <linux/if.h> |
@@ -844,7 +843,7 @@ static struct pcmcia_device_id hostap_cs_ids[] = { | |||
844 | PCMCIA_DEVICE_MANF_CARD(0x02d2, 0x0001), | 843 | PCMCIA_DEVICE_MANF_CARD(0x02d2, 0x0001), |
845 | PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x0001), | 844 | PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x0001), |
846 | PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300), | 845 | PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300), |
847 | PCMCIA_DEVICE_MANF_CARD(0xc00f, 0x0000), | 846 | /* PCMCIA_DEVICE_MANF_CARD(0xc00f, 0x0000), conflict with pcnet_cs */ |
848 | PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002), | 847 | PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002), |
849 | PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005), | 848 | PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005), |
850 | PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0010), | 849 | PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0010), |
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index 328e9a1d13b5..b764cfda6e84 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -30,7 +30,6 @@ | |||
30 | */ | 30 | */ |
31 | 31 | ||
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | 33 | ||
35 | #include <asm/delay.h> | 34 | #include <asm/delay.h> |
36 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c index 93786f4218f0..53374fcba77e 100644 --- a/drivers/net/wireless/hostap/hostap_main.c +++ b/drivers/net/wireless/hostap/hostap_main.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * more details. | 12 | * more details. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
18 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c index 194f07097581..5ea8ac835857 100644 --- a/drivers/net/wireless/hostap/hostap_pci.c +++ b/drivers/net/wireless/hostap/hostap_pci.c | |||
@@ -4,7 +4,6 @@ | |||
4 | * driver patches from Reyk Floeter <reyk@vantronix.net> and | 4 | * driver patches from Reyk Floeter <reyk@vantronix.net> and |
5 | * Andy Warner <andyw@pobox.com> */ | 5 | * Andy Warner <andyw@pobox.com> */ |
6 | 6 | ||
7 | #include <linux/config.h> | ||
8 | #include <linux/module.h> | 7 | #include <linux/module.h> |
9 | #include <linux/init.h> | 8 | #include <linux/init.h> |
10 | #include <linux/if.h> | 9 | #include <linux/if.h> |
diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c index edaaa943eb8f..4ee6abbc65ec 100644 --- a/drivers/net/wireless/hostap/hostap_plx.c +++ b/drivers/net/wireless/hostap/hostap_plx.c | |||
@@ -7,7 +7,6 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/init.h> | 11 | #include <linux/init.h> |
13 | #include <linux/if.h> | 12 | #include <linux/if.h> |
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 94aeb23a7729..27f744e43095 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -134,7 +134,6 @@ that only one external action is invoked at a time. | |||
134 | */ | 134 | */ |
135 | 135 | ||
136 | #include <linux/compiler.h> | 136 | #include <linux/compiler.h> |
137 | #include <linux/config.h> | ||
138 | #include <linux/errno.h> | 137 | #include <linux/errno.h> |
139 | #include <linux/if_arp.h> | 138 | #include <linux/if_arp.h> |
140 | #include <linux/in6.h> | 139 | #include <linux/in6.h> |
@@ -5358,7 +5357,7 @@ static int ipw2100_set_key(struct ipw2100_priv *priv, | |||
5358 | idx, keylen, len); | 5357 | idx, keylen, len); |
5359 | 5358 | ||
5360 | /* NOTE: We don't check cached values in case the firmware was reset | 5359 | /* NOTE: We don't check cached values in case the firmware was reset |
5361 | * or some other problem is occuring. If the user is setting the key, | 5360 | * or some other problem is occurring. If the user is setting the key, |
5362 | * then we push the change */ | 5361 | * then we push the change */ |
5363 | 5362 | ||
5364 | wep_key->idx = idx; | 5363 | wep_key->idx = idx; |
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h index ea12ad66b8e8..8b1cd7c749a4 100644 --- a/drivers/net/wireless/ipw2200.h +++ b/drivers/net/wireless/ipw2200.h | |||
@@ -31,7 +31,6 @@ | |||
31 | 31 | ||
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/moduleparam.h> | 33 | #include <linux/moduleparam.h> |
34 | #include <linux/config.h> | ||
35 | #include <linux/init.h> | 34 | #include <linux/init.h> |
36 | #include <linux/mutex.h> | 35 | #include <linux/mutex.h> |
37 | 36 | ||
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c index 9343d970537b..36b5e004305e 100644 --- a/drivers/net/wireless/netwave_cs.c +++ b/drivers/net/wireless/netwave_cs.c | |||
@@ -37,7 +37,6 @@ | |||
37 | /* To have statistics (just packets sent) define this */ | 37 | /* To have statistics (just packets sent) define this */ |
38 | #undef NETWAVE_STATS | 38 | #undef NETWAVE_STATS |
39 | 39 | ||
40 | #include <linux/config.h> | ||
41 | #include <linux/module.h> | 40 | #include <linux/module.h> |
42 | #include <linux/kernel.h> | 41 | #include <linux/kernel.h> |
43 | #include <linux/init.h> | 42 | #include <linux/init.h> |
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index 8a31b591a901..d6ed5781b93a 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -76,7 +76,6 @@ | |||
76 | 76 | ||
77 | #define DRIVER_NAME "orinoco" | 77 | #define DRIVER_NAME "orinoco" |
78 | 78 | ||
79 | #include <linux/config.h> | ||
80 | #include <linux/module.h> | 79 | #include <linux/module.h> |
81 | #include <linux/kernel.h> | 80 | #include <linux/kernel.h> |
82 | #include <linux/init.h> | 81 | #include <linux/init.h> |
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c index b2aec4d9fbb1..bc14689cbf24 100644 --- a/drivers/net/wireless/orinoco_cs.c +++ b/drivers/net/wireless/orinoco_cs.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #define DRIVER_NAME "orinoco_cs" | 13 | #define DRIVER_NAME "orinoco_cs" |
14 | #define PFX DRIVER_NAME ": " | 14 | #define PFX DRIVER_NAME ": " |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
18 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
19 | #include <linux/init.h> | 18 | #include <linux/init.h> |
diff --git a/drivers/net/wireless/orinoco_nortel.c b/drivers/net/wireless/orinoco_nortel.c index 74b9d5b2ba9e..4597fe1d1979 100644 --- a/drivers/net/wireless/orinoco_nortel.c +++ b/drivers/net/wireless/orinoco_nortel.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #define DRIVER_NAME "orinoco_nortel" | 40 | #define DRIVER_NAME "orinoco_nortel" |
41 | #define PFX DRIVER_NAME ": " | 41 | #define PFX DRIVER_NAME ": " |
42 | 42 | ||
43 | #include <linux/config.h> | ||
44 | #include <linux/module.h> | 43 | #include <linux/module.h> |
45 | #include <linux/kernel.h> | 44 | #include <linux/kernel.h> |
46 | #include <linux/init.h> | 45 | #include <linux/init.h> |
diff --git a/drivers/net/wireless/orinoco_pci.c b/drivers/net/wireless/orinoco_pci.c index 1c105f40f8d5..de3eae082a0d 100644 --- a/drivers/net/wireless/orinoco_pci.c +++ b/drivers/net/wireless/orinoco_pci.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #define DRIVER_NAME "orinoco_pci" | 44 | #define DRIVER_NAME "orinoco_pci" |
45 | #define PFX DRIVER_NAME ": " | 45 | #define PFX DRIVER_NAME ": " |
46 | 46 | ||
47 | #include <linux/config.h> | ||
48 | #include <linux/module.h> | 47 | #include <linux/module.h> |
49 | #include <linux/kernel.h> | 48 | #include <linux/kernel.h> |
50 | #include <linux/init.h> | 49 | #include <linux/init.h> |
diff --git a/drivers/net/wireless/orinoco_plx.c b/drivers/net/wireless/orinoco_plx.c index 84f696c77551..3f928b8939f0 100644 --- a/drivers/net/wireless/orinoco_plx.c +++ b/drivers/net/wireless/orinoco_plx.c | |||
@@ -86,7 +86,6 @@ | |||
86 | #define DRIVER_NAME "orinoco_plx" | 86 | #define DRIVER_NAME "orinoco_plx" |
87 | #define PFX DRIVER_NAME ": " | 87 | #define PFX DRIVER_NAME ": " |
88 | 88 | ||
89 | #include <linux/config.h> | ||
90 | #include <linux/module.h> | 89 | #include <linux/module.h> |
91 | #include <linux/kernel.h> | 90 | #include <linux/kernel.h> |
92 | #include <linux/init.h> | 91 | #include <linux/init.h> |
diff --git a/drivers/net/wireless/orinoco_tmd.c b/drivers/net/wireless/orinoco_tmd.c index d2b4decb7a7d..160a642185f0 100644 --- a/drivers/net/wireless/orinoco_tmd.c +++ b/drivers/net/wireless/orinoco_tmd.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #define DRIVER_NAME "orinoco_tmd" | 40 | #define DRIVER_NAME "orinoco_tmd" |
41 | #define PFX DRIVER_NAME ": " | 41 | #define PFX DRIVER_NAME ": " |
42 | 42 | ||
43 | #include <linux/config.h> | ||
44 | #include <linux/module.h> | 43 | #include <linux/module.h> |
45 | #include <linux/kernel.h> | 44 | #include <linux/kernel.h> |
46 | #include <linux/init.h> | 45 | #include <linux/init.h> |
diff --git a/drivers/net/wireless/prism54/islpci_mgt.c b/drivers/net/wireless/prism54/islpci_mgt.c index 6a60c5970cb5..2e061a80b294 100644 --- a/drivers/net/wireless/prism54/islpci_mgt.c +++ b/drivers/net/wireless/prism54/islpci_mgt.c | |||
@@ -18,7 +18,6 @@ | |||
18 | * | 18 | * |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/netdevice.h> | 21 | #include <linux/netdevice.h> |
23 | #include <linux/module.h> | 22 | #include <linux/module.h> |
24 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
diff --git a/drivers/net/wireless/prism54/prismcompat.h b/drivers/net/wireless/prism54/prismcompat.h index 55541c01752e..d71eca55a302 100644 --- a/drivers/net/wireless/prism54/prismcompat.h +++ b/drivers/net/wireless/prism54/prismcompat.h | |||
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | #include <linux/device.h> | 30 | #include <linux/device.h> |
31 | #include <linux/firmware.h> | 31 | #include <linux/firmware.h> |
32 | #include <linux/config.h> | ||
33 | #include <linux/moduleparam.h> | 32 | #include <linux/moduleparam.h> |
34 | #include <linux/workqueue.h> | 33 | #include <linux/workqueue.h> |
35 | #include <linux/compiler.h> | 34 | #include <linux/compiler.h> |
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index a915fe6c6aa5..61b83a5e737a 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
@@ -30,7 +30,6 @@ | |||
30 | * | 30 | * |
31 | =============================================================================*/ | 31 | =============================================================================*/ |
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | #include <linux/module.h> | 33 | #include <linux/module.h> |
35 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
36 | #include <linux/proc_fs.h> | 35 | #include <linux/proc_fs.h> |
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c index 7f9aa139c347..15465278c789 100644 --- a/drivers/net/wireless/spectrum_cs.c +++ b/drivers/net/wireless/spectrum_cs.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #define DRIVER_NAME "spectrum_cs" | 21 | #define DRIVER_NAME "spectrum_cs" |
22 | #define PFX DRIVER_NAME ": " | 22 | #define PFX DRIVER_NAME ": " |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
27 | #include <linux/init.h> | 26 | #include <linux/init.h> |
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c index 18a44580b53b..fd31885c6844 100644 --- a/drivers/net/wireless/strip.c +++ b/drivers/net/wireless/strip.c | |||
@@ -81,7 +81,6 @@ static const char StripVersion[] = "1.3A-STUART.CHESHIRE"; | |||
81 | /************************************************************************/ | 81 | /************************************************************************/ |
82 | /* Header files */ | 82 | /* Header files */ |
83 | 83 | ||
84 | #include <linux/config.h> | ||
85 | #include <linux/kernel.h> | 84 | #include <linux/kernel.h> |
86 | #include <linux/module.h> | 85 | #include <linux/module.h> |
87 | #include <linux/init.h> | 86 | #include <linux/init.h> |
diff --git a/drivers/net/wireless/wavelan_cs.p.h b/drivers/net/wireless/wavelan_cs.p.h index c65fe7a391ec..f34a36b0c7b0 100644 --- a/drivers/net/wireless/wavelan_cs.p.h +++ b/drivers/net/wireless/wavelan_cs.p.h | |||
@@ -411,7 +411,6 @@ | |||
411 | /***************************** INCLUDES *****************************/ | 411 | /***************************** INCLUDES *****************************/ |
412 | 412 | ||
413 | /* Linux headers that we need */ | 413 | /* Linux headers that we need */ |
414 | #include <linux/config.h> | ||
415 | #include <linux/module.h> | 414 | #include <linux/module.h> |
416 | #include <linux/kernel.h> | 415 | #include <linux/kernel.h> |
417 | #include <linux/init.h> | 416 | #include <linux/init.h> |
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index e52a650f6737..c03e400facee 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c | |||
@@ -28,7 +28,6 @@ | |||
28 | */ | 28 | */ |
29 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ | 29 | #undef REALLY_SLOW_IO /* most systems can safely undef this */ |
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
33 | #include <linux/types.h> | 32 | #include <linux/types.h> |
34 | #include <linux/ethtool.h> | 33 | #include <linux/ethtool.h> |
diff --git a/drivers/net/znet.c b/drivers/net/znet.c index a7c089df66e6..9f0291f35290 100644 --- a/drivers/net/znet.c +++ b/drivers/net/znet.c | |||
@@ -85,7 +85,6 @@ | |||
85 | - Understand why some traffic patterns add a 1s latency... | 85 | - Understand why some traffic patterns add a 1s latency... |
86 | */ | 86 | */ |
87 | 87 | ||
88 | #include <linux/config.h> | ||
89 | #include <linux/module.h> | 88 | #include <linux/module.h> |
90 | #include <linux/kernel.h> | 89 | #include <linux/kernel.h> |
91 | #include <linux/string.h> | 90 | #include <linux/string.h> |
diff --git a/drivers/nubus/nubus.c b/drivers/nubus/nubus.c index 14cbe34eb897..3a0a3a734933 100644 --- a/drivers/nubus/nubus.c +++ b/drivers/nubus/nubus.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * and others. | 7 | * and others. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/types.h> | 10 | #include <linux/types.h> |
12 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
13 | #include <linux/string.h> | 12 | #include <linux/string.h> |
diff --git a/drivers/nubus/nubus_syms.c b/drivers/nubus/nubus_syms.c index 22c1dc9f87b3..9204f04fbf0b 100644 --- a/drivers/nubus/nubus_syms.c +++ b/drivers/nubus/nubus_syms.c | |||
@@ -2,7 +2,6 @@ | |||
2 | 2 | ||
3 | (c) 1999 David Huggins-Daines <dhd@debian.org> */ | 3 | (c) 1999 David Huggins-Daines <dhd@debian.org> */ |
4 | 4 | ||
5 | #include <linux/config.h> | ||
6 | #include <linux/module.h> | 5 | #include <linux/module.h> |
7 | #include <linux/types.h> | 6 | #include <linux/types.h> |
8 | #include <linux/nubus.h> | 7 | #include <linux/nubus.h> |
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index a5d826237b26..68cb3a080050 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c | |||
@@ -31,7 +31,6 @@ | |||
31 | ** the coherency design originally worked out. Only PCX-W does. | 31 | ** the coherency design originally worked out. Only PCX-W does. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include <linux/types.h> | 34 | #include <linux/types.h> |
36 | #include <linux/init.h> | 35 | #include <linux/init.h> |
37 | #include <linux/mm.h> | 36 | #include <linux/mm.h> |
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index ce0a6ebcff15..0d96c50ffe9c 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c | |||
@@ -43,7 +43,6 @@ | |||
43 | ** for PCI drivers devices which implement/use MMIO registers. | 43 | ** for PCI drivers devices which implement/use MMIO registers. |
44 | */ | 44 | */ |
45 | 45 | ||
46 | #include <linux/config.h> | ||
47 | #include <linux/delay.h> | 46 | #include <linux/delay.h> |
48 | #include <linux/types.h> | 47 | #include <linux/types.h> |
49 | #include <linux/kernel.h> | 48 | #include <linux/kernel.h> |
diff --git a/drivers/parisc/gsc.c b/drivers/parisc/gsc.c index 5476ba7709b3..b45aa5c675a0 100644 --- a/drivers/parisc/gsc.c +++ b/drivers/parisc/gsc.c | |||
@@ -14,7 +14,6 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/bitops.h> | 16 | #include <linux/bitops.h> |
17 | #include <linux/config.h> | ||
18 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
19 | #include <linux/init.h> | 18 | #include <linux/init.h> |
20 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index 298f2ddb2c17..bf00fa2537bb 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * David Pye <dmp@davidmpye.dyndns.org> | 23 | * David Pye <dmp@davidmpye.dyndns.org> |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/module.h> | 26 | #include <linux/module.h> |
28 | #include <linux/stddef.h> /* for offsetof() */ | 27 | #include <linux/stddef.h> /* for offsetof() */ |
29 | #include <linux/init.h> | 28 | #include <linux/init.h> |
@@ -411,16 +410,17 @@ static __inline__ int led_get_net_activity(void) | |||
411 | static __inline__ int led_get_diskio_activity(void) | 410 | static __inline__ int led_get_diskio_activity(void) |
412 | { | 411 | { |
413 | static unsigned long last_pgpgin, last_pgpgout; | 412 | static unsigned long last_pgpgin, last_pgpgout; |
414 | struct page_state pgstat; | 413 | unsigned long events[NR_VM_EVENT_ITEMS]; |
415 | int changed; | 414 | int changed; |
416 | 415 | ||
417 | get_full_page_state(&pgstat); /* get no of sectors in & out */ | 416 | all_vm_events(events); |
418 | 417 | ||
419 | /* Just use a very simple calculation here. Do not care about overflow, | 418 | /* Just use a very simple calculation here. Do not care about overflow, |
420 | since we only want to know if there was activity or not. */ | 419 | since we only want to know if there was activity or not. */ |
421 | changed = (pgstat.pgpgin != last_pgpgin) || (pgstat.pgpgout != last_pgpgout); | 420 | changed = (events[PGPGIN] != last_pgpgin) || |
422 | last_pgpgin = pgstat.pgpgin; | 421 | (events[PGPGOUT] != last_pgpgout); |
423 | last_pgpgout = pgstat.pgpgout; | 422 | last_pgpgin = events[PGPGIN]; |
423 | last_pgpgout = events[PGPGOUT]; | ||
424 | 424 | ||
425 | return (changed ? LED_DISK_IO : 0); | 425 | return (changed ? LED_DISK_IO : 0); |
426 | } | 426 | } |
diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c index 0bcab83b4080..fad5a33bf0fa 100644 --- a/drivers/parisc/power.c +++ b/drivers/parisc/power.c | |||
@@ -35,7 +35,6 @@ | |||
35 | * runtime through the "/proc/sys/kernel/power" procfs entry. | 35 | * runtime through the "/proc/sys/kernel/power" procfs entry. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include <linux/config.h> | ||
39 | #include <linux/module.h> | 38 | #include <linux/module.h> |
40 | #include <linux/init.h> | 39 | #include <linux/init.h> |
41 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c index d09e39e39c60..8b4732815511 100644 --- a/drivers/parisc/sba_iommu.c +++ b/drivers/parisc/sba_iommu.c | |||
@@ -19,7 +19,6 @@ | |||
19 | ** FIXME: add DMA hint support programming in both sba and lba modules. | 19 | ** FIXME: add DMA hint support programming in both sba and lba modules. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
25 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
diff --git a/drivers/parport/ieee1284.c b/drivers/parport/ieee1284.c index 690b239ad3a7..7ff09f0f858f 100644 --- a/drivers/parport/ieee1284.c +++ b/drivers/parport/ieee1284.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * Various hacks, Fred Barnes <frmb2@ukc.ac.uk>, 04/2000 | 16 | * Various hacks, Fred Barnes <frmb2@ukc.ac.uk>, 04/2000 |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/module.h> | 19 | #include <linux/module.h> |
21 | #include <linux/threads.h> | 20 | #include <linux/threads.h> |
22 | #include <linux/parport.h> | 21 | #include <linux/parport.h> |
diff --git a/drivers/parport/ieee1284_ops.c b/drivers/parport/ieee1284_ops.c index d6c77658231e..525312f2fe9c 100644 --- a/drivers/parport/ieee1284_ops.c +++ b/drivers/parport/ieee1284_ops.c | |||
@@ -14,7 +14,6 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
19 | #include <linux/parport.h> | 18 | #include <linux/parport.h> |
20 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index 7318e4a9e436..fe800dc0be9f 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c | |||
@@ -42,7 +42,6 @@ | |||
42 | * but rather will start at port->base_hi. | 42 | * but rather will start at port->base_hi. |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <linux/config.h> | ||
46 | #include <linux/module.h> | 45 | #include <linux/module.h> |
47 | #include <linux/init.h> | 46 | #include <linux/init.h> |
48 | #include <linux/sched.h> | 47 | #include <linux/sched.h> |
diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c index 8610ae88b92d..2e744a274517 100644 --- a/drivers/parport/procfs.c +++ b/drivers/parport/procfs.c | |||
@@ -13,7 +13,6 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/config.h> | ||
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
19 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
diff --git a/drivers/parport/share.c b/drivers/parport/share.c index 2cb22c8d3357..94dc506b83d1 100644 --- a/drivers/parport/share.c +++ b/drivers/parport/share.c | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | #undef PARPORT_DEBUG_SHARING /* undef for production */ | 18 | #undef PARPORT_DEBUG_SHARING /* undef for production */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/string.h> | 21 | #include <linux/string.h> |
23 | #include <linux/threads.h> | 22 | #include <linux/threads.h> |
diff --git a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c index 037ce4c91687..30d87143b5d9 100644 --- a/drivers/pci/hotplug/cpci_hotplug_core.c +++ b/drivers/pci/hotplug/cpci_hotplug_core.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * Send feedback to <scottm@somanetworks.com> | 25 | * Send feedback to <scottm@somanetworks.com> |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
31 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c index 225b5e551dd6..02be74caa89f 100644 --- a/drivers/pci/hotplug/cpci_hotplug_pci.c +++ b/drivers/pci/hotplug/cpci_hotplug_pci.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * Send feedback to <scottm@somanetworks.com> | 23 | * Send feedback to <scottm@somanetworks.com> |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/module.h> | 26 | #include <linux/module.h> |
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
29 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c index 2d4639d6841f..e847f0d6c7fe 100644 --- a/drivers/pci/hotplug/cpcihp_generic.c +++ b/drivers/pci/hotplug/cpcihp_generic.c | |||
@@ -34,7 +34,6 @@ | |||
34 | * Send feedback to <scottm@somanetworks.com> | 34 | * Send feedback to <scottm@somanetworks.com> |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/config.h> | ||
38 | #include <linux/module.h> | 37 | #include <linux/module.h> |
39 | #include <linux/init.h> | 38 | #include <linux/init.h> |
40 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c index 1ec165df8522..584f8538da13 100644 --- a/drivers/pci/hotplug/cpcihp_zt5550.c +++ b/drivers/pci/hotplug/cpcihp_zt5550.c | |||
@@ -30,7 +30,6 @@ | |||
30 | * Send feedback to <scottm@somanetworks.com> | 30 | * Send feedback to <scottm@somanetworks.com> |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | #include <linux/module.h> | 33 | #include <linux/module.h> |
35 | #include <linux/moduleparam.h> | 34 | #include <linux/moduleparam.h> |
36 | #include <linux/init.h> | 35 | #include <linux/init.h> |
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c index f8658d63f077..e6e171f77c34 100644 --- a/drivers/pci/hotplug/cpqphp_core.c +++ b/drivers/pci/hotplug/cpqphp_core.c | |||
@@ -29,7 +29,6 @@ | |||
29 | * | 29 | * |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/config.h> | ||
33 | #include <linux/module.h> | 32 | #include <linux/module.h> |
34 | #include <linux/moduleparam.h> | 33 | #include <linux/moduleparam.h> |
35 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c index 55d2dc7e39ca..ae2dd36efef2 100644 --- a/drivers/pci/hotplug/cpqphp_ctrl.c +++ b/drivers/pci/hotplug/cpqphp_ctrl.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
32 | #include <linux/types.h> | 31 | #include <linux/types.h> |
diff --git a/drivers/pci/hotplug/cpqphp_nvram.c b/drivers/pci/hotplug/cpqphp_nvram.c index ac98a11bd1eb..cf0878917537 100644 --- a/drivers/pci/hotplug/cpqphp_nvram.c +++ b/drivers/pci/hotplug/cpqphp_nvram.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
32 | #include <linux/types.h> | 31 | #include <linux/types.h> |
diff --git a/drivers/pci/hotplug/cpqphp_pci.c b/drivers/pci/hotplug/cpqphp_pci.c index 00b81a7bdd26..0d9688952f4a 100644 --- a/drivers/pci/hotplug/cpqphp_pci.c +++ b/drivers/pci/hotplug/cpqphp_pci.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
32 | #include <linux/types.h> | 31 | #include <linux/types.h> |
diff --git a/drivers/pci/hotplug/cpqphp_sysfs.c b/drivers/pci/hotplug/cpqphp_sysfs.c index bbfeed767ff1..8b3da007e859 100644 --- a/drivers/pci/hotplug/cpqphp_sysfs.c +++ b/drivers/pci/hotplug/cpqphp_sysfs.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
32 | #include <linux/types.h> | 31 | #include <linux/types.h> |
diff --git a/drivers/pci/hotplug/fakephp.c b/drivers/pci/hotplug/fakephp.c index 71b80c23e8ce..dd2b762777c4 100644 --- a/drivers/pci/hotplug/fakephp.c +++ b/drivers/pci/hotplug/fakephp.c | |||
@@ -32,7 +32,6 @@ | |||
32 | * Enabling PCI devices is left as an exercise for the reader... | 32 | * Enabling PCI devices is left as an exercise for the reader... |
33 | * | 33 | * |
34 | */ | 34 | */ |
35 | #include <linux/config.h> | ||
36 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
37 | #include <linux/module.h> | 36 | #include <linux/module.h> |
38 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c index c4282902cb52..b7b378df89e3 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/moduleparam.h> | 31 | #include <linux/moduleparam.h> |
33 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
diff --git a/drivers/pci/hotplug/pcihp_skeleton.c b/drivers/pci/hotplug/pcihp_skeleton.c index 0a46f549676a..8ad446605f75 100644 --- a/drivers/pci/hotplug/pcihp_skeleton.c +++ b/drivers/pci/hotplug/pcihp_skeleton.c | |||
@@ -28,7 +28,6 @@ | |||
28 | * | 28 | * |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | #include <linux/module.h> | 31 | #include <linux/module.h> |
33 | #include <linux/moduleparam.h> | 32 | #include <linux/moduleparam.h> |
34 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index 638004546700..076bd6dcafae 100644 --- a/drivers/pci/hotplug/rpaphp_core.c +++ b/drivers/pci/hotplug/rpaphp_core.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Send feedback to <lxie@us.ibm.com> | 22 | * Send feedback to <lxie@us.ibm.com> |
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | #include <linux/config.h> | ||
26 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
27 | #include <linux/module.h> | 26 | #include <linux/module.h> |
28 | #include <linux/moduleparam.h> | 27 | #include <linux/moduleparam.h> |
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 76d023d8a33b..36bc7c415af7 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/irq.h> | 10 | #include <linux/irq.h> |
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/config.h> | ||
14 | #include <linux/ioport.h> | 13 | #include <linux/ioport.h> |
15 | #include <linux/smp_lock.h> | 14 | #include <linux/smp_lock.h> |
16 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 606f9b6f70eb..fdefa7dcd156 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -15,7 +15,6 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
20 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
21 | #include <linux/stat.h> | 20 | #include <linux/stat.h> |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 4364d793f73b..d1d7333bb71b 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * use the PowerTweak utility (see http://powertweak.sourceforge.net). | 15 | * use the PowerTweak utility (see http://powertweak.sourceforge.net). |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/types.h> | 18 | #include <linux/types.h> |
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c index cbb69cf41311..f5ee7ce16fa6 100644 --- a/drivers/pci/rom.c +++ b/drivers/pci/rom.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * | 6 | * |
7 | * PCI ROM access routines | 7 | * PCI ROM access routines |
8 | */ | 8 | */ |
9 | #include <linux/config.h> | ||
10 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
11 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
12 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c index a4d50940ebeb..5256342e8532 100644 --- a/drivers/pcmcia/at91_cf.c +++ b/drivers/pcmcia/at91_cf.c | |||
@@ -214,11 +214,10 @@ static struct pccard_operations at91_cf_ops = { | |||
214 | 214 | ||
215 | /*--------------------------------------------------------------------------*/ | 215 | /*--------------------------------------------------------------------------*/ |
216 | 216 | ||
217 | static int __init at91_cf_probe(struct device *dev) | 217 | static int __init at91_cf_probe(struct platform_device *pdev) |
218 | { | 218 | { |
219 | struct at91_cf_socket *cf; | 219 | struct at91_cf_socket *cf; |
220 | struct at91_cf_data *board = dev->platform_data; | 220 | struct at91_cf_data *board = pdev->dev.platform_data; |
221 | struct platform_device *pdev = to_platform_device(dev); | ||
222 | struct resource *io; | 221 | struct resource *io; |
223 | unsigned int csa; | 222 | unsigned int csa; |
224 | int status; | 223 | int status; |
@@ -236,7 +235,7 @@ static int __init at91_cf_probe(struct device *dev) | |||
236 | 235 | ||
237 | cf->board = board; | 236 | cf->board = board; |
238 | cf->pdev = pdev; | 237 | cf->pdev = pdev; |
239 | dev_set_drvdata(dev, cf); | 238 | platform_set_drvdata(pdev, cf); |
240 | 239 | ||
241 | /* CF takes over CS4, CS5, CS6 */ | 240 | /* CF takes over CS4, CS5, CS6 */ |
242 | csa = at91_sys_read(AT91_EBI_CSA); | 241 | csa = at91_sys_read(AT91_EBI_CSA); |
@@ -271,6 +270,7 @@ static int __init at91_cf_probe(struct device *dev) | |||
271 | SA_SAMPLE_RANDOM, driver_name, cf); | 270 | SA_SAMPLE_RANDOM, driver_name, cf); |
272 | if (status < 0) | 271 | if (status < 0) |
273 | goto fail0; | 272 | goto fail0; |
273 | device_init_wakeup(&pdev->dev, 1); | ||
274 | 274 | ||
275 | /* | 275 | /* |
276 | * The card driver will request this irq later as needed. | 276 | * The card driver will request this irq later as needed. |
@@ -301,7 +301,7 @@ static int __init at91_cf_probe(struct device *dev) | |||
301 | board->det_pin, board->irq_pin); | 301 | board->det_pin, board->irq_pin); |
302 | 302 | ||
303 | cf->socket.owner = THIS_MODULE; | 303 | cf->socket.owner = THIS_MODULE; |
304 | cf->socket.dev.dev = dev; | 304 | cf->socket.dev.dev = &pdev->dev; |
305 | cf->socket.ops = &at91_cf_ops; | 305 | cf->socket.ops = &at91_cf_ops; |
306 | cf->socket.resource_ops = &pccard_static_ops; | 306 | cf->socket.resource_ops = &pccard_static_ops; |
307 | cf->socket.features = SS_CAP_PCCARD | SS_CAP_STATIC_MAP | 307 | cf->socket.features = SS_CAP_PCCARD | SS_CAP_STATIC_MAP |
@@ -323,21 +323,25 @@ fail1: | |||
323 | free_irq(board->irq_pin, cf); | 323 | free_irq(board->irq_pin, cf); |
324 | fail0a: | 324 | fail0a: |
325 | free_irq(board->det_pin, cf); | 325 | free_irq(board->det_pin, cf); |
326 | device_init_wakeup(&pdev->dev, 0); | ||
326 | fail0: | 327 | fail0: |
327 | at91_sys_write(AT91_EBI_CSA, csa); | 328 | at91_sys_write(AT91_EBI_CSA, csa); |
328 | kfree(cf); | 329 | kfree(cf); |
329 | return status; | 330 | return status; |
330 | } | 331 | } |
331 | 332 | ||
332 | static int __exit at91_cf_remove(struct device *dev) | 333 | static int __exit at91_cf_remove(struct platform_device *pdev) |
333 | { | 334 | { |
334 | struct at91_cf_socket *cf = dev_get_drvdata(dev); | 335 | struct at91_cf_socket *cf = platform_get_drvdata(pdev); |
336 | struct at91_cf_data *board = cf->board; | ||
335 | struct resource *io = cf->socket.io[0].res; | 337 | struct resource *io = cf->socket.io[0].res; |
336 | unsigned int csa; | 338 | unsigned int csa; |
337 | 339 | ||
338 | pcmcia_unregister_socket(&cf->socket); | 340 | pcmcia_unregister_socket(&cf->socket); |
339 | free_irq(cf->board->irq_pin, cf); | 341 | if (board->irq_pin) |
340 | free_irq(cf->board->det_pin, cf); | 342 | free_irq(board->irq_pin, cf); |
343 | free_irq(board->det_pin, cf); | ||
344 | device_init_wakeup(&pdev->dev, 0); | ||
341 | iounmap((void __iomem *) cf->socket.io_offset); | 345 | iounmap((void __iomem *) cf->socket.io_offset); |
342 | release_mem_region(io->start, io->end + 1 - io->start); | 346 | release_mem_region(io->start, io->end + 1 - io->start); |
343 | 347 | ||
@@ -348,26 +352,65 @@ static int __exit at91_cf_remove(struct device *dev) | |||
348 | return 0; | 352 | return 0; |
349 | } | 353 | } |
350 | 354 | ||
351 | static struct device_driver at91_cf_driver = { | 355 | #ifdef CONFIG_PM |
352 | .name = (char *) driver_name, | 356 | |
353 | .bus = &platform_bus_type, | 357 | static int at91_cf_suspend(struct platform_device *pdev, pm_message_t mesg) |
358 | { | ||
359 | struct at91_cf_socket *cf = platform_get_drvdata(pdev); | ||
360 | struct at91_cf_data *board = cf->board; | ||
361 | |||
362 | pcmcia_socket_dev_suspend(&pdev->dev, mesg); | ||
363 | if (device_may_wakeup(&pdev->dev)) | ||
364 | enable_irq_wake(board->det_pin); | ||
365 | else { | ||
366 | disable_irq_wake(board->det_pin); | ||
367 | disable_irq(board->det_pin); | ||
368 | } | ||
369 | if (board->irq_pin) | ||
370 | disable_irq(board->irq_pin); | ||
371 | return 0; | ||
372 | } | ||
373 | |||
374 | static int at91_cf_resume(struct platform_device *pdev) | ||
375 | { | ||
376 | struct at91_cf_socket *cf = platform_get_drvdata(pdev); | ||
377 | struct at91_cf_data *board = cf->board; | ||
378 | |||
379 | if (board->irq_pin) | ||
380 | enable_irq(board->irq_pin); | ||
381 | if (!device_may_wakeup(&pdev->dev)) | ||
382 | enable_irq(board->det_pin); | ||
383 | pcmcia_socket_dev_resume(&pdev->dev); | ||
384 | return 0; | ||
385 | } | ||
386 | |||
387 | #else | ||
388 | #define at91_cf_suspend NULL | ||
389 | #define at91_cf_resume NULL | ||
390 | #endif | ||
391 | |||
392 | static struct platform_driver at91_cf_driver = { | ||
393 | .driver = { | ||
394 | .name = (char *) driver_name, | ||
395 | .owner = THIS_MODULE, | ||
396 | }, | ||
354 | .probe = at91_cf_probe, | 397 | .probe = at91_cf_probe, |
355 | .remove = __exit_p(at91_cf_remove), | 398 | .remove = __exit_p(at91_cf_remove), |
356 | .suspend = pcmcia_socket_dev_suspend, | 399 | .suspend = at91_cf_suspend, |
357 | .resume = pcmcia_socket_dev_resume, | 400 | .resume = at91_cf_resume, |
358 | }; | 401 | }; |
359 | 402 | ||
360 | /*--------------------------------------------------------------------------*/ | 403 | /*--------------------------------------------------------------------------*/ |
361 | 404 | ||
362 | static int __init at91_cf_init(void) | 405 | static int __init at91_cf_init(void) |
363 | { | 406 | { |
364 | return driver_register(&at91_cf_driver); | 407 | return platform_driver_register(&at91_cf_driver); |
365 | } | 408 | } |
366 | module_init(at91_cf_init); | 409 | module_init(at91_cf_init); |
367 | 410 | ||
368 | static void __exit at91_cf_exit(void) | 411 | static void __exit at91_cf_exit(void) |
369 | { | 412 | { |
370 | driver_unregister(&at91_cf_driver); | 413 | platform_driver_unregister(&at91_cf_driver); |
371 | } | 414 | } |
372 | module_exit(at91_cf_exit); | 415 | module_exit(at91_cf_exit); |
373 | 416 | ||
diff --git a/drivers/pcmcia/au1000_db1x00.c b/drivers/pcmcia/au1000_db1x00.c index abc13f28ba3f..74e051535d6c 100644 --- a/drivers/pcmcia/au1000_db1x00.c +++ b/drivers/pcmcia/au1000_db1x00.c | |||
@@ -30,7 +30,6 @@ | |||
30 | * | 30 | * |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | #include <linux/module.h> | 33 | #include <linux/module.h> |
35 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
36 | #include <linux/errno.h> | 35 | #include <linux/errno.h> |
@@ -296,7 +295,7 @@ struct pcmcia_low_level db1x00_pcmcia_ops = { | |||
296 | .socket_suspend = db1x00_socket_suspend | 295 | .socket_suspend = db1x00_socket_suspend |
297 | }; | 296 | }; |
298 | 297 | ||
299 | int __init au1x_board_init(struct device *dev) | 298 | int au1x_board_init(struct device *dev) |
300 | { | 299 | { |
301 | int ret = -ENODEV; | 300 | int ret = -ENODEV; |
302 | bcsr->pcmcia = 0; /* turn off power, if it's not already off */ | 301 | bcsr->pcmcia = 0; /* turn off power, if it's not already off */ |
diff --git a/drivers/pcmcia/au1000_generic.c b/drivers/pcmcia/au1000_generic.c index 971a35281649..d5dd0ce65536 100644 --- a/drivers/pcmcia/au1000_generic.c +++ b/drivers/pcmcia/au1000_generic.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/moduleparam.h> | 34 | #include <linux/moduleparam.h> |
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/config.h> | ||
37 | #include <linux/cpufreq.h> | 36 | #include <linux/cpufreq.h> |
38 | #include <linux/ioport.h> | 37 | #include <linux/ioport.h> |
39 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
diff --git a/drivers/pcmcia/au1000_generic.h b/drivers/pcmcia/au1000_generic.h index f2c970b5f4ff..1e467bb54077 100644 --- a/drivers/pcmcia/au1000_generic.h +++ b/drivers/pcmcia/au1000_generic.h | |||
@@ -22,7 +22,6 @@ | |||
22 | #define __ASM_AU1000_PCMCIA_H | 22 | #define __ASM_AU1000_PCMCIA_H |
23 | 23 | ||
24 | /* include the world */ | 24 | /* include the world */ |
25 | #include <linux/config.h> | ||
26 | 25 | ||
27 | #include <pcmcia/cs_types.h> | 26 | #include <pcmcia/cs_types.h> |
28 | #include <pcmcia/cs.h> | 27 | #include <pcmcia/cs.h> |
diff --git a/drivers/pcmcia/au1000_pb1x00.c b/drivers/pcmcia/au1000_pb1x00.c index fd5522ede867..86c0808d6a05 100644 --- a/drivers/pcmcia/au1000_pb1x00.c +++ b/drivers/pcmcia/au1000_pb1x00.c | |||
@@ -21,7 +21,6 @@ | |||
21 | * with this program; if not, write to the Free Software Foundation, Inc., | 21 | * with this program; if not, write to the Free Software Foundation, Inc., |
22 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | 22 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. |
23 | */ | 23 | */ |
24 | #include <linux/config.h> | ||
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | #include <linux/init.h> | 25 | #include <linux/init.h> |
27 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index 3162998579c1..f9cd831a3f31 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/pm.h> | 28 | #include <linux/pm.h> |
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
30 | #include <linux/device.h> | 30 | #include <linux/device.h> |
31 | #include <linux/kthread.h> | ||
31 | #include <asm/system.h> | 32 | #include <asm/system.h> |
32 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
33 | 34 | ||
@@ -176,6 +177,7 @@ static int pccardd(void *__skt); | |||
176 | */ | 177 | */ |
177 | int pcmcia_register_socket(struct pcmcia_socket *socket) | 178 | int pcmcia_register_socket(struct pcmcia_socket *socket) |
178 | { | 179 | { |
180 | struct task_struct *tsk; | ||
179 | int ret; | 181 | int ret; |
180 | 182 | ||
181 | if (!socket || !socket->ops || !socket->dev.dev || !socket->resource_ops) | 183 | if (!socket || !socket->ops || !socket->dev.dev || !socket->resource_ops) |
@@ -239,15 +241,18 @@ int pcmcia_register_socket(struct pcmcia_socket *socket) | |||
239 | mutex_init(&socket->skt_mutex); | 241 | mutex_init(&socket->skt_mutex); |
240 | spin_lock_init(&socket->thread_lock); | 242 | spin_lock_init(&socket->thread_lock); |
241 | 243 | ||
242 | ret = kernel_thread(pccardd, socket, CLONE_KERNEL); | 244 | tsk = kthread_run(pccardd, socket, "pccardd"); |
243 | if (ret < 0) | 245 | if (IS_ERR(tsk)) { |
246 | ret = PTR_ERR(tsk); | ||
244 | goto err; | 247 | goto err; |
248 | } | ||
245 | 249 | ||
246 | wait_for_completion(&socket->thread_done); | 250 | wait_for_completion(&socket->thread_done); |
247 | if(!socket->thread) { | 251 | if (!socket->thread) { |
248 | printk(KERN_WARNING "PCMCIA: warning: socket thread for socket %p did not start\n", socket); | 252 | printk(KERN_WARNING "PCMCIA: warning: socket thread for socket %p did not start\n", socket); |
249 | return -EIO; | 253 | return -EIO; |
250 | } | 254 | } |
255 | |||
251 | pcmcia_parse_events(socket, SS_DETECT); | 256 | pcmcia_parse_events(socket, SS_DETECT); |
252 | 257 | ||
253 | return 0; | 258 | return 0; |
@@ -272,10 +277,8 @@ void pcmcia_unregister_socket(struct pcmcia_socket *socket) | |||
272 | cs_dbg(socket, 0, "pcmcia_unregister_socket(0x%p)\n", socket->ops); | 277 | cs_dbg(socket, 0, "pcmcia_unregister_socket(0x%p)\n", socket->ops); |
273 | 278 | ||
274 | if (socket->thread) { | 279 | if (socket->thread) { |
275 | init_completion(&socket->thread_done); | ||
276 | socket->thread = NULL; | ||
277 | wake_up(&socket->thread_wait); | 280 | wake_up(&socket->thread_wait); |
278 | wait_for_completion(&socket->thread_done); | 281 | kthread_stop(socket->thread); |
279 | } | 282 | } |
280 | release_cis_mem(socket); | 283 | release_cis_mem(socket); |
281 | 284 | ||
@@ -630,8 +633,6 @@ static int pccardd(void *__skt) | |||
630 | DECLARE_WAITQUEUE(wait, current); | 633 | DECLARE_WAITQUEUE(wait, current); |
631 | int ret; | 634 | int ret; |
632 | 635 | ||
633 | daemonize("pccardd"); | ||
634 | |||
635 | skt->thread = current; | 636 | skt->thread = current; |
636 | skt->socket = dead_socket; | 637 | skt->socket = dead_socket; |
637 | skt->ops->init(skt); | 638 | skt->ops->init(skt); |
@@ -643,7 +644,8 @@ static int pccardd(void *__skt) | |||
643 | printk(KERN_WARNING "PCMCIA: unable to register socket 0x%p\n", | 644 | printk(KERN_WARNING "PCMCIA: unable to register socket 0x%p\n", |
644 | skt); | 645 | skt); |
645 | skt->thread = NULL; | 646 | skt->thread = NULL; |
646 | complete_and_exit(&skt->thread_done, 0); | 647 | complete(&skt->thread_done); |
648 | return 0; | ||
647 | } | 649 | } |
648 | 650 | ||
649 | add_wait_queue(&skt->thread_wait, &wait); | 651 | add_wait_queue(&skt->thread_wait, &wait); |
@@ -674,7 +676,7 @@ static int pccardd(void *__skt) | |||
674 | continue; | 676 | continue; |
675 | } | 677 | } |
676 | 678 | ||
677 | if (!skt->thread) | 679 | if (kthread_should_stop()) |
678 | break; | 680 | break; |
679 | 681 | ||
680 | schedule(); | 682 | schedule(); |
@@ -688,7 +690,7 @@ static int pccardd(void *__skt) | |||
688 | /* remove from the device core */ | 690 | /* remove from the device core */ |
689 | class_device_unregister(&skt->dev); | 691 | class_device_unregister(&skt->dev); |
690 | 692 | ||
691 | complete_and_exit(&skt->thread_done, 0); | 693 | return 0; |
692 | } | 694 | } |
693 | 695 | ||
694 | /* | 696 | /* |
@@ -697,11 +699,12 @@ static int pccardd(void *__skt) | |||
697 | */ | 699 | */ |
698 | void pcmcia_parse_events(struct pcmcia_socket *s, u_int events) | 700 | void pcmcia_parse_events(struct pcmcia_socket *s, u_int events) |
699 | { | 701 | { |
702 | unsigned long flags; | ||
700 | cs_dbg(s, 4, "parse_events: events %08x\n", events); | 703 | cs_dbg(s, 4, "parse_events: events %08x\n", events); |
701 | if (s->thread) { | 704 | if (s->thread) { |
702 | spin_lock(&s->thread_lock); | 705 | spin_lock_irqsave(&s->thread_lock, flags); |
703 | s->thread_events |= events; | 706 | s->thread_events |= events; |
704 | spin_unlock(&s->thread_lock); | 707 | spin_unlock_irqrestore(&s->thread_lock, flags); |
705 | 708 | ||
706 | wake_up(&s->thread_wait); | 709 | wake_up(&s->thread_wait); |
707 | } | 710 | } |
diff --git a/drivers/pcmcia/m32r_cfc.c b/drivers/pcmcia/m32r_cfc.c index 071cf485e1a3..9e768eaef17a 100644 --- a/drivers/pcmcia/m32r_cfc.c +++ b/drivers/pcmcia/m32r_cfc.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/moduleparam.h> | 11 | #include <linux/moduleparam.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/config.h> | ||
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
15 | #include <linux/fcntl.h> | 14 | #include <linux/fcntl.h> |
16 | #include <linux/string.h> | 15 | #include <linux/string.h> |
diff --git a/drivers/pcmcia/m32r_pcc.c b/drivers/pcmcia/m32r_pcc.c index 70d5f0748d55..61d50b5620dd 100644 --- a/drivers/pcmcia/m32r_pcc.c +++ b/drivers/pcmcia/m32r_pcc.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/moduleparam.h> | 11 | #include <linux/moduleparam.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/config.h> | ||
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
15 | #include <linux/fcntl.h> | 14 | #include <linux/fcntl.h> |
16 | #include <linux/string.h> | 15 | #include <linux/string.h> |
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 3131bb0a0095..3281e519e714 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -788,6 +788,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) | |||
788 | struct pcmcia_socket *s = p_dev->socket; | 788 | struct pcmcia_socket *s = p_dev->socket; |
789 | config_t *c; | 789 | config_t *c; |
790 | int ret = CS_IN_USE, irq = 0; | 790 | int ret = CS_IN_USE, irq = 0; |
791 | int type; | ||
791 | 792 | ||
792 | if (!(s->state & SOCKET_PRESENT)) | 793 | if (!(s->state & SOCKET_PRESENT)) |
793 | return CS_NO_CARD; | 794 | return CS_NO_CARD; |
@@ -797,6 +798,13 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) | |||
797 | if (c->state & CONFIG_IRQ_REQ) | 798 | if (c->state & CONFIG_IRQ_REQ) |
798 | return CS_IN_USE; | 799 | return CS_IN_USE; |
799 | 800 | ||
801 | /* Decide what type of interrupt we are registering */ | ||
802 | type = 0; | ||
803 | if (s->functions > 1) /* All of this ought to be handled higher up */ | ||
804 | type = SA_SHIRQ; | ||
805 | if (req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) | ||
806 | type = SA_SHIRQ; | ||
807 | |||
800 | #ifdef CONFIG_PCMCIA_PROBE | 808 | #ifdef CONFIG_PCMCIA_PROBE |
801 | if (s->irq.AssignedIRQ != 0) { | 809 | if (s->irq.AssignedIRQ != 0) { |
802 | /* If the interrupt is already assigned, it must be the same */ | 810 | /* If the interrupt is already assigned, it must be the same */ |
@@ -822,9 +830,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) | |||
822 | * marked as used by the kernel resource management core */ | 830 | * marked as used by the kernel resource management core */ |
823 | ret = request_irq(irq, | 831 | ret = request_irq(irq, |
824 | (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Handler : test_action, | 832 | (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Handler : test_action, |
825 | ((req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) || | 833 | type, |
826 | (s->functions > 1) || | ||
827 | (irq == s->pci_irq)) ? SA_SHIRQ : 0, | ||
828 | p_dev->devname, | 834 | p_dev->devname, |
829 | (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Instance : data); | 835 | (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Instance : data); |
830 | if (!ret) { | 836 | if (!ret) { |
@@ -839,18 +845,21 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) | |||
839 | if (ret && !s->irq.AssignedIRQ) { | 845 | if (ret && !s->irq.AssignedIRQ) { |
840 | if (!s->pci_irq) | 846 | if (!s->pci_irq) |
841 | return ret; | 847 | return ret; |
848 | type = SA_SHIRQ; | ||
842 | irq = s->pci_irq; | 849 | irq = s->pci_irq; |
843 | } | 850 | } |
844 | 851 | ||
845 | if (ret && req->Attributes & IRQ_HANDLE_PRESENT) { | 852 | if (ret && (req->Attributes & IRQ_HANDLE_PRESENT)) { |
846 | if (request_irq(irq, req->Handler, | 853 | if (request_irq(irq, req->Handler, type, p_dev->devname, req->Instance)) |
847 | ((req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) || | ||
848 | (s->functions > 1) || | ||
849 | (irq == s->pci_irq)) ? SA_SHIRQ : 0, | ||
850 | p_dev->devname, req->Instance)) | ||
851 | return CS_IN_USE; | 854 | return CS_IN_USE; |
852 | } | 855 | } |
853 | 856 | ||
857 | /* Make sure the fact the request type was overridden is passed back */ | ||
858 | if (type == SA_SHIRQ && !(req->Attributes & IRQ_TYPE_DYNAMIC_SHARING)) { | ||
859 | req->Attributes |= IRQ_TYPE_DYNAMIC_SHARING; | ||
860 | printk(KERN_WARNING "pcmcia: request for exclusive IRQ could not be fulfilled.\n"); | ||
861 | printk(KERN_WARNING "pcmcia: the driver needs updating to supported shared IRQ lines.\n"); | ||
862 | } | ||
854 | c->irq.Attributes = req->Attributes; | 863 | c->irq.Attributes = req->Attributes; |
855 | s->irq.AssignedIRQ = req->AssignedIRQ = irq; | 864 | s->irq.AssignedIRQ = req->AssignedIRQ = irq; |
856 | s->irq.Config++; | 865 | s->irq.Config++; |
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index 7fa18fb814bc..b3518131ea0d 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c | |||
@@ -18,7 +18,6 @@ | |||
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/config.h> | ||
22 | #include <linux/cpufreq.h> | 21 | #include <linux/cpufreq.h> |
23 | #include <linux/ioport.h> | 22 | #include <linux/ioport.h> |
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
diff --git a/drivers/pcmcia/sa1100_generic.c b/drivers/pcmcia/sa1100_generic.c index 6d441ec75c6a..c5b2a44b4c37 100644 --- a/drivers/pcmcia/sa1100_generic.c +++ b/drivers/pcmcia/sa1100_generic.c | |||
@@ -32,7 +32,6 @@ | |||
32 | 32 | ||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/init.h> | 34 | #include <linux/init.h> |
35 | #include <linux/config.h> | ||
36 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
37 | 36 | ||
38 | #include <pcmcia/cs_types.h> | 37 | #include <pcmcia/cs_types.h> |
diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c index 81ded52c8959..658cddfbcf29 100644 --- a/drivers/pcmcia/sa1111_generic.c +++ b/drivers/pcmcia/sa1111_generic.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * basically means we handle everything except controlling the | 5 | * basically means we handle everything except controlling the |
6 | * power. Power is machine specific... | 6 | * power. Power is machine specific... |
7 | */ | 7 | */ |
8 | #include <linux/config.h> | ||
9 | #include <linux/module.h> | 8 | #include <linux/module.h> |
10 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
11 | #include <linux/ioport.h> | 10 | #include <linux/ioport.h> |
diff --git a/drivers/pcmcia/sa11xx_base.c b/drivers/pcmcia/sa11xx_base.c index 59c5d968e9f6..31a7abc55b23 100644 --- a/drivers/pcmcia/sa11xx_base.c +++ b/drivers/pcmcia/sa11xx_base.c | |||
@@ -32,7 +32,6 @@ | |||
32 | 32 | ||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/init.h> | 34 | #include <linux/init.h> |
35 | #include <linux/config.h> | ||
36 | #include <linux/cpufreq.h> | 35 | #include <linux/cpufreq.h> |
37 | #include <linux/ioport.h> | 36 | #include <linux/ioport.h> |
38 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index ea7d9ca160b2..ecf65d4c4e95 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c | |||
@@ -31,7 +31,6 @@ | |||
31 | ======================================================================*/ | 31 | ======================================================================*/ |
32 | 32 | ||
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
36 | #include <linux/moduleparam.h> | 35 | #include <linux/moduleparam.h> |
37 | #include <linux/init.h> | 36 | #include <linux/init.h> |
diff --git a/drivers/pcmcia/ti113x.h b/drivers/pcmcia/ti113x.h index 7a3d1b8e16b9..62e9ebf967f9 100644 --- a/drivers/pcmcia/ti113x.h +++ b/drivers/pcmcia/ti113x.h | |||
@@ -647,6 +647,7 @@ static int ti12xx_2nd_slot_empty(struct yenta_socket *socket) | |||
647 | */ | 647 | */ |
648 | break; | 648 | break; |
649 | 649 | ||
650 | case PCI_DEVICE_ID_TI_XX12: | ||
650 | case PCI_DEVICE_ID_TI_X515: | 651 | case PCI_DEVICE_ID_TI_X515: |
651 | case PCI_DEVICE_ID_TI_X420: | 652 | case PCI_DEVICE_ID_TI_X420: |
652 | case PCI_DEVICE_ID_TI_X620: | 653 | case PCI_DEVICE_ID_TI_X620: |
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index 4145eb83b9b6..47e57602d5ea 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c | |||
@@ -287,7 +287,10 @@ static int yenta_set_socket(struct pcmcia_socket *sock, socket_state_t *state) | |||
287 | struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket); | 287 | struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket); |
288 | u16 bridge; | 288 | u16 bridge; |
289 | 289 | ||
290 | yenta_set_power(socket, state); | 290 | /* if powering down: do it immediately */ |
291 | if (state->Vcc == 0) | ||
292 | yenta_set_power(socket, state); | ||
293 | |||
291 | socket->io_irq = state->io_irq; | 294 | socket->io_irq = state->io_irq; |
292 | bridge = config_readw(socket, CB_BRIDGE_CONTROL) & ~(CB_BRIDGE_CRST | CB_BRIDGE_INTR); | 295 | bridge = config_readw(socket, CB_BRIDGE_CONTROL) & ~(CB_BRIDGE_CRST | CB_BRIDGE_INTR); |
293 | if (cb_readl(socket, CB_SOCKET_STATE) & CB_CBCARD) { | 296 | if (cb_readl(socket, CB_SOCKET_STATE) & CB_CBCARD) { |
@@ -339,6 +342,10 @@ static int yenta_set_socket(struct pcmcia_socket *sock, socket_state_t *state) | |||
339 | /* Socket event mask: get card insert/remove events.. */ | 342 | /* Socket event mask: get card insert/remove events.. */ |
340 | cb_writel(socket, CB_SOCKET_EVENT, -1); | 343 | cb_writel(socket, CB_SOCKET_EVENT, -1); |
341 | cb_writel(socket, CB_SOCKET_MASK, CB_CDMASK); | 344 | cb_writel(socket, CB_SOCKET_MASK, CB_CDMASK); |
345 | |||
346 | /* if powering up: do it as the last step when the socket is configured */ | ||
347 | if (state->Vcc != 0) | ||
348 | yenta_set_power(socket, state); | ||
342 | return 0; | 349 | return 0; |
343 | } | 350 | } |
344 | 351 | ||
@@ -998,6 +1005,77 @@ static void yenta_config_init(struct yenta_socket *socket) | |||
998 | config_writew(socket, CB_BRIDGE_CONTROL, bridge); | 1005 | config_writew(socket, CB_BRIDGE_CONTROL, bridge); |
999 | } | 1006 | } |
1000 | 1007 | ||
1008 | /** | ||
1009 | * yenta_fixup_parent_bridge - Fix subordinate bus# of the parent bridge | ||
1010 | * @cardbus_bridge: The PCI bus which the CardBus bridge bridges to | ||
1011 | * | ||
1012 | * Checks if devices on the bus which the CardBus bridge bridges to would be | ||
1013 | * invisible during PCI scans because of a misconfigured subordinate number | ||
1014 | * of the parent brige - some BIOSes seem to be too lazy to set it right. | ||
1015 | * Does the fixup carefully by checking how far it can go without conflicts. | ||
1016 | * See http://bugzilla.kernel.org/show_bug.cgi?id=2944 for more information. | ||
1017 | */ | ||
1018 | static void yenta_fixup_parent_bridge(struct pci_bus *cardbus_bridge) | ||
1019 | { | ||
1020 | struct list_head *tmp; | ||
1021 | unsigned char upper_limit; | ||
1022 | /* | ||
1023 | * We only check and fix the parent bridge: All systems which need | ||
1024 | * this fixup that have been reviewed are laptops and the only bridge | ||
1025 | * which needed fixing was the parent bridge of the CardBus bridge: | ||
1026 | */ | ||
1027 | struct pci_bus *bridge_to_fix = cardbus_bridge->parent; | ||
1028 | |||
1029 | /* Check bus numbers are already set up correctly: */ | ||
1030 | if (bridge_to_fix->subordinate >= cardbus_bridge->subordinate) | ||
1031 | return; /* The subordinate number is ok, nothing to do */ | ||
1032 | |||
1033 | if (!bridge_to_fix->parent) | ||
1034 | return; /* Root bridges are ok */ | ||
1035 | |||
1036 | /* stay within the limits of the bus range of the parent: */ | ||
1037 | upper_limit = bridge_to_fix->parent->subordinate; | ||
1038 | |||
1039 | /* check the bus ranges of all silbling bridges to prevent overlap */ | ||
1040 | list_for_each(tmp, &bridge_to_fix->parent->children) { | ||
1041 | struct pci_bus * silbling = pci_bus_b(tmp); | ||
1042 | /* | ||
1043 | * If the silbling has a higher secondary bus number | ||
1044 | * and it's secondary is equal or smaller than our | ||
1045 | * current upper limit, set the new upper limit to | ||
1046 | * the bus number below the silbling's range: | ||
1047 | */ | ||
1048 | if (silbling->secondary > bridge_to_fix->subordinate | ||
1049 | && silbling->secondary <= upper_limit) | ||
1050 | upper_limit = silbling->secondary - 1; | ||
1051 | } | ||
1052 | |||
1053 | /* Show that the wanted subordinate number is not possible: */ | ||
1054 | if (cardbus_bridge->subordinate > upper_limit) | ||
1055 | printk(KERN_WARNING "Yenta: Upper limit for fixing this " | ||
1056 | "bridge's parent bridge: #%02x\n", upper_limit); | ||
1057 | |||
1058 | /* If we have room to increase the bridge's subordinate number, */ | ||
1059 | if (bridge_to_fix->subordinate < upper_limit) { | ||
1060 | |||
1061 | /* use the highest number of the hidden bus, within limits */ | ||
1062 | unsigned char subordinate_to_assign = | ||
1063 | min(cardbus_bridge->subordinate, upper_limit); | ||
1064 | |||
1065 | printk(KERN_INFO "Yenta: Raising subordinate bus# of parent " | ||
1066 | "bus (#%02x) from #%02x to #%02x\n", | ||
1067 | bridge_to_fix->number, | ||
1068 | bridge_to_fix->subordinate, subordinate_to_assign); | ||
1069 | |||
1070 | /* Save the new subordinate in the bus struct of the bridge */ | ||
1071 | bridge_to_fix->subordinate = subordinate_to_assign; | ||
1072 | |||
1073 | /* and update the PCI config space with the new subordinate */ | ||
1074 | pci_write_config_byte(bridge_to_fix->self, | ||
1075 | PCI_SUBORDINATE_BUS, bridge_to_fix->subordinate); | ||
1076 | } | ||
1077 | } | ||
1078 | |||
1001 | /* | 1079 | /* |
1002 | * Initialize a cardbus controller. Make sure we have a usable | 1080 | * Initialize a cardbus controller. Make sure we have a usable |
1003 | * interrupt, and that we can map the cardbus area. Fill in the | 1081 | * interrupt, and that we can map the cardbus area. Fill in the |
@@ -1113,6 +1191,8 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i | |||
1113 | yenta_get_socket_capabilities(socket, isa_interrupts); | 1191 | yenta_get_socket_capabilities(socket, isa_interrupts); |
1114 | printk(KERN_INFO "Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE)); | 1192 | printk(KERN_INFO "Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE)); |
1115 | 1193 | ||
1194 | yenta_fixup_parent_bridge(dev->subordinate); | ||
1195 | |||
1116 | /* Register it with the pcmcia layer.. */ | 1196 | /* Register it with the pcmcia layer.. */ |
1117 | ret = pcmcia_register_socket(&socket->socket); | 1197 | ret = pcmcia_register_socket(&socket->socket); |
1118 | if (ret == 0) { | 1198 | if (ret == 0) { |
@@ -1232,6 +1312,7 @@ static struct pci_device_id yenta_table [] = { | |||
1232 | 1312 | ||
1233 | CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX21_XX11, TI12XX), | 1313 | CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX21_XX11, TI12XX), |
1234 | CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X515, TI12XX), | 1314 | CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X515, TI12XX), |
1315 | CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX12, TI12XX), | ||
1235 | CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X420, TI12XX), | 1316 | CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X420, TI12XX), |
1236 | CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X620, TI12XX), | 1317 | CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X620, TI12XX), |
1237 | CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_7410, TI12XX), | 1318 | CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_7410, TI12XX), |
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c index 0b4adcb60df4..227600cd6360 100644 --- a/drivers/pnp/card.c +++ b/drivers/pnp/card.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/module.h> | 8 | #include <linux/module.h> |
10 | #include <linux/slab.h> | 9 | #include <linux/slab.h> |
11 | #include <linux/pnp.h> | 10 | #include <linux/pnp.h> |
diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c index e54c15383193..e161423b4300 100644 --- a/drivers/pnp/driver.c +++ b/drivers/pnp/driver.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/string.h> | 8 | #include <linux/string.h> |
10 | #include <linux/list.h> | 9 | #include <linux/list.h> |
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
diff --git a/drivers/pnp/isapnp/compat.c b/drivers/pnp/isapnp/compat.c index 3ff7e76b33bd..0697ab88a9ac 100644 --- a/drivers/pnp/isapnp/compat.c +++ b/drivers/pnp/isapnp/compat.c | |||
@@ -8,7 +8,6 @@ | |||
8 | 8 | ||
9 | /* TODO: see if more isapnp functions are needed here */ | 9 | /* TODO: see if more isapnp functions are needed here */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/isapnp.h> | 12 | #include <linux/isapnp.h> |
14 | #include <linux/string.h> | 13 | #include <linux/string.h> |
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c index ac7c2bb6c69e..f2e0179962e2 100644 --- a/drivers/pnp/isapnp/core.c +++ b/drivers/pnp/isapnp/core.c | |||
@@ -34,7 +34,6 @@ | |||
34 | * 2003-08-11 Resource Management Updates - Adam Belay <ambx1@neo.rr.com> | 34 | * 2003-08-11 Resource Management Updates - Adam Belay <ambx1@neo.rr.com> |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/config.h> | ||
38 | #include <linux/module.h> | 37 | #include <linux/module.h> |
39 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
40 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
diff --git a/drivers/pnp/isapnp/proc.c b/drivers/pnp/isapnp/proc.c index cf54b0a3628e..958c11bedd0d 100644 --- a/drivers/pnp/isapnp/proc.c +++ b/drivers/pnp/isapnp/proc.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/module.h> | 22 | #include <linux/module.h> |
24 | #include <linux/isapnp.h> | 23 | #include <linux/isapnp.h> |
25 | #include <linux/proc_fs.h> | 24 | #include <linux/proc_fs.h> |
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c index 1d7a5b87f4cb..5026b345cb30 100644 --- a/drivers/pnp/manager.c +++ b/drivers/pnp/manager.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/init.h> | 11 | #include <linux/init.h> |
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index f104577f73e0..6cf34a63c790 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/acpi.h> | 22 | #include <linux/acpi.h> |
24 | #include <linux/pnp.h> | 23 | #include <linux/pnp.h> |
25 | #include <acpi/acpi_bus.h> | 24 | #include <acpi/acpi_bus.h> |
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c index c89c98a2cca8..ef508a4de557 100644 --- a/drivers/pnp/pnpbios/rsparser.c +++ b/drivers/pnp/pnpbios/rsparser.c | |||
@@ -3,7 +3,6 @@ | |||
3 | * | 3 | * |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/config.h> | ||
7 | #include <linux/ctype.h> | 6 | #include <linux/ctype.h> |
8 | #include <linux/pnp.h> | 7 | #include <linux/pnp.h> |
9 | #include <linux/pnpbios.h> | 8 | #include <linux/pnpbios.h> |
diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index 8936b0cb2ec3..e97ecefe8584 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * Copyright (c) 1999 Martin Mares <mj@ucw.cz> | 11 | * Copyright (c) 1999 Martin Mares <mj@ucw.cz> |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/types.h> | 14 | #include <linux/types.h> |
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
17 | #include <linux/string.h> | 16 | #include <linux/string.h> |
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c index 7bb892f58cc0..e7cf6bec737e 100644 --- a/drivers/pnp/resource.c +++ b/drivers/pnp/resource.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/module.h> | 9 | #include <linux/module.h> |
11 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
12 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
diff --git a/drivers/pnp/support.c b/drivers/pnp/support.c index 61fe998944bd..946a0dcd627d 100644 --- a/drivers/pnp/support.c +++ b/drivers/pnp/support.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/module.h> | 8 | #include <linux/module.h> |
10 | #include <linux/ctype.h> | 9 | #include <linux/ctype.h> |
11 | #include <linux/pnp.h> | 10 | #include <linux/pnp.h> |
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c index 94e30fe4b8f3..7bf7b2c88245 100644 --- a/drivers/rapidio/rio-scan.c +++ b/drivers/rapidio/rio-scan.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * option) any later version. | 10 | * option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | 15 | ||
diff --git a/drivers/rapidio/rio-sysfs.c b/drivers/rapidio/rio-sysfs.c index bef9316e95df..5687b8fcbf93 100644 --- a/drivers/rapidio/rio-sysfs.c +++ b/drivers/rapidio/rio-sysfs.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * option) any later version. | 10 | * option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/rio.h> | 14 | #include <linux/rio.h> |
16 | #include <linux/rio_drv.h> | 15 | #include <linux/rio_drv.h> |
diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c index 5e382470faa2..f644807da2f9 100644 --- a/drivers/rapidio/rio.c +++ b/drivers/rapidio/rio.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * option) any later version. | 11 | * option) any later version. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/types.h> | 14 | #include <linux/types.h> |
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
17 | 16 | ||
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index f2fc81a9074d..d51afbe014e5 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig | |||
@@ -15,7 +15,7 @@ config RTC_CLASS | |||
15 | help | 15 | help |
16 | Generic RTC class support. If you say yes here, you will | 16 | Generic RTC class support. If you say yes here, you will |
17 | be allowed to plug one or more RTCs to your system. You will | 17 | be allowed to plug one or more RTCs to your system. You will |
18 | probably want to enable one of more of the interfaces below. | 18 | probably want to enable one or more of the interfaces below. |
19 | 19 | ||
20 | This driver can also be built as a module. If so, the module | 20 | This driver can also be built as a module. If so, the module |
21 | will be called rtc-class. | 21 | will be called rtc-class. |
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 2dc179b14ce6..4bf03fb67f8d 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/kmod.h> | 12 | #include <linux/kmod.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 9e9ae7179602..d7295386821c 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/ctype.h> | 16 | #include <linux/ctype.h> |
18 | #include <linux/init.h> | 17 | #include <linux/init.h> |
19 | #include <linux/module.h> | 18 | #include <linux/module.h> |
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c index 4002f6c1c1b3..23fa0b289173 100644 --- a/drivers/s390/block/dasd_diag.c +++ b/drivers/s390/block/dasd_diag.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/stddef.h> | 11 | #include <linux/stddef.h> |
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 0dfab30e8089..2e655f466743 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/stddef.h> | 12 | #include <linux/stddef.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
diff --git a/drivers/s390/block/dasd_erp.c b/drivers/s390/block/dasd_erp.c index 4108d96f6a5a..58a65097922b 100644 --- a/drivers/s390/block/dasd_erp.c +++ b/drivers/s390/block/dasd_erp.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/ctype.h> | 12 | #include <linux/ctype.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | 14 | ||
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c index bb7755b9b19d..808434d38526 100644 --- a/drivers/s390/block/dasd_fba.c +++ b/drivers/s390/block/dasd_fba.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/stddef.h> | 9 | #include <linux/stddef.h> |
11 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
12 | #include <asm/debug.h> | 11 | #include <asm/debug.h> |
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c index 61ffde718a7a..12c7d296eaa8 100644 --- a/drivers/s390/block/dasd_genhd.c +++ b/drivers/s390/block/dasd_genhd.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
16 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
17 | #include <linux/blkpg.h> | 16 | #include <linux/blkpg.h> |
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index 302bcd0f28be..e97f5316ad2d 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | * i/o controls for the dasd driver. | 10 | * i/o controls for the dasd driver. |
11 | */ | 11 | */ |
12 | #include <linux/config.h> | ||
13 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
14 | #include <linux/major.h> | 13 | #include <linux/major.h> |
15 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c index ad23aede356c..bfa010f6dab2 100644 --- a/drivers/s390/block/dasd_proc.c +++ b/drivers/s390/block/dasd_proc.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/ctype.h> | 14 | #include <linux/ctype.h> |
16 | #include <linux/seq_file.h> | 15 | #include <linux/seq_file.h> |
17 | #include <linux/vmalloc.h> | 16 | #include <linux/vmalloc.h> |
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 606f6ad285a0..f25c6d116f6f 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * Dan Morrison, IBM Corporation (dmorriso@cse.buffalo.edu) | 11 | * Dan Morrison, IBM Corporation (dmorriso@cse.buffalo.edu) |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | #include <linux/types.h> | 15 | #include <linux/types.h> |
17 | #include <linux/kdev_t.h> | 16 | #include <linux/kdev_t.h> |
diff --git a/drivers/s390/char/con3270.c b/drivers/s390/char/con3270.c index ef607a1de55a..7566be890688 100644 --- a/drivers/s390/char/con3270.c +++ b/drivers/s390/char/con3270.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation | 8 | * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/bootmem.h> | 11 | #include <linux/bootmem.h> |
13 | #include <linux/console.h> | 12 | #include <linux/console.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
diff --git a/drivers/s390/char/ctrlchar.c b/drivers/s390/char/ctrlchar.c index be463242cf0f..0ea6f36a2527 100644 --- a/drivers/s390/char/ctrlchar.c +++ b/drivers/s390/char/ctrlchar.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * | 7 | * |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/stddef.h> | 10 | #include <linux/stddef.h> |
12 | #include <asm/errno.h> | 11 | #include <asm/errno.h> |
13 | #include <linux/sysrq.h> | 12 | #include <linux/sysrq.h> |
diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c index a6415377bc73..6099c14de429 100644 --- a/drivers/s390/char/fs3270.c +++ b/drivers/s390/char/fs3270.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation | 8 | * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/bootmem.h> | 11 | #include <linux/bootmem.h> |
13 | #include <linux/console.h> | 12 | #include <linux/console.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c index d4d2ff0a9da2..547ef906ae2c 100644 --- a/drivers/s390/char/keyboard.c +++ b/drivers/s390/char/keyboard.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com), | 7 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com), |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
13 | #include <linux/sysrq.h> | 12 | #include <linux/sysrq.h> |
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index 3c1314b7391b..e95b56f810db 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation | 8 | * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/bootmem.h> | 11 | #include <linux/bootmem.h> |
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/err.h> | 13 | #include <linux/err.h> |
diff --git a/drivers/s390/char/sclp_con.c b/drivers/s390/char/sclp_con.c index 10ef22f13541..86864f641716 100644 --- a/drivers/s390/char/sclp_con.c +++ b/drivers/s390/char/sclp_con.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | 8 | * Martin Schwidefsky <schwidefsky@de.ibm.com> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/kmod.h> | 11 | #include <linux/kmod.h> |
13 | #include <linux/console.h> | 12 | #include <linux/console.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
diff --git a/drivers/s390/char/sclp_cpi.c b/drivers/s390/char/sclp_cpi.c index 80f7f31310e6..732dfbdb85c4 100644 --- a/drivers/s390/char/sclp_cpi.c +++ b/drivers/s390/char/sclp_cpi.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * SCLP Control-Program Identification. | 5 | * SCLP Control-Program Identification. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/version.h> | 8 | #include <linux/version.h> |
10 | #include <linux/kmod.h> | 9 | #include <linux/kmod.h> |
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
diff --git a/drivers/s390/char/sclp_quiesce.c b/drivers/s390/char/sclp_quiesce.c index a4c53c172db6..32004aae95c1 100644 --- a/drivers/s390/char/sclp_quiesce.c +++ b/drivers/s390/char/sclp_quiesce.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * Peter Oberparleiter <peter.oberparleiter@de.ibm.com> | 7 | * Peter Oberparleiter <peter.oberparleiter@de.ibm.com> |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/types.h> | 11 | #include <linux/types.h> |
13 | #include <linux/cpumask.h> | 12 | #include <linux/cpumask.h> |
diff --git a/drivers/s390/char/sclp_rw.c b/drivers/s390/char/sclp_rw.c index 91e93c78f57a..0c92d3909cca 100644 --- a/drivers/s390/char/sclp_rw.c +++ b/drivers/s390/char/sclp_rw.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | 8 | * Martin Schwidefsky <schwidefsky@de.ibm.com> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/kmod.h> | 11 | #include <linux/kmod.h> |
13 | #include <linux/types.h> | 12 | #include <linux/types.h> |
14 | #include <linux/err.h> | 13 | #include <linux/err.h> |
diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c index 6cbf067f1a8f..f6cf9023039e 100644 --- a/drivers/s390/char/sclp_tty.c +++ b/drivers/s390/char/sclp_tty.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | 8 | * Martin Schwidefsky <schwidefsky@de.ibm.com> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/kmod.h> | 12 | #include <linux/kmod.h> |
14 | #include <linux/tty.h> | 13 | #include <linux/tty.h> |
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c index 9e02625c82cf..54fba6f17188 100644 --- a/drivers/s390/char/sclp_vt220.c +++ b/drivers/s390/char/sclp_vt220.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * Author(s): Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com> | 7 | * Author(s): Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com> |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/spinlock.h> | 11 | #include <linux/spinlock.h> |
13 | #include <linux/list.h> | 12 | #include <linux/list.h> |
diff --git a/drivers/s390/char/tape.h b/drivers/s390/char/tape.h index cd51ace8b610..1f4c89967be4 100644 --- a/drivers/s390/char/tape.h +++ b/drivers/s390/char/tape.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <asm/ccwdev.h> | 16 | #include <asm/ccwdev.h> |
17 | #include <asm/debug.h> | 17 | #include <asm/debug.h> |
18 | #include <asm/idals.h> | 18 | #include <asm/idals.h> |
19 | #include <linux/config.h> | ||
20 | #include <linux/blkdev.h> | 19 | #include <linux/blkdev.h> |
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c index d4f2da738078..48b4d30a7256 100644 --- a/drivers/s390/char/tape_34xx.c +++ b/drivers/s390/char/tape_34xx.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | 8 | * Martin Schwidefsky <schwidefsky@de.ibm.com> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
14 | #include <linux/bio.h> | 13 | #include <linux/bio.h> |
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index d71ef1adea59..928cbefc49d5 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | 8 | * Martin Schwidefsky <schwidefsky@de.ibm.com> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
14 | #include <linux/bio.h> | 13 | #include <linux/bio.h> |
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index b70d92690242..3225fcd1dcb4 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
@@ -11,7 +11,6 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
14 | #include <linux/config.h> | ||
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | #include <linux/blkdev.h> | 15 | #include <linux/blkdev.h> |
17 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
diff --git a/drivers/s390/char/tape_char.c b/drivers/s390/char/tape_char.c index 5ce7ca38ace0..97f75237bed6 100644 --- a/drivers/s390/char/tape_char.c +++ b/drivers/s390/char/tape_char.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | 10 | * Martin Schwidefsky <schwidefsky@de.ibm.com> |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/types.h> | 14 | #include <linux/types.h> |
16 | #include <linux/proc_fs.h> | 15 | #include <linux/proc_fs.h> |
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index e6e4086d3224..122b4d8965c3 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * Stefan Bader <shbader@de.ibm.com> | 11 | * Stefan Bader <shbader@de.ibm.com> |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | #include <linux/init.h> // for kernel parameters | 15 | #include <linux/init.h> // for kernel parameters |
17 | #include <linux/kmod.h> // for requesting modules | 16 | #include <linux/kmod.h> // for requesting modules |
diff --git a/drivers/s390/char/tape_proc.c b/drivers/s390/char/tape_proc.c index 5fec0a10cc3d..655d375ab22b 100644 --- a/drivers/s390/char/tape_proc.c +++ b/drivers/s390/char/tape_proc.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * PROCFS Functions | 11 | * PROCFS Functions |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | #include <linux/vmalloc.h> | 15 | #include <linux/vmalloc.h> |
17 | #include <linux/seq_file.h> | 16 | #include <linux/seq_file.h> |
diff --git a/drivers/s390/char/tape_std.c b/drivers/s390/char/tape_std.c index 99cf881f41db..7a76ec413a3a 100644 --- a/drivers/s390/char/tape_std.c +++ b/drivers/s390/char/tape_std.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * Stefan Bader <shbader@de.ibm.com> | 11 | * Stefan Bader <shbader@de.ibm.com> |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/stddef.h> | 14 | #include <linux/stddef.h> |
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
17 | #include <linux/bio.h> | 16 | #include <linux/bio.h> |
diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index 7d26a3e4cb80..f496f236b9c0 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation | 8 | * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/types.h> | 12 | #include <linux/types.h> |
14 | #include <linux/kdev_t.h> | 13 | #include <linux/kdev_t.h> |
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c index 15b895496a45..12c2d6b746e6 100644 --- a/drivers/s390/cio/blacklist.c +++ b/drivers/s390/cio/blacklist.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * Arnd Bergmann (arndb@de.ibm.com) | 9 | * Arnd Bergmann (arndb@de.ibm.com) |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
14 | #include <linux/vmalloc.h> | 13 | #include <linux/vmalloc.h> |
15 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index b00f3ed051a0..a01f3bba4a7b 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/config.h> | ||
14 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/device.h> | 15 | #include <linux/device.h> |
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 5b20d8c9c025..a3423267467f 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
@@ -11,7 +11,6 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/config.h> | ||
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
17 | #include <linux/device.h> | 16 | #include <linux/device.h> |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index eafde43e8410..67f0de6aed33 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * Cornelia Huck (cornelia.huck@de.ibm.com) | 8 | * Cornelia Huck (cornelia.huck@de.ibm.com) |
9 | * Martin Schwidefsky (schwidefsky@de.ibm.com) | 9 | * Martin Schwidefsky (schwidefsky@de.ibm.com) |
10 | */ | 10 | */ |
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
14 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index 7d0dd72635eb..cb1af0b6f033 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -9,7 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/config.h> | ||
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
14 | #include <linux/jiffies.h> | 13 | #include <linux/jiffies.h> |
15 | #include <linux/string.h> | 14 | #include <linux/string.h> |
diff --git a/drivers/s390/cio/device_id.c b/drivers/s390/cio/device_id.c index e60b2d8103b8..438db483035d 100644 --- a/drivers/s390/cio/device_id.c +++ b/drivers/s390/cio/device_id.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/config.h> | ||
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | 14 | ||
16 | #include <asm/ccwdev.h> | 15 | #include <asm/ccwdev.h> |
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index b266ad8e14ff..a60124264bee 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com) | 6 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com) |
7 | * Cornelia Huck (cornelia.huck@de.ibm.com) | 7 | * Cornelia Huck (cornelia.huck@de.ibm.com) |
8 | */ | 8 | */ |
9 | #include <linux/config.h> | ||
10 | #include <linux/module.h> | 9 | #include <linux/module.h> |
11 | #include <linux/init.h> | 10 | #include <linux/init.h> |
12 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
diff --git a/drivers/s390/cio/device_pgid.c b/drivers/s390/cio/device_pgid.c index 85b1020a1fcc..54cb64ed0786 100644 --- a/drivers/s390/cio/device_pgid.c +++ b/drivers/s390/cio/device_pgid.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * Path Group ID functions. | 9 | * Path Group ID functions. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | 14 | ||
diff --git a/drivers/s390/cio/device_status.c b/drivers/s390/cio/device_status.c index 6c762b43f921..14bef2c179bf 100644 --- a/drivers/s390/cio/device_status.c +++ b/drivers/s390/cio/device_status.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * Status accumulation and basic sense functions. | 9 | * Status accumulation and basic sense functions. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | 14 | ||
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c index 96f519281d92..b70039af70d6 100644 --- a/drivers/s390/cio/qdio.c +++ b/drivers/s390/cio/qdio.c | |||
@@ -30,7 +30,6 @@ | |||
30 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 30 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | #include <linux/module.h> | 33 | #include <linux/module.h> |
35 | #include <linux/init.h> | 34 | #include <linux/init.h> |
36 | 35 | ||
diff --git a/drivers/s390/net/fsm.c b/drivers/s390/net/fsm.c index 7145e2134cf0..2c1db8036b7c 100644 --- a/drivers/s390/net/fsm.c +++ b/drivers/s390/net/fsm.c | |||
@@ -4,7 +4,6 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "fsm.h" | 6 | #include "fsm.h" |
7 | #include <linux/config.h> | ||
8 | #include <linux/module.h> | 7 | #include <linux/module.h> |
9 | #include <linux/timer.h> | 8 | #include <linux/timer.h> |
10 | 9 | ||
diff --git a/drivers/s390/net/iucv.c b/drivers/s390/net/iucv.c index e0c7deb98831..189a49275433 100644 --- a/drivers/s390/net/iucv.c +++ b/drivers/s390/net/iucv.c | |||
@@ -33,7 +33,6 @@ | |||
33 | 33 | ||
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/moduleparam.h> | 35 | #include <linux/moduleparam.h> |
36 | #include <linux/config.h> | ||
37 | 36 | ||
38 | #include <linux/spinlock.h> | 37 | #include <linux/spinlock.h> |
39 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
diff --git a/drivers/s390/net/qeth_eddp.c b/drivers/s390/net/qeth_eddp.c index 38aad8321456..8491598f9149 100644 --- a/drivers/s390/net/qeth_eddp.c +++ b/drivers/s390/net/qeth_eddp.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * Author(s): Thomas Spatzier <tspat@de.ibm.com> | 8 | * Author(s): Thomas Spatzier <tspat@de.ibm.com> |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | #include <linux/config.h> | ||
12 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
13 | #include <linux/ip.h> | 12 | #include <linux/ip.h> |
14 | #include <linux/inetdevice.h> | 13 | #include <linux/inetdevice.h> |
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 56009d768326..36733b9823c6 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -27,7 +27,6 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/moduleparam.h> | 31 | #include <linux/moduleparam.h> |
33 | #include <linux/string.h> | 32 | #include <linux/string.h> |
diff --git a/drivers/s390/s390mach.c b/drivers/s390/s390mach.c index 8dc75002acbe..432136f96e64 100644 --- a/drivers/s390/s390mach.c +++ b/drivers/s390/s390mach.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * Martin Schwidefsky (schwidefsky@de.ibm.com) | 8 | * Martin Schwidefsky (schwidefsky@de.ibm.com) |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/init.h> | 11 | #include <linux/init.h> |
13 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
14 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
diff --git a/drivers/s390/sysinfo.c b/drivers/s390/sysinfo.c index 66da840c9316..d1c1e75bfd60 100644 --- a/drivers/s390/sysinfo.c +++ b/drivers/s390/sysinfo.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * Author(s): Ulrich Weigand (Ulrich.Weigand@de.ibm.com) | 5 | * Author(s): Ulrich Weigand (Ulrich.Weigand@de.ibm.com) |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
10 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
11 | #include <linux/proc_fs.h> | 10 | #include <linux/proc_fs.h> |
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index cf97e9efe9b6..063e676a3ac0 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #define __KERNEL_SYSCALLS__ | 22 | #define __KERNEL_SYSCALLS__ |
23 | static int errno; | 23 | static int errno; |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
28 | #include <linux/kthread.h> | 27 | #include <linux/kthread.h> |
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index 31b8a5f6116f..fa2418f7ad39 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c | |||
@@ -4,7 +4,6 @@ | |||
4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/config.h> | ||
8 | #include <linux/module.h> | 7 | #include <linux/module.h> |
9 | #include <linux/types.h> | 8 | #include <linux/types.h> |
10 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c index d7e4bb41bd79..293bb2fdb1d5 100644 --- a/drivers/sbus/char/openprom.c +++ b/drivers/sbus/char/openprom.c | |||
@@ -29,7 +29,6 @@ | |||
29 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 29 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/config.h> | ||
33 | #include <linux/module.h> | 32 | #include <linux/module.h> |
34 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
35 | #include <linux/sched.h> | 34 | #include <linux/sched.h> |
diff --git a/drivers/sbus/dvma.c b/drivers/sbus/dvma.c index 378a1d68024d..57e1526746a2 100644 --- a/drivers/sbus/dvma.c +++ b/drivers/sbus/dvma.c | |||
@@ -3,7 +3,6 @@ | |||
3 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/config.h> | ||
7 | #include <linux/string.h> | 6 | #include <linux/string.h> |
8 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
9 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
diff --git a/drivers/sbus/sbus.c b/drivers/sbus/sbus.c index 387a6aa8c020..16b59773c0bb 100644 --- a/drivers/sbus/sbus.c +++ b/drivers/sbus/sbus.c | |||
@@ -5,7 +5,6 @@ | |||
5 | 5 | ||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/slab.h> | 7 | #include <linux/slab.h> |
8 | #include <linux/config.h> | ||
9 | #include <linux/init.h> | 8 | #include <linux/init.h> |
10 | #include <linux/pci.h> | 9 | #include <linux/pci.h> |
11 | 10 | ||
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index 3c683dc23541..eb7a6a4ded75 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c | |||
@@ -114,7 +114,6 @@ | |||
114 | * */ | 114 | * */ |
115 | #define NCR_700_VERSION "2.8" | 115 | #define NCR_700_VERSION "2.8" |
116 | 116 | ||
117 | #include <linux/config.h> | ||
118 | #include <linux/kernel.h> | 117 | #include <linux/kernel.h> |
119 | #include <linux/types.h> | 118 | #include <linux/types.h> |
120 | #include <linux/string.h> | 119 | #include <linux/string.h> |
diff --git a/drivers/scsi/53c7xx.c b/drivers/scsi/53c7xx.c index 765769a629e4..c9bd0335995d 100644 --- a/drivers/scsi/53c7xx.c +++ b/drivers/scsi/53c7xx.c | |||
@@ -232,7 +232,6 @@ | |||
232 | 232 | ||
233 | #include <linux/module.h> | 233 | #include <linux/module.h> |
234 | 234 | ||
235 | #include <linux/config.h> | ||
236 | 235 | ||
237 | #include <linux/types.h> | 236 | #include <linux/types.h> |
238 | #include <asm/setup.h> | 237 | #include <asm/setup.h> |
diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index bde3d5834ade..259b47ec4f54 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #define BusLogic_DriverVersion "2.1.16" | 29 | #define BusLogic_DriverVersion "2.1.16" |
30 | #define BusLogic_DriverDate "18 July 2002" | 30 | #define BusLogic_DriverDate "18 July 2002" |
31 | 31 | ||
32 | #include <linux/config.h> | ||
33 | #include <linux/module.h> | 32 | #include <linux/module.h> |
34 | #include <linux/init.h> | 33 | #include <linux/init.h> |
35 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
diff --git a/drivers/scsi/BusLogic.h b/drivers/scsi/BusLogic.h index 1aaa6569edac..9792e5af5252 100644 --- a/drivers/scsi/BusLogic.h +++ b/drivers/scsi/BusLogic.h | |||
@@ -28,7 +28,6 @@ | |||
28 | #ifndef _BUSLOGIC_H | 28 | #ifndef _BUSLOGIC_H |
29 | #define _BUSLOGIC_H | 29 | #define _BUSLOGIC_H |
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | 31 | ||
33 | #ifndef PACKED | 32 | #ifndef PACKED |
34 | #define PACKED __attribute__((packed)) | 33 | #define PACKED __attribute__((packed)) |
diff --git a/drivers/scsi/FlashPoint.c b/drivers/scsi/FlashPoint.c index 8e3d949b7118..7c0068049586 100644 --- a/drivers/scsi/FlashPoint.c +++ b/drivers/scsi/FlashPoint.c | |||
@@ -15,7 +15,6 @@ | |||
15 | 15 | ||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | 18 | ||
20 | #ifndef CONFIG_SCSI_OMIT_FLASHPOINT | 19 | #ifndef CONFIG_SCSI_OMIT_FLASHPOINT |
21 | 20 | ||
diff --git a/drivers/scsi/NCR53C9x.c b/drivers/scsi/NCR53C9x.c index c7dd0154d012..8a4659e94105 100644 --- a/drivers/scsi/NCR53C9x.c +++ b/drivers/scsi/NCR53C9x.c | |||
@@ -23,7 +23,6 @@ | |||
23 | 23 | ||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
28 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
29 | #include <linux/types.h> | 28 | #include <linux/types.h> |
diff --git a/drivers/scsi/NCR53C9x.h b/drivers/scsi/NCR53C9x.h index 65a9b377a410..481653c977cf 100644 --- a/drivers/scsi/NCR53C9x.h +++ b/drivers/scsi/NCR53C9x.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #ifndef NCR53C9X_H | 13 | #ifndef NCR53C9X_H |
14 | #define NCR53C9X_H | 14 | #define NCR53C9X_H |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
18 | 17 | ||
19 | /* djweis for mac driver */ | 18 | /* djweis for mac driver */ |
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index dd9fb3d91000..537136457ea0 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c | |||
@@ -754,7 +754,6 @@ | |||
754 | * --- Linux Include Files | 754 | * --- Linux Include Files |
755 | */ | 755 | */ |
756 | 756 | ||
757 | #include <linux/config.h> | ||
758 | #include <linux/module.h> | 757 | #include <linux/module.h> |
759 | 758 | ||
760 | #if defined(CONFIG_X86) && !defined(CONFIG_ISA) | 759 | #if defined(CONFIG_X86) && !defined(CONFIG_ISA) |
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c index 86c6bd234591..24f0f5461792 100644 --- a/drivers/scsi/aha1542.c +++ b/drivers/scsi/aha1542.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * Added proper detection of the AHA-1640 (MCA version of AHA-1540) | 25 | * Added proper detection of the AHA-1640 (MCA version of AHA-1540) |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.h b/drivers/scsi/aic7xxx/aic79xx_osm.h index 2b8331649eeb..92c6154575e7 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.h +++ b/drivers/scsi/aic7xxx/aic79xx_osm.h | |||
@@ -42,7 +42,6 @@ | |||
42 | #ifndef _AIC79XX_LINUX_H_ | 42 | #ifndef _AIC79XX_LINUX_H_ |
43 | #define _AIC79XX_LINUX_H_ | 43 | #define _AIC79XX_LINUX_H_ |
44 | 44 | ||
45 | #include <linux/config.h> | ||
46 | #include <linux/types.h> | 45 | #include <linux/types.h> |
47 | #include <linux/blkdev.h> | 46 | #include <linux/blkdev.h> |
48 | #include <linux/delay.h> | 47 | #include <linux/delay.h> |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.h b/drivers/scsi/aic7xxx/aic7xxx_osm.h index a20b08c9ff15..d42a71ee076d 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.h +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.h | |||
@@ -59,7 +59,6 @@ | |||
59 | #ifndef _AIC7XXX_LINUX_H_ | 59 | #ifndef _AIC7XXX_LINUX_H_ |
60 | #define _AIC7XXX_LINUX_H_ | 60 | #define _AIC7XXX_LINUX_H_ |
61 | 61 | ||
62 | #include <linux/config.h> | ||
63 | #include <linux/types.h> | 62 | #include <linux/types.h> |
64 | #include <linux/blkdev.h> | 63 | #include <linux/blkdev.h> |
65 | #include <linux/delay.h> | 64 | #include <linux/delay.h> |
diff --git a/drivers/scsi/aic7xxx_old/aic7xxx_proc.c b/drivers/scsi/aic7xxx_old/aic7xxx_proc.c index 3bf334931a8a..b07e4f04fd00 100644 --- a/drivers/scsi/aic7xxx_old/aic7xxx_proc.c +++ b/drivers/scsi/aic7xxx_old/aic7xxx_proc.c | |||
@@ -29,7 +29,6 @@ | |||
29 | * $Id: aic7xxx_proc.c,v 4.1 1997/06/97 08:23:42 deang Exp $ | 29 | * $Id: aic7xxx_proc.c,v 4.1 1997/06/97 08:23:42 deang Exp $ |
30 | *-M*************************************************************************/ | 30 | *-M*************************************************************************/ |
31 | 31 | ||
32 | #include <linux/config.h> | ||
33 | 32 | ||
34 | #define BLS (&aic7xxx_buffer[size]) | 33 | #define BLS (&aic7xxx_buffer[size]) |
35 | #define HDRB \ | 34 | #define HDRB \ |
diff --git a/drivers/scsi/amiga7xx.c b/drivers/scsi/amiga7xx.c index c0844fa32c5d..9099d531d5a4 100644 --- a/drivers/scsi/amiga7xx.c +++ b/drivers/scsi/amiga7xx.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
12 | #include <linux/blkdev.h> | 12 | #include <linux/blkdev.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/config.h> | ||
15 | #include <linux/zorro.h> | 14 | #include <linux/zorro.h> |
16 | #include <linux/stat.h> | 15 | #include <linux/stat.h> |
17 | 16 | ||
diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c index dda5a5f79c53..1b9900b58956 100644 --- a/drivers/scsi/arm/acornscsi.c +++ b/drivers/scsi/arm/acornscsi.c | |||
@@ -129,7 +129,6 @@ | |||
129 | #define STRx(x) STRINGIFY(x) | 129 | #define STRx(x) STRINGIFY(x) |
130 | #define NO_WRITE_STR STRx(NO_WRITE) | 130 | #define NO_WRITE_STR STRx(NO_WRITE) |
131 | 131 | ||
132 | #include <linux/config.h> | ||
133 | #include <linux/module.h> | 132 | #include <linux/module.h> |
134 | #include <linux/kernel.h> | 133 | #include <linux/kernel.h> |
135 | #include <linux/sched.h> | 134 | #include <linux/sched.h> |
diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c index 57295bcea3e7..007a14e5c3fd 100644 --- a/drivers/scsi/atari_NCR5380.c +++ b/drivers/scsi/atari_NCR5380.c | |||
@@ -524,7 +524,6 @@ static __inline__ void initialize_SCp(Scsi_Cmnd *cmd) | |||
524 | } | 524 | } |
525 | } | 525 | } |
526 | 526 | ||
527 | #include <linux/config.h> | ||
528 | #include <linux/delay.h> | 527 | #include <linux/delay.h> |
529 | 528 | ||
530 | #if NDEBUG | 529 | #if NDEBUG |
diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c index f677c5a32a68..e1be4a4387cd 100644 --- a/drivers/scsi/atari_scsi.c +++ b/drivers/scsi/atari_scsi.c | |||
@@ -65,7 +65,6 @@ | |||
65 | 65 | ||
66 | 66 | ||
67 | 67 | ||
68 | #include <linux/config.h> | ||
69 | #include <linux/module.h> | 68 | #include <linux/module.h> |
70 | 69 | ||
71 | #define NDEBUG (0) | 70 | #define NDEBUG (0) |
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c index d9abd1645d15..f6caa4307768 100644 --- a/drivers/scsi/ch.c +++ b/drivers/scsi/ch.c | |||
@@ -7,7 +7,6 @@ | |||
7 | 7 | ||
8 | #define VERSION "0.25" | 8 | #define VERSION "0.25" |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/init.h> | 11 | #include <linux/init.h> |
13 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c index d92d5040a9fe..dddd2acce76f 100644 --- a/drivers/scsi/constants.c +++ b/drivers/scsi/constants.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * Additions for SPC-3 T10/1416-D Rev 21 22 Sept 2004, D. Gilbert 20041025 | 7 | * Additions for SPC-3 T10/1416-D Rev 21 22 Sept 2004, D. Gilbert 20041025 |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/blkdev.h> | 10 | #include <linux/blkdev.h> |
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
diff --git a/drivers/scsi/dpt/dpti_i2o.h b/drivers/scsi/dpt/dpti_i2o.h index a9585f5235d9..d84a281ad944 100644 --- a/drivers/scsi/dpt/dpti_i2o.h +++ b/drivers/scsi/dpt/dpti_i2o.h | |||
@@ -23,7 +23,6 @@ | |||
23 | 23 | ||
24 | #include <asm/semaphore.h> /* Needed for MUTEX init macros */ | 24 | #include <asm/semaphore.h> /* Needed for MUTEX init macros */ |
25 | #include <linux/version.h> | 25 | #include <linux/version.h> |
26 | #include <linux/config.h> | ||
27 | #include <linux/notifier.h> | 26 | #include <linux/notifier.h> |
28 | #include <asm/atomic.h> | 27 | #include <asm/atomic.h> |
29 | 28 | ||
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index 059eeee4b554..67c419402d8a 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c | |||
@@ -477,7 +477,6 @@ | |||
477 | * the driver sets host->wish_block = 1 for all ISA boards. | 477 | * the driver sets host->wish_block = 1 for all ISA boards. |
478 | */ | 478 | */ |
479 | 479 | ||
480 | #include <linux/config.h> | ||
481 | #include <linux/string.h> | 480 | #include <linux/string.h> |
482 | #include <linux/kernel.h> | 481 | #include <linux/kernel.h> |
483 | #include <linux/ioport.h> | 482 | #include <linux/ioport.h> |
diff --git a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c index 23beb48c79c5..d8c9ec21e0ef 100644 --- a/drivers/scsi/eata_pio.c +++ b/drivers/scsi/eata_pio.c | |||
@@ -46,7 +46,6 @@ | |||
46 | * last change: 2002/11/02 OS: Linux 2.5.45 * | 46 | * last change: 2002/11/02 OS: Linux 2.5.45 * |
47 | ************************************************************/ | 47 | ************************************************************/ |
48 | 48 | ||
49 | #include <linux/config.h> | ||
50 | #include <linux/module.h> | 49 | #include <linux/module.h> |
51 | #include <linux/kernel.h> | 50 | #include <linux/kernel.h> |
52 | #include <linux/sched.h> | 51 | #include <linux/sched.h> |
diff --git a/drivers/scsi/esp.c b/drivers/scsi/esp.c index ddb512463b45..36c50b61f94d 100644 --- a/drivers/scsi/esp.c +++ b/drivers/scsi/esp.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * 3) Add tagged queueing. | 12 | * 3) Add tagged queueing. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
17 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
18 | #include <linux/types.h> | 17 | #include <linux/types.h> |
diff --git a/drivers/scsi/fcal.c b/drivers/scsi/fcal.c index 03416548f20c..7f891023aa15 100644 --- a/drivers/scsi/fcal.c +++ b/drivers/scsi/fcal.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
14 | #include <linux/stat.h> | 14 | #include <linux/stat.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/config.h> | ||
17 | #ifdef CONFIG_KMOD | 16 | #ifdef CONFIG_KMOD |
18 | #include <linux/kmod.h> | 17 | #include <linux/kmod.h> |
19 | #endif | 18 | #endif |
diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c index e16013f0ad6e..03356887202d 100644 --- a/drivers/scsi/fdomain.c +++ b/drivers/scsi/fdomain.c | |||
@@ -266,7 +266,6 @@ | |||
266 | 266 | ||
267 | **************************************************************************/ | 267 | **************************************************************************/ |
268 | 268 | ||
269 | #include <linux/config.h> | ||
270 | #include <linux/module.h> | 269 | #include <linux/module.h> |
271 | #include <linux/init.h> | 270 | #include <linux/init.h> |
272 | #include <linux/interrupt.h> | 271 | #include <linux/interrupt.h> |
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index 5f313c93b7a9..fbc8e16c8d15 100644 --- a/drivers/scsi/g_NCR5380.c +++ b/drivers/scsi/g_NCR5380.c | |||
@@ -91,7 +91,6 @@ | |||
91 | #define AUTOPROBE_IRQ | 91 | #define AUTOPROBE_IRQ |
92 | #define AUTOSENSE | 92 | #define AUTOSENSE |
93 | 93 | ||
94 | #include <linux/config.h> | ||
95 | 94 | ||
96 | #ifdef CONFIG_SCSI_GENERIC_NCR53C400 | 95 | #ifdef CONFIG_SCSI_GENERIC_NCR53C400 |
97 | #define NCR53C400_PSEUDO_DMA 1 | 96 | #define NCR53C400_PSEUDO_DMA 1 |
diff --git a/drivers/scsi/g_NCR5380.h b/drivers/scsi/g_NCR5380.h index d60a89cb8052..df0b3f69ef63 100644 --- a/drivers/scsi/g_NCR5380.h +++ b/drivers/scsi/g_NCR5380.h | |||
@@ -32,7 +32,6 @@ | |||
32 | #ifndef GENERIC_NCR5380_H | 32 | #ifndef GENERIC_NCR5380_H |
33 | #define GENERIC_NCR5380_H | 33 | #define GENERIC_NCR5380_H |
34 | 34 | ||
35 | #include <linux/config.h> | ||
36 | 35 | ||
37 | #define GENERIC_NCR5380_PUBLIC_RELEASE 1 | 36 | #define GENERIC_NCR5380_PUBLIC_RELEASE 1 |
38 | 37 | ||
diff --git a/drivers/scsi/ibmmca.c b/drivers/scsi/ibmmca.c index 497f6642b2dc..1cbc94842cc6 100644 --- a/drivers/scsi/ibmmca.c +++ b/drivers/scsi/ibmmca.c | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 988e6f7af01a..f7b5d7372d26 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #define IDESCSI_VERSION "0.92" | 34 | #define IDESCSI_VERSION "0.92" |
35 | 35 | ||
36 | #include <linux/module.h> | 36 | #include <linux/module.h> |
37 | #include <linux/config.h> | ||
38 | #include <linux/types.h> | 37 | #include <linux/types.h> |
39 | #include <linux/string.h> | 38 | #include <linux/string.h> |
40 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c index 681bd18493f3..2d95ac9c32c1 100644 --- a/drivers/scsi/imm.c +++ b/drivers/scsi/imm.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * future expansion to five letters. | 8 | * future expansion to five letters. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/init.h> | 11 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index 913ba95f85bd..43acb1fe90b4 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c | |||
@@ -118,7 +118,6 @@ | |||
118 | #include <linux/blkdev.h> | 118 | #include <linux/blkdev.h> |
119 | #include <linux/spinlock.h> | 119 | #include <linux/spinlock.h> |
120 | #include <linux/stat.h> | 120 | #include <linux/stat.h> |
121 | #include <linux/config.h> | ||
122 | #include <linux/kernel.h> | 121 | #include <linux/kernel.h> |
123 | #include <linux/proc_fs.h> | 122 | #include <linux/proc_fs.h> |
124 | #include <linux/string.h> | 123 | #include <linux/string.h> |
diff --git a/drivers/scsi/initio.h b/drivers/scsi/initio.h index 3efb1184fc39..acb67a4af2cc 100644 --- a/drivers/scsi/initio.h +++ b/drivers/scsi/initio.h | |||
@@ -54,7 +54,6 @@ | |||
54 | **************************************************************************/ | 54 | **************************************************************************/ |
55 | 55 | ||
56 | 56 | ||
57 | #include <linux/config.h> | ||
58 | #include <linux/types.h> | 57 | #include <linux/types.h> |
59 | 58 | ||
60 | #define ULONG unsigned long | 59 | #define ULONG unsigned long |
@@ -193,13 +192,13 @@ typedef struct { | |||
193 | #define TSC_SEL_ATN_DIRECT_OUT 0x15 /* Select With ATN Sequence */ | 192 | #define TSC_SEL_ATN_DIRECT_OUT 0x15 /* Select With ATN Sequence */ |
194 | #define TSC_SEL_ATN3_DIRECT_IN 0xB5 /* Select With ATN3 Sequence */ | 193 | #define TSC_SEL_ATN3_DIRECT_IN 0xB5 /* Select With ATN3 Sequence */ |
195 | #define TSC_SEL_ATN3_DIRECT_OUT 0x35 /* Select With ATN3 Sequence */ | 194 | #define TSC_SEL_ATN3_DIRECT_OUT 0x35 /* Select With ATN3 Sequence */ |
196 | #define TSC_XF_DMA_OUT_DIRECT 0x06 /* DMA Xfer Infomation out */ | 195 | #define TSC_XF_DMA_OUT_DIRECT 0x06 /* DMA Xfer Information out */ |
197 | #define TSC_XF_DMA_IN_DIRECT 0x86 /* DMA Xfer Infomation in */ | 196 | #define TSC_XF_DMA_IN_DIRECT 0x86 /* DMA Xfer Information in */ |
198 | 197 | ||
199 | #define TSC_XF_DMA_OUT 0x43 /* DMA Xfer Infomation out */ | 198 | #define TSC_XF_DMA_OUT 0x43 /* DMA Xfer Information out */ |
200 | #define TSC_XF_DMA_IN 0xC3 /* DMA Xfer Infomation in */ | 199 | #define TSC_XF_DMA_IN 0xC3 /* DMA Xfer Information in */ |
201 | #define TSC_XF_FIFO_OUT 0x03 /* FIFO Xfer Infomation out */ | 200 | #define TSC_XF_FIFO_OUT 0x03 /* FIFO Xfer Information out */ |
202 | #define TSC_XF_FIFO_IN 0x83 /* FIFO Xfer Infomation in */ | 201 | #define TSC_XF_FIFO_IN 0x83 /* FIFO Xfer Information in */ |
203 | 202 | ||
204 | #define TSC_MSG_ACCEPT 0x0F /* Message Accept */ | 203 | #define TSC_MSG_ACCEPT 0x0F /* Message Accept */ |
205 | 204 | ||
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 96b65b307dd0..e19bf690cdf1 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -54,7 +54,6 @@ | |||
54 | * | 54 | * |
55 | */ | 55 | */ |
56 | 56 | ||
57 | #include <linux/config.h> | ||
58 | #include <linux/fs.h> | 57 | #include <linux/fs.h> |
59 | #include <linux/init.h> | 58 | #include <linux/init.h> |
60 | #include <linux/types.h> | 59 | #include <linux/types.h> |
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index 78f2ff736c3e..7436793c3ad3 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c | |||
@@ -196,7 +196,6 @@ | |||
196 | #include <linux/module.h> | 196 | #include <linux/module.h> |
197 | 197 | ||
198 | #include <linux/stat.h> | 198 | #include <linux/stat.h> |
199 | #include <linux/config.h> | ||
200 | 199 | ||
201 | #include <linux/spinlock.h> | 200 | #include <linux/spinlock.h> |
202 | #include <linux/init.h> | 201 | #include <linux/init.h> |
diff --git a/drivers/scsi/libata-bmdma.c b/drivers/scsi/libata-bmdma.c index 004e1a0d8b71..38bfebf4fe8f 100644 --- a/drivers/scsi/libata-bmdma.c +++ b/drivers/scsi/libata-bmdma.c | |||
@@ -32,7 +32,6 @@ | |||
32 | * | 32 | * |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/config.h> | ||
36 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
37 | #include <linux/pci.h> | 36 | #include <linux/pci.h> |
38 | #include <linux/libata.h> | 37 | #include <linux/libata.h> |
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index d1c1c30d123f..82caba464291 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -32,7 +32,6 @@ | |||
32 | * | 32 | * |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/config.h> | ||
36 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
37 | #include <linux/module.h> | 36 | #include <linux/module.h> |
38 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c index f852421002ef..c88717727be8 100644 --- a/drivers/scsi/mesh.c +++ b/drivers/scsi/mesh.c | |||
@@ -18,7 +18,6 @@ | |||
18 | * - retry arbitration if lost (unless higher levels do this for us) | 18 | * - retry arbitration if lost (unless higher levels do this for us) |
19 | * - power down the chip when no device is detected | 19 | * - power down the chip when no device is detected |
20 | */ | 20 | */ |
21 | #include <linux/config.h> | ||
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
23 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
24 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
diff --git a/drivers/scsi/ncr53c8xx.h b/drivers/scsi/ncr53c8xx.h index 0e4e46a01336..78818b6684f8 100644 --- a/drivers/scsi/ncr53c8xx.h +++ b/drivers/scsi/ncr53c8xx.h | |||
@@ -53,10 +53,8 @@ | |||
53 | #ifndef NCR53C8XX_H | 53 | #ifndef NCR53C8XX_H |
54 | #define NCR53C8XX_H | 54 | #define NCR53C8XX_H |
55 | 55 | ||
56 | #include <linux/config.h> | ||
57 | #include <scsi/scsi_host.h> | 56 | #include <scsi/scsi_host.h> |
58 | 57 | ||
59 | #include <linux/config.h> | ||
60 | 58 | ||
61 | /* | 59 | /* |
62 | ** If you want a driver as small as possible, donnot define the | 60 | ** If you want a driver as small as possible, donnot define the |
diff --git a/drivers/scsi/oktagon_esp.c b/drivers/scsi/oktagon_esp.c index dee426f8c07b..d7a0bcc6c670 100644 --- a/drivers/scsi/oktagon_esp.c +++ b/drivers/scsi/oktagon_esp.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * Based on cyber_esp.c | 6 | * Based on cyber_esp.c |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | 9 | ||
11 | #if defined(CONFIG_AMIGA) || defined(CONFIG_APUS) | 10 | #if defined(CONFIG_AMIGA) || defined(CONFIG_APUS) |
12 | #define USE_BOTTOM_HALF | 11 | #define USE_BOTTOM_HALF |
diff --git a/drivers/scsi/oktagon_io.S b/drivers/scsi/oktagon_io.S index 08ce8d80d8f5..8a7340b02707 100644 --- a/drivers/scsi/oktagon_io.S +++ b/drivers/scsi/oktagon_io.S | |||
@@ -23,7 +23,6 @@ int oktag_from_io(long *addr,long *paddr,long len) | |||
23 | * is moved to/from the IO register. | 23 | * is moved to/from the IO register. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | 26 | ||
28 | #ifdef CONFIG_APUS | 27 | #ifdef CONFIG_APUS |
29 | 28 | ||
diff --git a/drivers/scsi/osst.h b/drivers/scsi/osst.h index 011d4d6ca9f9..1e426f5d0ed8 100644 --- a/drivers/scsi/osst.h +++ b/drivers/scsi/osst.h | |||
@@ -3,7 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <asm/byteorder.h> | 5 | #include <asm/byteorder.h> |
6 | #include <linux/config.h> | ||
7 | #include <linux/completion.h> | 6 | #include <linux/completion.h> |
8 | 7 | ||
9 | /* FIXME - rename and use the following two types or delete them! | 8 | /* FIXME - rename and use the following two types or delete them! |
diff --git a/drivers/scsi/pluto.c b/drivers/scsi/pluto.c index 83a671799934..7abf64d1bfc9 100644 --- a/drivers/scsi/pluto.c +++ b/drivers/scsi/pluto.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
14 | #include <linux/stat.h> | 14 | #include <linux/stat.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/config.h> | ||
17 | #ifdef CONFIG_KMOD | 16 | #ifdef CONFIG_KMOD |
18 | #include <linux/kmod.h> | 17 | #include <linux/kmod.h> |
19 | #endif | 18 | #endif |
diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c index d58ac5ad509d..b0eba39f208a 100644 --- a/drivers/scsi/ppa.c +++ b/drivers/scsi/ppa.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/init.h> | 11 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 680f6063954b..a7e4183462b8 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c | |||
@@ -331,7 +331,6 @@ | |||
331 | *****************************************************************************/ | 331 | *****************************************************************************/ |
332 | 332 | ||
333 | 333 | ||
334 | #include <linux/config.h> | ||
335 | #include <linux/module.h> | 334 | #include <linux/module.h> |
336 | 335 | ||
337 | #include <linux/version.h> | 336 | #include <linux/version.h> |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index d6f6579cfd27..6734453ea28a 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -2134,7 +2134,7 @@ typedef struct scsi_qla_host { | |||
2134 | mempool_t *srb_mempool; | 2134 | mempool_t *srb_mempool; |
2135 | 2135 | ||
2136 | /* This spinlock is used to protect "io transactions", you must | 2136 | /* This spinlock is used to protect "io transactions", you must |
2137 | * aquire it before doing any IO to the card, eg with RD_REG*() and | 2137 | * acquire it before doing any IO to the card, eg with RD_REG*() and |
2138 | * WRT_REG*() for the duration of your entire commandtransaction. | 2138 | * WRT_REG*() for the duration of your entire commandtransaction. |
2139 | * | 2139 | * |
2140 | * This spinlock is of lower priority than the io request lock. | 2140 | * This spinlock is of lower priority than the io request lock. |
diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c index 5cc42c6054eb..56da25581f31 100644 --- a/drivers/scsi/sata_nv.c +++ b/drivers/scsi/sata_nv.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
36 | #include <linux/module.h> | 35 | #include <linux/module.h> |
37 | #include <linux/pci.h> | 36 | #include <linux/pci.h> |
diff --git a/drivers/scsi/sata_sis.c b/drivers/scsi/sata_sis.c index 809d337ed641..ee6b5df41d30 100644 --- a/drivers/scsi/sata_sis.c +++ b/drivers/scsi/sata_sis.c | |||
@@ -30,7 +30,6 @@ | |||
30 | * | 30 | * |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
36 | #include <linux/pci.h> | 35 | #include <linux/pci.h> |
diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c index 7566c2cabaf7..a958b45e597c 100644 --- a/drivers/scsi/sata_svw.c +++ b/drivers/scsi/sata_svw.c | |||
@@ -36,7 +36,6 @@ | |||
36 | * | 36 | * |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include <linux/config.h> | ||
40 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
41 | #include <linux/module.h> | 40 | #include <linux/module.h> |
42 | #include <linux/pci.h> | 41 | #include <linux/pci.h> |
diff --git a/drivers/scsi/sata_uli.c b/drivers/scsi/sata_uli.c index 64f3c1aeed21..33cdb4867ef1 100644 --- a/drivers/scsi/sata_uli.c +++ b/drivers/scsi/sata_uli.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * | 24 | * |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 5a5d2af8ee43..e1168860045c 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * module options to "modprobe scsi_debug num_tgts=2" [20021221] | 24 | * module options to "modprobe scsi_debug num_tgts=2" [20021221] |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/module.h> | 27 | #include <linux/module.h> |
29 | 28 | ||
30 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
diff --git a/drivers/scsi/scsi_logging.h b/drivers/scsi/scsi_logging.h index a3e2af6a846c..1f65139e14f8 100644 --- a/drivers/scsi/scsi_logging.h +++ b/drivers/scsi/scsi_logging.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _SCSI_LOGGING_H | 1 | #ifndef _SCSI_LOGGING_H |
2 | #define _SCSI_LOGGING_H | 2 | #define _SCSI_LOGGING_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | 4 | ||
6 | /* | 5 | /* |
7 | * This defines the scsi logging feature. It is a means by which the user | 6 | * This defines the scsi logging feature. It is a means by which the user |
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h index a1727a0e1bdd..015c90cf3abc 100644 --- a/drivers/scsi/scsi_priv.h +++ b/drivers/scsi/scsi_priv.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _SCSI_PRIV_H | 1 | #ifndef _SCSI_PRIV_H |
2 | #define _SCSI_PRIV_H | 2 | #define _SCSI_PRIV_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/device.h> | 4 | #include <linux/device.h> |
6 | 5 | ||
7 | struct request_queue; | 6 | struct request_queue; |
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 0f7e6f94d66b..1341608e9e3b 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * or a LUN is seen that cannot have a device attached to it. | 25 | * or a LUN is seen that cannot have a device attached to it. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/moduleparam.h> | 29 | #include <linux/moduleparam.h> |
31 | #include <linux/init.h> | 30 | #include <linux/init.h> |
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 5ec7a4fb0145..e7fe565b96de 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * Created to pull SCSI mid layer sysfs routines into one file. | 6 | * Created to pull SCSI mid layer sysfs routines into one file. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/module.h> | 9 | #include <linux/module.h> |
11 | #include <linux/init.h> | 10 | #include <linux/init.h> |
12 | #include <linux/blkdev.h> | 11 | #include <linux/blkdev.h> |
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index ace49d5bd9c4..29a9a53cdd1a 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c | |||
@@ -18,7 +18,6 @@ | |||
18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | #include <linux/config.h> | ||
22 | #include <linux/ctype.h> | 21 | #include <linux/ctype.h> |
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 354199011246..ea38757d12e5 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -32,7 +32,6 @@ | |||
32 | * than the level indicated above to trigger output. | 32 | * than the level indicated above to trigger output. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/config.h> | ||
36 | #include <linux/module.h> | 35 | #include <linux/module.h> |
37 | #include <linux/fs.h> | 36 | #include <linux/fs.h> |
38 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 98b9312ba8da..4e607d3065bc 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -28,7 +28,6 @@ static int sg_version_num = 30533; /* 2 digits for each component */ | |||
28 | * (otherwise the macros compile to empty statements). | 28 | * (otherwise the macros compile to empty statements). |
29 | * | 29 | * |
30 | */ | 30 | */ |
31 | #include <linux/config.h> | ||
32 | #include <linux/module.h> | 31 | #include <linux/module.h> |
33 | 32 | ||
34 | #include <linux/fs.h> | 33 | #include <linux/fs.h> |
diff --git a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c index 255886a9ac55..2b2789345c13 100644 --- a/drivers/scsi/sim710.c +++ b/drivers/scsi/sim710.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | 30 | ||
32 | #include <linux/blkdev.h> | 31 | #include <linux/blkdev.h> |
diff --git a/drivers/scsi/sr_vendor.c b/drivers/scsi/sr_vendor.c index 9dde8df2f5c9..a3e9d0f2eb5b 100644 --- a/drivers/scsi/sr_vendor.c +++ b/drivers/scsi/sr_vendor.c | |||
@@ -34,7 +34,6 @@ | |||
34 | * HP 6020 writers now supported. | 34 | * HP 6020 writers now supported. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/config.h> | ||
38 | #include <linux/cdrom.h> | 37 | #include <linux/cdrom.h> |
39 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
40 | #include <linux/string.h> | 39 | #include <linux/string.h> |
diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c index 25cced91c8a6..2ebe0d663899 100644 --- a/drivers/scsi/sun3_NCR5380.c +++ b/drivers/scsi/sun3_NCR5380.c | |||
@@ -535,7 +535,6 @@ static __inline__ void initialize_SCp(Scsi_Cmnd *cmd) | |||
535 | 535 | ||
536 | } | 536 | } |
537 | 537 | ||
538 | #include <linux/config.h> | ||
539 | #include <linux/delay.h> | 538 | #include <linux/delay.h> |
540 | 539 | ||
541 | #if 1 | 540 | #if 1 |
diff --git a/drivers/scsi/sym53c8xx_2/sym53c8xx.h b/drivers/scsi/sym53c8xx_2/sym53c8xx.h index 481103769729..7519728dfc38 100644 --- a/drivers/scsi/sym53c8xx_2/sym53c8xx.h +++ b/drivers/scsi/sym53c8xx_2/sym53c8xx.h | |||
@@ -40,7 +40,6 @@ | |||
40 | #ifndef SYM53C8XX_H | 40 | #ifndef SYM53C8XX_H |
41 | #define SYM53C8XX_H | 41 | #define SYM53C8XX_H |
42 | 42 | ||
43 | #include <linux/config.h> | ||
44 | 43 | ||
45 | /* | 44 | /* |
46 | * DMA addressing mode. | 45 | * DMA addressing mode. |
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.h b/drivers/scsi/sym53c8xx_2/sym_glue.h index a446cda3f64c..e022d3c71b59 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.h +++ b/drivers/scsi/sym53c8xx_2/sym_glue.h | |||
@@ -40,7 +40,6 @@ | |||
40 | #ifndef SYM_GLUE_H | 40 | #ifndef SYM_GLUE_H |
41 | #define SYM_GLUE_H | 41 | #define SYM_GLUE_H |
42 | 42 | ||
43 | #include <linux/config.h> | ||
44 | #include <linux/delay.h> | 43 | #include <linux/delay.h> |
45 | #include <linux/ioport.h> | 44 | #include <linux/ioport.h> |
46 | #include <linux/pci.h> | 45 | #include <linux/pci.h> |
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c index 91322aff241d..7540f6a7529f 100644 --- a/drivers/scsi/tmscsim.c +++ b/drivers/scsi/tmscsim.c | |||
@@ -218,7 +218,6 @@ | |||
218 | #endif | 218 | #endif |
219 | #define DCBDEBUG1(x) C_NOP | 219 | #define DCBDEBUG1(x) C_NOP |
220 | 220 | ||
221 | #include <linux/config.h> | ||
222 | #include <linux/module.h> | 221 | #include <linux/module.h> |
223 | #include <linux/delay.h> | 222 | #include <linux/delay.h> |
224 | #include <linux/signal.h> | 223 | #include <linux/signal.h> |
diff --git a/drivers/scsi/tmscsim.h b/drivers/scsi/tmscsim.h index d4495272fb40..9b66fa8d38d9 100644 --- a/drivers/scsi/tmscsim.h +++ b/drivers/scsi/tmscsim.h | |||
@@ -9,7 +9,6 @@ | |||
9 | #define _TMSCSIM_H | 9 | #define _TMSCSIM_H |
10 | 10 | ||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/config.h> | ||
13 | 12 | ||
14 | #define SCSI_IRQ_NONE 255 | 13 | #define SCSI_IRQ_NONE 255 |
15 | 14 | ||
diff --git a/drivers/scsi/u14-34f.c b/drivers/scsi/u14-34f.c index 33cd90fc657b..35c043e38ed4 100644 --- a/drivers/scsi/u14-34f.c +++ b/drivers/scsi/u14-34f.c | |||
@@ -405,7 +405,6 @@ | |||
405 | * the driver sets host->wish_block = TRUE for all ISA boards. | 405 | * the driver sets host->wish_block = TRUE for all ISA boards. |
406 | */ | 406 | */ |
407 | 407 | ||
408 | #include <linux/config.h> | ||
409 | #include <linux/string.h> | 408 | #include <linux/string.h> |
410 | #include <linux/kernel.h> | 409 | #include <linux/kernel.h> |
411 | #include <linux/ioport.h> | 410 | #include <linux/ioport.h> |
diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c index 27307fe5a4c8..680f38ab60d8 100644 --- a/drivers/scsi/wd33c93.c +++ b/drivers/scsi/wd33c93.c | |||
@@ -71,7 +71,6 @@ | |||
71 | * Richard Hirst <richard@sleepie.demon.co.uk> August 2000 | 71 | * Richard Hirst <richard@sleepie.demon.co.uk> August 2000 |
72 | */ | 72 | */ |
73 | 73 | ||
74 | #include <linux/config.h> | ||
75 | #include <linux/module.h> | 74 | #include <linux/module.h> |
76 | 75 | ||
77 | #include <linux/sched.h> | 76 | #include <linux/sched.h> |
diff --git a/drivers/scsi/wd33c93.h b/drivers/scsi/wd33c93.h index 193ec517d252..edcb0365cf0c 100644 --- a/drivers/scsi/wd33c93.h +++ b/drivers/scsi/wd33c93.h | |||
@@ -22,7 +22,6 @@ | |||
22 | #ifndef WD33C93_H | 22 | #ifndef WD33C93_H |
23 | #define WD33C93_H | 23 | #define WD33C93_H |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | 25 | ||
27 | #define PROC_INTERFACE /* add code for /proc/scsi/wd33c93/xxx interface */ | 26 | #define PROC_INTERFACE /* add code for /proc/scsi/wd33c93/xxx interface */ |
28 | #ifdef PROC_INTERFACE | 27 | #ifdef PROC_INTERFACE |
diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c index 9fd0de4b7afd..57438326b07f 100644 --- a/drivers/serial/21285.c +++ b/drivers/serial/21285.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * | 7 | * |
8 | * $Id: 21285.c,v 1.37 2002/07/28 10:03:27 rmk Exp $ | 8 | * $Id: 21285.c,v 1.37 2002/07/28 10:03:27 rmk Exp $ |
9 | */ | 9 | */ |
10 | #include <linux/config.h> | ||
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/tty.h> | 11 | #include <linux/tty.h> |
13 | #include <linux/ioport.h> | 12 | #include <linux/ioport.h> |
diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c index bff94541991c..993a702422ec 100644 --- a/drivers/serial/68328serial.c +++ b/drivers/serial/68328serial.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/tty.h> | 24 | #include <linux/tty.h> |
25 | #include <linux/tty_flip.h> | 25 | #include <linux/tty_flip.h> |
26 | #include <linux/config.h> | ||
27 | #include <linux/major.h> | 26 | #include <linux/major.h> |
28 | #include <linux/string.h> | 27 | #include <linux/string.h> |
29 | #include <linux/fcntl.h> | 28 | #include <linux/fcntl.h> |
diff --git a/drivers/serial/68328serial.h b/drivers/serial/68328serial.h index 978f8a609f3d..58aa2154655b 100644 --- a/drivers/serial/68328serial.h +++ b/drivers/serial/68328serial.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #ifndef _MC683XX_SERIAL_H | 11 | #ifndef _MC683XX_SERIAL_H |
12 | #define _MC683XX_SERIAL_H | 12 | #define _MC683XX_SERIAL_H |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | 14 | ||
16 | struct serial_struct { | 15 | struct serial_struct { |
17 | int type; | 16 | int type; |
diff --git a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c index 9843ae3d420e..e80e70e9b126 100644 --- a/drivers/serial/68360serial.c +++ b/drivers/serial/68360serial.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * int rs_360_init(void); | 20 | * int rs_360_init(void); |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
26 | #include <linux/signal.h> | 25 | #include <linux/signal.h> |
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index f361b356bd1d..9c5d36f50140 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * mapbase is the physical address of the IO port. | 19 | * mapbase is the physical address of the IO port. |
20 | * membase is an 'ioremapped' cookie. | 20 | * membase is an 'ioremapped' cookie. |
21 | */ | 21 | */ |
22 | #include <linux/config.h> | ||
23 | 22 | ||
24 | #if defined(CONFIG_SERIAL_8250_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 23 | #if defined(CONFIG_SERIAL_8250_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
25 | #define SUPPORT_SYSRQ | 24 | #define SUPPORT_SYSRQ |
diff --git a/drivers/serial/8250.h b/drivers/serial/8250.h index 490606b87095..91bd28f2bb47 100644 --- a/drivers/serial/8250.h +++ b/drivers/serial/8250.h | |||
@@ -15,7 +15,6 @@ | |||
15 | * $Id: 8250.h,v 1.8 2002/07/21 21:32:30 rmk Exp $ | 15 | * $Id: 8250.h,v 1.8 2002/07/21 21:32:30 rmk Exp $ |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/serial_8250.h> | 18 | #include <linux/serial_8250.h> |
20 | 19 | ||
21 | struct old_serial_port { | 20 | struct old_serial_port { |
diff --git a/drivers/serial/8250_mca.c b/drivers/serial/8250_mca.c index ac205256d5f3..d10be944ad44 100644 --- a/drivers/serial/8250_mca.c +++ b/drivers/serial/8250_mca.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * it under the terms of the GNU General Public License version 2 as | 8 | * it under the terms of the GNU General Public License version 2 as |
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
14 | #include <linux/mca.h> | 13 | #include <linux/mca.h> |
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index e920d196d0b1..7311d8487c96 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * required, these have to be supplied via some other means (eg, GPIO) | 31 | * required, these have to be supplied via some other means (eg, GPIO) |
32 | * and hooked into this driver. | 32 | * and hooked into this driver. |
33 | */ | 33 | */ |
34 | #include <linux/config.h> | ||
35 | 34 | ||
36 | #if defined(CONFIG_SERIAL_AMBA_PL010_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 35 | #if defined(CONFIG_SERIAL_AMBA_PL010_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
37 | #define SUPPORT_SYSRQ | 36 | #define SUPPORT_SYSRQ |
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index 3d966cfc9a38..a8d7124e84a1 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * required, these have to be supplied via some other means (eg, GPIO) | 31 | * required, these have to be supplied via some other means (eg, GPIO) |
32 | * and hooked into this driver. | 32 | * and hooked into this driver. |
33 | */ | 33 | */ |
34 | #include <linux/config.h> | ||
35 | 34 | ||
36 | #if defined(CONFIG_SERIAL_AMBA_PL011_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 35 | #if defined(CONFIG_SERIAL_AMBA_PL011_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
37 | #define SUPPORT_SYSRQ | 36 | #define SUPPORT_SYSRQ |
diff --git a/drivers/serial/at91_serial.c b/drivers/serial/at91_serial.c index df9500bdaded..7b3b3f3d5101 100644 --- a/drivers/serial/at91_serial.c +++ b/drivers/serial/at91_serial.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/tty.h> | 26 | #include <linux/tty.h> |
28 | #include <linux/ioport.h> | 27 | #include <linux/ioport.h> |
diff --git a/drivers/serial/clps711x.c b/drivers/serial/clps711x.c index 2691112c84ad..f27d852ce50d 100644 --- a/drivers/serial/clps711x.c +++ b/drivers/serial/clps711x.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * $Id: clps711x.c,v 1.42 2002/07/28 10:03:28 rmk Exp $ | 25 | * $Id: clps711x.c,v 1.42 2002/07/28 10:03:28 rmk Exp $ |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | #include <linux/config.h> | ||
29 | 28 | ||
30 | #if defined(CONFIG_SERIAL_CLPS711X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 29 | #if defined(CONFIG_SERIAL_CLPS711X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
31 | #define SUPPORT_SYSRQ | 30 | #define SUPPORT_SYSRQ |
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index 5cba59ad7dc5..90ff96e3339b 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
36 | #include <linux/tty.h> | 35 | #include <linux/tty.h> |
37 | #include <linux/ioport.h> | 36 | #include <linux/ioport.h> |
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/serial/cpm_uart/cpm_uart_cpm1.c index 17406a05ce1f..95afc37297a8 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c +++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/tty.h> | 31 | #include <linux/tty.h> |
33 | #include <linux/ioport.h> | 32 | #include <linux/ioport.h> |
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/drivers/serial/cpm_uart/cpm_uart_cpm2.c index cdba128250a9..ef3bb476c432 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c +++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/tty.h> | 31 | #include <linux/tty.h> |
33 | #include <linux/ioport.h> | 32 | #include <linux/ioport.h> |
diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c index b84137cdeb2b..901be3483455 100644 --- a/drivers/serial/crisv10.c +++ b/drivers/serial/crisv10.c | |||
@@ -425,7 +425,6 @@ | |||
425 | 425 | ||
426 | static char *serial_version = "$Revision: 1.25 $"; | 426 | static char *serial_version = "$Revision: 1.25 $"; |
427 | 427 | ||
428 | #include <linux/config.h> | ||
429 | #include <linux/types.h> | 428 | #include <linux/types.h> |
430 | #include <linux/errno.h> | 429 | #include <linux/errno.h> |
431 | #include <linux/signal.h> | 430 | #include <linux/signal.h> |
diff --git a/drivers/serial/crisv10.h b/drivers/serial/crisv10.h index 1800c0e7531a..f30b93d6ef79 100644 --- a/drivers/serial/crisv10.h +++ b/drivers/serial/crisv10.h | |||
@@ -7,7 +7,6 @@ | |||
7 | #ifndef _ETRAX_SERIAL_H | 7 | #ifndef _ETRAX_SERIAL_H |
8 | #define _ETRAX_SERIAL_H | 8 | #define _ETRAX_SERIAL_H |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/circ_buf.h> | 10 | #include <linux/circ_buf.h> |
12 | #include <asm/termios.h> | 11 | #include <asm/termios.h> |
13 | 12 | ||
diff --git a/drivers/serial/dz.c b/drivers/serial/dz.c index 466d06cc7d37..ecf824bd2d4e 100644 --- a/drivers/serial/dz.c +++ b/drivers/serial/dz.c | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | #undef DEBUG_DZ | 27 | #undef DEBUG_DZ |
28 | 28 | ||
29 | #include <linux/config.h> | ||
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
32 | #include <linux/init.h> | 31 | #include <linux/init.h> |
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c index 144a7a352b28..ad1e753cbc53 100644 --- a/drivers/serial/icom.c +++ b/drivers/serial/icom.c | |||
@@ -24,7 +24,6 @@ | |||
24 | */ | 24 | */ |
25 | #define SERIAL_DO_RESTART | 25 | #define SERIAL_DO_RESTART |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/config.h> | ||
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
29 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
30 | #include <linux/signal.h> | 29 | #include <linux/signal.h> |
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index da85bafa0942..0b5f39d038b9 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * [29-Mar-2005] Mike Lee | 25 | * [29-Mar-2005] Mike Lee |
26 | * Added hardware handshake | 26 | * Added hardware handshake |
27 | */ | 27 | */ |
28 | #include <linux/config.h> | ||
29 | 28 | ||
30 | #if defined(CONFIG_SERIAL_IMX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 29 | #if defined(CONFIG_SERIAL_IMX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
31 | #define SUPPORT_SYSRQ | 30 | #define SUPPORT_SYSRQ |
diff --git a/drivers/serial/ip22zilog.c b/drivers/serial/ip22zilog.c index 56b093ecd779..342042889f6e 100644 --- a/drivers/serial/ip22zilog.c +++ b/drivers/serial/ip22zilog.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * Copyright (C) 2002 Ralf Baechle (ralf@linux-mips.org) | 12 | * Copyright (C) 2002 Ralf Baechle (ralf@linux-mips.org) |
13 | * Copyright (C) 2002 David S. Miller (davem@redhat.com) | 13 | * Copyright (C) 2002 David S. Miller (davem@redhat.com) |
14 | */ | 14 | */ |
15 | #include <linux/config.h> | ||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c index 6a2a25d9b596..fbaae96f4c93 100644 --- a/drivers/serial/m32r_sio.c +++ b/drivers/serial/m32r_sio.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * membase is an 'ioremapped' cookie. This is compatible with the old | 25 | * membase is an 'ioremapped' cookie. This is compatible with the old |
26 | * serial.c driver, and is currently the preferred form. | 26 | * serial.c driver, and is currently the preferred form. |
27 | */ | 27 | */ |
28 | #include <linux/config.h> | ||
29 | 28 | ||
30 | #if defined(CONFIG_SERIAL_M32R_SIO_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 29 | #if defined(CONFIG_SERIAL_M32R_SIO_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
31 | #define SUPPORT_SYSRQ | 30 | #define SUPPORT_SYSRQ |
diff --git a/drivers/serial/m32r_sio.h b/drivers/serial/m32r_sio.h index 7c3ec24f7e50..849f1b2c2531 100644 --- a/drivers/serial/m32r_sio.h +++ b/drivers/serial/m32r_sio.h | |||
@@ -15,7 +15,6 @@ | |||
15 | * (at your option) any later version. | 15 | * (at your option) any later version. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | 18 | ||
20 | struct m32r_sio_probe { | 19 | struct m32r_sio_probe { |
21 | struct module *owner; | 20 | struct module *owner; |
diff --git a/drivers/serial/m32r_sio_reg.h b/drivers/serial/m32r_sio_reg.h index 9c864529451b..4671473793e3 100644 --- a/drivers/serial/m32r_sio_reg.h +++ b/drivers/serial/m32r_sio_reg.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #ifndef _M32R_SIO_REG_H | 15 | #ifndef _M32R_SIO_REG_H |
16 | #define _M32R_SIO_REG_H | 16 | #define _M32R_SIO_REG_H |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | 18 | ||
20 | #ifdef CONFIG_SERIAL_M32R_PLDSIO | 19 | #ifdef CONFIG_SERIAL_M32R_PLDSIO |
21 | 20 | ||
diff --git a/drivers/serial/mcfserial.h b/drivers/serial/mcfserial.h index a2b28e8629f9..56420e2cb110 100644 --- a/drivers/serial/mcfserial.h +++ b/drivers/serial/mcfserial.h | |||
@@ -14,7 +14,6 @@ | |||
14 | #ifndef _MCF_SERIAL_H | 14 | #ifndef _MCF_SERIAL_H |
15 | #define _MCF_SERIAL_H | 15 | #define _MCF_SERIAL_H |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/serial.h> | 17 | #include <linux/serial.h> |
19 | 18 | ||
20 | #ifdef __KERNEL__ | 19 | #ifdef __KERNEL__ |
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 1aa34844218c..1b8e554f674f 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
@@ -44,7 +44,6 @@ | |||
44 | * will be mapped to. | 44 | * will be mapped to. |
45 | */ | 45 | */ |
46 | 46 | ||
47 | #include <linux/config.h> | ||
48 | #include <linux/platform_device.h> | 47 | #include <linux/platform_device.h> |
49 | #include <linux/module.h> | 48 | #include <linux/module.h> |
50 | #include <linux/tty.h> | 49 | #include <linux/tty.h> |
diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c index 1cd102f84bfa..8c498f785e21 100644 --- a/drivers/serial/mpsc.c +++ b/drivers/serial/mpsc.c | |||
@@ -50,7 +50,6 @@ | |||
50 | * 4) AFAICT, hardware flow control isn't supported by the controller --MAG. | 50 | * 4) AFAICT, hardware flow control isn't supported by the controller --MAG. |
51 | */ | 51 | */ |
52 | 52 | ||
53 | #include <linux/config.h> | ||
54 | 53 | ||
55 | #if defined(CONFIG_SERIAL_MPSC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 54 | #if defined(CONFIG_SERIAL_MPSC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
56 | #define SUPPORT_SYSRQ | 55 | #define SUPPORT_SYSRQ |
diff --git a/drivers/serial/mux.c b/drivers/serial/mux.c index 64c0e89124c9..4a1c9983f38f 100644 --- a/drivers/serial/mux.c +++ b/drivers/serial/mux.c | |||
@@ -16,7 +16,6 @@ | |||
16 | ** | 16 | ** |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/module.h> | 19 | #include <linux/module.h> |
21 | #include <linux/tty.h> | 20 | #include <linux/tty.h> |
22 | #include <linux/ioport.h> | 21 | #include <linux/ioport.h> |
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index e3ba7e17a240..4d9435451f4a 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c | |||
@@ -42,7 +42,6 @@ | |||
42 | #undef DEBUG_HARD | 42 | #undef DEBUG_HARD |
43 | #undef USE_CTRL_O_SYSRQ | 43 | #undef USE_CTRL_O_SYSRQ |
44 | 44 | ||
45 | #include <linux/config.h> | ||
46 | #include <linux/module.h> | 45 | #include <linux/module.h> |
47 | #include <linux/tty.h> | 46 | #include <linux/tty.h> |
48 | 47 | ||
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index 0fa0ccc9ed27..a720953a404e 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * with the serial core maintainer satisfaction to appear soon. | 24 | * with the serial core maintainer satisfaction to appear soon. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | 27 | ||
29 | #if defined(CONFIG_SERIAL_PXA_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 28 | #if defined(CONFIG_SERIAL_PXA_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
30 | #define SUPPORT_SYSRQ | 29 | #define SUPPORT_SYSRQ |
@@ -390,7 +389,7 @@ static int serial_pxa_startup(struct uart_port *port) | |||
390 | 389 | ||
391 | /* | 390 | /* |
392 | * Finally, enable interrupts. Note: Modem status interrupts | 391 | * Finally, enable interrupts. Note: Modem status interrupts |
393 | * are set via set_termios(), which will be occuring imminently | 392 | * are set via set_termios(), which will be occurring imminently |
394 | * anyway, so we don't enable them here. | 393 | * anyway, so we don't enable them here. |
395 | */ | 394 | */ |
396 | up->ier = UART_IER_RLSI | UART_IER_RDI | UART_IER_RTOIE | UART_IER_UUE; | 395 | up->ier = UART_IER_RLSI | UART_IER_RDI | UART_IER_RTOIE | UART_IER_UUE; |
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c index 4c62ab949ecc..392bffcf96e8 100644 --- a/drivers/serial/s3c2410.c +++ b/drivers/serial/s3c2410.c | |||
@@ -55,7 +55,6 @@ | |||
55 | * BJD, 04-Nov-2004 | 55 | * BJD, 04-Nov-2004 |
56 | */ | 56 | */ |
57 | 57 | ||
58 | #include <linux/config.h> | ||
59 | 58 | ||
60 | #if defined(CONFIG_SERIAL_S3C2410_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 59 | #if defined(CONFIG_SERIAL_S3C2410_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
61 | #define SUPPORT_SYSRQ | 60 | #define SUPPORT_SYSRQ |
diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c index 8bbd8567669c..db3486d33870 100644 --- a/drivers/serial/sa1100.c +++ b/drivers/serial/sa1100.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * $Id: sa1100.c,v 1.50 2002/07/29 14:41:04 rmk Exp $ | 24 | * $Id: sa1100.c,v 1.50 2002/07/29 14:41:04 rmk Exp $ |
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | #include <linux/config.h> | ||
28 | 27 | ||
29 | #if defined(CONFIG_SERIAL_SA1100_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 28 | #if defined(CONFIG_SERIAL_SA1100_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
30 | #define SUPPORT_SYSRQ | 29 | #define SUPPORT_SYSRQ |
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 7dc1e67b6851..c54af8774393 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * along with this program; if not, write to the Free Software | 22 | * along with this program; if not, write to the Free Software |
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 | */ | 24 | */ |
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/tty.h> | 26 | #include <linux/tty.h> |
28 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index 2c70773543e0..cbf260bc225d 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c | |||
@@ -786,6 +786,7 @@ static struct pcmcia_device_id serial_ids[] = { | |||
786 | PCMCIA_DEVICE_CIS_PROD_ID12("ADVANTECH", "COMpad-32/85B-4", 0x96913a85, 0xcec8f102, "COMpad4.cis"), | 786 | PCMCIA_DEVICE_CIS_PROD_ID12("ADVANTECH", "COMpad-32/85B-4", 0x96913a85, 0xcec8f102, "COMpad4.cis"), |
787 | PCMCIA_DEVICE_CIS_PROD_ID123("ADVANTECH", "COMpad-32/85", "1.0", 0x96913a85, 0x8fbe92ae, 0x0877b627, "COMpad2.cis"), | 787 | PCMCIA_DEVICE_CIS_PROD_ID123("ADVANTECH", "COMpad-32/85", "1.0", 0x96913a85, 0x8fbe92ae, 0x0877b627, "COMpad2.cis"), |
788 | PCMCIA_DEVICE_CIS_PROD_ID2("RS-COM 2P", 0xad20b156, "RS-COM-2P.cis"), | 788 | PCMCIA_DEVICE_CIS_PROD_ID2("RS-COM 2P", 0xad20b156, "RS-COM-2P.cis"), |
789 | PCMCIA_DEVICE_CIS_MANF_CARD(0x0013, 0x0000, "GLOBETROTTER.cis"), | ||
789 | /* too generic */ | 790 | /* too generic */ |
790 | /* PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x0160, 0x0002), */ | 791 | /* PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x0160, 0x0002), */ |
791 | /* PCMCIA_MFC_DEVICE_MANF_CARD(1, 0x0160, 0x0002), */ | 792 | /* PCMCIA_MFC_DEVICE_MANF_CARD(1, 0x0160, 0x0002), */ |
diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c index 776d4ff06084..23ddedbaec08 100644 --- a/drivers/serial/serial_lh7a40x.c +++ b/drivers/serial/serial_lh7a40x.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | 30 | ||
32 | #if defined(CONFIG_SERIAL_LH7A40X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 31 | #if defined(CONFIG_SERIAL_LH7A40X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
33 | #define SUPPORT_SYSRQ | 32 | #define SUPPORT_SYSRQ |
diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c index a901a7e446f3..28c1881a6691 100644 --- a/drivers/serial/serial_txx9.c +++ b/drivers/serial/serial_txx9.c | |||
@@ -38,7 +38,6 @@ | |||
38 | * Fix some spin_locks. | 38 | * Fix some spin_locks. |
39 | * Do not call uart_add_one_port for absent ports. | 39 | * Do not call uart_add_one_port for absent ports. |
40 | */ | 40 | */ |
41 | #include <linux/config.h> | ||
42 | 41 | ||
43 | #if defined(CONFIG_SERIAL_TXX9_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 42 | #if defined(CONFIG_SERIAL_TXX9_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
44 | #define SUPPORT_SYSRQ | 43 | #define SUPPORT_SYSRQ |
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index d97f3ca6cc29..2509c3237e87 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -20,7 +20,6 @@ | |||
20 | 20 | ||
21 | #undef DEBUG | 21 | #undef DEBUG |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
26 | #include <linux/signal.h> | 25 | #include <linux/signal.h> |
diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h index 1f14bb4382f6..ab320fa3237c 100644 --- a/drivers/serial/sh-sci.h +++ b/drivers/serial/sh-sci.h | |||
@@ -10,7 +10,6 @@ | |||
10 | * Modified to support SH7300(SH-Mobile) SCIF. Takashi Kusuda (Jun 2003). | 10 | * Modified to support SH7300(SH-Mobile) SCIF. Takashi Kusuda (Jun 2003). |
11 | * Modified to support H8/300 Series Yoshinori Sato (Feb 2004). | 11 | * Modified to support H8/300 Series Yoshinori Sato (Feb 2004). |
12 | */ | 12 | */ |
13 | #include <linux/config.h> | ||
14 | #include <linux/serial_core.h> | 13 | #include <linux/serial_core.h> |
15 | 14 | ||
16 | #if defined(__H8300H__) || defined(__H8300S__) | 15 | #if defined(__H8300H__) || defined(__H8300S__) |
diff --git a/drivers/serial/sn_console.c b/drivers/serial/sn_console.c index 60ea4a3f0713..4b0afc8f12b9 100644 --- a/drivers/serial/sn_console.c +++ b/drivers/serial/sn_console.c | |||
@@ -37,7 +37,6 @@ | |||
37 | * http://oss.sgi.com/projects/GenInfo/NoticeExplan | 37 | * http://oss.sgi.com/projects/GenInfo/NoticeExplan |
38 | */ | 38 | */ |
39 | 39 | ||
40 | #include <linux/config.h> | ||
41 | #include <linux/interrupt.h> | 40 | #include <linux/interrupt.h> |
42 | #include <linux/tty.h> | 41 | #include <linux/tty.h> |
43 | #include <linux/serial.h> | 42 | #include <linux/serial.h> |
diff --git a/drivers/serial/suncore.c b/drivers/serial/suncore.c index fa4ae94243c2..e35d9ab359f1 100644 --- a/drivers/serial/suncore.c +++ b/drivers/serial/suncore.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * Copyright (C) 2002 David S. Miller (davem@redhat.com) | 10 | * Copyright (C) 2002 David S. Miller (davem@redhat.com) |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/console.h> | 15 | #include <linux/console.h> |
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c index d36bc4003399..f851f0f44f9b 100644 --- a/drivers/serial/sunhv.c +++ b/drivers/serial/sunhv.c | |||
@@ -20,8 +20,8 @@ | |||
20 | 20 | ||
21 | #include <asm/hypervisor.h> | 21 | #include <asm/hypervisor.h> |
22 | #include <asm/spitfire.h> | 22 | #include <asm/spitfire.h> |
23 | #include <asm/vdev.h> | 23 | #include <asm/prom.h> |
24 | #include <asm/oplib.h> | 24 | #include <asm/of_device.h> |
25 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
26 | 26 | ||
27 | #if defined(CONFIG_MAGIC_SYSRQ) | 27 | #if defined(CONFIG_MAGIC_SYSRQ) |
@@ -407,144 +407,120 @@ static inline struct console *SUNHV_CONSOLE(void) | |||
407 | return &sunhv_console; | 407 | return &sunhv_console; |
408 | } | 408 | } |
409 | 409 | ||
410 | static int __init hv_console_compatible(char *buf, int len) | 410 | static int __devinit hv_probe(struct of_device *op, const struct of_device_id *match) |
411 | { | ||
412 | while (len) { | ||
413 | int this_len; | ||
414 | |||
415 | if (!strcmp(buf, "qcn")) | ||
416 | return 1; | ||
417 | |||
418 | this_len = strlen(buf) + 1; | ||
419 | |||
420 | buf += this_len; | ||
421 | len -= this_len; | ||
422 | } | ||
423 | |||
424 | return 0; | ||
425 | } | ||
426 | |||
427 | static unsigned int __init get_interrupt(void) | ||
428 | { | ||
429 | struct device_node *dev_node; | ||
430 | |||
431 | dev_node = sun4v_vdev_root->child; | ||
432 | while (dev_node != NULL) { | ||
433 | struct property *prop; | ||
434 | |||
435 | if (strcmp(dev_node->name, "console")) | ||
436 | goto next_sibling; | ||
437 | |||
438 | prop = of_find_property(dev_node, "compatible", NULL); | ||
439 | if (!prop) | ||
440 | goto next_sibling; | ||
441 | |||
442 | if (hv_console_compatible(prop->value, prop->length)) | ||
443 | break; | ||
444 | |||
445 | next_sibling: | ||
446 | dev_node = dev_node->sibling; | ||
447 | } | ||
448 | if (!dev_node) | ||
449 | return 0; | ||
450 | |||
451 | /* Ok, the this is the OBP node for the sun4v hypervisor | ||
452 | * console device. Decode the interrupt. | ||
453 | */ | ||
454 | return sun4v_vdev_device_interrupt(dev_node); | ||
455 | } | ||
456 | |||
457 | static int __init sunhv_init(void) | ||
458 | { | 411 | { |
459 | struct uart_port *port; | 412 | struct uart_port *port; |
460 | int ret; | 413 | int err; |
461 | 414 | ||
462 | if (tlb_type != hypervisor) | 415 | if (op->irqs[0] == 0xffffffff) |
463 | return -ENODEV; | 416 | return -ENODEV; |
464 | 417 | ||
465 | port = kmalloc(sizeof(struct uart_port), GFP_KERNEL); | 418 | port = kzalloc(sizeof(struct uart_port), GFP_KERNEL); |
466 | if (unlikely(!port)) | 419 | if (unlikely(!port)) |
467 | return -ENOMEM; | 420 | return -ENOMEM; |
468 | 421 | ||
469 | memset(port, 0, sizeof(struct uart_port)); | 422 | sunhv_port = port; |
470 | 423 | ||
471 | port->line = 0; | 424 | port->line = 0; |
472 | port->ops = &sunhv_pops; | 425 | port->ops = &sunhv_pops; |
473 | port->type = PORT_SUNHV; | 426 | port->type = PORT_SUNHV; |
474 | port->uartclk = ( 29491200 / 16 ); /* arbitrary */ | 427 | port->uartclk = ( 29491200 / 16 ); /* arbitrary */ |
475 | 428 | ||
476 | /* Set this just to make uart_configure_port() happy. */ | ||
477 | port->membase = (unsigned char __iomem *) __pa(port); | 429 | port->membase = (unsigned char __iomem *) __pa(port); |
478 | 430 | ||
479 | port->irq = get_interrupt(); | 431 | port->irq = op->irqs[0]; |
480 | if (!port->irq) { | 432 | |
481 | kfree(port); | 433 | port->dev = &op->dev; |
482 | return -ENODEV; | ||
483 | } | ||
484 | 434 | ||
485 | sunhv_reg.minor = sunserial_current_minor; | 435 | sunhv_reg.minor = sunserial_current_minor; |
486 | sunhv_reg.nr = 1; | 436 | sunhv_reg.nr = 1; |
487 | 437 | ||
488 | ret = uart_register_driver(&sunhv_reg); | 438 | err = uart_register_driver(&sunhv_reg); |
489 | if (ret < 0) { | 439 | if (err) |
490 | printk(KERN_ERR "SUNHV: uart_register_driver() failed %d\n", | 440 | goto out_free_port; |
491 | ret); | ||
492 | kfree(port); | ||
493 | |||
494 | return ret; | ||
495 | } | ||
496 | 441 | ||
497 | sunhv_reg.tty_driver->name_base = sunhv_reg.minor - 64; | 442 | sunhv_reg.tty_driver->name_base = sunhv_reg.minor - 64; |
498 | sunserial_current_minor += 1; | 443 | sunserial_current_minor += 1; |
499 | 444 | ||
500 | sunhv_reg.cons = SUNHV_CONSOLE(); | 445 | sunhv_reg.cons = SUNHV_CONSOLE(); |
501 | 446 | ||
502 | sunhv_port = port; | 447 | err = uart_add_one_port(&sunhv_reg, port); |
448 | if (err) | ||
449 | goto out_unregister_driver; | ||
503 | 450 | ||
504 | ret = uart_add_one_port(&sunhv_reg, port); | 451 | err = request_irq(port->irq, sunhv_interrupt, 0, "hvcons", port); |
505 | if (ret < 0) { | 452 | if (err) |
506 | printk(KERN_ERR "SUNHV: uart_add_one_port() failed %d\n", ret); | 453 | goto out_remove_port; |
507 | sunserial_current_minor -= 1; | ||
508 | uart_unregister_driver(&sunhv_reg); | ||
509 | kfree(port); | ||
510 | sunhv_port = NULL; | ||
511 | return -ENODEV; | ||
512 | } | ||
513 | 454 | ||
514 | if (request_irq(port->irq, sunhv_interrupt, | 455 | dev_set_drvdata(&op->dev, port); |
515 | SA_SHIRQ, "serial(sunhv)", port)) { | ||
516 | printk(KERN_ERR "sunhv: Cannot register IRQ\n"); | ||
517 | uart_remove_one_port(&sunhv_reg, port); | ||
518 | sunserial_current_minor -= 1; | ||
519 | uart_unregister_driver(&sunhv_reg); | ||
520 | kfree(port); | ||
521 | sunhv_port = NULL; | ||
522 | return -ENODEV; | ||
523 | } | ||
524 | 456 | ||
525 | return 0; | 457 | return 0; |
458 | |||
459 | out_remove_port: | ||
460 | uart_remove_one_port(&sunhv_reg, port); | ||
461 | |||
462 | out_unregister_driver: | ||
463 | sunserial_current_minor -= 1; | ||
464 | uart_unregister_driver(&sunhv_reg); | ||
465 | |||
466 | out_free_port: | ||
467 | kfree(port); | ||
468 | sunhv_port = NULL; | ||
469 | return err; | ||
526 | } | 470 | } |
527 | 471 | ||
528 | static void __exit sunhv_exit(void) | 472 | static int __devexit hv_remove(struct of_device *dev) |
529 | { | 473 | { |
530 | struct uart_port *port = sunhv_port; | 474 | struct uart_port *port = dev_get_drvdata(&dev->dev); |
531 | |||
532 | BUG_ON(!port); | ||
533 | 475 | ||
534 | free_irq(port->irq, port); | 476 | free_irq(port->irq, port); |
535 | 477 | ||
536 | uart_remove_one_port(&sunhv_reg, port); | 478 | uart_remove_one_port(&sunhv_reg, port); |
537 | sunserial_current_minor -= 1; | ||
538 | 479 | ||
480 | sunserial_current_minor -= 1; | ||
539 | uart_unregister_driver(&sunhv_reg); | 481 | uart_unregister_driver(&sunhv_reg); |
540 | 482 | ||
541 | kfree(sunhv_port); | 483 | kfree(port); |
542 | sunhv_port = NULL; | 484 | sunhv_port = NULL; |
485 | |||
486 | dev_set_drvdata(&dev->dev, NULL); | ||
487 | |||
488 | return 0; | ||
489 | } | ||
490 | |||
491 | static struct of_device_id hv_match[] = { | ||
492 | { | ||
493 | .name = "console", | ||
494 | .compatible = "qcn", | ||
495 | }, | ||
496 | {}, | ||
497 | }; | ||
498 | MODULE_DEVICE_TABLE(of, hv_match); | ||
499 | |||
500 | static struct of_platform_driver hv_driver = { | ||
501 | .name = "hv", | ||
502 | .match_table = hv_match, | ||
503 | .probe = hv_probe, | ||
504 | .remove = __devexit_p(hv_remove), | ||
505 | }; | ||
506 | |||
507 | static int __init sunhv_init(void) | ||
508 | { | ||
509 | if (tlb_type != hypervisor) | ||
510 | return -ENODEV; | ||
511 | |||
512 | return of_register_driver(&hv_driver, &of_bus_type); | ||
513 | } | ||
514 | |||
515 | static void __exit sunhv_exit(void) | ||
516 | { | ||
517 | of_unregister_driver(&hv_driver); | ||
543 | } | 518 | } |
544 | 519 | ||
545 | module_init(sunhv_init); | 520 | module_init(sunhv_init); |
546 | module_exit(sunhv_exit); | 521 | module_exit(sunhv_exit); |
547 | 522 | ||
548 | MODULE_AUTHOR("David S. Miller"); | 523 | MODULE_AUTHOR("David S. Miller"); |
549 | MODULE_DESCRIPTION("SUN4V Hypervisor console driver") | 524 | MODULE_DESCRIPTION("SUN4V Hypervisor console driver"); |
525 | MODULE_VERSION("2.0"); | ||
550 | MODULE_LICENSE("GPL"); | 526 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index 7da02d11c364..20a48697727c 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* sunsab.c: ASYNC Driver for the SIEMENS SAB82532 DUSCC. | 1 | /* sunsab.c: ASYNC Driver for the SIEMENS SAB82532 DUSCC. |
2 | * | 2 | * |
3 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) | 3 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) |
4 | * Copyright (C) 2002 David S. Miller (davem@redhat.com) | 4 | * Copyright (C) 2002, 2006 David S. Miller (davem@davemloft.net) |
5 | * | 5 | * |
6 | * Rewrote buffer handling to use CIRC(Circular Buffer) macros. | 6 | * Rewrote buffer handling to use CIRC(Circular Buffer) macros. |
7 | * Maxim Krasnyanskiy <maxk@qualcomm.com> | 7 | * Maxim Krasnyanskiy <maxk@qualcomm.com> |
@@ -12,10 +12,9 @@ | |||
12 | * Theodore Ts'o <tytso@mit.edu>, 2001-Oct-12 | 12 | * Theodore Ts'o <tytso@mit.edu>, 2001-Oct-12 |
13 | * | 13 | * |
14 | * Ported to new 2.5.x UART layer. | 14 | * Ported to new 2.5.x UART layer. |
15 | * David S. Miller <davem@redhat.com> | 15 | * David S. Miller <davem@davemloft.net> |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/module.h> | 18 | #include <linux/module.h> |
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
@@ -37,8 +36,8 @@ | |||
37 | 36 | ||
38 | #include <asm/io.h> | 37 | #include <asm/io.h> |
39 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
40 | #include <asm/oplib.h> | 39 | #include <asm/prom.h> |
41 | #include <asm/ebus.h> | 40 | #include <asm/of_device.h> |
42 | 41 | ||
43 | #if defined(CONFIG_SERIAL_SUNZILOG_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 42 | #if defined(CONFIG_SERIAL_SUNZILOG_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
44 | #define SUPPORT_SYSRQ | 43 | #define SUPPORT_SYSRQ |
@@ -976,199 +975,188 @@ static inline struct console *SUNSAB_CONSOLE(void) | |||
976 | #define sunsab_console_init() do { } while (0) | 975 | #define sunsab_console_init() do { } while (0) |
977 | #endif | 976 | #endif |
978 | 977 | ||
979 | static void __init for_each_sab_edev(void (*callback)(struct linux_ebus_device *, void *), void *arg) | 978 | static int __devinit sunsab_init_one(struct uart_sunsab_port *up, |
979 | struct of_device *op, | ||
980 | unsigned long offset, | ||
981 | int line) | ||
980 | { | 982 | { |
981 | struct linux_ebus *ebus; | 983 | up->port.line = line; |
982 | struct linux_ebus_device *edev = NULL; | 984 | up->port.dev = &op->dev; |
983 | 985 | ||
984 | for_each_ebus(ebus) { | 986 | up->port.mapbase = op->resource[0].start + offset; |
985 | for_each_ebusdev(edev, ebus) { | 987 | up->port.membase = of_ioremap(&op->resource[0], offset, |
986 | if (!strcmp(edev->prom_node->name, "se")) { | 988 | sizeof(union sab82532_async_regs), |
987 | callback(edev, arg); | 989 | "sab"); |
988 | continue; | 990 | if (!up->port.membase) |
989 | } else if (!strcmp(edev->prom_node->name, "serial")) { | 991 | return -ENOMEM; |
990 | char *compat; | 992 | up->regs = (union sab82532_async_regs __iomem *) up->port.membase; |
991 | int clen; | ||
992 | |||
993 | /* On RIO this can be an SE, check it. We could | ||
994 | * just check ebus->is_rio, but this is more portable. | ||
995 | */ | ||
996 | compat = of_get_property(edev->prom_node, | ||
997 | "compatible", &clen); | ||
998 | if (compat && clen > 0) { | ||
999 | if (strncmp(compat, "sab82532", 8) == 0) { | ||
1000 | callback(edev, arg); | ||
1001 | continue; | ||
1002 | } | ||
1003 | } | ||
1004 | } | ||
1005 | } | ||
1006 | } | ||
1007 | } | ||
1008 | 993 | ||
1009 | static void __init sab_count_callback(struct linux_ebus_device *edev, void *arg) | 994 | up->port.irq = op->irqs[0]; |
1010 | { | ||
1011 | int *count_p = arg; | ||
1012 | 995 | ||
1013 | (*count_p)++; | 996 | up->port.fifosize = SAB82532_XMIT_FIFO_SIZE; |
1014 | } | 997 | up->port.iotype = UPIO_MEM; |
1015 | 998 | ||
1016 | static void __init sab_attach_callback(struct linux_ebus_device *edev, void *arg) | 999 | writeb(SAB82532_IPC_IC_ACT_LOW, &up->regs->w.ipc); |
1017 | { | ||
1018 | int *instance_p = arg; | ||
1019 | struct uart_sunsab_port *up; | ||
1020 | unsigned long regs, offset; | ||
1021 | int i; | ||
1022 | 1000 | ||
1023 | /* Note: ports are located in reverse order */ | 1001 | up->port.ops = &sunsab_pops; |
1024 | regs = edev->resource[0].start; | 1002 | up->port.type = PORT_SUNSAB; |
1025 | offset = sizeof(union sab82532_async_regs); | 1003 | up->port.uartclk = SAB_BASE_BAUD; |
1026 | for (i = 0; i < 2; i++) { | ||
1027 | up = &sunsab_ports[(*instance_p * 2) + 1 - i]; | ||
1028 | 1004 | ||
1029 | memset(up, 0, sizeof(*up)); | 1005 | up->type = readb(&up->regs->r.vstr) & 0x0f; |
1030 | up->regs = ioremap(regs + offset, sizeof(union sab82532_async_regs)); | 1006 | writeb(~((1 << 1) | (1 << 2) | (1 << 4)), &up->regs->w.pcr); |
1031 | up->port.irq = edev->irqs[0]; | 1007 | writeb(0xff, &up->regs->w.pim); |
1032 | up->port.fifosize = SAB82532_XMIT_FIFO_SIZE; | 1008 | if ((up->port.line & 0x1) == 0) { |
1033 | up->port.mapbase = (unsigned long)up->regs; | 1009 | up->pvr_dsr_bit = (1 << 0); |
1034 | up->port.iotype = UPIO_MEM; | 1010 | up->pvr_dtr_bit = (1 << 1); |
1011 | } else { | ||
1012 | up->pvr_dsr_bit = (1 << 3); | ||
1013 | up->pvr_dtr_bit = (1 << 2); | ||
1014 | } | ||
1015 | up->cached_pvr = (1 << 1) | (1 << 2) | (1 << 4); | ||
1016 | writeb(up->cached_pvr, &up->regs->w.pvr); | ||
1017 | up->cached_mode = readb(&up->regs->rw.mode); | ||
1018 | up->cached_mode |= SAB82532_MODE_FRTS; | ||
1019 | writeb(up->cached_mode, &up->regs->rw.mode); | ||
1020 | up->cached_mode |= SAB82532_MODE_RTS; | ||
1021 | writeb(up->cached_mode, &up->regs->rw.mode); | ||
1035 | 1022 | ||
1036 | writeb(SAB82532_IPC_IC_ACT_LOW, &up->regs->w.ipc); | 1023 | up->tec_timeout = SAB82532_MAX_TEC_TIMEOUT; |
1024 | up->cec_timeout = SAB82532_MAX_CEC_TIMEOUT; | ||
1037 | 1025 | ||
1038 | offset -= sizeof(union sab82532_async_regs); | 1026 | if (!(up->port.line & 0x01)) { |
1027 | int err; | ||
1028 | |||
1029 | err = request_irq(up->port.irq, sunsab_interrupt, | ||
1030 | SA_SHIRQ, "sab", up); | ||
1031 | if (err) { | ||
1032 | of_iounmap(up->port.membase, | ||
1033 | sizeof(union sab82532_async_regs)); | ||
1034 | return err; | ||
1035 | } | ||
1039 | } | 1036 | } |
1040 | 1037 | ||
1041 | (*instance_p)++; | 1038 | return 0; |
1042 | } | 1039 | } |
1043 | 1040 | ||
1044 | static int __init probe_for_sabs(void) | 1041 | static int __devinit sab_probe(struct of_device *op, const struct of_device_id *match) |
1045 | { | 1042 | { |
1046 | int this_sab = 0; | 1043 | static int inst; |
1044 | struct uart_sunsab_port *up; | ||
1045 | int err; | ||
1046 | |||
1047 | up = &sunsab_ports[inst * 2]; | ||
1048 | |||
1049 | err = sunsab_init_one(&up[0], op, | ||
1050 | sizeof(union sab82532_async_regs), | ||
1051 | (inst * 2) + 0); | ||
1052 | if (err) | ||
1053 | return err; | ||
1054 | |||
1055 | err = sunsab_init_one(&up[0], op, 0, | ||
1056 | (inst * 2) + 1); | ||
1057 | if (err) { | ||
1058 | of_iounmap(up[0].port.membase, | ||
1059 | sizeof(union sab82532_async_regs)); | ||
1060 | free_irq(up[0].port.irq, &up[0]); | ||
1061 | return err; | ||
1062 | } | ||
1047 | 1063 | ||
1048 | /* Find device instances. */ | 1064 | uart_add_one_port(&sunsab_reg, &up[0].port); |
1049 | for_each_sab_edev(&sab_count_callback, &this_sab); | 1065 | uart_add_one_port(&sunsab_reg, &up[1].port); |
1050 | if (!this_sab) | ||
1051 | return -ENODEV; | ||
1052 | 1066 | ||
1053 | /* Allocate tables. */ | 1067 | dev_set_drvdata(&op->dev, &up[0]); |
1054 | sunsab_ports = kmalloc(sizeof(struct uart_sunsab_port) * this_sab * 2, | ||
1055 | GFP_KERNEL); | ||
1056 | if (!sunsab_ports) | ||
1057 | return -ENOMEM; | ||
1058 | 1068 | ||
1059 | num_channels = this_sab * 2; | 1069 | inst++; |
1060 | 1070 | ||
1061 | this_sab = 0; | ||
1062 | for_each_sab_edev(&sab_attach_callback, &this_sab); | ||
1063 | return 0; | 1071 | return 0; |
1064 | } | 1072 | } |
1065 | 1073 | ||
1066 | static void __init sunsab_init_hw(void) | 1074 | static void __devexit sab_remove_one(struct uart_sunsab_port *up) |
1067 | { | 1075 | { |
1068 | int i; | 1076 | uart_remove_one_port(&sunsab_reg, &up->port); |
1069 | 1077 | if (!(up->port.line & 1)) | |
1070 | for (i = 0; i < num_channels; i++) { | 1078 | free_irq(up->port.irq, up); |
1071 | struct uart_sunsab_port *up = &sunsab_ports[i]; | 1079 | of_iounmap(up->port.membase, |
1072 | 1080 | sizeof(union sab82532_async_regs)); | |
1073 | up->port.line = i; | ||
1074 | up->port.ops = &sunsab_pops; | ||
1075 | up->port.type = PORT_SUNSAB; | ||
1076 | up->port.uartclk = SAB_BASE_BAUD; | ||
1077 | |||
1078 | up->type = readb(&up->regs->r.vstr) & 0x0f; | ||
1079 | writeb(~((1 << 1) | (1 << 2) | (1 << 4)), &up->regs->w.pcr); | ||
1080 | writeb(0xff, &up->regs->w.pim); | ||
1081 | if (up->port.line == 0) { | ||
1082 | up->pvr_dsr_bit = (1 << 0); | ||
1083 | up->pvr_dtr_bit = (1 << 1); | ||
1084 | } else { | ||
1085 | up->pvr_dsr_bit = (1 << 3); | ||
1086 | up->pvr_dtr_bit = (1 << 2); | ||
1087 | } | ||
1088 | up->cached_pvr = (1 << 1) | (1 << 2) | (1 << 4); | ||
1089 | writeb(up->cached_pvr, &up->regs->w.pvr); | ||
1090 | up->cached_mode = readb(&up->regs->rw.mode); | ||
1091 | up->cached_mode |= SAB82532_MODE_FRTS; | ||
1092 | writeb(up->cached_mode, &up->regs->rw.mode); | ||
1093 | up->cached_mode |= SAB82532_MODE_RTS; | ||
1094 | writeb(up->cached_mode, &up->regs->rw.mode); | ||
1095 | |||
1096 | up->tec_timeout = SAB82532_MAX_TEC_TIMEOUT; | ||
1097 | up->cec_timeout = SAB82532_MAX_CEC_TIMEOUT; | ||
1098 | |||
1099 | if (!(up->port.line & 0x01)) { | ||
1100 | if (request_irq(up->port.irq, sunsab_interrupt, | ||
1101 | SA_SHIRQ, "serial(sab82532)", up)) { | ||
1102 | printk("sunsab%d: can't get IRQ %x\n", | ||
1103 | i, up->port.irq); | ||
1104 | continue; | ||
1105 | } | ||
1106 | } | ||
1107 | } | ||
1108 | } | 1081 | } |
1109 | 1082 | ||
1110 | static int __init sunsab_init(void) | 1083 | static int __devexit sab_remove(struct of_device *op) |
1111 | { | 1084 | { |
1112 | int ret = probe_for_sabs(); | 1085 | struct uart_sunsab_port *up = dev_get_drvdata(&op->dev); |
1113 | int i; | ||
1114 | |||
1115 | if (ret < 0) | ||
1116 | return ret; | ||
1117 | 1086 | ||
1118 | sunsab_init_hw(); | 1087 | sab_remove_one(&up[0]); |
1088 | sab_remove_one(&up[1]); | ||
1119 | 1089 | ||
1120 | sunsab_reg.minor = sunserial_current_minor; | 1090 | dev_set_drvdata(&op->dev, NULL); |
1121 | sunsab_reg.nr = num_channels; | ||
1122 | 1091 | ||
1123 | ret = uart_register_driver(&sunsab_reg); | 1092 | return 0; |
1124 | if (ret < 0) { | 1093 | } |
1125 | int i; | ||
1126 | 1094 | ||
1127 | for (i = 0; i < num_channels; i++) { | 1095 | static struct of_device_id sab_match[] = { |
1128 | struct uart_sunsab_port *up = &sunsab_ports[i]; | 1096 | { |
1097 | .name = "se", | ||
1098 | }, | ||
1099 | { | ||
1100 | .name = "serial", | ||
1101 | .compatible = "sab82532", | ||
1102 | }, | ||
1103 | {}, | ||
1104 | }; | ||
1105 | MODULE_DEVICE_TABLE(of, sab_match); | ||
1129 | 1106 | ||
1130 | if (!(up->port.line & 0x01)) | 1107 | static struct of_platform_driver sab_driver = { |
1131 | free_irq(up->port.irq, up); | 1108 | .name = "sab", |
1132 | iounmap(up->regs); | 1109 | .match_table = sab_match, |
1133 | } | 1110 | .probe = sab_probe, |
1134 | kfree(sunsab_ports); | 1111 | .remove = __devexit_p(sab_remove), |
1135 | sunsab_ports = NULL; | 1112 | }; |
1136 | 1113 | ||
1137 | return ret; | 1114 | static int __init sunsab_init(void) |
1115 | { | ||
1116 | struct device_node *dp; | ||
1117 | int err; | ||
1118 | |||
1119 | num_channels = 0; | ||
1120 | for_each_node_by_name(dp, "su") | ||
1121 | num_channels += 2; | ||
1122 | for_each_node_by_name(dp, "serial") { | ||
1123 | if (of_device_is_compatible(dp, "sab82532")) | ||
1124 | num_channels += 2; | ||
1138 | } | 1125 | } |
1139 | 1126 | ||
1140 | sunsab_reg.tty_driver->name_base = sunsab_reg.minor - 64; | 1127 | if (num_channels) { |
1128 | sunsab_ports = kzalloc(sizeof(struct uart_sunsab_port) * | ||
1129 | num_channels, GFP_KERNEL); | ||
1130 | if (!sunsab_ports) | ||
1131 | return -ENOMEM; | ||
1141 | 1132 | ||
1142 | sunsab_reg.cons = SUNSAB_CONSOLE(); | 1133 | sunsab_reg.minor = sunserial_current_minor; |
1134 | sunsab_reg.nr = num_channels; | ||
1143 | 1135 | ||
1144 | sunserial_current_minor += num_channels; | 1136 | err = uart_register_driver(&sunsab_reg); |
1145 | 1137 | if (err) { | |
1146 | for (i = 0; i < num_channels; i++) { | 1138 | kfree(sunsab_ports); |
1147 | struct uart_sunsab_port *up = &sunsab_ports[i]; | 1139 | sunsab_ports = NULL; |
1148 | 1140 | ||
1149 | uart_add_one_port(&sunsab_reg, &up->port); | 1141 | return err; |
1142 | } | ||
1143 | |||
1144 | sunsab_reg.tty_driver->name_base = sunsab_reg.minor - 64; | ||
1145 | sunsab_reg.cons = SUNSAB_CONSOLE(); | ||
1146 | sunserial_current_minor += num_channels; | ||
1150 | } | 1147 | } |
1151 | 1148 | ||
1152 | return 0; | 1149 | return of_register_driver(&sab_driver, &of_bus_type); |
1153 | } | 1150 | } |
1154 | 1151 | ||
1155 | static void __exit sunsab_exit(void) | 1152 | static void __exit sunsab_exit(void) |
1156 | { | 1153 | { |
1157 | int i; | 1154 | of_unregister_driver(&sab_driver); |
1158 | 1155 | if (num_channels) { | |
1159 | for (i = 0; i < num_channels; i++) { | 1156 | sunserial_current_minor -= num_channels; |
1160 | struct uart_sunsab_port *up = &sunsab_ports[i]; | 1157 | uart_unregister_driver(&sunsab_reg); |
1161 | |||
1162 | uart_remove_one_port(&sunsab_reg, &up->port); | ||
1163 | |||
1164 | if (!(up->port.line & 0x01)) | ||
1165 | free_irq(up->port.irq, up); | ||
1166 | iounmap(up->regs); | ||
1167 | } | 1158 | } |
1168 | 1159 | ||
1169 | sunserial_current_minor -= num_channels; | ||
1170 | uart_unregister_driver(&sunsab_reg); | ||
1171 | |||
1172 | kfree(sunsab_ports); | 1160 | kfree(sunsab_ports); |
1173 | sunsab_ports = NULL; | 1161 | sunsab_ports = NULL; |
1174 | } | 1162 | } |
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 6e28c25138cf..eabf477fee95 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
@@ -12,10 +12,9 @@ | |||
12 | * Theodore Ts'o <tytso@mit.edu>, 2001-Oct-12 | 12 | * Theodore Ts'o <tytso@mit.edu>, 2001-Oct-12 |
13 | * | 13 | * |
14 | * Converted to new 2.5.x UART layer. | 14 | * Converted to new 2.5.x UART layer. |
15 | * David S. Miller (davem@redhat.com), 2002-Jul-29 | 15 | * David S. Miller (davem@davemloft.net), 2002-Jul-29 |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/module.h> | 18 | #include <linux/module.h> |
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
@@ -40,11 +39,8 @@ | |||
40 | 39 | ||
41 | #include <asm/io.h> | 40 | #include <asm/io.h> |
42 | #include <asm/irq.h> | 41 | #include <asm/irq.h> |
43 | #include <asm/oplib.h> | 42 | #include <asm/prom.h> |
44 | #include <asm/ebus.h> | 43 | #include <asm/of_device.h> |
45 | #ifdef CONFIG_SPARC64 | ||
46 | #include <asm/isa.h> | ||
47 | #endif | ||
48 | 44 | ||
49 | #if defined(CONFIG_SERIAL_SUNSU_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 45 | #if defined(CONFIG_SERIAL_SUNSU_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
50 | #define SUPPORT_SYSRQ | 46 | #define SUPPORT_SYSRQ |
@@ -94,10 +90,10 @@ struct uart_sunsu_port { | |||
94 | /* Probing information. */ | 90 | /* Probing information. */ |
95 | enum su_type su_type; | 91 | enum su_type su_type; |
96 | unsigned int type_probed; /* XXX Stupid */ | 92 | unsigned int type_probed; /* XXX Stupid */ |
97 | int port_node; | 93 | unsigned long reg_size; |
98 | 94 | ||
99 | #ifdef CONFIG_SERIO | 95 | #ifdef CONFIG_SERIO |
100 | struct serio *serio; | 96 | struct serio serio; |
101 | int serio_open; | 97 | int serio_open; |
102 | #endif | 98 | #endif |
103 | }; | 99 | }; |
@@ -509,7 +505,7 @@ static void receive_kbd_ms_chars(struct uart_sunsu_port *up, struct pt_regs *reg | |||
509 | /* Stop-A is handled by drivers/char/keyboard.c now. */ | 505 | /* Stop-A is handled by drivers/char/keyboard.c now. */ |
510 | if (up->su_type == SU_PORT_KBD) { | 506 | if (up->su_type == SU_PORT_KBD) { |
511 | #ifdef CONFIG_SERIO | 507 | #ifdef CONFIG_SERIO |
512 | serio_interrupt(up->serio, ch, 0, regs); | 508 | serio_interrupt(&up->serio, ch, 0, regs); |
513 | #endif | 509 | #endif |
514 | } else if (up->su_type == SU_PORT_MS) { | 510 | } else if (up->su_type == SU_PORT_MS) { |
515 | int ret = suncore_mouse_baud_detection(ch, is_break); | 511 | int ret = suncore_mouse_baud_detection(ch, is_break); |
@@ -523,7 +519,7 @@ static void receive_kbd_ms_chars(struct uart_sunsu_port *up, struct pt_regs *reg | |||
523 | 519 | ||
524 | case 0: | 520 | case 0: |
525 | #ifdef CONFIG_SERIO | 521 | #ifdef CONFIG_SERIO |
526 | serio_interrupt(up->serio, ch, 0, regs); | 522 | serio_interrupt(&up->serio, ch, 0, regs); |
527 | #endif | 523 | #endif |
528 | break; | 524 | break; |
529 | }; | 525 | }; |
@@ -1031,99 +1027,14 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up) | |||
1031 | { | 1027 | { |
1032 | unsigned char status1, status2, scratch, scratch2, scratch3; | 1028 | unsigned char status1, status2, scratch, scratch2, scratch3; |
1033 | unsigned char save_lcr, save_mcr; | 1029 | unsigned char save_lcr, save_mcr; |
1034 | struct linux_ebus_device *dev = NULL; | ||
1035 | struct linux_ebus *ebus; | ||
1036 | #ifdef CONFIG_SPARC64 | ||
1037 | struct sparc_isa_bridge *isa_br; | ||
1038 | struct sparc_isa_device *isa_dev; | ||
1039 | #endif | ||
1040 | #ifndef CONFIG_SPARC64 | ||
1041 | struct linux_prom_registers reg0; | ||
1042 | #endif | ||
1043 | unsigned long flags; | 1030 | unsigned long flags; |
1044 | 1031 | ||
1045 | if (!up->port_node || !up->su_type) | 1032 | if (up->su_type == SU_PORT_NONE) |
1046 | return; | 1033 | return; |
1047 | 1034 | ||
1048 | up->type_probed = PORT_UNKNOWN; | 1035 | up->type_probed = PORT_UNKNOWN; |
1049 | up->port.iotype = UPIO_MEM; | 1036 | up->port.iotype = UPIO_MEM; |
1050 | 1037 | ||
1051 | /* | ||
1052 | * First we look for Ebus-bases su's | ||
1053 | */ | ||
1054 | for_each_ebus(ebus) { | ||
1055 | for_each_ebusdev(dev, ebus) { | ||
1056 | if (dev->prom_node->node == up->port_node) { | ||
1057 | /* | ||
1058 | * The EBus is broken on sparc; it delivers | ||
1059 | * virtual addresses in resources. Oh well... | ||
1060 | * This is correct on sparc64, though. | ||
1061 | */ | ||
1062 | up->port.membase = (char *) dev->resource[0].start; | ||
1063 | /* | ||
1064 | * This is correct on both architectures. | ||
1065 | */ | ||
1066 | up->port.mapbase = dev->resource[0].start; | ||
1067 | up->port.irq = dev->irqs[0]; | ||
1068 | goto ebus_done; | ||
1069 | } | ||
1070 | } | ||
1071 | } | ||
1072 | |||
1073 | #ifdef CONFIG_SPARC64 | ||
1074 | for_each_isa(isa_br) { | ||
1075 | for_each_isadev(isa_dev, isa_br) { | ||
1076 | if (isa_dev->prom_node->node == up->port_node) { | ||
1077 | /* Same on sparc64. Cool architecure... */ | ||
1078 | up->port.membase = (char *) isa_dev->resource.start; | ||
1079 | up->port.mapbase = isa_dev->resource.start; | ||
1080 | up->port.irq = isa_dev->irq; | ||
1081 | goto ebus_done; | ||
1082 | } | ||
1083 | } | ||
1084 | } | ||
1085 | #endif | ||
1086 | |||
1087 | #ifdef CONFIG_SPARC64 | ||
1088 | /* | ||
1089 | * Not on Ebus, bailing. | ||
1090 | */ | ||
1091 | return; | ||
1092 | #else | ||
1093 | /* | ||
1094 | * Not on Ebus, must be OBIO. | ||
1095 | */ | ||
1096 | if (prom_getproperty(up->port_node, "reg", | ||
1097 | (char *)®0, sizeof(reg0)) == -1) { | ||
1098 | prom_printf("sunsu: no \"reg\" property\n"); | ||
1099 | return; | ||
1100 | } | ||
1101 | prom_apply_obio_ranges(®0, 1); | ||
1102 | if (reg0.which_io != 0) { /* Just in case... */ | ||
1103 | prom_printf("sunsu: bus number nonzero: 0x%x:%x\n", | ||
1104 | reg0.which_io, reg0.phys_addr); | ||
1105 | return; | ||
1106 | } | ||
1107 | up->port.mapbase = reg0.phys_addr; | ||
1108 | if ((up->port.membase = ioremap(reg0.phys_addr, reg0.reg_size)) == 0) { | ||
1109 | prom_printf("sunsu: Cannot map registers.\n"); | ||
1110 | return; | ||
1111 | } | ||
1112 | |||
1113 | /* | ||
1114 | * 0x20 is sun4m thing, Dave Redman heritage. | ||
1115 | * See arch/sparc/kernel/irq.c. | ||
1116 | */ | ||
1117 | #define IRQ_4M(n) ((n)|0x20) | ||
1118 | |||
1119 | /* | ||
1120 | * There is no intr property on MrCoffee, so hardwire it. | ||
1121 | */ | ||
1122 | up->port.irq = IRQ_4M(13); | ||
1123 | #endif | ||
1124 | |||
1125 | ebus_done: | ||
1126 | |||
1127 | spin_lock_irqsave(&up->port.lock, flags); | 1038 | spin_lock_irqsave(&up->port.lock, flags); |
1128 | 1039 | ||
1129 | if (!(up->port.flags & UPF_BUGGY_UART)) { | 1040 | if (!(up->port.flags & UPF_BUGGY_UART)) { |
@@ -1269,18 +1180,13 @@ static struct uart_driver sunsu_reg = { | |||
1269 | .major = TTY_MAJOR, | 1180 | .major = TTY_MAJOR, |
1270 | }; | 1181 | }; |
1271 | 1182 | ||
1272 | static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel) | 1183 | static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up) |
1273 | { | 1184 | { |
1274 | int quot, baud; | 1185 | int quot, baud; |
1275 | #ifdef CONFIG_SERIO | 1186 | #ifdef CONFIG_SERIO |
1276 | struct serio *serio; | 1187 | struct serio *serio; |
1277 | #endif | 1188 | #endif |
1278 | 1189 | ||
1279 | spin_lock_init(&up->port.lock); | ||
1280 | up->port.line = channel; | ||
1281 | up->port.type = PORT_UNKNOWN; | ||
1282 | up->port.uartclk = (SU_BASE_BAUD * 16); | ||
1283 | |||
1284 | if (up->su_type == SU_PORT_KBD) { | 1190 | if (up->su_type == SU_PORT_KBD) { |
1285 | up->cflag = B1200 | CS8 | CLOCAL | CREAD; | 1191 | up->cflag = B1200 | CS8 | CLOCAL | CREAD; |
1286 | baud = 1200; | 1192 | baud = 1200; |
@@ -1292,41 +1198,31 @@ static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel) | |||
1292 | 1198 | ||
1293 | sunsu_autoconfig(up); | 1199 | sunsu_autoconfig(up); |
1294 | if (up->port.type == PORT_UNKNOWN) | 1200 | if (up->port.type == PORT_UNKNOWN) |
1295 | return -1; | 1201 | return -ENODEV; |
1296 | |||
1297 | printk(KERN_INFO "su%d at 0x%p (irq = %d) is a %s\n", | ||
1298 | channel, | ||
1299 | up->port.membase, up->port.irq, | ||
1300 | sunsu_type(&up->port)); | ||
1301 | 1202 | ||
1302 | #ifdef CONFIG_SERIO | 1203 | #ifdef CONFIG_SERIO |
1303 | up->serio = serio = kmalloc(sizeof(struct serio), GFP_KERNEL); | 1204 | serio = &up->serio; |
1304 | if (serio) { | 1205 | serio->port_data = up; |
1305 | memset(serio, 0, sizeof(*serio)); | ||
1306 | |||
1307 | serio->port_data = up; | ||
1308 | |||
1309 | serio->id.type = SERIO_RS232; | ||
1310 | if (up->su_type == SU_PORT_KBD) { | ||
1311 | serio->id.proto = SERIO_SUNKBD; | ||
1312 | strlcpy(serio->name, "sukbd", sizeof(serio->name)); | ||
1313 | } else { | ||
1314 | serio->id.proto = SERIO_SUN; | ||
1315 | serio->id.extra = 1; | ||
1316 | strlcpy(serio->name, "sums", sizeof(serio->name)); | ||
1317 | } | ||
1318 | strlcpy(serio->phys, (channel == 0 ? "su/serio0" : "su/serio1"), | ||
1319 | sizeof(serio->phys)); | ||
1320 | |||
1321 | serio->write = sunsu_serio_write; | ||
1322 | serio->open = sunsu_serio_open; | ||
1323 | serio->close = sunsu_serio_close; | ||
1324 | 1206 | ||
1325 | serio_register_port(serio); | 1207 | serio->id.type = SERIO_RS232; |
1208 | if (up->su_type == SU_PORT_KBD) { | ||
1209 | serio->id.proto = SERIO_SUNKBD; | ||
1210 | strlcpy(serio->name, "sukbd", sizeof(serio->name)); | ||
1326 | } else { | 1211 | } else { |
1327 | printk(KERN_WARNING "su%d: not enough memory for serio port\n", | 1212 | serio->id.proto = SERIO_SUN; |
1328 | channel); | 1213 | serio->id.extra = 1; |
1214 | strlcpy(serio->name, "sums", sizeof(serio->name)); | ||
1329 | } | 1215 | } |
1216 | strlcpy(serio->phys, | ||
1217 | (!(up->port.line & 1) ? "su/serio0" : "su/serio1"), | ||
1218 | sizeof(serio->phys)); | ||
1219 | |||
1220 | serio->write = sunsu_serio_write; | ||
1221 | serio->open = sunsu_serio_open; | ||
1222 | serio->close = sunsu_serio_close; | ||
1223 | serio->dev.parent = up->port.dev; | ||
1224 | |||
1225 | serio_register_port(serio); | ||
1330 | #endif | 1226 | #endif |
1331 | 1227 | ||
1332 | sunsu_change_speed(&up->port, up->cflag, 0, quot); | 1228 | sunsu_change_speed(&up->port, up->cflag, 0, quot); |
@@ -1458,22 +1354,20 @@ static struct console sunsu_cons = { | |||
1458 | * Register console. | 1354 | * Register console. |
1459 | */ | 1355 | */ |
1460 | 1356 | ||
1461 | static inline struct console *SUNSU_CONSOLE(void) | 1357 | static inline struct console *SUNSU_CONSOLE(int num_uart) |
1462 | { | 1358 | { |
1463 | int i; | 1359 | int i; |
1464 | 1360 | ||
1465 | if (con_is_present()) | 1361 | if (con_is_present()) |
1466 | return NULL; | 1362 | return NULL; |
1467 | 1363 | ||
1468 | for (i = 0; i < UART_NR; i++) { | 1364 | for (i = 0; i < num_uart; i++) { |
1469 | int this_minor = sunsu_reg.minor + i; | 1365 | int this_minor = sunsu_reg.minor + i; |
1470 | 1366 | ||
1471 | if ((this_minor - 64) == (serial_console - 1)) | 1367 | if ((this_minor - 64) == (serial_console - 1)) |
1472 | break; | 1368 | break; |
1473 | } | 1369 | } |
1474 | if (i == UART_NR) | 1370 | if (i == num_uart) |
1475 | return NULL; | ||
1476 | if (sunsu_ports[i].port_node == 0) | ||
1477 | return NULL; | 1371 | return NULL; |
1478 | 1372 | ||
1479 | sunsu_cons.index = i; | 1373 | sunsu_cons.index = i; |
@@ -1481,252 +1375,186 @@ static inline struct console *SUNSU_CONSOLE(void) | |||
1481 | return &sunsu_cons; | 1375 | return &sunsu_cons; |
1482 | } | 1376 | } |
1483 | #else | 1377 | #else |
1484 | #define SUNSU_CONSOLE() (NULL) | 1378 | #define SUNSU_CONSOLE(num_uart) (NULL) |
1485 | #define sunsu_serial_console_init() do { } while (0) | 1379 | #define sunsu_serial_console_init() do { } while (0) |
1486 | #endif | 1380 | #endif |
1487 | 1381 | ||
1488 | static int __init sunsu_serial_init(void) | 1382 | static enum su_type __devinit su_get_type(struct device_node *dp) |
1489 | { | 1383 | { |
1490 | int instance, ret, i; | 1384 | struct device_node *ap = of_find_node_by_path("/aliases"); |
1491 | 1385 | ||
1492 | /* How many instances do we need? */ | 1386 | if (ap) { |
1493 | instance = 0; | 1387 | char *keyb = of_get_property(ap, "keyboard", NULL); |
1494 | for (i = 0; i < UART_NR; i++) { | 1388 | char *ms = of_get_property(ap, "mouse", NULL); |
1495 | struct uart_sunsu_port *up = &sunsu_ports[i]; | ||
1496 | 1389 | ||
1497 | if (up->su_type == SU_PORT_MS || | 1390 | if (keyb) { |
1498 | up->su_type == SU_PORT_KBD) | 1391 | if (dp == of_find_node_by_path(keyb)) |
1499 | continue; | 1392 | return SU_PORT_KBD; |
1393 | } | ||
1394 | if (ms) { | ||
1395 | if (dp == of_find_node_by_path(ms)) | ||
1396 | return SU_PORT_MS; | ||
1397 | } | ||
1398 | } | ||
1500 | 1399 | ||
1501 | spin_lock_init(&up->port.lock); | 1400 | return SU_PORT_PORT; |
1502 | up->port.flags |= UPF_BOOT_AUTOCONF; | 1401 | } |
1503 | up->port.type = PORT_UNKNOWN; | ||
1504 | up->port.uartclk = (SU_BASE_BAUD * 16); | ||
1505 | 1402 | ||
1506 | sunsu_autoconfig(up); | 1403 | static int __devinit su_probe(struct of_device *op, const struct of_device_id *match) |
1507 | if (up->port.type == PORT_UNKNOWN) | 1404 | { |
1508 | continue; | 1405 | static int inst; |
1406 | struct device_node *dp = op->node; | ||
1407 | struct uart_sunsu_port *up; | ||
1408 | struct resource *rp; | ||
1409 | int err; | ||
1509 | 1410 | ||
1510 | up->port.line = instance++; | 1411 | if (inst >= UART_NR) |
1511 | up->port.ops = &sunsu_pops; | 1412 | return -EINVAL; |
1512 | } | ||
1513 | 1413 | ||
1514 | sunsu_reg.minor = sunserial_current_minor; | 1414 | up = &sunsu_ports[inst]; |
1415 | up->port.line = inst; | ||
1515 | 1416 | ||
1516 | sunsu_reg.nr = instance; | 1417 | spin_lock_init(&up->port.lock); |
1517 | 1418 | ||
1518 | ret = uart_register_driver(&sunsu_reg); | 1419 | up->su_type = su_get_type(dp); |
1519 | if (ret < 0) | ||
1520 | return ret; | ||
1521 | 1420 | ||
1522 | sunsu_reg.tty_driver->name_base = sunsu_reg.minor - 64; | 1421 | rp = &op->resource[0]; |
1422 | up->port.mapbase = op->resource[0].start; | ||
1523 | 1423 | ||
1524 | sunserial_current_minor += instance; | 1424 | up->reg_size = (rp->end - rp->start) + 1; |
1425 | up->port.membase = of_ioremap(rp, 0, up->reg_size, "su"); | ||
1426 | if (!up->port.membase) | ||
1427 | return -ENOMEM; | ||
1525 | 1428 | ||
1526 | sunsu_reg.cons = SUNSU_CONSOLE(); | 1429 | up->port.irq = op->irqs[0]; |
1527 | 1430 | ||
1528 | for (i = 0; i < UART_NR; i++) { | 1431 | up->port.dev = &op->dev; |
1529 | struct uart_sunsu_port *up = &sunsu_ports[i]; | ||
1530 | 1432 | ||
1531 | /* Do not register Keyboard/Mouse lines with UART | 1433 | up->port.type = PORT_UNKNOWN; |
1532 | * layer. | 1434 | up->port.uartclk = (SU_BASE_BAUD * 16); |
1533 | */ | ||
1534 | if (up->su_type == SU_PORT_MS || | ||
1535 | up->su_type == SU_PORT_KBD) | ||
1536 | continue; | ||
1537 | 1435 | ||
1538 | if (up->port.type == PORT_UNKNOWN) | 1436 | err = 0; |
1539 | continue; | 1437 | if (up->su_type == SU_PORT_KBD || up->su_type == SU_PORT_MS) { |
1438 | err = sunsu_kbd_ms_init(up); | ||
1439 | if (err) | ||
1440 | goto out_unmap; | ||
1540 | 1441 | ||
1541 | uart_add_one_port(&sunsu_reg, &up->port); | 1442 | return 0; |
1542 | } | 1443 | } |
1543 | 1444 | ||
1544 | return 0; | 1445 | up->port.flags |= UPF_BOOT_AUTOCONF; |
1545 | } | ||
1546 | 1446 | ||
1547 | static int su_node_ok(int node, char *name, int namelen) | 1447 | sunsu_autoconfig(up); |
1548 | { | ||
1549 | if (strncmp(name, "su", namelen) == 0 || | ||
1550 | strncmp(name, "su_pnp", namelen) == 0) | ||
1551 | return 1; | ||
1552 | |||
1553 | if (strncmp(name, "serial", namelen) == 0) { | ||
1554 | char compat[32]; | ||
1555 | int clen; | ||
1556 | |||
1557 | /* Is it _really_ a 'su' device? */ | ||
1558 | clen = prom_getproperty(node, "compatible", compat, sizeof(compat)); | ||
1559 | if (clen > 0) { | ||
1560 | if (strncmp(compat, "sab82532", 8) == 0) { | ||
1561 | /* Nope, Siemens serial, not for us. */ | ||
1562 | return 0; | ||
1563 | } | ||
1564 | } | ||
1565 | return 1; | ||
1566 | } | ||
1567 | 1448 | ||
1568 | return 0; | 1449 | err = -ENODEV; |
1569 | } | 1450 | if (up->port.type == PORT_UNKNOWN) |
1451 | goto out_unmap; | ||
1570 | 1452 | ||
1571 | #define SU_PROPSIZE 128 | 1453 | up->port.ops = &sunsu_pops; |
1572 | 1454 | ||
1573 | /* | 1455 | err = uart_add_one_port(&sunsu_reg, &up->port); |
1574 | * Scan status structure. | 1456 | if (err) |
1575 | * "prop" is a local variable but it eats stack to keep it in each | 1457 | goto out_unmap; |
1576 | * stack frame of a recursive procedure. | ||
1577 | */ | ||
1578 | struct su_probe_scan { | ||
1579 | int msnode, kbnode; /* PROM nodes for mouse and keyboard */ | ||
1580 | int msx, kbx; /* minors for mouse and keyboard */ | ||
1581 | int devices; /* scan index */ | ||
1582 | char prop[SU_PROPSIZE]; | ||
1583 | }; | ||
1584 | 1458 | ||
1585 | /* | 1459 | dev_set_drvdata(&op->dev, up); |
1586 | * We have several platforms which present 'su' in different parts | ||
1587 | * of the device tree. 'su' may be found under obio, ebus, isa and pci. | ||
1588 | * We walk over the tree and find them wherever PROM hides them. | ||
1589 | */ | ||
1590 | static void __init su_probe_any(struct su_probe_scan *t, int sunode) | ||
1591 | { | ||
1592 | struct uart_sunsu_port *up; | ||
1593 | int len; | ||
1594 | 1460 | ||
1595 | if (t->devices >= UART_NR) | 1461 | inst++; |
1596 | return; | ||
1597 | 1462 | ||
1598 | for (; sunode != 0; sunode = prom_getsibling(sunode)) { | 1463 | return 0; |
1599 | len = prom_getproperty(sunode, "name", t->prop, SU_PROPSIZE); | 1464 | |
1600 | if (len <= 1) | 1465 | out_unmap: |
1601 | continue; /* Broken PROM node */ | 1466 | of_iounmap(up->port.membase, up->reg_size); |
1602 | 1467 | return err; | |
1603 | if (su_node_ok(sunode, t->prop, len)) { | ||
1604 | up = &sunsu_ports[t->devices]; | ||
1605 | if (t->kbnode != 0 && sunode == t->kbnode) { | ||
1606 | t->kbx = t->devices; | ||
1607 | up->su_type = SU_PORT_KBD; | ||
1608 | } else if (t->msnode != 0 && sunode == t->msnode) { | ||
1609 | t->msx = t->devices; | ||
1610 | up->su_type = SU_PORT_MS; | ||
1611 | } else { | ||
1612 | #ifdef CONFIG_SPARC64 | ||
1613 | /* | ||
1614 | * Do not attempt to use the truncated | ||
1615 | * keyboard/mouse ports as serial ports | ||
1616 | * on Ultras with PC keyboard attached. | ||
1617 | */ | ||
1618 | if (prom_getbool(sunode, "mouse")) | ||
1619 | continue; | ||
1620 | if (prom_getbool(sunode, "keyboard")) | ||
1621 | continue; | ||
1622 | #endif | ||
1623 | up->su_type = SU_PORT_PORT; | ||
1624 | } | ||
1625 | up->port_node = sunode; | ||
1626 | ++t->devices; | ||
1627 | } else { | ||
1628 | su_probe_any(t, prom_getchild(sunode)); | ||
1629 | } | ||
1630 | } | ||
1631 | } | 1468 | } |
1632 | 1469 | ||
1633 | static int __init sunsu_probe(void) | 1470 | static int __devexit su_remove(struct of_device *dev) |
1634 | { | 1471 | { |
1635 | int node; | 1472 | struct uart_sunsu_port *up = dev_get_drvdata(&dev->dev);; |
1636 | int len; | ||
1637 | struct su_probe_scan scan; | ||
1638 | 1473 | ||
1639 | /* | 1474 | if (up->su_type == SU_PORT_MS || |
1640 | * First, we scan the tree. | 1475 | up->su_type == SU_PORT_KBD) { |
1641 | */ | 1476 | #ifdef CONFIG_SERIO |
1642 | scan.devices = 0; | 1477 | serio_unregister_port(&up->serio); |
1643 | scan.msx = -1; | 1478 | #endif |
1644 | scan.kbx = -1; | 1479 | } else if (up->port.type != PORT_UNKNOWN) |
1645 | scan.kbnode = 0; | 1480 | uart_remove_one_port(&sunsu_reg, &up->port); |
1646 | scan.msnode = 0; | ||
1647 | 1481 | ||
1648 | /* | 1482 | return 0; |
1649 | * Get the nodes for keyboard and mouse from 'aliases'... | 1483 | } |
1650 | */ | ||
1651 | node = prom_getchild(prom_root_node); | ||
1652 | node = prom_searchsiblings(node, "aliases"); | ||
1653 | if (node != 0) { | ||
1654 | len = prom_getproperty(node, "keyboard", scan.prop, SU_PROPSIZE); | ||
1655 | if (len > 0) { | ||
1656 | scan.prop[len] = 0; | ||
1657 | scan.kbnode = prom_finddevice(scan.prop); | ||
1658 | } | ||
1659 | 1484 | ||
1660 | len = prom_getproperty(node, "mouse", scan.prop, SU_PROPSIZE); | 1485 | static struct of_device_id su_match[] = { |
1661 | if (len > 0) { | 1486 | { |
1662 | scan.prop[len] = 0; | 1487 | .name = "su", |
1663 | scan.msnode = prom_finddevice(scan.prop); | 1488 | }, |
1664 | } | 1489 | { |
1665 | } | 1490 | .name = "su_pnp", |
1491 | }, | ||
1492 | { | ||
1493 | .name = "serial", | ||
1494 | .compatible = "su", | ||
1495 | }, | ||
1496 | {}, | ||
1497 | }; | ||
1498 | MODULE_DEVICE_TABLE(of, su_match); | ||
1666 | 1499 | ||
1667 | su_probe_any(&scan, prom_getchild(prom_root_node)); | 1500 | static struct of_platform_driver su_driver = { |
1501 | .name = "su", | ||
1502 | .match_table = su_match, | ||
1503 | .probe = su_probe, | ||
1504 | .remove = __devexit_p(su_remove), | ||
1505 | }; | ||
1668 | 1506 | ||
1669 | /* | 1507 | static int num_uart; |
1670 | * Second, we process the special case of keyboard and mouse. | ||
1671 | * | ||
1672 | * Currently if we got keyboard and mouse hooked to "su" ports | ||
1673 | * we do not use any possible remaining "su" as a serial port. | ||
1674 | * Thus, we ignore values of .msx and .kbx, then compact ports. | ||
1675 | */ | ||
1676 | if (scan.msx != -1 && scan.kbx != -1) { | ||
1677 | sunsu_ports[0].su_type = SU_PORT_MS; | ||
1678 | sunsu_ports[0].port_node = scan.msnode; | ||
1679 | sunsu_kbd_ms_init(&sunsu_ports[0], 0); | ||
1680 | 1508 | ||
1681 | sunsu_ports[1].su_type = SU_PORT_KBD; | 1509 | static int __init sunsu_init(void) |
1682 | sunsu_ports[1].port_node = scan.kbnode; | 1510 | { |
1683 | sunsu_kbd_ms_init(&sunsu_ports[1], 1); | 1511 | struct device_node *dp; |
1512 | int err; | ||
1684 | 1513 | ||
1685 | return 0; | 1514 | num_uart = 0; |
1515 | for_each_node_by_name(dp, "su") { | ||
1516 | if (su_get_type(dp) == SU_PORT_PORT) | ||
1517 | num_uart++; | ||
1686 | } | 1518 | } |
1687 | 1519 | for_each_node_by_name(dp, "su_pnp") { | |
1688 | if (scan.msx != -1 || scan.kbx != -1) { | 1520 | if (su_get_type(dp) == SU_PORT_PORT) |
1689 | printk("sunsu_probe: cannot match keyboard and mouse, confused\n"); | 1521 | num_uart++; |
1690 | return -ENODEV; | 1522 | } |
1523 | for_each_node_by_name(dp, "serial") { | ||
1524 | if (of_device_is_compatible(dp, "su")) { | ||
1525 | if (su_get_type(dp) == SU_PORT_PORT) | ||
1526 | num_uart++; | ||
1527 | } | ||
1691 | } | 1528 | } |
1692 | 1529 | ||
1693 | if (scan.devices == 0) | 1530 | if (num_uart) { |
1694 | return -ENODEV; | 1531 | sunsu_reg.minor = sunserial_current_minor; |
1532 | sunsu_reg.nr = num_uart; | ||
1533 | err = uart_register_driver(&sunsu_reg); | ||
1534 | if (err) | ||
1535 | return err; | ||
1536 | sunsu_reg.tty_driver->name_base = sunsu_reg.minor - 64; | ||
1537 | sunserial_current_minor += num_uart; | ||
1538 | sunsu_reg.cons = SUNSU_CONSOLE(num_uart); | ||
1539 | } | ||
1695 | 1540 | ||
1696 | /* | 1541 | err = of_register_driver(&su_driver, &of_bus_type); |
1697 | * Console must be initiated after the generic initialization. | 1542 | if (err && num_uart) |
1698 | */ | 1543 | uart_unregister_driver(&sunsu_reg); |
1699 | sunsu_serial_init(); | ||
1700 | 1544 | ||
1701 | return 0; | 1545 | return err; |
1702 | } | 1546 | } |
1703 | 1547 | ||
1704 | static void __exit sunsu_exit(void) | 1548 | static void __exit sunsu_exit(void) |
1705 | { | 1549 | { |
1706 | int i, saw_uart; | 1550 | if (num_uart) |
1707 | |||
1708 | saw_uart = 0; | ||
1709 | for (i = 0; i < UART_NR; i++) { | ||
1710 | struct uart_sunsu_port *up = &sunsu_ports[i]; | ||
1711 | |||
1712 | if (up->su_type == SU_PORT_MS || | ||
1713 | up->su_type == SU_PORT_KBD) { | ||
1714 | #ifdef CONFIG_SERIO | ||
1715 | if (up->serio) { | ||
1716 | serio_unregister_port(up->serio); | ||
1717 | up->serio = NULL; | ||
1718 | } | ||
1719 | #endif | ||
1720 | } else if (up->port.type != PORT_UNKNOWN) { | ||
1721 | uart_remove_one_port(&sunsu_reg, &up->port); | ||
1722 | saw_uart++; | ||
1723 | } | ||
1724 | } | ||
1725 | |||
1726 | if (saw_uart) | ||
1727 | uart_unregister_driver(&sunsu_reg); | 1551 | uart_unregister_driver(&sunsu_reg); |
1728 | } | 1552 | } |
1729 | 1553 | ||
1730 | module_init(sunsu_probe); | 1554 | module_init(sunsu_init); |
1731 | module_exit(sunsu_exit); | 1555 | module_exit(sunsu_exit); |
1556 | |||
1557 | MODULE_AUTHOR("Eddie C. Dost, Peter Zaitcev, and David S. Miller"); | ||
1558 | MODULE_DESCRIPTION("Sun SU serial port driver"); | ||
1559 | MODULE_VERSION("2.0"); | ||
1732 | MODULE_LICENSE("GPL"); | 1560 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index 9f42677287ad..9ee7f3af9ae2 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* sunzilog.c: Zilog serial driver for Sparc systems. |
2 | * sunzilog.c | ||
3 | * | 2 | * |
4 | * Driver for Zilog serial chips found on Sun workstations and | 3 | * Driver for Zilog serial chips found on Sun workstations and |
5 | * servers. This driver could actually be made more generic. | 4 | * servers. This driver could actually be made more generic. |
@@ -10,10 +9,9 @@ | |||
10 | * C. Dost, Pete Zaitcev, Ted Ts'o and Alex Buell for their | 9 | * C. Dost, Pete Zaitcev, Ted Ts'o and Alex Buell for their |
11 | * work there. | 10 | * work there. |
12 | * | 11 | * |
13 | * Copyright (C) 2002 David S. Miller (davem@redhat.com) | 12 | * Copyright (C) 2002, 2006 David S. Miller (davem@davemloft.net) |
14 | */ | 13 | */ |
15 | 14 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/module.h> | 15 | #include <linux/module.h> |
18 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
19 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
@@ -38,10 +36,8 @@ | |||
38 | 36 | ||
39 | #include <asm/io.h> | 37 | #include <asm/io.h> |
40 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
41 | #ifdef CONFIG_SPARC64 | 39 | #include <asm/prom.h> |
42 | #include <asm/fhc.h> | 40 | #include <asm/of_device.h> |
43 | #endif | ||
44 | #include <asm/sbus.h> | ||
45 | 41 | ||
46 | #if defined(CONFIG_SERIAL_SUNZILOG_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 42 | #if defined(CONFIG_SERIAL_SUNZILOG_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
47 | #define SUPPORT_SYSRQ | 43 | #define SUPPORT_SYSRQ |
@@ -65,7 +61,7 @@ | |||
65 | #define ZSDELAY() | 61 | #define ZSDELAY() |
66 | #define ZSDELAY_LONG() | 62 | #define ZSDELAY_LONG() |
67 | #define ZS_WSYNC(__channel) \ | 63 | #define ZS_WSYNC(__channel) \ |
68 | sbus_readb(&((__channel)->control)) | 64 | readb(&((__channel)->control)) |
69 | #endif | 65 | #endif |
70 | 66 | ||
71 | static int num_sunzilog; | 67 | static int num_sunzilog; |
@@ -107,7 +103,7 @@ struct uart_sunzilog_port { | |||
107 | unsigned char prev_status; | 103 | unsigned char prev_status; |
108 | 104 | ||
109 | #ifdef CONFIG_SERIO | 105 | #ifdef CONFIG_SERIO |
110 | struct serio *serio; | 106 | struct serio serio; |
111 | int serio_open; | 107 | int serio_open; |
112 | #endif | 108 | #endif |
113 | }; | 109 | }; |
@@ -138,9 +134,9 @@ static unsigned char read_zsreg(struct zilog_channel __iomem *channel, | |||
138 | { | 134 | { |
139 | unsigned char retval; | 135 | unsigned char retval; |
140 | 136 | ||
141 | sbus_writeb(reg, &channel->control); | 137 | writeb(reg, &channel->control); |
142 | ZSDELAY(); | 138 | ZSDELAY(); |
143 | retval = sbus_readb(&channel->control); | 139 | retval = readb(&channel->control); |
144 | ZSDELAY(); | 140 | ZSDELAY(); |
145 | 141 | ||
146 | return retval; | 142 | return retval; |
@@ -149,9 +145,9 @@ static unsigned char read_zsreg(struct zilog_channel __iomem *channel, | |||
149 | static void write_zsreg(struct zilog_channel __iomem *channel, | 145 | static void write_zsreg(struct zilog_channel __iomem *channel, |
150 | unsigned char reg, unsigned char value) | 146 | unsigned char reg, unsigned char value) |
151 | { | 147 | { |
152 | sbus_writeb(reg, &channel->control); | 148 | writeb(reg, &channel->control); |
153 | ZSDELAY(); | 149 | ZSDELAY(); |
154 | sbus_writeb(value, &channel->control); | 150 | writeb(value, &channel->control); |
155 | ZSDELAY(); | 151 | ZSDELAY(); |
156 | } | 152 | } |
157 | 153 | ||
@@ -162,17 +158,17 @@ static void sunzilog_clear_fifo(struct zilog_channel __iomem *channel) | |||
162 | for (i = 0; i < 32; i++) { | 158 | for (i = 0; i < 32; i++) { |
163 | unsigned char regval; | 159 | unsigned char regval; |
164 | 160 | ||
165 | regval = sbus_readb(&channel->control); | 161 | regval = readb(&channel->control); |
166 | ZSDELAY(); | 162 | ZSDELAY(); |
167 | if (regval & Rx_CH_AV) | 163 | if (regval & Rx_CH_AV) |
168 | break; | 164 | break; |
169 | 165 | ||
170 | regval = read_zsreg(channel, R1); | 166 | regval = read_zsreg(channel, R1); |
171 | sbus_readb(&channel->data); | 167 | readb(&channel->data); |
172 | ZSDELAY(); | 168 | ZSDELAY(); |
173 | 169 | ||
174 | if (regval & (PAR_ERR | Rx_OVR | CRC_ERR)) { | 170 | if (regval & (PAR_ERR | Rx_OVR | CRC_ERR)) { |
175 | sbus_writeb(ERR_RES, &channel->control); | 171 | writeb(ERR_RES, &channel->control); |
176 | ZSDELAY(); | 172 | ZSDELAY(); |
177 | ZS_WSYNC(channel); | 173 | ZS_WSYNC(channel); |
178 | } | 174 | } |
@@ -194,7 +190,7 @@ static void __load_zsregs(struct zilog_channel __iomem *channel, unsigned char * | |||
194 | udelay(100); | 190 | udelay(100); |
195 | } | 191 | } |
196 | 192 | ||
197 | sbus_writeb(ERR_RES, &channel->control); | 193 | writeb(ERR_RES, &channel->control); |
198 | ZSDELAY(); | 194 | ZSDELAY(); |
199 | ZS_WSYNC(channel); | 195 | ZS_WSYNC(channel); |
200 | 196 | ||
@@ -291,7 +287,7 @@ static void sunzilog_kbdms_receive_chars(struct uart_sunzilog_port *up, | |||
291 | /* Stop-A is handled by drivers/char/keyboard.c now. */ | 287 | /* Stop-A is handled by drivers/char/keyboard.c now. */ |
292 | #ifdef CONFIG_SERIO | 288 | #ifdef CONFIG_SERIO |
293 | if (up->serio_open) | 289 | if (up->serio_open) |
294 | serio_interrupt(up->serio, ch, 0, regs); | 290 | serio_interrupt(&up->serio, ch, 0, regs); |
295 | #endif | 291 | #endif |
296 | } else if (ZS_IS_MOUSE(up)) { | 292 | } else if (ZS_IS_MOUSE(up)) { |
297 | int ret = suncore_mouse_baud_detection(ch, is_break); | 293 | int ret = suncore_mouse_baud_detection(ch, is_break); |
@@ -306,7 +302,7 @@ static void sunzilog_kbdms_receive_chars(struct uart_sunzilog_port *up, | |||
306 | case 0: | 302 | case 0: |
307 | #ifdef CONFIG_SERIO | 303 | #ifdef CONFIG_SERIO |
308 | if (up->serio_open) | 304 | if (up->serio_open) |
309 | serio_interrupt(up->serio, ch, 0, regs); | 305 | serio_interrupt(&up->serio, ch, 0, regs); |
310 | #endif | 306 | #endif |
311 | break; | 307 | break; |
312 | }; | 308 | }; |
@@ -330,12 +326,12 @@ sunzilog_receive_chars(struct uart_sunzilog_port *up, | |||
330 | 326 | ||
331 | r1 = read_zsreg(channel, R1); | 327 | r1 = read_zsreg(channel, R1); |
332 | if (r1 & (PAR_ERR | Rx_OVR | CRC_ERR)) { | 328 | if (r1 & (PAR_ERR | Rx_OVR | CRC_ERR)) { |
333 | sbus_writeb(ERR_RES, &channel->control); | 329 | writeb(ERR_RES, &channel->control); |
334 | ZSDELAY(); | 330 | ZSDELAY(); |
335 | ZS_WSYNC(channel); | 331 | ZS_WSYNC(channel); |
336 | } | 332 | } |
337 | 333 | ||
338 | ch = sbus_readb(&channel->control); | 334 | ch = readb(&channel->control); |
339 | ZSDELAY(); | 335 | ZSDELAY(); |
340 | 336 | ||
341 | /* This funny hack depends upon BRK_ABRT not interfering | 337 | /* This funny hack depends upon BRK_ABRT not interfering |
@@ -347,7 +343,7 @@ sunzilog_receive_chars(struct uart_sunzilog_port *up, | |||
347 | if (!(ch & Rx_CH_AV)) | 343 | if (!(ch & Rx_CH_AV)) |
348 | break; | 344 | break; |
349 | 345 | ||
350 | ch = sbus_readb(&channel->data); | 346 | ch = readb(&channel->data); |
351 | ZSDELAY(); | 347 | ZSDELAY(); |
352 | 348 | ||
353 | ch &= up->parity_mask; | 349 | ch &= up->parity_mask; |
@@ -406,10 +402,10 @@ static void sunzilog_status_handle(struct uart_sunzilog_port *up, | |||
406 | { | 402 | { |
407 | unsigned char status; | 403 | unsigned char status; |
408 | 404 | ||
409 | status = sbus_readb(&channel->control); | 405 | status = readb(&channel->control); |
410 | ZSDELAY(); | 406 | ZSDELAY(); |
411 | 407 | ||
412 | sbus_writeb(RES_EXT_INT, &channel->control); | 408 | writeb(RES_EXT_INT, &channel->control); |
413 | ZSDELAY(); | 409 | ZSDELAY(); |
414 | ZS_WSYNC(channel); | 410 | ZS_WSYNC(channel); |
415 | 411 | ||
@@ -421,7 +417,7 @@ static void sunzilog_status_handle(struct uart_sunzilog_port *up, | |||
421 | * confusing the PROM. | 417 | * confusing the PROM. |
422 | */ | 418 | */ |
423 | while (1) { | 419 | while (1) { |
424 | status = sbus_readb(&channel->control); | 420 | status = readb(&channel->control); |
425 | ZSDELAY(); | 421 | ZSDELAY(); |
426 | if (!(status & BRK_ABRT)) | 422 | if (!(status & BRK_ABRT)) |
427 | break; | 423 | break; |
@@ -458,7 +454,7 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up, | |||
458 | struct circ_buf *xmit; | 454 | struct circ_buf *xmit; |
459 | 455 | ||
460 | if (ZS_IS_CONS(up)) { | 456 | if (ZS_IS_CONS(up)) { |
461 | unsigned char status = sbus_readb(&channel->control); | 457 | unsigned char status = readb(&channel->control); |
462 | ZSDELAY(); | 458 | ZSDELAY(); |
463 | 459 | ||
464 | /* TX still busy? Just wait for the next TX done interrupt. | 460 | /* TX still busy? Just wait for the next TX done interrupt. |
@@ -487,7 +483,7 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up, | |||
487 | 483 | ||
488 | if (up->port.x_char) { | 484 | if (up->port.x_char) { |
489 | up->flags |= SUNZILOG_FLAG_TX_ACTIVE; | 485 | up->flags |= SUNZILOG_FLAG_TX_ACTIVE; |
490 | sbus_writeb(up->port.x_char, &channel->data); | 486 | writeb(up->port.x_char, &channel->data); |
491 | ZSDELAY(); | 487 | ZSDELAY(); |
492 | ZS_WSYNC(channel); | 488 | ZS_WSYNC(channel); |
493 | 489 | ||
@@ -506,7 +502,7 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up, | |||
506 | goto ack_tx_int; | 502 | goto ack_tx_int; |
507 | 503 | ||
508 | up->flags |= SUNZILOG_FLAG_TX_ACTIVE; | 504 | up->flags |= SUNZILOG_FLAG_TX_ACTIVE; |
509 | sbus_writeb(xmit->buf[xmit->tail], &channel->data); | 505 | writeb(xmit->buf[xmit->tail], &channel->data); |
510 | ZSDELAY(); | 506 | ZSDELAY(); |
511 | ZS_WSYNC(channel); | 507 | ZS_WSYNC(channel); |
512 | 508 | ||
@@ -519,7 +515,7 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up, | |||
519 | return; | 515 | return; |
520 | 516 | ||
521 | ack_tx_int: | 517 | ack_tx_int: |
522 | sbus_writeb(RES_Tx_P, &channel->control); | 518 | writeb(RES_Tx_P, &channel->control); |
523 | ZSDELAY(); | 519 | ZSDELAY(); |
524 | ZS_WSYNC(channel); | 520 | ZS_WSYNC(channel); |
525 | } | 521 | } |
@@ -540,7 +536,7 @@ static irqreturn_t sunzilog_interrupt(int irq, void *dev_id, struct pt_regs *reg | |||
540 | /* Channel A */ | 536 | /* Channel A */ |
541 | tty = NULL; | 537 | tty = NULL; |
542 | if (r3 & (CHAEXT | CHATxIP | CHARxIP)) { | 538 | if (r3 & (CHAEXT | CHATxIP | CHARxIP)) { |
543 | sbus_writeb(RES_H_IUS, &channel->control); | 539 | writeb(RES_H_IUS, &channel->control); |
544 | ZSDELAY(); | 540 | ZSDELAY(); |
545 | ZS_WSYNC(channel); | 541 | ZS_WSYNC(channel); |
546 | 542 | ||
@@ -563,7 +559,7 @@ static irqreturn_t sunzilog_interrupt(int irq, void *dev_id, struct pt_regs *reg | |||
563 | spin_lock(&up->port.lock); | 559 | spin_lock(&up->port.lock); |
564 | tty = NULL; | 560 | tty = NULL; |
565 | if (r3 & (CHBEXT | CHBTxIP | CHBRxIP)) { | 561 | if (r3 & (CHBEXT | CHBTxIP | CHBRxIP)) { |
566 | sbus_writeb(RES_H_IUS, &channel->control); | 562 | writeb(RES_H_IUS, &channel->control); |
567 | ZSDELAY(); | 563 | ZSDELAY(); |
568 | ZS_WSYNC(channel); | 564 | ZS_WSYNC(channel); |
569 | 565 | ||
@@ -594,7 +590,7 @@ static __inline__ unsigned char sunzilog_read_channel_status(struct uart_port *p | |||
594 | unsigned char status; | 590 | unsigned char status; |
595 | 591 | ||
596 | channel = ZILOG_CHANNEL_FROM_PORT(port); | 592 | channel = ZILOG_CHANNEL_FROM_PORT(port); |
597 | status = sbus_readb(&channel->control); | 593 | status = readb(&channel->control); |
598 | ZSDELAY(); | 594 | ZSDELAY(); |
599 | 595 | ||
600 | return status; | 596 | return status; |
@@ -682,7 +678,7 @@ static void sunzilog_start_tx(struct uart_port *port) | |||
682 | up->flags |= SUNZILOG_FLAG_TX_ACTIVE; | 678 | up->flags |= SUNZILOG_FLAG_TX_ACTIVE; |
683 | up->flags &= ~SUNZILOG_FLAG_TX_STOPPED; | 679 | up->flags &= ~SUNZILOG_FLAG_TX_STOPPED; |
684 | 680 | ||
685 | status = sbus_readb(&channel->control); | 681 | status = readb(&channel->control); |
686 | ZSDELAY(); | 682 | ZSDELAY(); |
687 | 683 | ||
688 | /* TX busy? Just wait for the TX done interrupt. */ | 684 | /* TX busy? Just wait for the TX done interrupt. */ |
@@ -693,7 +689,7 @@ static void sunzilog_start_tx(struct uart_port *port) | |||
693 | * IRQ sending engine. | 689 | * IRQ sending engine. |
694 | */ | 690 | */ |
695 | if (port->x_char) { | 691 | if (port->x_char) { |
696 | sbus_writeb(port->x_char, &channel->data); | 692 | writeb(port->x_char, &channel->data); |
697 | ZSDELAY(); | 693 | ZSDELAY(); |
698 | ZS_WSYNC(channel); | 694 | ZS_WSYNC(channel); |
699 | 695 | ||
@@ -702,7 +698,7 @@ static void sunzilog_start_tx(struct uart_port *port) | |||
702 | } else { | 698 | } else { |
703 | struct circ_buf *xmit = &port->info->xmit; | 699 | struct circ_buf *xmit = &port->info->xmit; |
704 | 700 | ||
705 | sbus_writeb(xmit->buf[xmit->tail], &channel->data); | 701 | writeb(xmit->buf[xmit->tail], &channel->data); |
706 | ZSDELAY(); | 702 | ZSDELAY(); |
707 | ZS_WSYNC(channel); | 703 | ZS_WSYNC(channel); |
708 | 704 | ||
@@ -779,7 +775,7 @@ static void __sunzilog_startup(struct uart_sunzilog_port *up) | |||
779 | struct zilog_channel __iomem *channel; | 775 | struct zilog_channel __iomem *channel; |
780 | 776 | ||
781 | channel = ZILOG_CHANNEL_FROM_PORT(&up->port); | 777 | channel = ZILOG_CHANNEL_FROM_PORT(&up->port); |
782 | up->prev_status = sbus_readb(&channel->control); | 778 | up->prev_status = readb(&channel->control); |
783 | 779 | ||
784 | /* Enable receiver and transmitter. */ | 780 | /* Enable receiver and transmitter. */ |
785 | up->curregs[R3] |= RxENAB; | 781 | up->curregs[R3] |= RxENAB; |
@@ -963,7 +959,7 @@ sunzilog_set_termios(struct uart_port *port, struct termios *termios, | |||
963 | 959 | ||
964 | static const char *sunzilog_type(struct uart_port *port) | 960 | static const char *sunzilog_type(struct uart_port *port) |
965 | { | 961 | { |
966 | return "SunZilog"; | 962 | return "zs"; |
967 | } | 963 | } |
968 | 964 | ||
969 | /* We do not request/release mappings of the registers here, this | 965 | /* We do not request/release mappings of the registers here, this |
@@ -1012,7 +1008,6 @@ static struct uart_sunzilog_port *sunzilog_port_table; | |||
1012 | static struct zilog_layout __iomem **sunzilog_chip_regs; | 1008 | static struct zilog_layout __iomem **sunzilog_chip_regs; |
1013 | 1009 | ||
1014 | static struct uart_sunzilog_port *sunzilog_irq_chain; | 1010 | static struct uart_sunzilog_port *sunzilog_irq_chain; |
1015 | static int zilog_irq = -1; | ||
1016 | 1011 | ||
1017 | static struct uart_driver sunzilog_reg = { | 1012 | static struct uart_driver sunzilog_reg = { |
1018 | .owner = THIS_MODULE, | 1013 | .owner = THIS_MODULE, |
@@ -1021,232 +1016,47 @@ static struct uart_driver sunzilog_reg = { | |||
1021 | .major = TTY_MAJOR, | 1016 | .major = TTY_MAJOR, |
1022 | }; | 1017 | }; |
1023 | 1018 | ||
1024 | static void * __init alloc_one_table(unsigned long size) | 1019 | static int __init sunzilog_alloc_tables(void) |
1025 | { | ||
1026 | void *ret; | ||
1027 | |||
1028 | ret = kmalloc(size, GFP_KERNEL); | ||
1029 | if (ret != NULL) | ||
1030 | memset(ret, 0, size); | ||
1031 | |||
1032 | return ret; | ||
1033 | } | ||
1034 | |||
1035 | static void __init sunzilog_alloc_tables(void) | ||
1036 | { | ||
1037 | sunzilog_port_table = | ||
1038 | alloc_one_table(NUM_CHANNELS * sizeof(struct uart_sunzilog_port)); | ||
1039 | sunzilog_chip_regs = | ||
1040 | alloc_one_table(NUM_SUNZILOG * sizeof(struct zilog_layout __iomem *)); | ||
1041 | |||
1042 | if (sunzilog_port_table == NULL || sunzilog_chip_regs == NULL) { | ||
1043 | prom_printf("SunZilog: Cannot allocate tables.\n"); | ||
1044 | prom_halt(); | ||
1045 | } | ||
1046 | } | ||
1047 | |||
1048 | #ifdef CONFIG_SPARC64 | ||
1049 | |||
1050 | /* We used to attempt to use the address property of the Zilog device node | ||
1051 | * but that totally is not necessary on sparc64. | ||
1052 | */ | ||
1053 | static struct zilog_layout __iomem * __init get_zs_sun4u(int chip, int zsnode) | ||
1054 | { | 1020 | { |
1055 | void __iomem *mapped_addr; | 1021 | struct uart_sunzilog_port *up; |
1056 | unsigned int sun4u_ino; | 1022 | unsigned long size; |
1057 | struct sbus_bus *sbus = NULL; | 1023 | int i; |
1058 | struct sbus_dev *sdev = NULL; | ||
1059 | int err; | ||
1060 | |||
1061 | if (central_bus == NULL) { | ||
1062 | for_each_sbus(sbus) { | ||
1063 | for_each_sbusdev(sdev, sbus) { | ||
1064 | if (sdev->prom_node == zsnode) | ||
1065 | goto found; | ||
1066 | } | ||
1067 | } | ||
1068 | } | ||
1069 | found: | ||
1070 | if (sdev == NULL && central_bus == NULL) { | ||
1071 | prom_printf("SunZilog: sdev&¢ral == NULL for " | ||
1072 | "Zilog %d in get_zs_sun4u.\n", chip); | ||
1073 | prom_halt(); | ||
1074 | } | ||
1075 | if (central_bus == NULL) { | ||
1076 | mapped_addr = | ||
1077 | sbus_ioremap(&sdev->resource[0], 0, | ||
1078 | PAGE_SIZE, | ||
1079 | "Zilog Registers"); | ||
1080 | } else { | ||
1081 | struct linux_prom_registers zsregs[1]; | ||
1082 | |||
1083 | err = prom_getproperty(zsnode, "reg", | ||
1084 | (char *) &zsregs[0], | ||
1085 | sizeof(zsregs)); | ||
1086 | if (err == -1) { | ||
1087 | prom_printf("SunZilog: Cannot map " | ||
1088 | "Zilog %d regs on " | ||
1089 | "central bus.\n", chip); | ||
1090 | prom_halt(); | ||
1091 | } | ||
1092 | apply_fhc_ranges(central_bus->child, | ||
1093 | &zsregs[0], 1); | ||
1094 | apply_central_ranges(central_bus, &zsregs[0], 1); | ||
1095 | mapped_addr = (void __iomem *) | ||
1096 | ((((u64)zsregs[0].which_io)<<32UL) | | ||
1097 | ((u64)zsregs[0].phys_addr)); | ||
1098 | } | ||
1099 | |||
1100 | if (zilog_irq == -1) { | ||
1101 | if (central_bus) { | ||
1102 | unsigned long iclr, imap; | ||
1103 | |||
1104 | iclr = central_bus->child->fhc_regs.uregs | ||
1105 | + FHC_UREGS_ICLR; | ||
1106 | imap = central_bus->child->fhc_regs.uregs | ||
1107 | + FHC_UREGS_IMAP; | ||
1108 | zilog_irq = build_irq(0, iclr, imap); | ||
1109 | } else { | ||
1110 | err = prom_getproperty(zsnode, "interrupts", | ||
1111 | (char *) &sun4u_ino, | ||
1112 | sizeof(sun4u_ino)); | ||
1113 | zilog_irq = sbus_build_irq(sbus_root, sun4u_ino); | ||
1114 | } | ||
1115 | } | ||
1116 | |||
1117 | return (struct zilog_layout __iomem *) mapped_addr; | ||
1118 | } | ||
1119 | #else /* CONFIG_SPARC64 */ | ||
1120 | |||
1121 | /* | ||
1122 | * XXX The sun4d case is utterly screwed: it tries to re-walk the tree | ||
1123 | * (for the 3rd time) in order to find bootbus and cpu. Streamline it. | ||
1124 | */ | ||
1125 | static struct zilog_layout __iomem * __init get_zs_sun4cmd(int chip, int node) | ||
1126 | { | ||
1127 | struct linux_prom_irqs irq_info[2]; | ||
1128 | void __iomem *mapped_addr = NULL; | ||
1129 | int zsnode, cpunode, bbnode; | ||
1130 | struct linux_prom_registers zsreg[4]; | ||
1131 | struct resource res; | ||
1132 | |||
1133 | if (sparc_cpu_model == sun4d) { | ||
1134 | int walk; | ||
1135 | |||
1136 | zsnode = 0; | ||
1137 | bbnode = 0; | ||
1138 | cpunode = 0; | ||
1139 | for (walk = prom_getchild(prom_root_node); | ||
1140 | (walk = prom_searchsiblings(walk, "cpu-unit")) != 0; | ||
1141 | walk = prom_getsibling(walk)) { | ||
1142 | bbnode = prom_getchild(walk); | ||
1143 | if (bbnode && | ||
1144 | (bbnode = prom_searchsiblings(bbnode, "bootbus"))) { | ||
1145 | if ((zsnode = prom_getchild(bbnode)) == node) { | ||
1146 | cpunode = walk; | ||
1147 | break; | ||
1148 | } | ||
1149 | } | ||
1150 | } | ||
1151 | if (!walk) { | ||
1152 | prom_printf("SunZilog: Cannot find the %d'th bootbus on sun4d.\n", | ||
1153 | (chip / 2)); | ||
1154 | prom_halt(); | ||
1155 | } | ||
1156 | 1024 | ||
1157 | if (prom_getproperty(zsnode, "reg", | 1025 | size = NUM_CHANNELS * sizeof(struct uart_sunzilog_port); |
1158 | (char *) zsreg, sizeof(zsreg)) == -1) { | 1026 | sunzilog_port_table = kzalloc(size, GFP_KERNEL); |
1159 | prom_printf("SunZilog: Cannot map Zilog %d\n", chip); | 1027 | if (!sunzilog_port_table) |
1160 | prom_halt(); | 1028 | return -ENOMEM; |
1161 | } | ||
1162 | /* XXX Looks like an off by one? */ | ||
1163 | prom_apply_generic_ranges(bbnode, cpunode, zsreg, 1); | ||
1164 | res.start = zsreg[0].phys_addr; | ||
1165 | res.end = res.start + (8 - 1); | ||
1166 | res.flags = zsreg[0].which_io | IORESOURCE_IO; | ||
1167 | mapped_addr = sbus_ioremap(&res, 0, 8, "Zilog Serial"); | ||
1168 | 1029 | ||
1169 | } else { | 1030 | for (i = 0; i < NUM_CHANNELS; i++) { |
1170 | zsnode = node; | 1031 | up = &sunzilog_port_table[i]; |
1171 | 1032 | ||
1172 | #if 0 /* XXX When was this used? */ | 1033 | spin_lock_init(&up->port.lock); |
1173 | if (prom_getintdefault(zsnode, "slave", -1) != chipid) { | ||
1174 | zsnode = prom_getsibling(zsnode); | ||
1175 | continue; | ||
1176 | } | ||
1177 | #endif | ||
1178 | 1034 | ||
1179 | /* | 1035 | if (i == 0) |
1180 | * "address" is only present on ports that OBP opened | 1036 | sunzilog_irq_chain = up; |
1181 | * (from Mitch Bradley's "Hitchhiker's Guide to OBP"). | ||
1182 | * We do not use it. | ||
1183 | */ | ||
1184 | 1037 | ||
1185 | if (prom_getproperty(zsnode, "reg", | 1038 | if (i < NUM_CHANNELS - 1) |
1186 | (char *) zsreg, sizeof(zsreg)) == -1) { | 1039 | up->next = up + 1; |
1187 | prom_printf("SunZilog: Cannot map Zilog %d\n", chip); | 1040 | else |
1188 | prom_halt(); | 1041 | up->next = NULL; |
1189 | } | ||
1190 | if (sparc_cpu_model == sun4m) /* Crude. Pass parent. XXX */ | ||
1191 | prom_apply_obio_ranges(zsreg, 1); | ||
1192 | res.start = zsreg[0].phys_addr; | ||
1193 | res.end = res.start + (8 - 1); | ||
1194 | res.flags = zsreg[0].which_io | IORESOURCE_IO; | ||
1195 | mapped_addr = sbus_ioremap(&res, 0, 8, "Zilog Serial"); | ||
1196 | } | 1042 | } |
1197 | 1043 | ||
1198 | if (prom_getproperty(zsnode, "intr", | 1044 | size = NUM_SUNZILOG * sizeof(struct zilog_layout __iomem *); |
1199 | (char *) irq_info, sizeof(irq_info)) | 1045 | sunzilog_chip_regs = kzalloc(size, GFP_KERNEL); |
1200 | % sizeof(struct linux_prom_irqs)) { | 1046 | if (!sunzilog_chip_regs) { |
1201 | prom_printf("SunZilog: Cannot get IRQ property for Zilog %d.\n", | 1047 | kfree(sunzilog_port_table); |
1202 | chip); | 1048 | sunzilog_irq_chain = NULL; |
1203 | prom_halt(); | 1049 | return -ENOMEM; |
1204 | } | ||
1205 | if (zilog_irq == -1) { | ||
1206 | zilog_irq = irq_info[0].pri; | ||
1207 | } else if (zilog_irq != irq_info[0].pri) { | ||
1208 | /* XXX. Dumb. Should handle per-chip IRQ, for add-ons. */ | ||
1209 | prom_printf("SunZilog: Inconsistent IRQ layout for Zilog %d.\n", | ||
1210 | chip); | ||
1211 | prom_halt(); | ||
1212 | } | 1050 | } |
1213 | 1051 | ||
1214 | return (struct zilog_layout __iomem *) mapped_addr; | 1052 | return 0; |
1215 | } | 1053 | } |
1216 | #endif /* !(CONFIG_SPARC64) */ | ||
1217 | 1054 | ||
1218 | /* Get the address of the registers for SunZilog instance CHIP. */ | 1055 | static void sunzilog_free_tables(void) |
1219 | static struct zilog_layout __iomem * __init get_zs(int chip, int node) | ||
1220 | { | 1056 | { |
1221 | if (chip < 0 || chip >= NUM_SUNZILOG) { | 1057 | kfree(sunzilog_port_table); |
1222 | prom_printf("SunZilog: Illegal chip number %d in get_zs.\n", chip); | 1058 | sunzilog_irq_chain = NULL; |
1223 | prom_halt(); | 1059 | kfree(sunzilog_chip_regs); |
1224 | } | ||
1225 | |||
1226 | #ifdef CONFIG_SPARC64 | ||
1227 | return get_zs_sun4u(chip, node); | ||
1228 | #else | ||
1229 | |||
1230 | if (sparc_cpu_model == sun4) { | ||
1231 | struct resource res; | ||
1232 | |||
1233 | /* Not probe-able, hard code it. */ | ||
1234 | switch (chip) { | ||
1235 | case 0: | ||
1236 | res.start = 0xf1000000; | ||
1237 | break; | ||
1238 | case 1: | ||
1239 | res.start = 0xf0000000; | ||
1240 | break; | ||
1241 | }; | ||
1242 | zilog_irq = 12; | ||
1243 | res.end = (res.start + (8 - 1)); | ||
1244 | res.flags = IORESOURCE_IO; | ||
1245 | return sbus_ioremap(&res, 0, 8, "SunZilog"); | ||
1246 | } | ||
1247 | |||
1248 | return get_zs_sun4cmd(chip, node); | ||
1249 | #endif | ||
1250 | } | 1060 | } |
1251 | 1061 | ||
1252 | #define ZS_PUT_CHAR_MAX_DELAY 2000 /* 10 ms */ | 1062 | #define ZS_PUT_CHAR_MAX_DELAY 2000 /* 10 ms */ |
@@ -1260,7 +1070,7 @@ static void sunzilog_putchar(struct uart_port *port, int ch) | |||
1260 | * udelay with ZSDELAY as that is a NOP on some platforms. -DaveM | 1070 | * udelay with ZSDELAY as that is a NOP on some platforms. -DaveM |
1261 | */ | 1071 | */ |
1262 | do { | 1072 | do { |
1263 | unsigned char val = sbus_readb(&channel->control); | 1073 | unsigned char val = readb(&channel->control); |
1264 | if (val & Tx_BUF_EMP) { | 1074 | if (val & Tx_BUF_EMP) { |
1265 | ZSDELAY(); | 1075 | ZSDELAY(); |
1266 | break; | 1076 | break; |
@@ -1268,7 +1078,7 @@ static void sunzilog_putchar(struct uart_port *port, int ch) | |||
1268 | udelay(5); | 1078 | udelay(5); |
1269 | } while (--loops); | 1079 | } while (--loops); |
1270 | 1080 | ||
1271 | sbus_writeb(ch, &channel->data); | 1081 | writeb(ch, &channel->data); |
1272 | ZSDELAY(); | 1082 | ZSDELAY(); |
1273 | ZS_WSYNC(channel); | 1083 | ZS_WSYNC(channel); |
1274 | } | 1084 | } |
@@ -1385,28 +1195,6 @@ static struct console sunzilog_console = { | |||
1385 | .data = &sunzilog_reg, | 1195 | .data = &sunzilog_reg, |
1386 | }; | 1196 | }; |
1387 | 1197 | ||
1388 | static int __init sunzilog_console_init(void) | ||
1389 | { | ||
1390 | int i; | ||
1391 | |||
1392 | if (con_is_present()) | ||
1393 | return 0; | ||
1394 | |||
1395 | for (i = 0; i < NUM_CHANNELS; i++) { | ||
1396 | int this_minor = sunzilog_reg.minor + i; | ||
1397 | |||
1398 | if ((this_minor - 64) == (serial_console - 1)) | ||
1399 | break; | ||
1400 | } | ||
1401 | if (i == NUM_CHANNELS) | ||
1402 | return 0; | ||
1403 | |||
1404 | sunzilog_console.index = i; | ||
1405 | sunzilog_port_table[i].flags |= SUNZILOG_FLAG_IS_CONS; | ||
1406 | register_console(&sunzilog_console); | ||
1407 | return 0; | ||
1408 | } | ||
1409 | |||
1410 | static inline struct console *SUNZILOG_CONSOLE(void) | 1198 | static inline struct console *SUNZILOG_CONSOLE(void) |
1411 | { | 1199 | { |
1412 | int i; | 1200 | int i; |
@@ -1431,101 +1219,8 @@ static inline struct console *SUNZILOG_CONSOLE(void) | |||
1431 | 1219 | ||
1432 | #else | 1220 | #else |
1433 | #define SUNZILOG_CONSOLE() (NULL) | 1221 | #define SUNZILOG_CONSOLE() (NULL) |
1434 | #define sunzilog_console_init() do { } while (0) | ||
1435 | #endif | 1222 | #endif |
1436 | 1223 | ||
1437 | /* | ||
1438 | * We scan the PROM tree recursively. This is the most reliable way | ||
1439 | * to find Zilog nodes on various platforms. However, we face an extreme | ||
1440 | * shortage of kernel stack, so we must be very careful. To that end, | ||
1441 | * we scan only to a certain depth, and we use a common property buffer | ||
1442 | * in the scan structure. | ||
1443 | */ | ||
1444 | #define ZS_PROPSIZE 128 | ||
1445 | #define ZS_SCAN_DEPTH 5 | ||
1446 | |||
1447 | struct zs_probe_scan { | ||
1448 | int depth; | ||
1449 | void (*scanner)(struct zs_probe_scan *t, int node); | ||
1450 | |||
1451 | int devices; | ||
1452 | char prop[ZS_PROPSIZE]; | ||
1453 | }; | ||
1454 | |||
1455 | static int __inline__ sunzilog_node_ok(int node, const char *name, int len) | ||
1456 | { | ||
1457 | if (strncmp(name, "zs", len) == 0) | ||
1458 | return 1; | ||
1459 | /* Don't fold this procedure just yet. Compare to su_node_ok(). */ | ||
1460 | return 0; | ||
1461 | } | ||
1462 | |||
1463 | static void __init sunzilog_scan(struct zs_probe_scan *t, int node) | ||
1464 | { | ||
1465 | int len; | ||
1466 | |||
1467 | for (; node != 0; node = prom_getsibling(node)) { | ||
1468 | len = prom_getproperty(node, "name", t->prop, ZS_PROPSIZE); | ||
1469 | if (len <= 1) | ||
1470 | continue; /* Broken PROM node */ | ||
1471 | if (sunzilog_node_ok(node, t->prop, len)) { | ||
1472 | (*t->scanner)(t, node); | ||
1473 | } else { | ||
1474 | if (t->depth < ZS_SCAN_DEPTH) { | ||
1475 | t->depth++; | ||
1476 | sunzilog_scan(t, prom_getchild(node)); | ||
1477 | --t->depth; | ||
1478 | } | ||
1479 | } | ||
1480 | } | ||
1481 | } | ||
1482 | |||
1483 | static void __init sunzilog_prepare(void) | ||
1484 | { | ||
1485 | struct uart_sunzilog_port *up; | ||
1486 | struct zilog_layout __iomem *rp; | ||
1487 | int channel, chip; | ||
1488 | |||
1489 | /* | ||
1490 | * Temporary fix. | ||
1491 | */ | ||
1492 | for (channel = 0; channel < NUM_CHANNELS; channel++) | ||
1493 | spin_lock_init(&sunzilog_port_table[channel].port.lock); | ||
1494 | |||
1495 | sunzilog_irq_chain = up = &sunzilog_port_table[0]; | ||
1496 | for (channel = 0; channel < NUM_CHANNELS - 1; channel++) | ||
1497 | up[channel].next = &up[channel + 1]; | ||
1498 | up[channel].next = NULL; | ||
1499 | |||
1500 | for (chip = 0; chip < NUM_SUNZILOG; chip++) { | ||
1501 | rp = sunzilog_chip_regs[chip]; | ||
1502 | up[(chip * 2) + 0].port.membase = (void __iomem *)&rp->channelA; | ||
1503 | up[(chip * 2) + 1].port.membase = (void __iomem *)&rp->channelB; | ||
1504 | |||
1505 | /* Channel A */ | ||
1506 | up[(chip * 2) + 0].port.iotype = UPIO_MEM; | ||
1507 | up[(chip * 2) + 0].port.irq = zilog_irq; | ||
1508 | up[(chip * 2) + 0].port.uartclk = ZS_CLOCK; | ||
1509 | up[(chip * 2) + 0].port.fifosize = 1; | ||
1510 | up[(chip * 2) + 0].port.ops = &sunzilog_pops; | ||
1511 | up[(chip * 2) + 0].port.type = PORT_SUNZILOG; | ||
1512 | up[(chip * 2) + 0].port.flags = 0; | ||
1513 | up[(chip * 2) + 0].port.line = (chip * 2) + 0; | ||
1514 | up[(chip * 2) + 0].flags |= SUNZILOG_FLAG_IS_CHANNEL_A; | ||
1515 | |||
1516 | /* Channel B */ | ||
1517 | up[(chip * 2) + 1].port.iotype = UPIO_MEM; | ||
1518 | up[(chip * 2) + 1].port.irq = zilog_irq; | ||
1519 | up[(chip * 2) + 1].port.uartclk = ZS_CLOCK; | ||
1520 | up[(chip * 2) + 1].port.fifosize = 1; | ||
1521 | up[(chip * 2) + 1].port.ops = &sunzilog_pops; | ||
1522 | up[(chip * 2) + 1].port.type = PORT_SUNZILOG; | ||
1523 | up[(chip * 2) + 1].port.flags = 0; | ||
1524 | up[(chip * 2) + 1].port.line = (chip * 2) + 1; | ||
1525 | up[(chip * 2) + 1].flags |= 0; | ||
1526 | } | ||
1527 | } | ||
1528 | |||
1529 | static void __init sunzilog_init_kbdms(struct uart_sunzilog_port *up, int channel) | 1224 | static void __init sunzilog_init_kbdms(struct uart_sunzilog_port *up, int channel) |
1530 | { | 1225 | { |
1531 | int baud, brg; | 1226 | int baud, brg; |
@@ -1539,8 +1234,6 @@ static void __init sunzilog_init_kbdms(struct uart_sunzilog_port *up, int channe | |||
1539 | up->cflag = B4800 | CS8 | CLOCAL | CREAD; | 1234 | up->cflag = B4800 | CS8 | CLOCAL | CREAD; |
1540 | baud = 4800; | 1235 | baud = 4800; |
1541 | } | 1236 | } |
1542 | printk(KERN_INFO "zs%d at 0x%p (irq = %d) is a SunZilog\n", | ||
1543 | channel, up->port.membase, zilog_irq); | ||
1544 | 1237 | ||
1545 | up->curregs[R15] = BRKIE; | 1238 | up->curregs[R15] = BRKIE; |
1546 | brg = BPS_TO_BRG(baud, ZS_CLOCK / ZS_CLOCK_DIVISOR); | 1239 | brg = BPS_TO_BRG(baud, ZS_CLOCK / ZS_CLOCK_DIVISOR); |
@@ -1552,216 +1245,268 @@ static void __init sunzilog_init_kbdms(struct uart_sunzilog_port *up, int channe | |||
1552 | #ifdef CONFIG_SERIO | 1245 | #ifdef CONFIG_SERIO |
1553 | static void __init sunzilog_register_serio(struct uart_sunzilog_port *up, int channel) | 1246 | static void __init sunzilog_register_serio(struct uart_sunzilog_port *up, int channel) |
1554 | { | 1247 | { |
1555 | struct serio *serio; | 1248 | struct serio *serio = &up->serio; |
1556 | |||
1557 | up->serio = serio = kmalloc(sizeof(struct serio), GFP_KERNEL); | ||
1558 | if (serio) { | ||
1559 | memset(serio, 0, sizeof(*serio)); | ||
1560 | |||
1561 | serio->port_data = up; | ||
1562 | |||
1563 | serio->id.type = SERIO_RS232; | ||
1564 | if (channel == KEYBOARD_LINE) { | ||
1565 | serio->id.proto = SERIO_SUNKBD; | ||
1566 | strlcpy(serio->name, "zskbd", sizeof(serio->name)); | ||
1567 | } else { | ||
1568 | serio->id.proto = SERIO_SUN; | ||
1569 | serio->id.extra = 1; | ||
1570 | strlcpy(serio->name, "zsms", sizeof(serio->name)); | ||
1571 | } | ||
1572 | strlcpy(serio->phys, | ||
1573 | (channel == KEYBOARD_LINE ? "zs/serio0" : "zs/serio1"), | ||
1574 | sizeof(serio->phys)); | ||
1575 | 1249 | ||
1576 | serio->write = sunzilog_serio_write; | 1250 | serio->port_data = up; |
1577 | serio->open = sunzilog_serio_open; | ||
1578 | serio->close = sunzilog_serio_close; | ||
1579 | 1251 | ||
1580 | serio_register_port(serio); | 1252 | serio->id.type = SERIO_RS232; |
1253 | if (channel == KEYBOARD_LINE) { | ||
1254 | serio->id.proto = SERIO_SUNKBD; | ||
1255 | strlcpy(serio->name, "zskbd", sizeof(serio->name)); | ||
1581 | } else { | 1256 | } else { |
1582 | printk(KERN_WARNING "zs%d: not enough memory for serio port\n", | 1257 | serio->id.proto = SERIO_SUN; |
1583 | channel); | 1258 | serio->id.extra = 1; |
1259 | strlcpy(serio->name, "zsms", sizeof(serio->name)); | ||
1584 | } | 1260 | } |
1261 | strlcpy(serio->phys, | ||
1262 | (channel == KEYBOARD_LINE ? "zs/serio0" : "zs/serio1"), | ||
1263 | sizeof(serio->phys)); | ||
1264 | |||
1265 | serio->write = sunzilog_serio_write; | ||
1266 | serio->open = sunzilog_serio_open; | ||
1267 | serio->close = sunzilog_serio_close; | ||
1268 | serio->dev.parent = up->port.dev; | ||
1269 | |||
1270 | serio_register_port(serio); | ||
1585 | } | 1271 | } |
1586 | #endif | 1272 | #endif |
1587 | 1273 | ||
1588 | static void __init sunzilog_init_hw(void) | 1274 | static void __init sunzilog_init_hw(struct uart_sunzilog_port *up) |
1589 | { | 1275 | { |
1590 | int i; | 1276 | struct zilog_channel __iomem *channel; |
1591 | 1277 | unsigned long flags; | |
1592 | for (i = 0; i < NUM_CHANNELS; i++) { | 1278 | int baud, brg; |
1593 | struct uart_sunzilog_port *up = &sunzilog_port_table[i]; | ||
1594 | struct zilog_channel __iomem *channel = ZILOG_CHANNEL_FROM_PORT(&up->port); | ||
1595 | unsigned long flags; | ||
1596 | int baud, brg; | ||
1597 | 1279 | ||
1598 | spin_lock_irqsave(&up->port.lock, flags); | 1280 | channel = ZILOG_CHANNEL_FROM_PORT(&up->port); |
1599 | 1281 | ||
1600 | if (ZS_IS_CHANNEL_A(up)) { | 1282 | spin_lock_irqsave(&up->port.lock, flags); |
1601 | write_zsreg(channel, R9, FHWRES); | 1283 | if (ZS_IS_CHANNEL_A(up)) { |
1602 | ZSDELAY_LONG(); | 1284 | write_zsreg(channel, R9, FHWRES); |
1603 | (void) read_zsreg(channel, R0); | 1285 | ZSDELAY_LONG(); |
1604 | } | 1286 | (void) read_zsreg(channel, R0); |
1287 | } | ||
1605 | 1288 | ||
1606 | if (i == KEYBOARD_LINE || i == MOUSE_LINE) { | 1289 | if (up->port.line == KEYBOARD_LINE || |
1607 | sunzilog_init_kbdms(up, i); | 1290 | up->port.line == MOUSE_LINE) { |
1608 | up->curregs[R9] |= (NV | MIE); | 1291 | sunzilog_init_kbdms(up, up->port.line); |
1609 | write_zsreg(channel, R9, up->curregs[R9]); | 1292 | up->curregs[R9] |= (NV | MIE); |
1610 | } else { | 1293 | write_zsreg(channel, R9, up->curregs[R9]); |
1611 | /* Normal serial TTY. */ | 1294 | } else { |
1612 | up->parity_mask = 0xff; | 1295 | /* Normal serial TTY. */ |
1613 | up->curregs[R1] = EXT_INT_ENAB | INT_ALL_Rx | TxINT_ENAB; | 1296 | up->parity_mask = 0xff; |
1614 | up->curregs[R4] = PAR_EVEN | X16CLK | SB1; | 1297 | up->curregs[R1] = EXT_INT_ENAB | INT_ALL_Rx | TxINT_ENAB; |
1615 | up->curregs[R3] = RxENAB | Rx8; | 1298 | up->curregs[R4] = PAR_EVEN | X16CLK | SB1; |
1616 | up->curregs[R5] = TxENAB | Tx8; | 1299 | up->curregs[R3] = RxENAB | Rx8; |
1617 | up->curregs[R9] = NV | MIE; | 1300 | up->curregs[R5] = TxENAB | Tx8; |
1618 | up->curregs[R10] = NRZ; | 1301 | up->curregs[R9] = NV | MIE; |
1619 | up->curregs[R11] = TCBR | RCBR; | 1302 | up->curregs[R10] = NRZ; |
1620 | baud = 9600; | 1303 | up->curregs[R11] = TCBR | RCBR; |
1621 | brg = BPS_TO_BRG(baud, ZS_CLOCK / ZS_CLOCK_DIVISOR); | 1304 | baud = 9600; |
1622 | up->curregs[R12] = (brg & 0xff); | 1305 | brg = BPS_TO_BRG(baud, ZS_CLOCK / ZS_CLOCK_DIVISOR); |
1623 | up->curregs[R13] = (brg >> 8) & 0xff; | 1306 | up->curregs[R12] = (brg & 0xff); |
1624 | up->curregs[R14] = BRSRC | BRENAB; | 1307 | up->curregs[R13] = (brg >> 8) & 0xff; |
1625 | __load_zsregs(channel, up->curregs); | 1308 | up->curregs[R14] = BRSRC | BRENAB; |
1626 | write_zsreg(channel, R9, up->curregs[R9]); | 1309 | __load_zsregs(channel, up->curregs); |
1627 | } | 1310 | write_zsreg(channel, R9, up->curregs[R9]); |
1311 | } | ||
1628 | 1312 | ||
1629 | spin_unlock_irqrestore(&up->port.lock, flags); | 1313 | spin_unlock_irqrestore(&up->port.lock, flags); |
1630 | 1314 | ||
1631 | #ifdef CONFIG_SERIO | 1315 | #ifdef CONFIG_SERIO |
1632 | if (i == KEYBOARD_LINE || i == MOUSE_LINE) | 1316 | if (up->port.line == KEYBOARD_LINE || up->port.line == MOUSE_LINE) |
1633 | sunzilog_register_serio(up, i); | 1317 | sunzilog_register_serio(up, up->port.line); |
1634 | #endif | 1318 | #endif |
1635 | } | ||
1636 | } | ||
1637 | |||
1638 | static struct zilog_layout __iomem * __init get_zs(int chip, int node); | ||
1639 | |||
1640 | static void __init sunzilog_scan_probe(struct zs_probe_scan *t, int node) | ||
1641 | { | ||
1642 | sunzilog_chip_regs[t->devices] = get_zs(t->devices, node); | ||
1643 | t->devices++; | ||
1644 | } | 1319 | } |
1645 | 1320 | ||
1646 | static int __init sunzilog_ports_init(void) | 1321 | static int __devinit zs_get_instance(struct device_node *dp) |
1647 | { | 1322 | { |
1648 | struct zs_probe_scan scan; | ||
1649 | int ret; | 1323 | int ret; |
1650 | int uart_count; | ||
1651 | int i; | ||
1652 | |||
1653 | printk(KERN_DEBUG "SunZilog: %d chips.\n", NUM_SUNZILOG); | ||
1654 | |||
1655 | scan.scanner = sunzilog_scan_probe; | ||
1656 | scan.depth = 0; | ||
1657 | scan.devices = 0; | ||
1658 | sunzilog_scan(&scan, prom_getchild(prom_root_node)); | ||
1659 | |||
1660 | sunzilog_prepare(); | ||
1661 | 1324 | ||
1662 | if (request_irq(zilog_irq, sunzilog_interrupt, SA_SHIRQ, | 1325 | ret = of_getintprop_default(dp, "slave", -1); |
1663 | "SunZilog", sunzilog_irq_chain)) { | 1326 | if (ret != -1) |
1664 | prom_printf("SunZilog: Unable to register zs interrupt handler.\n"); | 1327 | return ret; |
1665 | prom_halt(); | ||
1666 | } | ||
1667 | 1328 | ||
1668 | sunzilog_init_hw(); | 1329 | if (of_find_property(dp, "keyboard", NULL)) |
1330 | ret = 1; | ||
1331 | else | ||
1332 | ret = 0; | ||
1669 | 1333 | ||
1670 | /* We can only init this once we have probed the Zilogs | 1334 | return ret; |
1671 | * in the system. Do not count channels assigned to keyboards | 1335 | } |
1672 | * or mice when we are deciding how many ports to register. | ||
1673 | */ | ||
1674 | uart_count = 0; | ||
1675 | for (i = 0; i < NUM_CHANNELS; i++) { | ||
1676 | struct uart_sunzilog_port *up = &sunzilog_port_table[i]; | ||
1677 | 1336 | ||
1678 | if (ZS_IS_KEYB(up) || ZS_IS_MOUSE(up)) | 1337 | static int zilog_irq = -1; |
1679 | continue; | ||
1680 | 1338 | ||
1681 | uart_count++; | 1339 | static int __devinit zs_probe(struct of_device *dev, const struct of_device_id *match) |
1682 | } | 1340 | { |
1683 | 1341 | struct of_device *op = to_of_device(&dev->dev); | |
1684 | sunzilog_reg.nr = uart_count; | 1342 | struct uart_sunzilog_port *up; |
1685 | sunzilog_reg.minor = sunserial_current_minor; | 1343 | struct zilog_layout __iomem *rp; |
1344 | int inst = zs_get_instance(dev->node); | ||
1345 | int err; | ||
1686 | 1346 | ||
1687 | ret = uart_register_driver(&sunzilog_reg); | 1347 | sunzilog_chip_regs[inst] = of_ioremap(&op->resource[0], 0, |
1688 | if (ret == 0) { | 1348 | sizeof(struct zilog_layout), |
1689 | sunzilog_reg.tty_driver->name_base = sunzilog_reg.minor - 64; | 1349 | "zs"); |
1690 | sunzilog_reg.cons = SUNZILOG_CONSOLE(); | 1350 | if (!sunzilog_chip_regs[inst]) |
1351 | return -ENOMEM; | ||
1691 | 1352 | ||
1692 | sunserial_current_minor += uart_count; | 1353 | rp = sunzilog_chip_regs[inst]; |
1693 | 1354 | ||
1694 | for (i = 0; i < NUM_CHANNELS; i++) { | 1355 | if (zilog_irq == -1) { |
1695 | struct uart_sunzilog_port *up = &sunzilog_port_table[i]; | 1356 | zilog_irq = op->irqs[0]; |
1357 | err = request_irq(zilog_irq, sunzilog_interrupt, SA_SHIRQ, | ||
1358 | "zs", sunzilog_irq_chain); | ||
1359 | if (err) { | ||
1360 | of_iounmap(rp, sizeof(struct zilog_layout)); | ||
1696 | 1361 | ||
1697 | if (ZS_IS_KEYB(up) || ZS_IS_MOUSE(up)) | 1362 | return err; |
1698 | continue; | 1363 | } |
1364 | } | ||
1699 | 1365 | ||
1700 | if (uart_add_one_port(&sunzilog_reg, &up->port)) { | 1366 | up = &sunzilog_port_table[inst * 2]; |
1701 | printk(KERN_ERR | 1367 | |
1702 | "SunZilog: failed to add port zs%d\n", i); | 1368 | /* Channel A */ |
1703 | } | 1369 | up[0].port.mapbase = op->resource[0].start + 0x00; |
1370 | up[0].port.membase = (void __iomem *) &rp->channelA; | ||
1371 | up[0].port.iotype = UPIO_MEM; | ||
1372 | up[0].port.irq = op->irqs[0]; | ||
1373 | up[0].port.uartclk = ZS_CLOCK; | ||
1374 | up[0].port.fifosize = 1; | ||
1375 | up[0].port.ops = &sunzilog_pops; | ||
1376 | up[0].port.type = PORT_SUNZILOG; | ||
1377 | up[0].port.flags = 0; | ||
1378 | up[0].port.line = (inst * 2) + 0; | ||
1379 | up[0].port.dev = &op->dev; | ||
1380 | up[0].flags |= SUNZILOG_FLAG_IS_CHANNEL_A; | ||
1381 | if (inst == 1) | ||
1382 | up[0].flags |= SUNZILOG_FLAG_CONS_KEYB; | ||
1383 | sunzilog_init_hw(&up[0]); | ||
1384 | |||
1385 | /* Channel B */ | ||
1386 | up[1].port.mapbase = op->resource[0].start + 0x04; | ||
1387 | up[1].port.membase = (void __iomem *) &rp->channelB; | ||
1388 | up[1].port.iotype = UPIO_MEM; | ||
1389 | up[1].port.irq = op->irqs[0]; | ||
1390 | up[1].port.uartclk = ZS_CLOCK; | ||
1391 | up[1].port.fifosize = 1; | ||
1392 | up[1].port.ops = &sunzilog_pops; | ||
1393 | up[1].port.type = PORT_SUNZILOG; | ||
1394 | up[1].port.flags = 0; | ||
1395 | up[1].port.line = (inst * 2) + 1; | ||
1396 | up[1].port.dev = &op->dev; | ||
1397 | up[1].flags |= 0; | ||
1398 | if (inst == 1) | ||
1399 | up[1].flags |= SUNZILOG_FLAG_CONS_MOUSE; | ||
1400 | sunzilog_init_hw(&up[1]); | ||
1401 | |||
1402 | if (inst != 1) { | ||
1403 | err = uart_add_one_port(&sunzilog_reg, &up[0].port); | ||
1404 | if (err) { | ||
1405 | of_iounmap(rp, sizeof(struct zilog_layout)); | ||
1406 | return err; | ||
1407 | } | ||
1408 | err = uart_add_one_port(&sunzilog_reg, &up[1].port); | ||
1409 | if (err) { | ||
1410 | uart_remove_one_port(&sunzilog_reg, &up[0].port); | ||
1411 | of_iounmap(rp, sizeof(struct zilog_layout)); | ||
1412 | return err; | ||
1704 | } | 1413 | } |
1705 | } | 1414 | } |
1706 | 1415 | ||
1707 | return ret; | 1416 | dev_set_drvdata(&dev->dev, &up[0]); |
1417 | |||
1418 | return 0; | ||
1708 | } | 1419 | } |
1709 | 1420 | ||
1710 | static void __init sunzilog_scan_count(struct zs_probe_scan *t, int node) | 1421 | static void __devexit zs_remove_one(struct uart_sunzilog_port *up) |
1711 | { | 1422 | { |
1712 | t->devices++; | 1423 | if (ZS_IS_KEYB(up) || ZS_IS_MOUSE(up)) { |
1424 | #ifdef CONFIG_SERIO | ||
1425 | serio_unregister_port(&up->serio); | ||
1426 | #endif | ||
1427 | } else | ||
1428 | uart_remove_one_port(&sunzilog_reg, &up->port); | ||
1713 | } | 1429 | } |
1714 | 1430 | ||
1715 | static int __init sunzilog_ports_count(void) | 1431 | static int __devexit zs_remove(struct of_device *dev) |
1716 | { | 1432 | { |
1717 | struct zs_probe_scan scan; | 1433 | struct uart_sunzilog_port *up = dev_get_drvdata(&dev->dev); |
1434 | struct zilog_layout __iomem *regs; | ||
1718 | 1435 | ||
1719 | /* Sun4 Zilog setup is hard coded, no probing to do. */ | 1436 | zs_remove_one(&up[0]); |
1720 | if (sparc_cpu_model == sun4) | 1437 | zs_remove_one(&up[1]); |
1721 | return 2; | ||
1722 | 1438 | ||
1723 | scan.scanner = sunzilog_scan_count; | 1439 | regs = sunzilog_chip_regs[up[0].port.line / 2]; |
1724 | scan.depth = 0; | 1440 | of_iounmap(regs, sizeof(struct zilog_layout)); |
1725 | scan.devices = 0; | ||
1726 | 1441 | ||
1727 | sunzilog_scan(&scan, prom_getchild(prom_root_node)); | 1442 | dev_set_drvdata(&dev->dev, NULL); |
1728 | 1443 | ||
1729 | return scan.devices; | 1444 | return 0; |
1730 | } | 1445 | } |
1731 | 1446 | ||
1447 | static struct of_device_id zs_match[] = { | ||
1448 | { | ||
1449 | .name = "zs", | ||
1450 | }, | ||
1451 | {}, | ||
1452 | }; | ||
1453 | MODULE_DEVICE_TABLE(of, zs_match); | ||
1454 | |||
1455 | static struct of_platform_driver zs_driver = { | ||
1456 | .name = "zs", | ||
1457 | .match_table = zs_match, | ||
1458 | .probe = zs_probe, | ||
1459 | .remove = __devexit_p(zs_remove), | ||
1460 | }; | ||
1461 | |||
1732 | static int __init sunzilog_init(void) | 1462 | static int __init sunzilog_init(void) |
1733 | { | 1463 | { |
1464 | struct device_node *dp; | ||
1465 | int err; | ||
1734 | 1466 | ||
1735 | NUM_SUNZILOG = sunzilog_ports_count(); | 1467 | NUM_SUNZILOG = 0; |
1736 | if (NUM_SUNZILOG == 0) | 1468 | for_each_node_by_name(dp, "zs") |
1737 | return -ENODEV; | 1469 | NUM_SUNZILOG++; |
1738 | 1470 | ||
1739 | sunzilog_alloc_tables(); | 1471 | if (NUM_SUNZILOG) { |
1472 | int uart_count; | ||
1740 | 1473 | ||
1741 | sunzilog_ports_init(); | 1474 | err = sunzilog_alloc_tables(); |
1475 | if (err) | ||
1476 | return err; | ||
1742 | 1477 | ||
1743 | return 0; | 1478 | /* Subtract 1 for keyboard, 1 for mouse. */ |
1479 | uart_count = (NUM_SUNZILOG * 2) - 2; | ||
1480 | |||
1481 | sunzilog_reg.nr = uart_count; | ||
1482 | sunzilog_reg.minor = sunserial_current_minor; | ||
1483 | err = uart_register_driver(&sunzilog_reg); | ||
1484 | if (err) { | ||
1485 | sunzilog_free_tables(); | ||
1486 | return err; | ||
1487 | } | ||
1488 | sunzilog_reg.tty_driver->name_base = sunzilog_reg.minor - 64; | ||
1489 | sunzilog_reg.cons = SUNZILOG_CONSOLE(); | ||
1490 | |||
1491 | sunserial_current_minor += uart_count; | ||
1492 | } | ||
1493 | |||
1494 | return of_register_driver(&zs_driver, &of_bus_type); | ||
1744 | } | 1495 | } |
1745 | 1496 | ||
1746 | static void __exit sunzilog_exit(void) | 1497 | static void __exit sunzilog_exit(void) |
1747 | { | 1498 | { |
1748 | int i; | 1499 | of_unregister_driver(&zs_driver); |
1749 | 1500 | ||
1750 | for (i = 0; i < NUM_CHANNELS; i++) { | 1501 | if (zilog_irq != -1) { |
1751 | struct uart_sunzilog_port *up = &sunzilog_port_table[i]; | 1502 | free_irq(zilog_irq, sunzilog_irq_chain); |
1752 | 1503 | zilog_irq = -1; | |
1753 | if (ZS_IS_KEYB(up) || ZS_IS_MOUSE(up)) { | ||
1754 | #ifdef CONFIG_SERIO | ||
1755 | if (up->serio) { | ||
1756 | serio_unregister_port(up->serio); | ||
1757 | up->serio = NULL; | ||
1758 | } | ||
1759 | #endif | ||
1760 | } else | ||
1761 | uart_remove_one_port(&sunzilog_reg, &up->port); | ||
1762 | } | 1504 | } |
1763 | 1505 | ||
1764 | uart_unregister_driver(&sunzilog_reg); | 1506 | if (NUM_SUNZILOG) { |
1507 | uart_unregister_driver(&sunzilog_reg); | ||
1508 | sunzilog_free_tables(); | ||
1509 | } | ||
1765 | } | 1510 | } |
1766 | 1511 | ||
1767 | module_init(sunzilog_init); | 1512 | module_init(sunzilog_init); |
@@ -1769,4 +1514,5 @@ module_exit(sunzilog_exit); | |||
1769 | 1514 | ||
1770 | MODULE_AUTHOR("David S. Miller"); | 1515 | MODULE_AUTHOR("David S. Miller"); |
1771 | MODULE_DESCRIPTION("Sun Zilog serial port driver"); | 1516 | MODULE_DESCRIPTION("Sun Zilog serial port driver"); |
1517 | MODULE_VERSION("2.0"); | ||
1772 | MODULE_LICENSE("GPL"); | 1518 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c index 017571ffa19c..e93d0edc2e08 100644 --- a/drivers/serial/vr41xx_siu.c +++ b/drivers/serial/vr41xx_siu.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * along with this program; if not, write to the Free Software | 19 | * along with this program; if not, write to the Free Software |
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | #include <linux/config.h> | ||
23 | 22 | ||
24 | #if defined(CONFIG_SERIAL_VR41XX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 23 | #if defined(CONFIG_SERIAL_VR41XX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
25 | #define SUPPORT_SYSRQ | 24 | #define SUPPORT_SYSRQ |
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c index ed946311d3a4..0040f10c9e39 100644 --- a/drivers/sn/ioc3.c +++ b/drivers/sn/ioc3.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * Pat Gefre <pfg@sgi.com> - IOC3 serial port IRQ demuxer | 7 | * Pat Gefre <pfg@sgi.com> - IOC3 serial port IRQ demuxer |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c index dd2f950b21a7..a23862ef72b2 100644 --- a/drivers/spi/spi_bitbang.c +++ b/drivers/spi/spi_bitbang.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/init.h> | 19 | #include <linux/init.h> |
21 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
22 | #include <linux/workqueue.h> | 21 | #include <linux/workqueue.h> |
diff --git a/drivers/spi/spi_butterfly.c b/drivers/spi/spi_butterfly.c index a006a1ee27ac..39d9b20f2038 100644 --- a/drivers/spi/spi_butterfly.c +++ b/drivers/spi/spi_butterfly.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | */ | 19 | */ |
20 | #include <linux/config.h> | ||
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
22 | #include <linux/init.h> | 21 | #include <linux/init.h> |
23 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/tc/lk201.c b/drivers/tc/lk201.c index cf10d5cdfb93..757dec9c7ee9 100644 --- a/drivers/tc/lk201.c +++ b/drivers/tc/lk201.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * Copyright (C) 2001, 2002, 2003, 2004 Maciej W. Rozycki | 8 | * Copyright (C) 2001, 2002, 2003, 2004 Maciej W. Rozycki |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | 11 | ||
13 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
14 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
diff --git a/drivers/tc/zs.c b/drivers/tc/zs.c index 7f27b356eaf7..93bc90b8ff92 100644 --- a/drivers/tc/zs.c +++ b/drivers/tc/zs.c | |||
@@ -39,7 +39,6 @@ | |||
39 | * is shared with DSRS(DTE) at pin 23. | 39 | * is shared with DSRS(DTE) at pin 23. |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include <linux/config.h> | ||
43 | #include <linux/errno.h> | 42 | #include <linux/errno.h> |
44 | #include <linux/signal.h> | 43 | #include <linux/signal.h> |
45 | #include <linux/sched.h> | 44 | #include <linux/sched.h> |
diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c index ad742cec94fa..f4f4ef0f377a 100644 --- a/drivers/usb/core/buffer.c +++ b/drivers/usb/core/buffer.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * and should work with all USB controllers, regardles of bus type. | 5 | * and should work with all USB controllers, regardles of bus type. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/module.h> | 8 | #include <linux/module.h> |
10 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
11 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index a9d89c78cc20..4c9e63e665b6 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <linux/usb.h> | 1 | #include <linux/usb.h> |
3 | #include <linux/module.h> | 2 | #include <linux/module.h> |
4 | #include <linux/init.h> | 3 | #include <linux/init.h> |
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index bcbeaf7101d1..f7bdd94b3aa8 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/usbdevice_fs.h> | 47 | #include <linux/usbdevice_fs.h> |
48 | #include <linux/cdev.h> | 48 | #include <linux/cdev.h> |
49 | #include <linux/notifier.h> | 49 | #include <linux/notifier.h> |
50 | #include <linux/security.h> | ||
50 | #include <asm/uaccess.h> | 51 | #include <asm/uaccess.h> |
51 | #include <asm/byteorder.h> | 52 | #include <asm/byteorder.h> |
52 | #include <linux/moduleparam.h> | 53 | #include <linux/moduleparam.h> |
@@ -68,6 +69,7 @@ struct async { | |||
68 | void __user *userbuffer; | 69 | void __user *userbuffer; |
69 | void __user *userurb; | 70 | void __user *userurb; |
70 | struct urb *urb; | 71 | struct urb *urb; |
72 | u32 secid; | ||
71 | }; | 73 | }; |
72 | 74 | ||
73 | static int usbfs_snoop = 0; | 75 | static int usbfs_snoop = 0; |
@@ -312,7 +314,7 @@ static void async_completed(struct urb *urb, struct pt_regs *regs) | |||
312 | sinfo.si_code = SI_ASYNCIO; | 314 | sinfo.si_code = SI_ASYNCIO; |
313 | sinfo.si_addr = as->userurb; | 315 | sinfo.si_addr = as->userurb; |
314 | kill_proc_info_as_uid(as->signr, &sinfo, as->pid, as->uid, | 316 | kill_proc_info_as_uid(as->signr, &sinfo, as->pid, as->uid, |
315 | as->euid); | 317 | as->euid, as->secid); |
316 | } | 318 | } |
317 | snoop(&urb->dev->dev, "urb complete\n"); | 319 | snoop(&urb->dev->dev, "urb complete\n"); |
318 | snoop_urb(urb, as->userurb); | 320 | snoop_urb(urb, as->userurb); |
@@ -572,6 +574,7 @@ static int usbdev_open(struct inode *inode, struct file *file) | |||
572 | ps->disc_euid = current->euid; | 574 | ps->disc_euid = current->euid; |
573 | ps->disccontext = NULL; | 575 | ps->disccontext = NULL; |
574 | ps->ifclaimed = 0; | 576 | ps->ifclaimed = 0; |
577 | security_task_getsecid(current, &ps->secid); | ||
575 | wmb(); | 578 | wmb(); |
576 | list_add_tail(&ps->list, &dev->filelist); | 579 | list_add_tail(&ps->list, &dev->filelist); |
577 | file->private_data = ps; | 580 | file->private_data = ps; |
@@ -1053,6 +1056,7 @@ static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb, | |||
1053 | as->pid = current->pid; | 1056 | as->pid = current->pid; |
1054 | as->uid = current->uid; | 1057 | as->uid = current->uid; |
1055 | as->euid = current->euid; | 1058 | as->euid = current->euid; |
1059 | security_task_getsecid(current, &as->secid); | ||
1056 | if (!(uurb->endpoint & USB_DIR_IN)) { | 1060 | if (!(uurb->endpoint & USB_DIR_IN)) { |
1057 | if (copy_from_user(as->urb->transfer_buffer, uurb->buffer, as->urb->transfer_buffer_length)) { | 1061 | if (copy_from_user(as->urb->transfer_buffer, uurb->buffer, as->urb->transfer_buffer_length)) { |
1058 | free_async(as); | 1062 | free_async(as); |
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index c196f3845305..ec8906501415 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c | |||
@@ -21,7 +21,6 @@ | |||
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/device.h> | 24 | #include <linux/device.h> |
26 | #include <linux/usb.h> | 25 | #include <linux/usb.h> |
27 | #include "hcd.h" | 26 | #include "hcd.h" |
diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c index f65b193cde3d..abee0f5b6a66 100644 --- a/drivers/usb/core/file.c +++ b/drivers/usb/core/file.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * | 15 | * |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/module.h> | 18 | #include <linux/module.h> |
20 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
21 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 66b78404ab34..9d16716d166e 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 16 | * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 4bf914d00a14..fb4d058bbde0 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 22 | * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/version.h> | 26 | #include <linux/version.h> |
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index e1731ff8af4d..875596e98e42 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
13 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c index bfc9b28a7242..e47e3a8ed6e4 100644 --- a/drivers/usb/core/inode.c +++ b/drivers/usb/core/inode.c | |||
@@ -27,7 +27,6 @@ | |||
27 | 27 | ||
28 | /*****************************************************************************/ | 28 | /*****************************************************************************/ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/fs.h> | 31 | #include <linux/fs.h> |
33 | #include <linux/mount.h> | 32 | #include <linux/mount.h> |
@@ -700,7 +699,7 @@ static void usbfs_remove_device(struct usb_device *dev) | |||
700 | sinfo.si_errno = EPIPE; | 699 | sinfo.si_errno = EPIPE; |
701 | sinfo.si_code = SI_ASYNCIO; | 700 | sinfo.si_code = SI_ASYNCIO; |
702 | sinfo.si_addr = ds->disccontext; | 701 | sinfo.si_addr = ds->disccontext; |
703 | kill_proc_info_as_uid(ds->discsignr, &sinfo, ds->disc_pid, ds->disc_uid, ds->disc_euid); | 702 | kill_proc_info_as_uid(ds->discsignr, &sinfo, ds->disc_pid, ds->disc_uid, ds->disc_euid, ds->secid); |
704 | } | 703 | } |
705 | } | 704 | } |
706 | } | 705 | } |
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 8569600f3130..4cc8d3e67db7 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
@@ -2,7 +2,6 @@ | |||
2 | * message.c - synchronous message handling | 2 | * message.c - synchronous message handling |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/config.h> | ||
6 | #include <linux/pci.h> /* for scatterlist macros */ | 5 | #include <linux/pci.h> /* for scatterlist macros */ |
7 | #include <linux/usb.h> | 6 | #include <linux/usb.h> |
8 | #include <linux/module.h> | 7 | #include <linux/module.h> |
diff --git a/drivers/usb/core/notify.c b/drivers/usb/core/notify.c index fe0ed54fa0ae..b042676af0a5 100644 --- a/drivers/usb/core/notify.c +++ b/drivers/usb/core/notify.c | |||
@@ -9,7 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/notifier.h> | 13 | #include <linux/notifier.h> |
15 | #include <linux/usb.h> | 14 | #include <linux/usb.h> |
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index 3f49bf51cff7..dec973affb0f 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/usb.h> | 14 | #include <linux/usb.h> |
16 | #include "usb.h" | 15 | #include "usb.h" |
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index dad4d8fd8180..9864988377c7 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <linux/module.h> | 1 | #include <linux/module.h> |
3 | #include <linux/string.h> | 2 | #include <linux/string.h> |
4 | #include <linux/bitops.h> | 3 | #include <linux/bitops.h> |
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index fb488c8a860c..184c24660a4c 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
@@ -21,7 +21,6 @@ | |||
21 | * are evil. | 21 | * are evil. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | #include <linux/string.h> | 25 | #include <linux/string.h> |
27 | #include <linux/bitops.h> | 26 | #include <linux/bitops.h> |
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 7a650c763a62..49f69236b420 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h | |||
@@ -80,6 +80,7 @@ struct dev_state { | |||
80 | uid_t disc_uid, disc_euid; | 80 | uid_t disc_uid, disc_euid; |
81 | void __user *disccontext; | 81 | void __user *disccontext; |
82 | unsigned long ifclaimed; | 82 | unsigned long ifclaimed; |
83 | u32 secid; | ||
83 | }; | 84 | }; |
84 | 85 | ||
85 | /* internal notify stuff */ | 86 | /* internal notify stuff */ |
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index b8d0b7825bf3..acb3c3d2e888 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #undef VERBOSE | 25 | #undef VERBOSE |
26 | #undef PACKET_TRACE | 26 | #undef PACKET_TRACE |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index 42ce41d71b7f..4be47195bd38 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c | |||
@@ -36,7 +36,6 @@ | |||
36 | 36 | ||
37 | #define DEBUG | 37 | #define DEBUG |
38 | 38 | ||
39 | #include <linux/config.h> | ||
40 | #include <linux/module.h> | 39 | #include <linux/module.h> |
41 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
42 | #include <linux/delay.h> | 41 | #include <linux/delay.h> |
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 078daa026718..8320fcef0425 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c | |||
@@ -23,7 +23,6 @@ | |||
23 | // #define DEBUG 1 | 23 | // #define DEBUG 1 |
24 | // #define VERBOSE | 24 | // #define VERBOSE |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/module.h> | 26 | #include <linux/module.h> |
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
29 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index a43dc908ac59..b1a9cf06f3e6 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c | |||
@@ -221,7 +221,6 @@ | |||
221 | #undef VERBOSE | 221 | #undef VERBOSE |
222 | #undef DUMP_MSGS | 222 | #undef DUMP_MSGS |
223 | 223 | ||
224 | #include <linux/config.h> | ||
225 | 224 | ||
226 | #include <asm/system.h> | 225 | #include <asm/system.h> |
227 | #include <asm/uaccess.h> | 226 | #include <asm/uaccess.h> |
diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c index 5378c1757292..3f827ded8cdf 100644 --- a/drivers/usb/gadget/goku_udc.c +++ b/drivers/usb/gadget/goku_udc.c | |||
@@ -24,7 +24,6 @@ | |||
24 | // #define VERBOSE /* extra debug messages (success too) */ | 24 | // #define VERBOSE /* extra debug messages (success too) */ |
25 | // #define USB_TRACE /* packet-level success messages */ | 25 | // #define USB_TRACE /* packet-level success messages */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
diff --git a/drivers/usb/gadget/lh7a40x_udc.h b/drivers/usb/gadget/lh7a40x_udc.h index 9b2e6f7cbb8b..e3bb78524c88 100644 --- a/drivers/usb/gadget/lh7a40x_udc.h +++ b/drivers/usb/gadget/lh7a40x_udc.h | |||
@@ -24,7 +24,6 @@ | |||
24 | #ifndef __LH7A40X_H_ | 24 | #ifndef __LH7A40X_H_ |
25 | #define __LH7A40X_H_ | 25 | #define __LH7A40X_H_ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/module.h> | 27 | #include <linux/module.h> |
29 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
30 | #include <linux/ioport.h> | 29 | #include <linux/ioport.h> |
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index 1facdea56a8a..570996d7eb34 100644 --- a/drivers/usb/gadget/net2280.c +++ b/drivers/usb/gadget/net2280.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #undef DEBUG /* messages on error and most fault paths */ | 46 | #undef DEBUG /* messages on error and most fault paths */ |
47 | #undef VERBOSE /* extra debug messages (success too) */ | 47 | #undef VERBOSE /* extra debug messages (success too) */ |
48 | 48 | ||
49 | #include <linux/config.h> | ||
50 | #include <linux/module.h> | 49 | #include <linux/module.h> |
51 | #include <linux/pci.h> | 50 | #include <linux/pci.h> |
52 | #include <linux/dma-mapping.h> | 51 | #include <linux/dma-mapping.h> |
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index fbea51448909..0d642ac70055 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #undef DEBUG | 22 | #undef DEBUG |
23 | #undef VERBOSE | 23 | #undef VERBOSE |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
28 | #include <linux/ioport.h> | 27 | #include <linux/ioport.h> |
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c index 735e9dbd39fd..c88650dffdeb 100644 --- a/drivers/usb/gadget/pxa2xx_udc.c +++ b/drivers/usb/gadget/pxa2xx_udc.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #undef DEBUG | 27 | #undef DEBUG |
28 | // #define VERBOSE DBG_VERBOSE | 28 | // #define VERBOSE DBG_VERBOSE |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
33 | #include <linux/ioport.h> | 32 | #include <linux/ioport.h> |
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index 3ff6db7828a0..354670d12308 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * updates to merge with Linux 2.6, better match RNDIS spec | 23 | * updates to merge with Linux 2.6, better match RNDIS spec |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/module.h> | 26 | #include <linux/module.h> |
28 | #include <linux/moduleparam.h> | 27 | #include <linux/moduleparam.h> |
29 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index 416acac879df..30d7664d449d 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
23 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index 68e3d8f5da89..3a08a7ab4ce0 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c | |||
@@ -62,7 +62,6 @@ | |||
62 | #define DEBUG 1 | 62 | #define DEBUG 1 |
63 | // #define VERBOSE | 63 | // #define VERBOSE |
64 | 64 | ||
65 | #include <linux/config.h> | ||
66 | #include <linux/module.h> | 65 | #include <linux/module.h> |
67 | #include <linux/kernel.h> | 66 | #include <linux/kernel.h> |
68 | #include <linux/delay.h> | 67 | #include <linux/delay.h> |
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 9b37e508ada3..cee6f538de0a 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 16 | * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/module.h> | 19 | #include <linux/module.h> |
21 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
22 | #include <linux/dmapool.h> | 21 | #include <linux/dmapool.h> |
diff --git a/drivers/usb/host/hc_crisv10.c b/drivers/usb/host/hc_crisv10.c index 4a22909518f5..61e571782cf7 100644 --- a/drivers/usb/host/hc_crisv10.c +++ b/drivers/usb/host/hc_crisv10.c | |||
@@ -4,7 +4,6 @@ | |||
4 | * Copyright (c) 2002, 2003 Axis Communications AB. | 4 | * Copyright (c) 2002, 2003 Axis Communications AB. |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/config.h> | ||
8 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
9 | #include <linux/delay.h> | 8 | #include <linux/delay.h> |
10 | #include <linux/ioport.h> | 9 | #include <linux/ioport.h> |
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 73f5a379d9b3..8fb842ed5f6e 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -74,7 +74,6 @@ | |||
74 | * This file is licenced under the GPL. | 74 | * This file is licenced under the GPL. |
75 | */ | 75 | */ |
76 | 76 | ||
77 | #include <linux/config.h> | ||
78 | #include <linux/module.h> | 77 | #include <linux/module.h> |
79 | #include <linux/moduleparam.h> | 78 | #include <linux/moduleparam.h> |
80 | #include <linux/pci.h> | 79 | #include <linux/pci.h> |
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index 1045f846fbe2..dff60568b4a1 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * (and others) | 8 | * (and others) |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/types.h> | 11 | #include <linux/types.h> |
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index 89bcda5a3298..c327168255cd 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #undef VERBOSE | 31 | #undef VERBOSE |
32 | #undef PACKET_TRACE | 32 | #undef PACKET_TRACE |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
36 | #include <linux/moduleparam.h> | 35 | #include <linux/moduleparam.h> |
37 | #include <linux/kernel.h> | 36 | #include <linux/kernel.h> |
diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c index 6637a0e49978..dc286a48cafd 100644 --- a/drivers/usb/host/uhci-debug.c +++ b/drivers/usb/host/uhci-debug.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * (C) Copyright 1999-2001 Johannes Erdfelt | 9 | * (C) Copyright 1999-2001 Johannes Erdfelt |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/debugfs.h> | 13 | #include <linux/debugfs.h> |
15 | #include <linux/smp_lock.h> | 14 | #include <linux/smp_lock.h> |
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index 7b48567622ef..4151f618602d 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/pci.h> | 26 | #include <linux/pci.h> |
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
diff --git a/drivers/usb/input/appletouch.c b/drivers/usb/input/appletouch.c index 36855062eacc..9e3f13903371 100644 --- a/drivers/usb/input/appletouch.c +++ b/drivers/usb/input/appletouch.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
32 | #include <linux/errno.h> | 31 | #include <linux/errno.h> |
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
diff --git a/drivers/usb/input/ati_remote.c b/drivers/usb/input/ati_remote.c index 07c8c0e665dd..05d2d6012eb2 100644 --- a/drivers/usb/input/ati_remote.c +++ b/drivers/usb/input/ati_remote.c | |||
@@ -85,7 +85,6 @@ | |||
85 | * | 85 | * |
86 | */ | 86 | */ |
87 | 87 | ||
88 | #include <linux/config.h> | ||
89 | #include <linux/kernel.h> | 88 | #include <linux/kernel.h> |
90 | #include <linux/errno.h> | 89 | #include <linux/errno.h> |
91 | #include <linux/init.h> | 90 | #include <linux/init.h> |
diff --git a/drivers/usb/input/hiddev.c b/drivers/usb/input/hiddev.c index c4670e1d4654..70477f02cc29 100644 --- a/drivers/usb/input/hiddev.c +++ b/drivers/usb/input/hiddev.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * e-mail - mail your message to Paul Stewart <stewart@wetlogic.net> | 25 | * e-mail - mail your message to Paul Stewart <stewart@wetlogic.net> |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/poll.h> | 28 | #include <linux/poll.h> |
30 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
diff --git a/drivers/usb/input/itmtouch.c b/drivers/usb/input/itmtouch.c index 5c570cc703f3..86acb5f1907a 100644 --- a/drivers/usb/input/itmtouch.c +++ b/drivers/usb/input/itmtouch.c | |||
@@ -39,7 +39,6 @@ | |||
39 | * | 39 | * |
40 | *****************************************************************************/ | 40 | *****************************************************************************/ |
41 | 41 | ||
42 | #include <linux/config.h> | ||
43 | #include <linux/kernel.h> | 42 | #include <linux/kernel.h> |
44 | #include <linux/slab.h> | 43 | #include <linux/slab.h> |
45 | #include <linux/module.h> | 44 | #include <linux/module.h> |
diff --git a/drivers/usb/input/keyspan_remote.c b/drivers/usb/input/keyspan_remote.c index 70af985b5db9..4723b310f277 100644 --- a/drivers/usb/input/keyspan_remote.c +++ b/drivers/usb/input/keyspan_remote.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * and Keyspan, Inc the manufacturers of the Keyspan USB DMR product. | 11 | * and Keyspan, Inc the manufacturers of the Keyspan USB DMR product. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
diff --git a/drivers/usb/input/mtouchusb.c b/drivers/usb/input/mtouchusb.c index 4fdee4db0729..a9ccda8810e0 100644 --- a/drivers/usb/input/mtouchusb.c +++ b/drivers/usb/input/mtouchusb.c | |||
@@ -39,7 +39,6 @@ | |||
39 | * | 39 | * |
40 | *****************************************************************************/ | 40 | *****************************************************************************/ |
41 | 41 | ||
42 | #include <linux/config.h> | ||
43 | #include <linux/kernel.h> | 42 | #include <linux/kernel.h> |
44 | #include <linux/slab.h> | 43 | #include <linux/slab.h> |
45 | #include <linux/module.h> | 44 | #include <linux/module.h> |
diff --git a/drivers/usb/input/touchkitusb.c b/drivers/usb/input/touchkitusb.c index da7b0bf51aff..0149043ffb97 100644 --- a/drivers/usb/input/touchkitusb.c +++ b/drivers/usb/input/touchkitusb.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | //#define DEBUG | 25 | //#define DEBUG |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
29 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
diff --git a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c index cfd4a4e04334..9889b1cda05b 100644 --- a/drivers/usb/input/xpad.c +++ b/drivers/usb/input/xpad.c | |||
@@ -54,7 +54,6 @@ | |||
54 | * 2002-07-17 - 0.0.5 : simplified d-pad handling | 54 | * 2002-07-17 - 0.0.5 : simplified d-pad handling |
55 | */ | 55 | */ |
56 | 56 | ||
57 | #include <linux/config.h> | ||
58 | #include <linux/kernel.h> | 57 | #include <linux/kernel.h> |
59 | #include <linux/init.h> | 58 | #include <linux/init.h> |
60 | #include <linux/slab.h> | 59 | #include <linux/slab.h> |
diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c index 24aedbb20f03..575a4e672e96 100644 --- a/drivers/usb/input/yealink.c +++ b/drivers/usb/input/yealink.c | |||
@@ -46,7 +46,6 @@ | |||
46 | * 20050816 henk Merge 2.6.13-rc6 | 46 | * 20050816 henk Merge 2.6.13-rc6 |
47 | */ | 47 | */ |
48 | 48 | ||
49 | #include <linux/config.h> | ||
50 | #include <linux/kernel.h> | 49 | #include <linux/kernel.h> |
51 | #include <linux/init.h> | 50 | #include <linux/init.h> |
52 | #include <linux/slab.h> | 51 | #include <linux/slab.h> |
diff --git a/drivers/usb/misc/cytherm.c b/drivers/usb/misc/cytherm.c index a04204292aa3..b20bec445552 100644 --- a/drivers/usb/misc/cytherm.c +++ b/drivers/usb/misc/cytherm.c | |||
@@ -14,7 +14,6 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
19 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
20 | #include <linux/init.h> | 19 | #include <linux/init.h> |
diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c index d0b167256699..fcd69c52aea9 100644 --- a/drivers/usb/misc/idmouse.c +++ b/drivers/usb/misc/idmouse.c | |||
@@ -16,7 +16,6 @@ | |||
16 | 16 | ||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
22 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c index 966acb474f67..f30ab1fbb3c8 100644 --- a/drivers/usb/misc/ldusb.c +++ b/drivers/usb/misc/ldusb.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * V0.13 (mh) Added support for LD X-Ray and Machine Test System | 27 | * V0.13 (mh) Added support for LD X-Ray and Machine Test System |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
32 | #include <linux/errno.h> | 31 | #include <linux/errno.h> |
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c index 779bcf0373ad..7699d970e680 100644 --- a/drivers/usb/misc/legousbtower.c +++ b/drivers/usb/misc/legousbtower.c | |||
@@ -75,7 +75,6 @@ | |||
75 | * - move reset into open to clean out spurious data | 75 | * - move reset into open to clean out spurious data |
76 | */ | 76 | */ |
77 | 77 | ||
78 | #include <linux/config.h> | ||
79 | #include <linux/kernel.h> | 78 | #include <linux/kernel.h> |
80 | #include <linux/errno.h> | 79 | #include <linux/errno.h> |
81 | #include <linux/init.h> | 80 | #include <linux/init.h> |
diff --git a/drivers/usb/misc/phidgetkit.c b/drivers/usb/misc/phidgetkit.c index 13aeea2026cc..bfbbbfbb92bc 100644 --- a/drivers/usb/misc/phidgetkit.c +++ b/drivers/usb/misc/phidgetkit.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * This is a driver for the USB PhidgetInterfaceKit. | 13 | * This is a driver for the USB PhidgetInterfaceKit. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
19 | #include <linux/init.h> | 18 | #include <linux/init.h> |
diff --git a/drivers/usb/misc/phidgetservo.c b/drivers/usb/misc/phidgetservo.c index 5a040c205eed..c0df79c96538 100644 --- a/drivers/usb/misc/phidgetservo.c +++ b/drivers/usb/misc/phidgetservo.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
30 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
31 | #include <linux/init.h> | 30 | #include <linux/init.h> |
diff --git a/drivers/usb/misc/sisusbvga/sisusb_init.c b/drivers/usb/misc/sisusbvga/sisusb_init.c index 968f0d38cff7..9b30f8962814 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_init.c +++ b/drivers/usb/misc/sisusbvga/sisusb_init.c | |||
@@ -36,7 +36,6 @@ | |||
36 | * | 36 | * |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include <linux/config.h> | ||
40 | #include <linux/module.h> | 39 | #include <linux/module.h> |
41 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
42 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
diff --git a/drivers/usb/misc/usbled.c b/drivers/usb/misc/usbled.c index f441964132c0..0c5ee0ad6bb9 100644 --- a/drivers/usb/misc/usbled.c +++ b/drivers/usb/misc/usbled.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 81ba14c73dc7..786e1dbe88ec 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
3 | #include <linux/errno.h> | 2 | #include <linux/errno.h> |
4 | #include <linux/init.h> | 3 | #include <linux/init.h> |
diff --git a/drivers/usb/net/asix.c b/drivers/usb/net/asix.c index 37111acec875..2e2bbc003e93 100644 --- a/drivers/usb/net/asix.c +++ b/drivers/usb/net/asix.c | |||
@@ -22,7 +22,6 @@ | |||
22 | // #define DEBUG // error path messages, extra info | 22 | // #define DEBUG // error path messages, extra info |
23 | // #define VERBOSE // more; success messages | 23 | // #define VERBOSE // more; success messages |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/kmod.h> | 26 | #include <linux/kmod.h> |
28 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
diff --git a/drivers/usb/net/cdc_ether.c b/drivers/usb/net/cdc_ether.c index efd195b5912c..82ce0358d9a3 100644 --- a/drivers/usb/net/cdc_ether.c +++ b/drivers/usb/net/cdc_ether.c | |||
@@ -20,7 +20,6 @@ | |||
20 | // #define DEBUG // error path messages, extra info | 20 | // #define DEBUG // error path messages, extra info |
21 | // #define VERBOSE // more; success messages | 21 | // #define VERBOSE // more; success messages |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
26 | #include <linux/init.h> | 25 | #include <linux/init.h> |
diff --git a/drivers/usb/net/cdc_subset.c b/drivers/usb/net/cdc_subset.c index ec801e8bb1bb..e2fae85851a3 100644 --- a/drivers/usb/net/cdc_subset.c +++ b/drivers/usb/net/cdc_subset.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/kmod.h> | 21 | #include <linux/kmod.h> |
23 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
diff --git a/drivers/usb/net/gl620a.c b/drivers/usb/net/gl620a.c index faf1e86be687..3155f25f1d48 100644 --- a/drivers/usb/net/gl620a.c +++ b/drivers/usb/net/gl620a.c | |||
@@ -21,7 +21,6 @@ | |||
21 | // #define DEBUG // error path messages, extra info | 21 | // #define DEBUG // error path messages, extra info |
22 | // #define VERBOSE // more; success messages | 22 | // #define VERBOSE // more; success messages |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
27 | #include <linux/init.h> | 26 | #include <linux/init.h> |
diff --git a/drivers/usb/net/net1080.c b/drivers/usb/net/net1080.c index 78e6a43b1087..a9b6eeac3e3f 100644 --- a/drivers/usb/net/net1080.c +++ b/drivers/usb/net/net1080.c | |||
@@ -20,7 +20,6 @@ | |||
20 | // #define DEBUG // error path messages, extra info | 20 | // #define DEBUG // error path messages, extra info |
21 | // #define VERBOSE // more; success messages | 21 | // #define VERBOSE // more; success messages |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
26 | #include <linux/init.h> | 25 | #include <linux/init.h> |
diff --git a/drivers/usb/net/plusb.c b/drivers/usb/net/plusb.c index 4fe863389cb7..5d17cdfc7bab 100644 --- a/drivers/usb/net/plusb.c +++ b/drivers/usb/net/plusb.c | |||
@@ -20,7 +20,6 @@ | |||
20 | // #define DEBUG // error path messages, extra info | 20 | // #define DEBUG // error path messages, extra info |
21 | // #define VERBOSE // more; success messages | 21 | // #define VERBOSE // more; success messages |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
26 | #include <linux/init.h> | 25 | #include <linux/init.h> |
diff --git a/drivers/usb/net/rndis_host.c b/drivers/usb/net/rndis_host.c index f551546d7521..c2a28d88ef3c 100644 --- a/drivers/usb/net/rndis_host.c +++ b/drivers/usb/net/rndis_host.c | |||
@@ -20,7 +20,6 @@ | |||
20 | // #define DEBUG // error path messages, extra info | 20 | // #define DEBUG // error path messages, extra info |
21 | // #define VERBOSE // more; success messages | 21 | // #define VERBOSE // more; success messages |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
26 | #include <linux/init.h> | 25 | #include <linux/init.h> |
diff --git a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c index 1bbbae283c0b..718f8e2b552b 100644 --- a/drivers/usb/net/rtl8150.c +++ b/drivers/usb/net/rtl8150.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * version 2 as published by the Free Software Foundation. | 6 | * version 2 as published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
11 | #include <linux/init.h> | 10 | #include <linux/init.h> |
12 | #include <linux/signal.h> | 11 | #include <linux/signal.h> |
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c index 362d6907c9bb..54183e173a6d 100644 --- a/drivers/usb/net/usbnet.c +++ b/drivers/usb/net/usbnet.c | |||
@@ -33,7 +33,6 @@ | |||
33 | // #define DEBUG // error path messages, extra info | 33 | // #define DEBUG // error path messages, extra info |
34 | // #define VERBOSE // more; success messages | 34 | // #define VERBOSE // more; success messages |
35 | 35 | ||
36 | #include <linux/config.h> | ||
37 | #include <linux/module.h> | 36 | #include <linux/module.h> |
38 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
39 | #include <linux/init.h> | 38 | #include <linux/init.h> |
diff --git a/drivers/usb/net/zaurus.c b/drivers/usb/net/zaurus.c index 813e470d0600..144566bda583 100644 --- a/drivers/usb/net/zaurus.c +++ b/drivers/usb/net/zaurus.c | |||
@@ -20,7 +20,6 @@ | |||
20 | // #define DEBUG // error path messages, extra info | 20 | // #define DEBUG // error path messages, extra info |
21 | // #define VERBOSE // more; success messages | 21 | // #define VERBOSE // more; success messages |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
26 | #include <linux/init.h> | 25 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c index 4144777ea18b..3faa7aa0111a 100644 --- a/drivers/usb/serial/belkin_sa.c +++ b/drivers/usb/serial/belkin_sa.c | |||
@@ -63,7 +63,6 @@ | |||
63 | * UsbSnoop on Windows2000 and from examining the other USB drivers. | 63 | * UsbSnoop on Windows2000 and from examining the other USB drivers. |
64 | */ | 64 | */ |
65 | 65 | ||
66 | #include <linux/config.h> | ||
67 | #include <linux/kernel.h> | 66 | #include <linux/kernel.h> |
68 | #include <linux/errno.h> | 67 | #include <linux/errno.h> |
69 | #include <linux/init.h> | 68 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c index e9f9f4bafa17..f2d993b70c18 100644 --- a/drivers/usb/serial/bus.c +++ b/drivers/usb/serial/bus.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * 2 as published by the Free Software Foundation. | 8 | * 2 as published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
13 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
14 | #include <linux/tty.h> | 13 | #include <linux/tty.h> |
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index f3404e10afb4..3d456b32c316 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c index f8c0cb287736..df0a4f98b4ae 100644 --- a/drivers/usb/serial/cp2101.c +++ b/drivers/usb/serial/cp2101.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
22 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
23 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index 1fd5c5a9f2ef..49b51ab0d4cb 100644 --- a/drivers/usb/serial/cyberjack.c +++ b/drivers/usb/serial/cyberjack.c | |||
@@ -28,7 +28,6 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
33 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
34 | #include <linux/init.h> | 33 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 5de76efe1b37..4ff2dfb299bd 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c | |||
@@ -48,7 +48,6 @@ | |||
48 | /* Code originates and was built up from ftdi_sio, belkin, pl2303 and others. */ | 48 | /* Code originates and was built up from ftdi_sio, belkin, pl2303 and others. */ |
49 | 49 | ||
50 | 50 | ||
51 | #include <linux/config.h> | ||
52 | #include <linux/kernel.h> | 51 | #include <linux/kernel.h> |
53 | #include <linux/errno.h> | 52 | #include <linux/errno.h> |
54 | #include <linux/init.h> | 53 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index b3f776a90c93..6953d3ef5738 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c | |||
@@ -233,7 +233,6 @@ | |||
233 | * $Id: digi_acceleport.c,v 1.80.1.2 2000/11/02 05:45:08 root Exp $ | 233 | * $Id: digi_acceleport.c,v 1.80.1.2 2000/11/02 05:45:08 root Exp $ |
234 | */ | 234 | */ |
235 | 235 | ||
236 | #include <linux/config.h> | ||
237 | #include <linux/kernel.h> | 236 | #include <linux/kernel.h> |
238 | #include <linux/errno.h> | 237 | #include <linux/errno.h> |
239 | #include <linux/init.h> | 238 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c index afca1eae5fb5..1e2b31eeb497 100644 --- a/drivers/usb/serial/empeg.c +++ b/drivers/usb/serial/empeg.c | |||
@@ -51,7 +51,6 @@ | |||
51 | * | 51 | * |
52 | */ | 52 | */ |
53 | 53 | ||
54 | #include <linux/config.h> | ||
55 | #include <linux/kernel.h> | 54 | #include <linux/kernel.h> |
56 | #include <linux/errno.h> | 55 | #include <linux/errno.h> |
57 | #include <linux/init.h> | 56 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/ezusb.c b/drivers/usb/serial/ezusb.c index 1e419c8d7392..debc3b0f9662 100644 --- a/drivers/usb/serial/ezusb.c +++ b/drivers/usb/serial/ezusb.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * 2 as published by the Free Software Foundation. | 8 | * 2 as published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
13 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index b2bfea7c815a..8a74b19f1283 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -245,7 +245,6 @@ | |||
245 | /* to talk to the device */ | 245 | /* to talk to the device */ |
246 | /* Thanx to gkh and the rest of the usb dev group for all code I have assimilated :-) */ | 246 | /* Thanx to gkh and the rest of the usb dev group for all code I have assimilated :-) */ |
247 | 247 | ||
248 | #include <linux/config.h> | ||
249 | #include <linux/kernel.h> | 248 | #include <linux/kernel.h> |
250 | #include <linux/errno.h> | 249 | #include <linux/errno.h> |
251 | #include <linux/init.h> | 250 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c index 04767759cf8a..1f5d1620baa1 100644 --- a/drivers/usb/serial/garmin_gps.c +++ b/drivers/usb/serial/garmin_gps.c | |||
@@ -23,7 +23,6 @@ | |||
23 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA | 23 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
28 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
29 | #include <linux/init.h> | 28 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 07a478c59fb2..945b8bb38c92 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
15 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
diff --git a/drivers/usb/serial/hp4x.c b/drivers/usb/serial/hp4x.c index e9719da2aca1..7e06358b0310 100644 --- a/drivers/usb/serial/hp4x.c +++ b/drivers/usb/serial/hp4x.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * See Documentation/usb/usb-serial.txt for more information on using this driver | 12 | * See Documentation/usb/usb-serial.txt for more information on using this driver |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
18 | #include <linux/tty.h> | 17 | #include <linux/tty.h> |
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index b85d2156dfdc..bd2c05dac2a9 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c | |||
@@ -29,7 +29,6 @@ | |||
29 | * | 29 | * |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/config.h> | ||
33 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
34 | #include <linux/jiffies.h> | 33 | #include <linux/jiffies.h> |
35 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index 8e1e2253748b..723a12ae87b5 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * | 24 | * |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
29 | #include <linux/jiffies.h> | 28 | #include <linux/jiffies.h> |
30 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c index 9da6d2a8f2b0..dbcfe172a5cc 100644 --- a/drivers/usb/serial/ipaq.c +++ b/drivers/usb/serial/ipaq.c | |||
@@ -44,7 +44,6 @@ | |||
44 | * Thanks to info from Heath Robinson and Arieh Davidoff. | 44 | * Thanks to info from Heath Robinson and Arieh Davidoff. |
45 | */ | 45 | */ |
46 | 46 | ||
47 | #include <linux/config.h> | ||
48 | #include <linux/kernel.h> | 47 | #include <linux/kernel.h> |
49 | #include <linux/errno.h> | 48 | #include <linux/errno.h> |
50 | #include <linux/init.h> | 49 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c index d7f3f736a692..2cf1fed3de43 100644 --- a/drivers/usb/serial/ir-usb.c +++ b/drivers/usb/serial/ir-usb.c | |||
@@ -46,7 +46,6 @@ | |||
46 | * initial version released. | 46 | * initial version released. |
47 | */ | 47 | */ |
48 | 48 | ||
49 | #include <linux/config.h> | ||
50 | #include <linux/kernel.h> | 49 | #include <linux/kernel.h> |
51 | #include <linux/errno.h> | 50 | #include <linux/errno.h> |
52 | #include <linux/init.h> | 51 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c index 2cf6ade704e4..d7c58f1bc960 100644 --- a/drivers/usb/serial/keyspan.c +++ b/drivers/usb/serial/keyspan.c | |||
@@ -95,7 +95,6 @@ | |||
95 | */ | 95 | */ |
96 | 96 | ||
97 | 97 | ||
98 | #include <linux/config.h> | ||
99 | #include <linux/kernel.h> | 98 | #include <linux/kernel.h> |
100 | #include <linux/jiffies.h> | 99 | #include <linux/jiffies.h> |
101 | #include <linux/errno.h> | 100 | #include <linux/errno.h> |
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index b0441c35f98f..03ab3c0f3cce 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c | |||
@@ -66,7 +66,6 @@ | |||
66 | */ | 66 | */ |
67 | 67 | ||
68 | 68 | ||
69 | #include <linux/config.h> | ||
70 | #include <linux/kernel.h> | 69 | #include <linux/kernel.h> |
71 | #include <linux/errno.h> | 70 | #include <linux/errno.h> |
72 | #include <linux/init.h> | 71 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c index 65d79f630fa4..b45ff3e7ab40 100644 --- a/drivers/usb/serial/kl5kusb105.c +++ b/drivers/usb/serial/kl5kusb105.c | |||
@@ -45,7 +45,6 @@ | |||
45 | */ | 45 | */ |
46 | 46 | ||
47 | 47 | ||
48 | #include <linux/config.h> | ||
49 | #include <linux/kernel.h> | 48 | #include <linux/kernel.h> |
50 | #include <linux/errno.h> | 49 | #include <linux/errno.h> |
51 | #include <linux/init.h> | 50 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index 87dfcd89ffab..457733374772 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c | |||
@@ -35,7 +35,6 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | 37 | ||
38 | #include <linux/config.h> | ||
39 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
40 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
41 | #include <linux/init.h> | 40 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index 35bd29b6c408..ca05d3275f3e 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c | |||
@@ -64,7 +64,6 @@ | |||
64 | * (via linux-usb-devel). | 64 | * (via linux-usb-devel). |
65 | */ | 65 | */ |
66 | 66 | ||
67 | #include <linux/config.h> | ||
68 | #include <linux/kernel.h> | 67 | #include <linux/kernel.h> |
69 | #include <linux/errno.h> | 68 | #include <linux/errno.h> |
70 | #include <linux/init.h> | 69 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c index 6dcdb5f598b8..cfb711a21a45 100644 --- a/drivers/usb/serial/omninet.c +++ b/drivers/usb/serial/omninet.c | |||
@@ -35,7 +35,6 @@ | |||
35 | * | 35 | * |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include <linux/config.h> | ||
39 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
40 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
41 | #include <linux/init.h> | 40 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index b0861b61bba7..78ad4b3126a6 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -57,7 +57,6 @@ | |||
57 | #define DRIVER_AUTHOR "Matthias Urlichs <smurf@smurf.noris.de>" | 57 | #define DRIVER_AUTHOR "Matthias Urlichs <smurf@smurf.noris.de>" |
58 | #define DRIVER_DESC "USB Driver for GSM modems" | 58 | #define DRIVER_DESC "USB Driver for GSM modems" |
59 | 59 | ||
60 | #include <linux/config.h> | ||
61 | #include <linux/kernel.h> | 60 | #include <linux/kernel.h> |
62 | #include <linux/jiffies.h> | 61 | #include <linux/jiffies.h> |
63 | #include <linux/errno.h> | 62 | #include <linux/errno.h> |
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index d88704387202..de93a2b909e7 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
19 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
20 | #include <linux/init.h> | 19 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c index f0215f850d2d..897d8447252b 100644 --- a/drivers/usb/serial/safe_serial.c +++ b/drivers/usb/serial/safe_serial.c | |||
@@ -60,7 +60,6 @@ | |||
60 | */ | 60 | */ |
61 | 61 | ||
62 | 62 | ||
63 | #include <linux/config.h> | ||
64 | #include <linux/kernel.h> | 63 | #include <linux/kernel.h> |
65 | #include <linux/errno.h> | 64 | #include <linux/errno.h> |
66 | #include <linux/init.h> | 65 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index c3a2071b802d..a9afff31a921 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -68,7 +68,6 @@ | |||
68 | * fi | 68 | * fi |
69 | */ | 69 | */ |
70 | 70 | ||
71 | #include <linux/config.h> | ||
72 | #include <linux/kernel.h> | 71 | #include <linux/kernel.h> |
73 | #include <linux/errno.h> | 72 | #include <linux/errno.h> |
74 | #include <linux/init.h> | 73 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index f466f89eeb6d..b59a0536ea5c 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * | 16 | * |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
21 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
22 | #include <linux/init.h> | 21 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h index d53ea9b11e81..0f2802a60194 100644 --- a/drivers/usb/serial/usb-serial.h +++ b/drivers/usb/serial/usb-serial.h | |||
@@ -14,7 +14,6 @@ | |||
14 | #ifndef __LINUX_USB_SERIAL_H | 14 | #ifndef __LINUX_USB_SERIAL_H |
15 | #define __LINUX_USB_SERIAL_H | 15 | #define __LINUX_USB_SERIAL_H |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/kref.h> | 17 | #include <linux/kref.h> |
19 | #include <linux/mutex.h> | 18 | #include <linux/mutex.h> |
20 | 19 | ||
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c index 9e89b8d54f72..95a2936e902e 100644 --- a/drivers/usb/serial/visor.c +++ b/drivers/usb/serial/visor.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
19 | #include <linux/init.h> | 18 | #include <linux/init.h> |
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index 56ffc81302fc..540438c3f381 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c | |||
@@ -65,7 +65,6 @@ | |||
65 | * | 65 | * |
66 | */ | 66 | */ |
67 | 67 | ||
68 | #include <linux/config.h> | ||
69 | #include <linux/kernel.h> | 68 | #include <linux/kernel.h> |
70 | #include <linux/errno.h> | 69 | #include <linux/errno.h> |
71 | #include <linux/init.h> | 70 | #include <linux/init.h> |
diff --git a/drivers/usb/storage/debug.h b/drivers/usb/storage/debug.h index cd2096acc723..77e244a8c376 100644 --- a/drivers/usb/storage/debug.h +++ b/drivers/usb/storage/debug.h | |||
@@ -44,7 +44,6 @@ | |||
44 | #ifndef _DEBUG_H_ | 44 | #ifndef _DEBUG_H_ |
45 | #define _DEBUG_H_ | 45 | #define _DEBUG_H_ |
46 | 46 | ||
47 | #include <linux/config.h> | ||
48 | #include <linux/kernel.h> | 47 | #include <linux/kernel.h> |
49 | 48 | ||
50 | #define USB_STORAGE "usb-storage: " | 49 | #define USB_STORAGE "usb-storage: " |
diff --git a/drivers/usb/storage/dpcm.c b/drivers/usb/storage/dpcm.c index 92b69e4c8047..1628cb258562 100644 --- a/drivers/usb/storage/dpcm.c +++ b/drivers/usb/storage/dpcm.c | |||
@@ -29,7 +29,6 @@ | |||
29 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 29 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/config.h> | ||
33 | #include <scsi/scsi.h> | 32 | #include <scsi/scsi.h> |
34 | #include <scsi/scsi_cmnd.h> | 33 | #include <scsi/scsi_cmnd.h> |
35 | #include <scsi/scsi_device.h> | 34 | #include <scsi/scsi_device.h> |
diff --git a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c index 30e96050fe0c..88aa59ab7563 100644 --- a/drivers/usb/storage/freecom.c +++ b/drivers/usb/storage/freecom.c | |||
@@ -28,7 +28,6 @@ | |||
28 | * (http://www.freecom.de/) | 28 | * (http://www.freecom.de/) |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | #include <linux/hdreg.h> | 31 | #include <linux/hdreg.h> |
33 | 32 | ||
34 | #include <scsi/scsi.h> | 33 | #include <scsi/scsi.h> |
diff --git a/drivers/usb/storage/initializers.h b/drivers/usb/storage/initializers.h index f9907a5cf129..927f7781080f 100644 --- a/drivers/usb/storage/initializers.h +++ b/drivers/usb/storage/initializers.h | |||
@@ -37,7 +37,6 @@ | |||
37 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 37 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
38 | */ | 38 | */ |
39 | 39 | ||
40 | #include <linux/config.h> | ||
41 | #include "usb.h" | 40 | #include "usb.h" |
42 | #include "transport.h" | 41 | #include "transport.h" |
43 | 42 | ||
diff --git a/drivers/usb/storage/onetouch.c b/drivers/usb/storage/onetouch.c index 026a587eb8dd..313920d980c9 100644 --- a/drivers/usb/storage/onetouch.c +++ b/drivers/usb/storage/onetouch.c | |||
@@ -28,7 +28,6 @@ | |||
28 | * | 28 | * |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
33 | #include <linux/input.h> | 32 | #include <linux/input.h> |
34 | #include <linux/init.h> | 33 | #include <linux/init.h> |
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index 19b25c5cafd4..eb7188b3565c 100644 --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c | |||
@@ -45,7 +45,6 @@ | |||
45 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 45 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
46 | */ | 46 | */ |
47 | 47 | ||
48 | #include <linux/config.h> | ||
49 | #include <linux/sched.h> | 48 | #include <linux/sched.h> |
50 | #include <linux/errno.h> | 49 | #include <linux/errno.h> |
51 | #include <linux/slab.h> | 50 | #include <linux/slab.h> |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 543244d421c1..c7e84e653df9 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
@@ -31,7 +31,6 @@ | |||
31 | * the following thing for it to work: | 31 | * the following thing for it to work: |
32 | * The macro UNUSUAL_DEV() must be defined before this file is included | 32 | * The macro UNUSUAL_DEV() must be defined before this file is included |
33 | */ | 33 | */ |
34 | #include <linux/config.h> | ||
35 | 34 | ||
36 | /* If you edit this file, please try to keep it sorted first by VendorID, | 35 | /* If you edit this file, please try to keep it sorted first by VendorID, |
37 | * then by ProductID. | 36 | * then by ProductID. |
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index e232c7c89909..1185acac4b21 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
@@ -47,7 +47,6 @@ | |||
47 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 47 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
48 | */ | 48 | */ |
49 | 49 | ||
50 | #include <linux/config.h> | ||
51 | #include <linux/sched.h> | 50 | #include <linux/sched.h> |
52 | #include <linux/errno.h> | 51 | #include <linux/errno.h> |
53 | #include <linux/suspend.h> | 52 | #include <linux/suspend.h> |
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c index 4de9fb56ebfc..b362039792b3 100644 --- a/drivers/usb/usb-skeleton.c +++ b/drivers/usb/usb-skeleton.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
19 | #include <linux/init.h> | 18 | #include <linux/init.h> |
diff --git a/drivers/video/S3triofb.c b/drivers/video/S3triofb.c index 455fda990ff7..e714e8449c1d 100644 --- a/drivers/video/S3triofb.c +++ b/drivers/video/S3triofb.c | |||
@@ -23,7 +23,6 @@ | |||
23 | 23 | ||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/config.h> | ||
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
28 | #include <linux/module.h> | 27 | #include <linux/module.h> |
29 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c index 98baecccb3fd..61a8bf159cb0 100644 --- a/drivers/video/acornfb.c +++ b/drivers/video/acornfb.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * - Blanking 8bpp displays with VIDC | 17 | * - Blanking 8bpp displays with VIDC |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
23 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c index 3033c72dea20..f9bc9f777e75 100644 --- a/drivers/video/amifb.c +++ b/drivers/video/amifb.c | |||
@@ -48,7 +48,6 @@ | |||
48 | #include <linux/tty.h> | 48 | #include <linux/tty.h> |
49 | #include <linux/slab.h> | 49 | #include <linux/slab.h> |
50 | #include <linux/delay.h> | 50 | #include <linux/delay.h> |
51 | #include <linux/config.h> | ||
52 | #include <linux/interrupt.h> | 51 | #include <linux/interrupt.h> |
53 | #include <linux/fb.h> | 52 | #include <linux/fb.h> |
54 | #include <linux/init.h> | 53 | #include <linux/init.h> |
diff --git a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c index 29f9f0dfe3b4..eaeaf4d1a094 100644 --- a/drivers/video/asiliantfb.c +++ b/drivers/video/asiliantfb.c | |||
@@ -29,7 +29,6 @@ | |||
29 | * more details. | 29 | * more details. |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/config.h> | ||
33 | #include <linux/module.h> | 32 | #include <linux/module.h> |
34 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
35 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index 11cf7fcb1d55..72c589109471 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c | |||
@@ -46,7 +46,6 @@ | |||
46 | */ | 46 | */ |
47 | 47 | ||
48 | 48 | ||
49 | #include <linux/config.h> | ||
50 | #include <linux/module.h> | 49 | #include <linux/module.h> |
51 | #include <linux/moduleparam.h> | 50 | #include <linux/moduleparam.h> |
52 | #include <linux/kernel.h> | 51 | #include <linux/kernel.h> |
diff --git a/drivers/video/aty/atyfb.h b/drivers/video/aty/atyfb.h index 43d2cb58af87..55fb8b04489b 100644 --- a/drivers/video/aty/atyfb.h +++ b/drivers/video/aty/atyfb.h | |||
@@ -2,7 +2,6 @@ | |||
2 | * ATI Frame Buffer Device Driver Core Definitions | 2 | * ATI Frame Buffer Device Driver Core Definitions |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/config.h> | ||
6 | #include <linux/spinlock.h> | 5 | #include <linux/spinlock.h> |
7 | #include <linux/wait.h> | 6 | #include <linux/wait.h> |
8 | /* | 7 | /* |
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 22e720611bf6..85fcd22e6ed5 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -49,7 +49,6 @@ | |||
49 | ******************************************************************************/ | 49 | ******************************************************************************/ |
50 | 50 | ||
51 | 51 | ||
52 | #include <linux/config.h> | ||
53 | #include <linux/module.h> | 52 | #include <linux/module.h> |
54 | #include <linux/moduleparam.h> | 53 | #include <linux/moduleparam.h> |
55 | #include <linux/kernel.h> | 54 | #include <linux/kernel.h> |
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 68b15645b893..51b78f8de949 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c | |||
@@ -52,7 +52,6 @@ | |||
52 | 52 | ||
53 | #define RADEON_VERSION "0.2.0" | 53 | #define RADEON_VERSION "0.2.0" |
54 | 54 | ||
55 | #include <linux/config.h> | ||
56 | #include <linux/module.h> | 55 | #include <linux/module.h> |
57 | #include <linux/moduleparam.h> | 56 | #include <linux/moduleparam.h> |
58 | #include <linux/kernel.h> | 57 | #include <linux/kernel.h> |
diff --git a/drivers/video/aty/radeon_i2c.c b/drivers/video/aty/radeon_i2c.c index a9d0414e4655..9aaca58c074a 100644 --- a/drivers/video/aty/radeon_i2c.c +++ b/drivers/video/aty/radeon_i2c.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | #include <linux/module.h> | 1 | #include <linux/module.h> |
3 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
4 | #include <linux/sched.h> | 3 | #include <linux/sched.h> |
diff --git a/drivers/video/aty/radeonfb.h b/drivers/video/aty/radeonfb.h index 1645943b1123..38657b2d10eb 100644 --- a/drivers/video/aty/radeonfb.h +++ b/drivers/video/aty/radeonfb.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef __RADEONFB_H__ | 1 | #ifndef __RADEONFB_H__ |
2 | #define __RADEONFB_H__ | 2 | #define __RADEONFB_H__ |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/module.h> | 4 | #include <linux/module.h> |
6 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
7 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
@@ -382,7 +381,7 @@ struct radeonfb_info { | |||
382 | /* Note about this function: we have some rare cases where we must not schedule, | 381 | /* Note about this function: we have some rare cases where we must not schedule, |
383 | * this typically happen with our special "wake up early" hook which allows us to | 382 | * this typically happen with our special "wake up early" hook which allows us to |
384 | * wake up the graphic chip (and thus get the console back) before everything else | 383 | * wake up the graphic chip (and thus get the console back) before everything else |
385 | * on some machines that support that mecanism. At this point, interrupts are off | 384 | * on some machines that support that mechanism. At this point, interrupts are off |
386 | * and scheduling is not permitted | 385 | * and scheduling is not permitted |
387 | */ | 386 | */ |
388 | static inline void _radeon_msleep(struct radeonfb_info *rinfo, unsigned long ms) | 387 | static inline void _radeon_msleep(struct radeonfb_info *rinfo, unsigned long ms) |
diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c index 9ef68cd83bb4..a92a91fef16f 100644 --- a/drivers/video/au1100fb.c +++ b/drivers/video/au1100fb.c | |||
@@ -40,7 +40,6 @@ | |||
40 | * with this program; if not, write to the Free Software Foundation, Inc., | 40 | * with this program; if not, write to the Free Software Foundation, Inc., |
41 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 41 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
42 | */ | 42 | */ |
43 | #include <linux/config.h> | ||
44 | #include <linux/module.h> | 43 | #include <linux/module.h> |
45 | #include <linux/kernel.h> | 44 | #include <linux/kernel.h> |
46 | #include <linux/errno.h> | 45 | #include <linux/errno.h> |
diff --git a/drivers/video/backlight/locomolcd.c b/drivers/video/backlight/locomolcd.c index bd879b7ec119..caf1eca199b0 100644 --- a/drivers/video/backlight/locomolcd.c +++ b/drivers/video/backlight/locomolcd.c | |||
@@ -11,7 +11,6 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | /* LCD power functions */ | 13 | /* LCD power functions */ |
14 | #include <linux/config.h> | ||
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c index 6577fdfdfc16..c66e3d52cbf3 100644 --- a/drivers/video/bw2.c +++ b/drivers/video/bw2.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* bw2.c: BWTWO frame buffer driver | 1 | /* bw2.c: BWTWO frame buffer driver |
2 | * | 2 | * |
3 | * Copyright (C) 2003 David S. Miller (davem@redhat.com) | 3 | * Copyright (C) 2003, 2006 David S. Miller (davem@davemloft.net) |
4 | * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz) | 4 | * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz) |
5 | * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) | 5 | * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) |
6 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) | 6 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) |
@@ -19,14 +19,11 @@ | |||
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | 20 | ||
21 | #include <asm/io.h> | 21 | #include <asm/io.h> |
22 | #include <asm/sbus.h> | ||
23 | #include <asm/oplib.h> | 22 | #include <asm/oplib.h> |
23 | #include <asm/prom.h> | ||
24 | #include <asm/of_device.h> | ||
24 | #include <asm/fbio.h> | 25 | #include <asm/fbio.h> |
25 | 26 | ||
26 | #ifdef CONFIG_SPARC32 | ||
27 | #include <asm/sun4paddr.h> | ||
28 | #endif | ||
29 | |||
30 | #include "sbuslib.h" | 27 | #include "sbuslib.h" |
31 | 28 | ||
32 | /* | 29 | /* |
@@ -59,30 +56,30 @@ static struct fb_ops bw2_ops = { | |||
59 | #define BWTWO_REGISTER_OFFSET 0x400000 | 56 | #define BWTWO_REGISTER_OFFSET 0x400000 |
60 | 57 | ||
61 | struct bt_regs { | 58 | struct bt_regs { |
62 | volatile u32 addr; | 59 | u32 addr; |
63 | volatile u32 color_map; | 60 | u32 color_map; |
64 | volatile u32 control; | 61 | u32 control; |
65 | volatile u32 cursor; | 62 | u32 cursor; |
66 | }; | 63 | }; |
67 | 64 | ||
68 | struct bw2_regs { | 65 | struct bw2_regs { |
69 | struct bt_regs cmap; | 66 | struct bt_regs cmap; |
70 | volatile u8 control; | 67 | u8 control; |
71 | volatile u8 status; | 68 | u8 status; |
72 | volatile u8 cursor_start; | 69 | u8 cursor_start; |
73 | volatile u8 cursor_end; | 70 | u8 cursor_end; |
74 | volatile u8 h_blank_start; | 71 | u8 h_blank_start; |
75 | volatile u8 h_blank_end; | 72 | u8 h_blank_end; |
76 | volatile u8 h_sync_start; | 73 | u8 h_sync_start; |
77 | volatile u8 h_sync_end; | 74 | u8 h_sync_end; |
78 | volatile u8 comp_sync_end; | 75 | u8 comp_sync_end; |
79 | volatile u8 v_blank_start_high; | 76 | u8 v_blank_start_high; |
80 | volatile u8 v_blank_start_low; | 77 | u8 v_blank_start_low; |
81 | volatile u8 v_blank_end; | 78 | u8 v_blank_end; |
82 | volatile u8 v_sync_start; | 79 | u8 v_sync_start; |
83 | volatile u8 v_sync_end; | 80 | u8 v_sync_end; |
84 | volatile u8 xfer_holdoff_start; | 81 | u8 xfer_holdoff_start; |
85 | volatile u8 xfer_holdoff_end; | 82 | u8 xfer_holdoff_end; |
86 | }; | 83 | }; |
87 | 84 | ||
88 | /* Status Register Constants */ | 85 | /* Status Register Constants */ |
@@ -117,9 +114,8 @@ struct bw2_par { | |||
117 | #define BW2_FLAG_BLANKED 0x00000001 | 114 | #define BW2_FLAG_BLANKED 0x00000001 |
118 | 115 | ||
119 | unsigned long physbase; | 116 | unsigned long physbase; |
117 | unsigned long which_io; | ||
120 | unsigned long fbsize; | 118 | unsigned long fbsize; |
121 | |||
122 | struct sbus_dev *sdev; | ||
123 | }; | 119 | }; |
124 | 120 | ||
125 | /** | 121 | /** |
@@ -174,9 +170,7 @@ static int bw2_mmap(struct fb_info *info, struct vm_area_struct *vma) | |||
174 | 170 | ||
175 | return sbusfb_mmap_helper(bw2_mmap_map, | 171 | return sbusfb_mmap_helper(bw2_mmap_map, |
176 | par->physbase, par->fbsize, | 172 | par->physbase, par->fbsize, |
177 | (par->sdev ? | 173 | par->which_io, |
178 | par->sdev->reg_addrs[0].which_io : | ||
179 | 0), | ||
180 | vma); | 174 | vma); |
181 | } | 175 | } |
182 | 176 | ||
@@ -288,139 +282,124 @@ static void bw2_do_default_mode(struct bw2_par *par, struct fb_info *info, | |||
288 | struct all_info { | 282 | struct all_info { |
289 | struct fb_info info; | 283 | struct fb_info info; |
290 | struct bw2_par par; | 284 | struct bw2_par par; |
291 | struct list_head list; | ||
292 | }; | 285 | }; |
293 | static LIST_HEAD(bw2_list); | ||
294 | 286 | ||
295 | static void bw2_init_one(struct sbus_dev *sdev) | 287 | static int __devinit bw2_init_one(struct of_device *op) |
296 | { | 288 | { |
289 | struct device_node *dp = op->node; | ||
297 | struct all_info *all; | 290 | struct all_info *all; |
298 | struct resource *resp; | 291 | int linebytes, err; |
299 | #ifdef CONFIG_SUN4 | ||
300 | struct resource res; | ||
301 | #endif | ||
302 | int linebytes; | ||
303 | 292 | ||
304 | all = kmalloc(sizeof(*all), GFP_KERNEL); | 293 | all = kzalloc(sizeof(*all), GFP_KERNEL); |
305 | if (!all) { | 294 | if (!all) |
306 | printk(KERN_ERR "bw2: Cannot allocate memory.\n"); | 295 | return -ENOMEM; |
307 | return; | ||
308 | } | ||
309 | memset(all, 0, sizeof(*all)); | ||
310 | |||
311 | INIT_LIST_HEAD(&all->list); | ||
312 | 296 | ||
313 | spin_lock_init(&all->par.lock); | 297 | spin_lock_init(&all->par.lock); |
314 | all->par.sdev = sdev; | 298 | |
315 | 299 | all->par.physbase = op->resource[0].start; | |
316 | #ifdef CONFIG_SUN4 | 300 | all->par.which_io = op->resource[0].flags & IORESOURCE_BITS; |
317 | if (!sdev) { | 301 | |
318 | all->par.physbase = sun4_bwtwo_physaddr; | 302 | sbusfb_fill_var(&all->info.var, dp->node, 1); |
319 | res.start = sun4_bwtwo_physaddr; | 303 | linebytes = of_getintprop_default(dp, "linebytes", |
320 | res.end = res.start + BWTWO_REGISTER_OFFSET + sizeof(struct bw2_regs) - 1; | 304 | all->info.var.xres); |
321 | res.flags = IORESOURCE_IO; | 305 | |
322 | resp = &res; | ||
323 | all->info.var.xres = all->info.var.xres_virtual = 1152; | ||
324 | all->info.var.yres = all->info.var.yres_virtual = 900; | ||
325 | all->info.var.bits_per_pixel = 1; | ||
326 | linebytes = 1152 / 8; | ||
327 | } else | ||
328 | #else | ||
329 | { | ||
330 | BUG_ON(!sdev); | ||
331 | all->par.physbase = sdev->reg_addrs[0].phys_addr; | ||
332 | resp = &sdev->resource[0]; | ||
333 | sbusfb_fill_var(&all->info.var, (sdev ? sdev->prom_node : 0), 1); | ||
334 | linebytes = prom_getintdefault(sdev->prom_node, "linebytes", | ||
335 | all->info.var.xres); | ||
336 | } | ||
337 | #endif | ||
338 | all->info.var.red.length = all->info.var.green.length = | 306 | all->info.var.red.length = all->info.var.green.length = |
339 | all->info.var.blue.length = all->info.var.bits_per_pixel; | 307 | all->info.var.blue.length = all->info.var.bits_per_pixel; |
340 | all->info.var.red.offset = all->info.var.green.offset = | 308 | all->info.var.red.offset = all->info.var.green.offset = |
341 | all->info.var.blue.offset = 0; | 309 | all->info.var.blue.offset = 0; |
342 | 310 | ||
343 | all->par.regs = sbus_ioremap(resp, BWTWO_REGISTER_OFFSET, | 311 | all->par.regs = of_ioremap(&op->resource[0], BWTWO_REGISTER_OFFSET, |
344 | sizeof(struct bw2_regs), "bw2 regs"); | 312 | sizeof(struct bw2_regs), "bw2 regs"); |
345 | 313 | ||
346 | if (sdev && !prom_getbool(sdev->prom_node, "width")) | 314 | if (!of_find_property(dp, "width", NULL)) |
347 | bw2_do_default_mode(&all->par, &all->info, &linebytes); | 315 | bw2_do_default_mode(&all->par, &all->info, &linebytes); |
348 | 316 | ||
349 | all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); | 317 | all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); |
350 | 318 | ||
351 | all->info.flags = FBINFO_DEFAULT; | 319 | all->info.flags = FBINFO_DEFAULT; |
352 | all->info.fbops = &bw2_ops; | 320 | all->info.fbops = &bw2_ops; |
353 | #if defined(CONFIG_SPARC32) | 321 | |
354 | if (sdev) | 322 | all->info.screen_base = |
355 | all->info.screen_base = (char __iomem *) | 323 | sbus_ioremap(&op->resource[0], 0, all->par.fbsize, "bw2 ram"); |
356 | prom_getintdefault(sdev->prom_node, "address", 0); | ||
357 | #endif | ||
358 | if (!all->info.screen_base) | ||
359 | all->info.screen_base = | ||
360 | sbus_ioremap(resp, 0, all->par.fbsize, "bw2 ram"); | ||
361 | all->info.par = &all->par; | 324 | all->info.par = &all->par; |
362 | 325 | ||
363 | bw2_blank(0, &all->info); | 326 | bw2_blank(0, &all->info); |
364 | 327 | ||
365 | bw2_init_fix(&all->info, linebytes); | 328 | bw2_init_fix(&all->info, linebytes); |
366 | 329 | ||
367 | if (register_framebuffer(&all->info) < 0) { | 330 | err= register_framebuffer(&all->info); |
368 | printk(KERN_ERR "bw2: Could not register framebuffer.\n"); | 331 | if (err < 0) { |
332 | of_iounmap(all->par.regs, sizeof(struct bw2_regs)); | ||
333 | of_iounmap(all->info.screen_base, all->par.fbsize); | ||
369 | kfree(all); | 334 | kfree(all); |
370 | return; | 335 | return err; |
371 | } | 336 | } |
372 | 337 | ||
373 | list_add(&all->list, &bw2_list); | 338 | dev_set_drvdata(&op->dev, all); |
339 | |||
340 | printk("%s: bwtwo at %lx:%lx\n", | ||
341 | dp->full_name, | ||
342 | all->par.which_io, all->par.physbase); | ||
374 | 343 | ||
375 | printk("bw2: bwtwo at %lx:%lx\n", | 344 | return 0; |
376 | (long) (sdev ? sdev->reg_addrs[0].which_io : 0), | ||
377 | (long) all->par.physbase); | ||
378 | } | 345 | } |
379 | 346 | ||
380 | int __init bw2_init(void) | 347 | static int __devinit bw2_probe(struct of_device *dev, const struct of_device_id *match) |
381 | { | 348 | { |
382 | struct sbus_bus *sbus; | 349 | struct of_device *op = to_of_device(&dev->dev); |
383 | struct sbus_dev *sdev; | ||
384 | 350 | ||
385 | if (fb_get_options("bw2fb", NULL)) | 351 | return bw2_init_one(op); |
386 | return -ENODEV; | 352 | } |
387 | 353 | ||
388 | #ifdef CONFIG_SUN4 | 354 | static int __devexit bw2_remove(struct of_device *dev) |
389 | bw2_init_one(NULL); | 355 | { |
390 | #endif | 356 | struct all_info *all = dev_get_drvdata(&dev->dev); |
391 | for_all_sbusdev(sdev, sbus) { | 357 | |
392 | if (!strcmp(sdev->prom_name, "bwtwo")) | 358 | unregister_framebuffer(&all->info); |
393 | bw2_init_one(sdev); | 359 | |
394 | } | 360 | of_iounmap(all->par.regs, sizeof(struct bw2_regs)); |
361 | of_iounmap(all->info.screen_base, all->par.fbsize); | ||
362 | |||
363 | kfree(all); | ||
364 | |||
365 | dev_set_drvdata(&dev->dev, NULL); | ||
395 | 366 | ||
396 | return 0; | 367 | return 0; |
397 | } | 368 | } |
398 | 369 | ||
399 | void __exit bw2_exit(void) | 370 | static struct of_device_id bw2_match[] = { |
400 | { | 371 | { |
401 | struct list_head *pos, *tmp; | 372 | .name = "bwtwo", |
373 | }, | ||
374 | {}, | ||
375 | }; | ||
376 | MODULE_DEVICE_TABLE(of, bw2_match); | ||
402 | 377 | ||
403 | list_for_each_safe(pos, tmp, &bw2_list) { | 378 | static struct of_platform_driver bw2_driver = { |
404 | struct all_info *all = list_entry(pos, typeof(*all), list); | 379 | .name = "bw2", |
380 | .match_table = bw2_match, | ||
381 | .probe = bw2_probe, | ||
382 | .remove = __devexit_p(bw2_remove), | ||
383 | }; | ||
405 | 384 | ||
406 | unregister_framebuffer(&all->info); | 385 | static int __init bw2_init(void) |
407 | kfree(all); | 386 | { |
408 | } | 387 | if (fb_get_options("bw2fb", NULL)) |
388 | return -ENODEV; | ||
389 | |||
390 | return of_register_driver(&bw2_driver, &of_bus_type); | ||
409 | } | 391 | } |
410 | 392 | ||
411 | int __init | 393 | static void __exit bw2_exit(void) |
412 | bw2_setup(char *arg) | ||
413 | { | 394 | { |
414 | /* No cmdline options yet... */ | 395 | return of_unregister_driver(&bw2_driver); |
415 | return 0; | ||
416 | } | 396 | } |
417 | 397 | ||
418 | module_init(bw2_init); | ||
419 | 398 | ||
420 | #ifdef MODULE | 399 | module_init(bw2_init); |
421 | module_exit(bw2_exit); | 400 | module_exit(bw2_exit); |
422 | #endif | ||
423 | 401 | ||
424 | MODULE_DESCRIPTION("framebuffer driver for BWTWO chipsets"); | 402 | MODULE_DESCRIPTION("framebuffer driver for BWTWO chipsets"); |
425 | MODULE_AUTHOR("David S. Miller <davem@redhat.com>"); | 403 | MODULE_AUTHOR("David S. Miller <davem@davemloft.net>"); |
404 | MODULE_VERSION("2.0"); | ||
426 | MODULE_LICENSE("GPL"); | 405 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/video/cfbcopyarea.c b/drivers/video/cfbcopyarea.c index 74415325b016..6faea4034e3d 100644 --- a/drivers/video/cfbcopyarea.c +++ b/drivers/video/cfbcopyarea.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | 25 | ||
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/module.h> | 27 | #include <linux/module.h> |
29 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
30 | #include <linux/string.h> | 29 | #include <linux/string.h> |
diff --git a/drivers/video/cfbfillrect.c b/drivers/video/cfbfillrect.c index e5ff62e9cfb8..f00b50aab606 100644 --- a/drivers/video/cfbfillrect.c +++ b/drivers/video/cfbfillrect.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * the native cpu endians. I also need to deal with MSB position in the word. | 17 | * the native cpu endians. I also need to deal with MSB position in the word. |
18 | * | 18 | * |
19 | */ | 19 | */ |
20 | #include <linux/config.h> | ||
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/string.h> | 21 | #include <linux/string.h> |
23 | #include <linux/fb.h> | 22 | #include <linux/fb.h> |
diff --git a/drivers/video/cfbimgblt.c b/drivers/video/cfbimgblt.c index ad8a89bf8eae..51d35386a945 100644 --- a/drivers/video/cfbimgblt.c +++ b/drivers/video/cfbimgblt.c | |||
@@ -29,7 +29,6 @@ | |||
29 | * Also need to add code to deal with cards endians that are different than | 29 | * Also need to add code to deal with cards endians that are different than |
30 | * the native cpu endians. I also need to deal with MSB position in the word. | 30 | * the native cpu endians. I also need to deal with MSB position in the word. |
31 | */ | 31 | */ |
32 | #include <linux/config.h> | ||
33 | #include <linux/module.h> | 32 | #include <linux/module.h> |
34 | #include <linux/string.h> | 33 | #include <linux/string.h> |
35 | #include <linux/fb.h> | 34 | #include <linux/fb.h> |
diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c index 63b6c79c8a0a..7f926c619b61 100644 --- a/drivers/video/cg14.c +++ b/drivers/video/cg14.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* cg14.c: CGFOURTEEN frame buffer driver | 1 | /* cg14.c: CGFOURTEEN frame buffer driver |
2 | * | 2 | * |
3 | * Copyright (C) 2003 David S. Miller (davem@redhat.com) | 3 | * Copyright (C) 2003, 2006 David S. Miller (davem@davemloft.net) |
4 | * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz) | 4 | * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz) |
5 | * Copyright (C) 1995 Miguel de Icaza (miguel@nuclecu.unam.mx) | 5 | * Copyright (C) 1995 Miguel de Icaza (miguel@nuclecu.unam.mx) |
6 | * | 6 | * |
@@ -18,8 +18,8 @@ | |||
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | 19 | ||
20 | #include <asm/io.h> | 20 | #include <asm/io.h> |
21 | #include <asm/sbus.h> | 21 | #include <asm/prom.h> |
22 | #include <asm/oplib.h> | 22 | #include <asm/of_device.h> |
23 | #include <asm/fbio.h> | 23 | #include <asm/fbio.h> |
24 | 24 | ||
25 | #include "sbuslib.h" | 25 | #include "sbuslib.h" |
@@ -99,73 +99,73 @@ static struct fb_ops cg14_ops = { | |||
99 | #define CG14_MCR_PIXMODE_32 3 | 99 | #define CG14_MCR_PIXMODE_32 3 |
100 | 100 | ||
101 | struct cg14_regs{ | 101 | struct cg14_regs{ |
102 | volatile u8 mcr; /* Master Control Reg */ | 102 | u8 mcr; /* Master Control Reg */ |
103 | volatile u8 ppr; /* Packed Pixel Reg */ | 103 | u8 ppr; /* Packed Pixel Reg */ |
104 | volatile u8 tms[2]; /* Test Mode Status Regs */ | 104 | u8 tms[2]; /* Test Mode Status Regs */ |
105 | volatile u8 msr; /* Master Status Reg */ | 105 | u8 msr; /* Master Status Reg */ |
106 | volatile u8 fsr; /* Fault Status Reg */ | 106 | u8 fsr; /* Fault Status Reg */ |
107 | volatile u8 rev; /* Revision & Impl */ | 107 | u8 rev; /* Revision & Impl */ |
108 | volatile u8 ccr; /* Clock Control Reg */ | 108 | u8 ccr; /* Clock Control Reg */ |
109 | volatile u32 tmr; /* Test Mode Read Back */ | 109 | u32 tmr; /* Test Mode Read Back */ |
110 | volatile u8 mod; /* Monitor Operation Data Reg */ | 110 | u8 mod; /* Monitor Operation Data Reg */ |
111 | volatile u8 acr; /* Aux Control */ | 111 | u8 acr; /* Aux Control */ |
112 | u8 xxx0[6]; | 112 | u8 xxx0[6]; |
113 | volatile u16 hct; /* Hor Counter */ | 113 | u16 hct; /* Hor Counter */ |
114 | volatile u16 vct; /* Vert Counter */ | 114 | u16 vct; /* Vert Counter */ |
115 | volatile u16 hbs; /* Hor Blank Start */ | 115 | u16 hbs; /* Hor Blank Start */ |
116 | volatile u16 hbc; /* Hor Blank Clear */ | 116 | u16 hbc; /* Hor Blank Clear */ |
117 | volatile u16 hss; /* Hor Sync Start */ | 117 | u16 hss; /* Hor Sync Start */ |
118 | volatile u16 hsc; /* Hor Sync Clear */ | 118 | u16 hsc; /* Hor Sync Clear */ |
119 | volatile u16 csc; /* Composite Sync Clear */ | 119 | u16 csc; /* Composite Sync Clear */ |
120 | volatile u16 vbs; /* Vert Blank Start */ | 120 | u16 vbs; /* Vert Blank Start */ |
121 | volatile u16 vbc; /* Vert Blank Clear */ | 121 | u16 vbc; /* Vert Blank Clear */ |
122 | volatile u16 vss; /* Vert Sync Start */ | 122 | u16 vss; /* Vert Sync Start */ |
123 | volatile u16 vsc; /* Vert Sync Clear */ | 123 | u16 vsc; /* Vert Sync Clear */ |
124 | volatile u16 xcs; | 124 | u16 xcs; |
125 | volatile u16 xcc; | 125 | u16 xcc; |
126 | volatile u16 fsa; /* Fault Status Address */ | 126 | u16 fsa; /* Fault Status Address */ |
127 | volatile u16 adr; /* Address Registers */ | 127 | u16 adr; /* Address Registers */ |
128 | u8 xxx1[0xce]; | 128 | u8 xxx1[0xce]; |
129 | volatile u8 pcg[0x100]; /* Pixel Clock Generator */ | 129 | u8 pcg[0x100]; /* Pixel Clock Generator */ |
130 | volatile u32 vbr; /* Frame Base Row */ | 130 | u32 vbr; /* Frame Base Row */ |
131 | volatile u32 vmcr; /* VBC Master Control */ | 131 | u32 vmcr; /* VBC Master Control */ |
132 | volatile u32 vcr; /* VBC refresh */ | 132 | u32 vcr; /* VBC refresh */ |
133 | volatile u32 vca; /* VBC Config */ | 133 | u32 vca; /* VBC Config */ |
134 | }; | 134 | }; |
135 | 135 | ||
136 | #define CG14_CCR_ENABLE 0x04 | 136 | #define CG14_CCR_ENABLE 0x04 |
137 | #define CG14_CCR_SELECT 0x02 /* HW/Full screen */ | 137 | #define CG14_CCR_SELECT 0x02 /* HW/Full screen */ |
138 | 138 | ||
139 | struct cg14_cursor { | 139 | struct cg14_cursor { |
140 | volatile u32 cpl0[32]; /* Enable plane 0 */ | 140 | u32 cpl0[32]; /* Enable plane 0 */ |
141 | volatile u32 cpl1[32]; /* Color selection plane */ | 141 | u32 cpl1[32]; /* Color selection plane */ |
142 | volatile u8 ccr; /* Cursor Control Reg */ | 142 | u8 ccr; /* Cursor Control Reg */ |
143 | u8 xxx0[3]; | 143 | u8 xxx0[3]; |
144 | volatile u16 cursx; /* Cursor x,y position */ | 144 | u16 cursx; /* Cursor x,y position */ |
145 | volatile u16 cursy; /* Cursor x,y position */ | 145 | u16 cursy; /* Cursor x,y position */ |
146 | volatile u32 color0; | 146 | u32 color0; |
147 | volatile u32 color1; | 147 | u32 color1; |
148 | u32 xxx1[0x1bc]; | 148 | u32 xxx1[0x1bc]; |
149 | volatile u32 cpl0i[32]; /* Enable plane 0 autoinc */ | 149 | u32 cpl0i[32]; /* Enable plane 0 autoinc */ |
150 | volatile u32 cpl1i[32]; /* Color selection autoinc */ | 150 | u32 cpl1i[32]; /* Color selection autoinc */ |
151 | }; | 151 | }; |
152 | 152 | ||
153 | struct cg14_dac { | 153 | struct cg14_dac { |
154 | volatile u8 addr; /* Address Register */ | 154 | u8 addr; /* Address Register */ |
155 | u8 xxx0[255]; | 155 | u8 xxx0[255]; |
156 | volatile u8 glut; /* Gamma table */ | 156 | u8 glut; /* Gamma table */ |
157 | u8 xxx1[255]; | 157 | u8 xxx1[255]; |
158 | volatile u8 select; /* Register Select */ | 158 | u8 select; /* Register Select */ |
159 | u8 xxx2[255]; | 159 | u8 xxx2[255]; |
160 | volatile u8 mode; /* Mode Register */ | 160 | u8 mode; /* Mode Register */ |
161 | }; | 161 | }; |
162 | 162 | ||
163 | struct cg14_xlut{ | 163 | struct cg14_xlut{ |
164 | volatile u8 x_xlut [256]; | 164 | u8 x_xlut [256]; |
165 | volatile u8 x_xlutd [256]; | 165 | u8 x_xlutd [256]; |
166 | u8 xxx0[0x600]; | 166 | u8 xxx0[0x600]; |
167 | volatile u8 x_xlut_inc [256]; | 167 | u8 x_xlut_inc [256]; |
168 | volatile u8 x_xlutd_inc [256]; | 168 | u8 x_xlutd_inc [256]; |
169 | }; | 169 | }; |
170 | 170 | ||
171 | /* Color look up table (clut) */ | 171 | /* Color look up table (clut) */ |
@@ -204,7 +204,6 @@ struct cg14_par { | |||
204 | 204 | ||
205 | int mode; | 205 | int mode; |
206 | int ramsize; | 206 | int ramsize; |
207 | struct sbus_dev *sdev; | ||
208 | }; | 207 | }; |
209 | 208 | ||
210 | static void __cg14_reset(struct cg14_par *par) | 209 | static void __cg14_reset(struct cg14_par *par) |
@@ -355,14 +354,9 @@ static int cg14_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) | |||
355 | * Initialisation | 354 | * Initialisation |
356 | */ | 355 | */ |
357 | 356 | ||
358 | static void cg14_init_fix(struct fb_info *info, int linebytes) | 357 | static void cg14_init_fix(struct fb_info *info, int linebytes, struct device_node *dp) |
359 | { | 358 | { |
360 | struct cg14_par *par = (struct cg14_par *)info->par; | 359 | const char *name = dp->name; |
361 | const char *name; | ||
362 | |||
363 | name = "cgfourteen"; | ||
364 | if (par->sdev) | ||
365 | name = par->sdev->prom_name; | ||
366 | 360 | ||
367 | strlcpy(info->fix.id, name, sizeof(info->fix.id)); | 361 | strlcpy(info->fix.id, name, sizeof(info->fix.id)); |
368 | 362 | ||
@@ -456,98 +450,81 @@ static struct sbus_mmap_map __cg14_mmap_map[CG14_MMAP_ENTRIES] __initdata = { | |||
456 | struct all_info { | 450 | struct all_info { |
457 | struct fb_info info; | 451 | struct fb_info info; |
458 | struct cg14_par par; | 452 | struct cg14_par par; |
459 | struct list_head list; | ||
460 | }; | 453 | }; |
461 | static LIST_HEAD(cg14_list); | ||
462 | 454 | ||
463 | static void cg14_init_one(struct sbus_dev *sdev, int node, int parent_node) | 455 | static void cg14_unmap_regs(struct all_info *all) |
464 | { | 456 | { |
465 | struct all_info *all; | 457 | if (all->par.regs) |
466 | unsigned long phys, rphys; | 458 | of_iounmap(all->par.regs, sizeof(struct cg14_regs)); |
467 | u32 bases[6]; | 459 | if (all->par.clut) |
468 | int is_8mb, linebytes, i; | 460 | of_iounmap(all->par.clut, sizeof(struct cg14_clut)); |
469 | 461 | if (all->par.cursor) | |
470 | if (!sdev) { | 462 | of_iounmap(all->par.cursor, sizeof(struct cg14_cursor)); |
471 | if (prom_getproperty(node, "address", | 463 | if (all->info.screen_base) |
472 | (char *) &bases[0], sizeof(bases)) <= 0 | 464 | of_iounmap(all->info.screen_base, all->par.fbsize); |
473 | || !bases[0]) { | 465 | } |
474 | printk(KERN_ERR "cg14: Device is not mapped.\n"); | ||
475 | return; | ||
476 | } | ||
477 | if (__get_iospace(bases[0]) != __get_iospace(bases[1])) { | ||
478 | printk(KERN_ERR "cg14: I/O spaces don't match.\n"); | ||
479 | return; | ||
480 | } | ||
481 | } | ||
482 | 466 | ||
483 | all = kmalloc(sizeof(*all), GFP_KERNEL); | 467 | static int __devinit cg14_init_one(struct of_device *op) |
484 | if (!all) { | 468 | { |
485 | printk(KERN_ERR "cg14: Cannot allocate memory.\n"); | 469 | struct device_node *dp = op->node; |
486 | return; | 470 | struct all_info *all; |
487 | } | 471 | int is_8mb, linebytes, i, err; |
488 | memset(all, 0, sizeof(*all)); | ||
489 | 472 | ||
490 | INIT_LIST_HEAD(&all->list); | 473 | all = kzalloc(sizeof(*all), GFP_KERNEL); |
474 | if (!all) | ||
475 | return -ENOMEM; | ||
491 | 476 | ||
492 | spin_lock_init(&all->par.lock); | 477 | spin_lock_init(&all->par.lock); |
493 | 478 | ||
494 | sbusfb_fill_var(&all->info.var, node, 8); | 479 | sbusfb_fill_var(&all->info.var, dp->node, 8); |
495 | all->info.var.red.length = 8; | 480 | all->info.var.red.length = 8; |
496 | all->info.var.green.length = 8; | 481 | all->info.var.green.length = 8; |
497 | all->info.var.blue.length = 8; | 482 | all->info.var.blue.length = 8; |
498 | 483 | ||
499 | linebytes = prom_getintdefault(node, "linebytes", | 484 | linebytes = of_getintprop_default(dp, "linebytes", |
500 | all->info.var.xres); | 485 | all->info.var.xres); |
501 | all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); | 486 | all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); |
502 | 487 | ||
503 | all->par.sdev = sdev; | 488 | if (!strcmp(dp->parent->name, "sbus") || |
504 | if (sdev) { | 489 | !strcmp(dp->parent->name, "sbi")) { |
505 | rphys = sdev->reg_addrs[0].phys_addr; | 490 | all->par.physbase = op->resource[0].start; |
506 | all->par.physbase = phys = sdev->reg_addrs[1].phys_addr; | 491 | all->par.iospace = op->resource[0].flags & IORESOURCE_BITS; |
507 | all->par.iospace = sdev->reg_addrs[0].which_io; | ||
508 | |||
509 | all->par.regs = sbus_ioremap(&sdev->resource[0], 0, | ||
510 | sizeof(struct cg14_regs), | ||
511 | "cg14 regs"); | ||
512 | all->par.clut = sbus_ioremap(&sdev->resource[0], CG14_CLUT1, | ||
513 | sizeof(struct cg14_clut), | ||
514 | "cg14 clut"); | ||
515 | all->par.cursor = sbus_ioremap(&sdev->resource[0], CG14_CURSORREGS, | ||
516 | sizeof(struct cg14_cursor), | ||
517 | "cg14 cursor"); | ||
518 | all->info.screen_base = sbus_ioremap(&sdev->resource[1], 0, | ||
519 | all->par.fbsize, "cg14 ram"); | ||
520 | } else { | 492 | } else { |
521 | rphys = __get_phys(bases[0]); | 493 | all->par.physbase = op->resource[1].start; |
522 | all->par.physbase = phys = __get_phys(bases[1]); | 494 | all->par.iospace = op->resource[0].flags & IORESOURCE_BITS; |
523 | all->par.iospace = __get_iospace(bases[0]); | ||
524 | all->par.regs = (struct cg14_regs __iomem *)(unsigned long)bases[0]; | ||
525 | all->par.clut = (struct cg14_clut __iomem *)((unsigned long)bases[0] + | ||
526 | CG14_CLUT1); | ||
527 | all->par.cursor = | ||
528 | (struct cg14_cursor __iomem *)((unsigned long)bases[0] + | ||
529 | CG14_CURSORREGS); | ||
530 | |||
531 | all->info.screen_base = (char __iomem *)(unsigned long)bases[1]; | ||
532 | } | 495 | } |
533 | 496 | ||
534 | prom_getproperty(node, "reg", (char *) &bases[0], sizeof(bases)); | 497 | all->par.regs = of_ioremap(&op->resource[0], 0, |
535 | is_8mb = (bases[5] == 0x800000); | 498 | sizeof(struct cg14_regs), "cg14 regs"); |
499 | all->par.clut = of_ioremap(&op->resource[0], CG14_CLUT1, | ||
500 | sizeof(struct cg14_clut), "cg14 clut"); | ||
501 | all->par.cursor = of_ioremap(&op->resource[0], CG14_CURSORREGS, | ||
502 | sizeof(struct cg14_cursor), "cg14 cursor"); | ||
536 | 503 | ||
537 | if (sizeof(all->par.mmap_map) != sizeof(__cg14_mmap_map)) { | 504 | all->info.screen_base = of_ioremap(&op->resource[1], 0, |
538 | extern void __cg14_mmap_sized_wrongly(void); | 505 | all->par.fbsize, "cg14 ram"); |
539 | 506 | ||
540 | __cg14_mmap_sized_wrongly(); | 507 | if (!all->par.regs || !all->par.clut || !all->par.cursor || |
541 | } | 508 | !all->info.screen_base) |
509 | cg14_unmap_regs(all); | ||
510 | |||
511 | is_8mb = (((op->resource[1].end - op->resource[1].start) + 1) == | ||
512 | (8 * 1024 * 1024)); | ||
513 | |||
514 | BUILD_BUG_ON(sizeof(all->par.mmap_map) != sizeof(__cg14_mmap_map)); | ||
542 | 515 | ||
543 | memcpy(&all->par.mmap_map, &__cg14_mmap_map, sizeof(all->par.mmap_map)); | 516 | memcpy(&all->par.mmap_map, &__cg14_mmap_map, |
517 | sizeof(all->par.mmap_map)); | ||
518 | |||
544 | for (i = 0; i < CG14_MMAP_ENTRIES; i++) { | 519 | for (i = 0; i < CG14_MMAP_ENTRIES; i++) { |
545 | struct sbus_mmap_map *map = &all->par.mmap_map[i]; | 520 | struct sbus_mmap_map *map = &all->par.mmap_map[i]; |
546 | 521 | ||
547 | if (!map->size) | 522 | if (!map->size) |
548 | break; | 523 | break; |
549 | if (map->poff & 0x80000000) | 524 | if (map->poff & 0x80000000) |
550 | map->poff = (map->poff & 0x7fffffff) + rphys - phys; | 525 | map->poff = (map->poff & 0x7fffffff) + |
526 | (op->resource[0].start - | ||
527 | op->resource[1].start); | ||
551 | if (is_8mb && | 528 | if (is_8mb && |
552 | map->size >= 0x100000 && | 529 | map->size >= 0x100000 && |
553 | map->size <= 0x400000) | 530 | map->size <= 0x400000) |
@@ -564,84 +541,87 @@ static void cg14_init_one(struct sbus_dev *sdev, int node, int parent_node) | |||
564 | __cg14_reset(&all->par); | 541 | __cg14_reset(&all->par); |
565 | 542 | ||
566 | if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { | 543 | if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { |
567 | printk(KERN_ERR "cg14: Could not allocate color map.\n"); | 544 | cg14_unmap_regs(all); |
568 | kfree(all); | 545 | kfree(all); |
569 | return; | 546 | return -ENOMEM; |
570 | } | 547 | } |
571 | fb_set_cmap(&all->info.cmap, &all->info); | 548 | fb_set_cmap(&all->info.cmap, &all->info); |
572 | 549 | ||
573 | cg14_init_fix(&all->info, linebytes); | 550 | cg14_init_fix(&all->info, linebytes, dp); |
574 | 551 | ||
575 | if (register_framebuffer(&all->info) < 0) { | 552 | err = register_framebuffer(&all->info); |
576 | printk(KERN_ERR "cg14: Could not register framebuffer.\n"); | 553 | if (err < 0) { |
577 | fb_dealloc_cmap(&all->info.cmap); | 554 | fb_dealloc_cmap(&all->info.cmap); |
555 | cg14_unmap_regs(all); | ||
578 | kfree(all); | 556 | kfree(all); |
579 | return; | 557 | return err; |
580 | } | 558 | } |
581 | 559 | ||
582 | list_add(&all->list, &cg14_list); | 560 | dev_set_drvdata(&op->dev, all); |
583 | 561 | ||
584 | printk("cg14: cgfourteen at %lx:%lx, %dMB\n", | 562 | printk("%s: cgfourteen at %lx:%lx, %dMB\n", |
585 | all->par.iospace, all->par.physbase, all->par.ramsize >> 20); | 563 | dp->full_name, |
564 | all->par.iospace, all->par.physbase, | ||
565 | all->par.ramsize >> 20); | ||
586 | 566 | ||
567 | return 0; | ||
587 | } | 568 | } |
588 | 569 | ||
589 | int __init cg14_init(void) | 570 | static int __devinit cg14_probe(struct of_device *dev, const struct of_device_id *match) |
590 | { | 571 | { |
591 | struct sbus_bus *sbus; | 572 | struct of_device *op = to_of_device(&dev->dev); |
592 | struct sbus_dev *sdev; | ||
593 | 573 | ||
594 | if (fb_get_options("cg14fb", NULL)) | 574 | return cg14_init_one(op); |
595 | return -ENODEV; | 575 | } |
596 | 576 | ||
597 | #ifdef CONFIG_SPARC32 | 577 | static int __devexit cg14_remove(struct of_device *dev) |
598 | { | 578 | { |
599 | int root, node; | 579 | struct all_info *all = dev_get_drvdata(&dev->dev); |
600 | 580 | ||
601 | root = prom_getchild(prom_root_node); | 581 | unregister_framebuffer(&all->info); |
602 | root = prom_searchsiblings(root, "obio"); | 582 | fb_dealloc_cmap(&all->info.cmap); |
603 | if (root) { | 583 | |
604 | node = prom_searchsiblings(prom_getchild(root), | 584 | cg14_unmap_regs(all); |
605 | "cgfourteen"); | 585 | |
606 | if (node) | 586 | kfree(all); |
607 | cg14_init_one(NULL, node, root); | 587 | |
608 | } | 588 | dev_set_drvdata(&dev->dev, NULL); |
609 | } | ||
610 | #endif | ||
611 | for_all_sbusdev(sdev, sbus) { | ||
612 | if (!strcmp(sdev->prom_name, "cgfourteen")) | ||
613 | cg14_init_one(sdev, sdev->prom_node, sbus->prom_node); | ||
614 | } | ||
615 | 589 | ||
616 | return 0; | 590 | return 0; |
617 | } | 591 | } |
618 | 592 | ||
619 | void __exit cg14_exit(void) | 593 | static struct of_device_id cg14_match[] = { |
620 | { | 594 | { |
621 | struct list_head *pos, *tmp; | 595 | .name = "cgfourteen", |
596 | }, | ||
597 | {}, | ||
598 | }; | ||
599 | MODULE_DEVICE_TABLE(of, cg14_match); | ||
622 | 600 | ||
623 | list_for_each_safe(pos, tmp, &cg14_list) { | 601 | static struct of_platform_driver cg14_driver = { |
624 | struct all_info *all = list_entry(pos, typeof(*all), list); | 602 | .name = "cg14", |
603 | .match_table = cg14_match, | ||
604 | .probe = cg14_probe, | ||
605 | .remove = __devexit_p(cg14_remove), | ||
606 | }; | ||
625 | 607 | ||
626 | unregister_framebuffer(&all->info); | 608 | int __init cg14_init(void) |
627 | fb_dealloc_cmap(&all->info.cmap); | 609 | { |
628 | kfree(all); | 610 | if (fb_get_options("cg14fb", NULL)) |
629 | } | 611 | return -ENODEV; |
612 | |||
613 | return of_register_driver(&cg14_driver, &of_bus_type); | ||
630 | } | 614 | } |
631 | 615 | ||
632 | int __init | 616 | void __exit cg14_exit(void) |
633 | cg14_setup(char *arg) | ||
634 | { | 617 | { |
635 | /* No cmdline options yet... */ | 618 | of_unregister_driver(&cg14_driver); |
636 | return 0; | ||
637 | } | 619 | } |
638 | 620 | ||
639 | module_init(cg14_init); | 621 | module_init(cg14_init); |
640 | |||
641 | #ifdef MODULE | ||
642 | module_exit(cg14_exit); | 622 | module_exit(cg14_exit); |
643 | #endif | ||
644 | 623 | ||
645 | MODULE_DESCRIPTION("framebuffer driver for CGfourteen chipsets"); | 624 | MODULE_DESCRIPTION("framebuffer driver for CGfourteen chipsets"); |
646 | MODULE_AUTHOR("David S. Miller <davem@redhat.com>"); | 625 | MODULE_AUTHOR("David S. Miller <davem@davemloft.net>"); |
626 | MODULE_VERSION("2.0"); | ||
647 | MODULE_LICENSE("GPL"); | 627 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c index 3de6e1b5ab2f..9c8c753ef454 100644 --- a/drivers/video/cg3.c +++ b/drivers/video/cg3.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* cg3.c: CGTHREE frame buffer driver | 1 | /* cg3.c: CGTHREE frame buffer driver |
2 | * | 2 | * |
3 | * Copyright (C) 2003 David S. Miller (davem@redhat.com) | 3 | * Copyright (C) 2003, 2006 David S. Miller (davem@davemloft.net) |
4 | * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz) | 4 | * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz) |
5 | * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) | 5 | * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) |
6 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) | 6 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) |
@@ -19,8 +19,9 @@ | |||
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | 20 | ||
21 | #include <asm/io.h> | 21 | #include <asm/io.h> |
22 | #include <asm/sbus.h> | ||
23 | #include <asm/oplib.h> | 22 | #include <asm/oplib.h> |
23 | #include <asm/prom.h> | ||
24 | #include <asm/of_device.h> | ||
24 | #include <asm/fbio.h> | 25 | #include <asm/fbio.h> |
25 | 26 | ||
26 | #include "sbuslib.h" | 27 | #include "sbuslib.h" |
@@ -80,30 +81,30 @@ enum cg3_type { | |||
80 | }; | 81 | }; |
81 | 82 | ||
82 | struct bt_regs { | 83 | struct bt_regs { |
83 | volatile u32 addr; | 84 | u32 addr; |
84 | volatile u32 color_map; | 85 | u32 color_map; |
85 | volatile u32 control; | 86 | u32 control; |
86 | volatile u32 cursor; | 87 | u32 cursor; |
87 | }; | 88 | }; |
88 | 89 | ||
89 | struct cg3_regs { | 90 | struct cg3_regs { |
90 | struct bt_regs cmap; | 91 | struct bt_regs cmap; |
91 | volatile u8 control; | 92 | u8 control; |
92 | volatile u8 status; | 93 | u8 status; |
93 | volatile u8 cursor_start; | 94 | u8 cursor_start; |
94 | volatile u8 cursor_end; | 95 | u8 cursor_end; |
95 | volatile u8 h_blank_start; | 96 | u8 h_blank_start; |
96 | volatile u8 h_blank_end; | 97 | u8 h_blank_end; |
97 | volatile u8 h_sync_start; | 98 | u8 h_sync_start; |
98 | volatile u8 h_sync_end; | 99 | u8 h_sync_end; |
99 | volatile u8 comp_sync_end; | 100 | u8 comp_sync_end; |
100 | volatile u8 v_blank_start_high; | 101 | u8 v_blank_start_high; |
101 | volatile u8 v_blank_start_low; | 102 | u8 v_blank_start_low; |
102 | volatile u8 v_blank_end; | 103 | u8 v_blank_end; |
103 | volatile u8 v_sync_start; | 104 | u8 v_sync_start; |
104 | volatile u8 v_sync_end; | 105 | u8 v_sync_end; |
105 | volatile u8 xfer_holdoff_start; | 106 | u8 xfer_holdoff_start; |
106 | volatile u8 xfer_holdoff_end; | 107 | u8 xfer_holdoff_end; |
107 | }; | 108 | }; |
108 | 109 | ||
109 | /* Offset of interesting structures in the OBIO space */ | 110 | /* Offset of interesting structures in the OBIO space */ |
@@ -120,9 +121,8 @@ struct cg3_par { | |||
120 | #define CG3_FLAG_RDI 0x00000002 | 121 | #define CG3_FLAG_RDI 0x00000002 |
121 | 122 | ||
122 | unsigned long physbase; | 123 | unsigned long physbase; |
124 | unsigned long which_io; | ||
123 | unsigned long fbsize; | 125 | unsigned long fbsize; |
124 | |||
125 | struct sbus_dev *sdev; | ||
126 | }; | 126 | }; |
127 | 127 | ||
128 | /** | 128 | /** |
@@ -235,7 +235,7 @@ static int cg3_mmap(struct fb_info *info, struct vm_area_struct *vma) | |||
235 | 235 | ||
236 | return sbusfb_mmap_helper(cg3_mmap_map, | 236 | return sbusfb_mmap_helper(cg3_mmap_map, |
237 | par->physbase, par->fbsize, | 237 | par->physbase, par->fbsize, |
238 | par->sdev->reg_addrs[0].which_io, | 238 | par->which_io, |
239 | vma); | 239 | vma); |
240 | } | 240 | } |
241 | 241 | ||
@@ -252,11 +252,9 @@ static int cg3_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) | |||
252 | */ | 252 | */ |
253 | 253 | ||
254 | static void | 254 | static void |
255 | cg3_init_fix(struct fb_info *info, int linebytes) | 255 | cg3_init_fix(struct fb_info *info, int linebytes, struct device_node *dp) |
256 | { | 256 | { |
257 | struct cg3_par *par = (struct cg3_par *)info->par; | 257 | strlcpy(info->fix.id, dp->name, sizeof(info->fix.id)); |
258 | |||
259 | strlcpy(info->fix.id, par->sdev->prom_name, sizeof(info->fix.id)); | ||
260 | 258 | ||
261 | info->fix.type = FB_TYPE_PACKED_PIXELS; | 259 | info->fix.type = FB_TYPE_PACKED_PIXELS; |
262 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; | 260 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; |
@@ -267,16 +265,15 @@ cg3_init_fix(struct fb_info *info, int linebytes) | |||
267 | } | 265 | } |
268 | 266 | ||
269 | static void cg3_rdi_maybe_fixup_var(struct fb_var_screeninfo *var, | 267 | static void cg3_rdi_maybe_fixup_var(struct fb_var_screeninfo *var, |
270 | struct sbus_dev *sdev) | 268 | struct device_node *dp) |
271 | { | 269 | { |
272 | char buffer[40]; | 270 | char *params; |
273 | char *p; | 271 | char *p; |
274 | int ww, hh; | 272 | int ww, hh; |
275 | 273 | ||
276 | *buffer = 0; | 274 | params = of_get_property(dp, "params", NULL); |
277 | prom_getstring(sdev->prom_node, "params", buffer, sizeof(buffer)); | 275 | if (params) { |
278 | if (*buffer) { | 276 | ww = simple_strtoul(params, &p, 10); |
279 | ww = simple_strtoul(buffer, &p, 10); | ||
280 | if (ww && *p == 'x') { | 277 | if (ww && *p == 'x') { |
281 | hh = simple_strtoul(p + 1, &p, 10); | 278 | hh = simple_strtoul(p + 1, &p, 10); |
282 | if (hh && *p == '-') { | 279 | if (hh && *p == '-') { |
@@ -348,11 +345,11 @@ static void cg3_do_default_mode(struct cg3_par *par) | |||
348 | sbus_writeb(p[1], regp); | 345 | sbus_writeb(p[1], regp); |
349 | } | 346 | } |
350 | for (p = cg3_dacvals; *p; p += 2) { | 347 | for (p = cg3_dacvals; *p; p += 2) { |
351 | volatile u8 __iomem *regp; | 348 | u8 __iomem *regp; |
352 | 349 | ||
353 | regp = (volatile u8 __iomem *)&par->regs->cmap.addr; | 350 | regp = (u8 __iomem *)&par->regs->cmap.addr; |
354 | sbus_writeb(p[0], regp); | 351 | sbus_writeb(p[0], regp); |
355 | regp = (volatile u8 __iomem *)&par->regs->cmap.control; | 352 | regp = (u8 __iomem *)&par->regs->cmap.control; |
356 | sbus_writeb(p[1], regp); | 353 | sbus_writeb(p[1], regp); |
357 | } | 354 | } |
358 | } | 355 | } |
@@ -360,129 +357,137 @@ static void cg3_do_default_mode(struct cg3_par *par) | |||
360 | struct all_info { | 357 | struct all_info { |
361 | struct fb_info info; | 358 | struct fb_info info; |
362 | struct cg3_par par; | 359 | struct cg3_par par; |
363 | struct list_head list; | ||
364 | }; | 360 | }; |
365 | static LIST_HEAD(cg3_list); | ||
366 | 361 | ||
367 | static void cg3_init_one(struct sbus_dev *sdev) | 362 | static int __devinit cg3_init_one(struct of_device *op) |
368 | { | 363 | { |
364 | struct device_node *dp = op->node; | ||
369 | struct all_info *all; | 365 | struct all_info *all; |
370 | int linebytes; | 366 | int linebytes, err; |
371 | |||
372 | all = kmalloc(sizeof(*all), GFP_KERNEL); | ||
373 | if (!all) { | ||
374 | printk(KERN_ERR "cg3: Cannot allocate memory.\n"); | ||
375 | return; | ||
376 | } | ||
377 | memset(all, 0, sizeof(*all)); | ||
378 | 367 | ||
379 | INIT_LIST_HEAD(&all->list); | 368 | all = kzalloc(sizeof(*all), GFP_KERNEL); |
369 | if (!all) | ||
370 | return -ENOMEM; | ||
380 | 371 | ||
381 | spin_lock_init(&all->par.lock); | 372 | spin_lock_init(&all->par.lock); |
382 | all->par.sdev = sdev; | ||
383 | 373 | ||
384 | all->par.physbase = sdev->reg_addrs[0].phys_addr; | 374 | all->par.physbase = op->resource[0].start; |
375 | all->par.which_io = op->resource[0].flags & IORESOURCE_BITS; | ||
385 | 376 | ||
386 | sbusfb_fill_var(&all->info.var, sdev->prom_node, 8); | 377 | sbusfb_fill_var(&all->info.var, dp->node, 8); |
387 | all->info.var.red.length = 8; | 378 | all->info.var.red.length = 8; |
388 | all->info.var.green.length = 8; | 379 | all->info.var.green.length = 8; |
389 | all->info.var.blue.length = 8; | 380 | all->info.var.blue.length = 8; |
390 | if (!strcmp(sdev->prom_name, "cgRDI")) | 381 | if (!strcmp(dp->name, "cgRDI")) |
391 | all->par.flags |= CG3_FLAG_RDI; | 382 | all->par.flags |= CG3_FLAG_RDI; |
392 | if (all->par.flags & CG3_FLAG_RDI) | 383 | if (all->par.flags & CG3_FLAG_RDI) |
393 | cg3_rdi_maybe_fixup_var(&all->info.var, sdev); | 384 | cg3_rdi_maybe_fixup_var(&all->info.var, dp); |
394 | 385 | ||
395 | linebytes = prom_getintdefault(sdev->prom_node, "linebytes", | 386 | linebytes = of_getintprop_default(dp, "linebytes", |
396 | all->info.var.xres); | 387 | all->info.var.xres); |
397 | all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); | 388 | all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); |
398 | 389 | ||
399 | all->par.regs = sbus_ioremap(&sdev->resource[0], CG3_REGS_OFFSET, | 390 | all->par.regs = of_ioremap(&op->resource[0], CG3_REGS_OFFSET, |
400 | sizeof(struct cg3_regs), "cg3 regs"); | 391 | sizeof(struct cg3_regs), "cg3 regs"); |
401 | 392 | ||
402 | all->info.flags = FBINFO_DEFAULT; | 393 | all->info.flags = FBINFO_DEFAULT; |
403 | all->info.fbops = &cg3_ops; | 394 | all->info.fbops = &cg3_ops; |
404 | #ifdef CONFIG_SPARC32 | 395 | all->info.screen_base = |
405 | all->info.screen_base = (char __iomem *) | 396 | of_ioremap(&op->resource[0], CG3_RAM_OFFSET, |
406 | prom_getintdefault(sdev->prom_node, "address", 0); | 397 | all->par.fbsize, "cg3 ram"); |
407 | #endif | ||
408 | if (!all->info.screen_base) | ||
409 | all->info.screen_base = | ||
410 | sbus_ioremap(&sdev->resource[0], CG3_RAM_OFFSET, | ||
411 | all->par.fbsize, "cg3 ram"); | ||
412 | all->info.par = &all->par; | 398 | all->info.par = &all->par; |
413 | 399 | ||
414 | cg3_blank(0, &all->info); | 400 | cg3_blank(0, &all->info); |
415 | 401 | ||
416 | if (!prom_getbool(sdev->prom_node, "width")) | 402 | if (!of_find_property(dp, "width", NULL)) |
417 | cg3_do_default_mode(&all->par); | 403 | cg3_do_default_mode(&all->par); |
418 | 404 | ||
419 | if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { | 405 | if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { |
420 | printk(KERN_ERR "cg3: Could not allocate color map.\n"); | 406 | of_iounmap(all->par.regs, sizeof(struct cg3_regs)); |
407 | of_iounmap(all->info.screen_base, all->par.fbsize); | ||
421 | kfree(all); | 408 | kfree(all); |
422 | return; | 409 | return -ENOMEM; |
423 | } | 410 | } |
424 | fb_set_cmap(&all->info.cmap, &all->info); | 411 | fb_set_cmap(&all->info.cmap, &all->info); |
425 | 412 | ||
426 | cg3_init_fix(&all->info, linebytes); | 413 | cg3_init_fix(&all->info, linebytes, dp); |
427 | 414 | ||
428 | if (register_framebuffer(&all->info) < 0) { | 415 | err = register_framebuffer(&all->info); |
429 | printk(KERN_ERR "cg3: Could not register framebuffer.\n"); | 416 | if (err < 0) { |
430 | fb_dealloc_cmap(&all->info.cmap); | 417 | fb_dealloc_cmap(&all->info.cmap); |
418 | of_iounmap(all->par.regs, sizeof(struct cg3_regs)); | ||
419 | of_iounmap(all->info.screen_base, all->par.fbsize); | ||
431 | kfree(all); | 420 | kfree(all); |
432 | return; | 421 | return err; |
433 | } | 422 | } |
434 | 423 | ||
435 | list_add(&all->list, &cg3_list); | 424 | dev_set_drvdata(&op->dev, all); |
425 | |||
426 | printk("%s: cg3 at %lx:%lx\n", | ||
427 | dp->full_name, all->par.which_io, all->par.physbase); | ||
436 | 428 | ||
437 | printk("cg3: %s at %lx:%lx\n", | 429 | return 0; |
438 | sdev->prom_name, | ||
439 | (long) sdev->reg_addrs[0].which_io, | ||
440 | (long) sdev->reg_addrs[0].phys_addr); | ||
441 | } | 430 | } |
442 | 431 | ||
443 | int __init cg3_init(void) | 432 | static int __devinit cg3_probe(struct of_device *dev, const struct of_device_id *match) |
444 | { | 433 | { |
445 | struct sbus_bus *sbus; | 434 | struct of_device *op = to_of_device(&dev->dev); |
446 | struct sbus_dev *sdev; | ||
447 | 435 | ||
448 | if (fb_get_options("cg3fb", NULL)) | 436 | return cg3_init_one(op); |
449 | return -ENODEV; | 437 | } |
450 | 438 | ||
451 | for_all_sbusdev(sdev, sbus) { | 439 | static int __devexit cg3_remove(struct of_device *dev) |
452 | if (!strcmp(sdev->prom_name, "cgthree") || | 440 | { |
453 | !strcmp(sdev->prom_name, "cgRDI")) | 441 | struct all_info *all = dev_get_drvdata(&dev->dev); |
454 | cg3_init_one(sdev); | 442 | |
455 | } | 443 | unregister_framebuffer(&all->info); |
444 | fb_dealloc_cmap(&all->info.cmap); | ||
445 | |||
446 | of_iounmap(all->par.regs, sizeof(struct cg3_regs)); | ||
447 | of_iounmap(all->info.screen_base, all->par.fbsize); | ||
448 | |||
449 | kfree(all); | ||
450 | |||
451 | dev_set_drvdata(&dev->dev, NULL); | ||
456 | 452 | ||
457 | return 0; | 453 | return 0; |
458 | } | 454 | } |
459 | 455 | ||
460 | void __exit cg3_exit(void) | 456 | static struct of_device_id cg3_match[] = { |
461 | { | 457 | { |
462 | struct list_head *pos, *tmp; | 458 | .name = "cgthree", |
459 | }, | ||
460 | { | ||
461 | .name = "cgRDI", | ||
462 | }, | ||
463 | {}, | ||
464 | }; | ||
465 | MODULE_DEVICE_TABLE(of, cg3_match); | ||
463 | 466 | ||
464 | list_for_each_safe(pos, tmp, &cg3_list) { | 467 | static struct of_platform_driver cg3_driver = { |
465 | struct all_info *all = list_entry(pos, typeof(*all), list); | 468 | .name = "cg3", |
469 | .match_table = cg3_match, | ||
470 | .probe = cg3_probe, | ||
471 | .remove = __devexit_p(cg3_remove), | ||
472 | }; | ||
466 | 473 | ||
467 | unregister_framebuffer(&all->info); | 474 | static int __init cg3_init(void) |
468 | fb_dealloc_cmap(&all->info.cmap); | 475 | { |
469 | kfree(all); | 476 | if (fb_get_options("cg3fb", NULL)) |
470 | } | 477 | return -ENODEV; |
478 | |||
479 | return of_register_driver(&cg3_driver, &of_bus_type); | ||
471 | } | 480 | } |
472 | 481 | ||
473 | int __init | 482 | static void __exit cg3_exit(void) |
474 | cg3_setup(char *arg) | ||
475 | { | 483 | { |
476 | /* No cmdline options yet... */ | 484 | of_unregister_driver(&cg3_driver); |
477 | return 0; | ||
478 | } | 485 | } |
479 | 486 | ||
480 | module_init(cg3_init); | 487 | module_init(cg3_init); |
481 | |||
482 | #ifdef MODULE | ||
483 | module_exit(cg3_exit); | 488 | module_exit(cg3_exit); |
484 | #endif | ||
485 | 489 | ||
486 | MODULE_DESCRIPTION("framebuffer driver for CGthree chipsets"); | 490 | MODULE_DESCRIPTION("framebuffer driver for CGthree chipsets"); |
487 | MODULE_AUTHOR("David S. Miller <davem@redhat.com>"); | 491 | MODULE_AUTHOR("David S. Miller <davem@davemloft.net>"); |
492 | MODULE_VERSION("2.0"); | ||
488 | MODULE_LICENSE("GPL"); | 493 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c index 7aab91ead681..64146be2eeb0 100644 --- a/drivers/video/cg6.c +++ b/drivers/video/cg6.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* cg6.c: CGSIX (GX, GXplus, TGX) frame buffer driver | 1 | /* cg6.c: CGSIX (GX, GXplus, TGX) frame buffer driver |
2 | * | 2 | * |
3 | * Copyright (C) 2003 David S. Miller (davem@redhat.com) | 3 | * Copyright (C) 2003, 2006 David S. Miller (davem@davemloft.net) |
4 | * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz) | 4 | * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz) |
5 | * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) | 5 | * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) |
6 | * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) | 6 | * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) |
@@ -19,8 +19,8 @@ | |||
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | 20 | ||
21 | #include <asm/io.h> | 21 | #include <asm/io.h> |
22 | #include <asm/sbus.h> | 22 | #include <asm/prom.h> |
23 | #include <asm/oplib.h> | 23 | #include <asm/of_device.h> |
24 | #include <asm/fbio.h> | 24 | #include <asm/fbio.h> |
25 | 25 | ||
26 | #include "sbuslib.h" | 26 | #include "sbuslib.h" |
@@ -164,89 +164,89 @@ static struct fb_ops cg6_ops = { | |||
164 | 164 | ||
165 | /* The contents are unknown */ | 165 | /* The contents are unknown */ |
166 | struct cg6_tec { | 166 | struct cg6_tec { |
167 | volatile int tec_matrix; | 167 | int tec_matrix; |
168 | volatile int tec_clip; | 168 | int tec_clip; |
169 | volatile int tec_vdc; | 169 | int tec_vdc; |
170 | }; | 170 | }; |
171 | 171 | ||
172 | struct cg6_thc { | 172 | struct cg6_thc { |
173 | uint thc_pad0[512]; | 173 | u32 thc_pad0[512]; |
174 | volatile uint thc_hs; /* hsync timing */ | 174 | u32 thc_hs; /* hsync timing */ |
175 | volatile uint thc_hsdvs; | 175 | u32 thc_hsdvs; |
176 | volatile uint thc_hd; | 176 | u32 thc_hd; |
177 | volatile uint thc_vs; /* vsync timing */ | 177 | u32 thc_vs; /* vsync timing */ |
178 | volatile uint thc_vd; | 178 | u32 thc_vd; |
179 | volatile uint thc_refresh; | 179 | u32 thc_refresh; |
180 | volatile uint thc_misc; | 180 | u32 thc_misc; |
181 | uint thc_pad1[56]; | 181 | u32 thc_pad1[56]; |
182 | volatile uint thc_cursxy; /* cursor x,y position (16 bits each) */ | 182 | u32 thc_cursxy; /* cursor x,y position (16 bits each) */ |
183 | volatile uint thc_cursmask[32]; /* cursor mask bits */ | 183 | u32 thc_cursmask[32]; /* cursor mask bits */ |
184 | volatile uint thc_cursbits[32]; /* what to show where mask enabled */ | 184 | u32 thc_cursbits[32]; /* what to show where mask enabled */ |
185 | }; | 185 | }; |
186 | 186 | ||
187 | struct cg6_fbc { | 187 | struct cg6_fbc { |
188 | u32 xxx0[1]; | 188 | u32 xxx0[1]; |
189 | volatile u32 mode; | 189 | u32 mode; |
190 | volatile u32 clip; | 190 | u32 clip; |
191 | u32 xxx1[1]; | 191 | u32 xxx1[1]; |
192 | volatile u32 s; | 192 | u32 s; |
193 | volatile u32 draw; | 193 | u32 draw; |
194 | volatile u32 blit; | 194 | u32 blit; |
195 | volatile u32 font; | 195 | u32 font; |
196 | u32 xxx2[24]; | 196 | u32 xxx2[24]; |
197 | volatile u32 x0, y0, z0, color0; | 197 | u32 x0, y0, z0, color0; |
198 | volatile u32 x1, y1, z1, color1; | 198 | u32 x1, y1, z1, color1; |
199 | volatile u32 x2, y2, z2, color2; | 199 | u32 x2, y2, z2, color2; |
200 | volatile u32 x3, y3, z3, color3; | 200 | u32 x3, y3, z3, color3; |
201 | volatile u32 offx, offy; | 201 | u32 offx, offy; |
202 | u32 xxx3[2]; | 202 | u32 xxx3[2]; |
203 | volatile u32 incx, incy; | 203 | u32 incx, incy; |
204 | u32 xxx4[2]; | 204 | u32 xxx4[2]; |
205 | volatile u32 clipminx, clipminy; | 205 | u32 clipminx, clipminy; |
206 | u32 xxx5[2]; | 206 | u32 xxx5[2]; |
207 | volatile u32 clipmaxx, clipmaxy; | 207 | u32 clipmaxx, clipmaxy; |
208 | u32 xxx6[2]; | 208 | u32 xxx6[2]; |
209 | volatile u32 fg; | 209 | u32 fg; |
210 | volatile u32 bg; | 210 | u32 bg; |
211 | volatile u32 alu; | 211 | u32 alu; |
212 | volatile u32 pm; | 212 | u32 pm; |
213 | volatile u32 pixelm; | 213 | u32 pixelm; |
214 | u32 xxx7[2]; | 214 | u32 xxx7[2]; |
215 | volatile u32 patalign; | 215 | u32 patalign; |
216 | volatile u32 pattern[8]; | 216 | u32 pattern[8]; |
217 | u32 xxx8[432]; | 217 | u32 xxx8[432]; |
218 | volatile u32 apointx, apointy, apointz; | 218 | u32 apointx, apointy, apointz; |
219 | u32 xxx9[1]; | 219 | u32 xxx9[1]; |
220 | volatile u32 rpointx, rpointy, rpointz; | 220 | u32 rpointx, rpointy, rpointz; |
221 | u32 xxx10[5]; | 221 | u32 xxx10[5]; |
222 | volatile u32 pointr, pointg, pointb, pointa; | 222 | u32 pointr, pointg, pointb, pointa; |
223 | volatile u32 alinex, aliney, alinez; | 223 | u32 alinex, aliney, alinez; |
224 | u32 xxx11[1]; | 224 | u32 xxx11[1]; |
225 | volatile u32 rlinex, rliney, rlinez; | 225 | u32 rlinex, rliney, rlinez; |
226 | u32 xxx12[5]; | 226 | u32 xxx12[5]; |
227 | volatile u32 liner, lineg, lineb, linea; | 227 | u32 liner, lineg, lineb, linea; |
228 | volatile u32 atrix, atriy, atriz; | 228 | u32 atrix, atriy, atriz; |
229 | u32 xxx13[1]; | 229 | u32 xxx13[1]; |
230 | volatile u32 rtrix, rtriy, rtriz; | 230 | u32 rtrix, rtriy, rtriz; |
231 | u32 xxx14[5]; | 231 | u32 xxx14[5]; |
232 | volatile u32 trir, trig, trib, tria; | 232 | u32 trir, trig, trib, tria; |
233 | volatile u32 aquadx, aquady, aquadz; | 233 | u32 aquadx, aquady, aquadz; |
234 | u32 xxx15[1]; | 234 | u32 xxx15[1]; |
235 | volatile u32 rquadx, rquady, rquadz; | 235 | u32 rquadx, rquady, rquadz; |
236 | u32 xxx16[5]; | 236 | u32 xxx16[5]; |
237 | volatile u32 quadr, quadg, quadb, quada; | 237 | u32 quadr, quadg, quadb, quada; |
238 | volatile u32 arectx, arecty, arectz; | 238 | u32 arectx, arecty, arectz; |
239 | u32 xxx17[1]; | 239 | u32 xxx17[1]; |
240 | volatile u32 rrectx, rrecty, rrectz; | 240 | u32 rrectx, rrecty, rrectz; |
241 | u32 xxx18[5]; | 241 | u32 xxx18[5]; |
242 | volatile u32 rectr, rectg, rectb, recta; | 242 | u32 rectr, rectg, rectb, recta; |
243 | }; | 243 | }; |
244 | 244 | ||
245 | struct bt_regs { | 245 | struct bt_regs { |
246 | volatile u32 addr; | 246 | u32 addr; |
247 | volatile u32 color_map; | 247 | u32 color_map; |
248 | volatile u32 control; | 248 | u32 control; |
249 | volatile u32 cursor; | 249 | u32 cursor; |
250 | }; | 250 | }; |
251 | 251 | ||
252 | struct cg6_par { | 252 | struct cg6_par { |
@@ -255,15 +255,14 @@ struct cg6_par { | |||
255 | struct cg6_fbc __iomem *fbc; | 255 | struct cg6_fbc __iomem *fbc; |
256 | struct cg6_thc __iomem *thc; | 256 | struct cg6_thc __iomem *thc; |
257 | struct cg6_tec __iomem *tec; | 257 | struct cg6_tec __iomem *tec; |
258 | volatile u32 __iomem *fhc; | 258 | u32 __iomem *fhc; |
259 | 259 | ||
260 | u32 flags; | 260 | u32 flags; |
261 | #define CG6_FLAG_BLANKED 0x00000001 | 261 | #define CG6_FLAG_BLANKED 0x00000001 |
262 | 262 | ||
263 | unsigned long physbase; | 263 | unsigned long physbase; |
264 | unsigned long which_io; | ||
264 | unsigned long fbsize; | 265 | unsigned long fbsize; |
265 | |||
266 | struct sbus_dev *sdev; | ||
267 | }; | 266 | }; |
268 | 267 | ||
269 | static int cg6_sync(struct fb_info *info) | 268 | static int cg6_sync(struct fb_info *info) |
@@ -529,8 +528,7 @@ static int cg6_mmap(struct fb_info *info, struct vm_area_struct *vma) | |||
529 | 528 | ||
530 | return sbusfb_mmap_helper(cg6_mmap_map, | 529 | return sbusfb_mmap_helper(cg6_mmap_map, |
531 | par->physbase, par->fbsize, | 530 | par->physbase, par->fbsize, |
532 | par->sdev->reg_addrs[0].which_io, | 531 | par->which_io, vma); |
533 | vma); | ||
534 | } | 532 | } |
535 | 533 | ||
536 | static int cg6_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) | 534 | static int cg6_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) |
@@ -658,62 +656,75 @@ static void cg6_chip_init(struct fb_info *info) | |||
658 | struct all_info { | 656 | struct all_info { |
659 | struct fb_info info; | 657 | struct fb_info info; |
660 | struct cg6_par par; | 658 | struct cg6_par par; |
661 | struct list_head list; | ||
662 | }; | 659 | }; |
663 | static LIST_HEAD(cg6_list); | ||
664 | 660 | ||
665 | static void cg6_init_one(struct sbus_dev *sdev) | 661 | static void cg6_unmap_regs(struct all_info *all) |
666 | { | 662 | { |
667 | struct all_info *all; | 663 | if (all->par.fbc) |
668 | int linebytes; | 664 | of_iounmap(all->par.fbc, 4096); |
665 | if (all->par.tec) | ||
666 | of_iounmap(all->par.tec, sizeof(struct cg6_tec)); | ||
667 | if (all->par.thc) | ||
668 | of_iounmap(all->par.thc, sizeof(struct cg6_thc)); | ||
669 | if (all->par.bt) | ||
670 | of_iounmap(all->par.bt, sizeof(struct bt_regs)); | ||
671 | if (all->par.fhc) | ||
672 | of_iounmap(all->par.fhc, sizeof(u32)); | ||
673 | |||
674 | if (all->info.screen_base) | ||
675 | of_iounmap(all->info.screen_base, all->par.fbsize); | ||
676 | } | ||
669 | 677 | ||
670 | all = kmalloc(sizeof(*all), GFP_KERNEL); | 678 | static int __devinit cg6_init_one(struct of_device *op) |
671 | if (!all) { | 679 | { |
672 | printk(KERN_ERR "cg6: Cannot allocate memory.\n"); | 680 | struct device_node *dp = op->node; |
673 | return; | 681 | struct all_info *all; |
674 | } | 682 | int linebytes, err; |
675 | memset(all, 0, sizeof(*all)); | ||
676 | 683 | ||
677 | INIT_LIST_HEAD(&all->list); | 684 | all = kzalloc(sizeof(*all), GFP_KERNEL); |
685 | if (!all) | ||
686 | return -ENOMEM; | ||
678 | 687 | ||
679 | spin_lock_init(&all->par.lock); | 688 | spin_lock_init(&all->par.lock); |
680 | all->par.sdev = sdev; | ||
681 | 689 | ||
682 | all->par.physbase = sdev->reg_addrs[0].phys_addr; | 690 | all->par.physbase = op->resource[0].start; |
691 | all->par.which_io = op->resource[0].flags & IORESOURCE_BITS; | ||
683 | 692 | ||
684 | sbusfb_fill_var(&all->info.var, sdev->prom_node, 8); | 693 | sbusfb_fill_var(&all->info.var, dp->node, 8); |
685 | all->info.var.red.length = 8; | 694 | all->info.var.red.length = 8; |
686 | all->info.var.green.length = 8; | 695 | all->info.var.green.length = 8; |
687 | all->info.var.blue.length = 8; | 696 | all->info.var.blue.length = 8; |
688 | 697 | ||
689 | linebytes = prom_getintdefault(sdev->prom_node, "linebytes", | 698 | linebytes = of_getintprop_default(dp, "linebytes", |
690 | all->info.var.xres); | 699 | all->info.var.xres); |
691 | all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); | 700 | all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); |
692 | if (prom_getbool(sdev->prom_node, "dblbuf")) | 701 | if (of_find_property(dp, "dblbuf", NULL)) |
693 | all->par.fbsize *= 4; | 702 | all->par.fbsize *= 4; |
694 | 703 | ||
695 | all->par.fbc = sbus_ioremap(&sdev->resource[0], CG6_FBC_OFFSET, | 704 | all->par.fbc = of_ioremap(&op->resource[0], CG6_FBC_OFFSET, |
696 | 4096, "cgsix fbc"); | 705 | 4096, "cgsix fbc"); |
697 | all->par.tec = sbus_ioremap(&sdev->resource[0], CG6_TEC_OFFSET, | 706 | all->par.tec = of_ioremap(&op->resource[0], CG6_TEC_OFFSET, |
698 | sizeof(struct cg6_tec), "cgsix tec"); | 707 | sizeof(struct cg6_tec), "cgsix tec"); |
699 | all->par.thc = sbus_ioremap(&sdev->resource[0], CG6_THC_OFFSET, | 708 | all->par.thc = of_ioremap(&op->resource[0], CG6_THC_OFFSET, |
700 | sizeof(struct cg6_thc), "cgsix thc"); | 709 | sizeof(struct cg6_thc), "cgsix thc"); |
701 | all->par.bt = sbus_ioremap(&sdev->resource[0], CG6_BROOKTREE_OFFSET, | 710 | all->par.bt = of_ioremap(&op->resource[0], CG6_BROOKTREE_OFFSET, |
702 | sizeof(struct bt_regs), "cgsix dac"); | 711 | sizeof(struct bt_regs), "cgsix dac"); |
703 | all->par.fhc = sbus_ioremap(&sdev->resource[0], CG6_FHC_OFFSET, | 712 | all->par.fhc = of_ioremap(&op->resource[0], CG6_FHC_OFFSET, |
704 | sizeof(u32), "cgsix fhc"); | 713 | sizeof(u32), "cgsix fhc"); |
705 | 714 | ||
706 | all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_IMAGEBLIT | | 715 | all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_IMAGEBLIT | |
707 | FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT; | 716 | FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT; |
708 | all->info.fbops = &cg6_ops; | 717 | all->info.fbops = &cg6_ops; |
709 | #ifdef CONFIG_SPARC32 | 718 | |
710 | all->info.screen_base = (char __iomem *) | 719 | all->info.screen_base = of_ioremap(&op->resource[0], CG6_RAM_OFFSET, |
711 | prom_getintdefault(sdev->prom_node, "address", 0); | 720 | all->par.fbsize, "cgsix ram"); |
712 | #endif | 721 | if (!all->par.fbc || !all->par.tec || !all->par.thc || |
713 | if (!all->info.screen_base) | 722 | !all->par.bt || !all->par.fhc || !all->info.screen_base) { |
714 | all->info.screen_base = | 723 | cg6_unmap_regs(all); |
715 | sbus_ioremap(&sdev->resource[0], CG6_RAM_OFFSET, | 724 | kfree(all); |
716 | all->par.fbsize, "cgsix ram"); | 725 | return -ENOMEM; |
726 | } | ||
727 | |||
717 | all->info.par = &all->par; | 728 | all->info.par = &all->par; |
718 | 729 | ||
719 | all->info.var.accel_flags = FB_ACCELF_TEXT; | 730 | all->info.var.accel_flags = FB_ACCELF_TEXT; |
@@ -723,72 +734,90 @@ static void cg6_init_one(struct sbus_dev *sdev) | |||
723 | cg6_blank(0, &all->info); | 734 | cg6_blank(0, &all->info); |
724 | 735 | ||
725 | if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { | 736 | if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { |
726 | printk(KERN_ERR "cg6: Could not allocate color map.\n"); | 737 | cg6_unmap_regs(all); |
727 | kfree(all); | 738 | kfree(all); |
728 | return; | 739 | return -ENOMEM; |
729 | } | 740 | } |
730 | 741 | ||
731 | fb_set_cmap(&all->info.cmap, &all->info); | 742 | fb_set_cmap(&all->info.cmap, &all->info); |
732 | cg6_init_fix(&all->info, linebytes); | 743 | cg6_init_fix(&all->info, linebytes); |
733 | 744 | ||
734 | if (register_framebuffer(&all->info) < 0) { | 745 | err = register_framebuffer(&all->info); |
735 | printk(KERN_ERR "cg6: Could not register framebuffer.\n"); | 746 | if (err < 0) { |
747 | cg6_unmap_regs(all); | ||
736 | fb_dealloc_cmap(&all->info.cmap); | 748 | fb_dealloc_cmap(&all->info.cmap); |
737 | kfree(all); | 749 | kfree(all); |
738 | return; | 750 | return err; |
739 | } | 751 | } |
740 | 752 | ||
741 | list_add(&all->list, &cg6_list); | 753 | dev_set_drvdata(&op->dev, all); |
742 | 754 | ||
743 | printk("cg6: CGsix [%s] at %lx:%lx\n", | 755 | printk("%s: CGsix [%s] at %lx:%lx\n", |
756 | dp->full_name, | ||
744 | all->info.fix.id, | 757 | all->info.fix.id, |
745 | (long) sdev->reg_addrs[0].which_io, | 758 | all->par.which_io, all->par.physbase); |
746 | (long) sdev->reg_addrs[0].phys_addr); | 759 | |
760 | return 0; | ||
747 | } | 761 | } |
748 | 762 | ||
749 | int __init cg6_init(void) | 763 | static int __devinit cg6_probe(struct of_device *dev, const struct of_device_id *match) |
750 | { | 764 | { |
751 | struct sbus_bus *sbus; | 765 | struct of_device *op = to_of_device(&dev->dev); |
752 | struct sbus_dev *sdev; | ||
753 | 766 | ||
754 | if (fb_get_options("cg6fb", NULL)) | 767 | return cg6_init_one(op); |
755 | return -ENODEV; | 768 | } |
756 | 769 | ||
757 | for_all_sbusdev(sdev, sbus) { | 770 | static int __devexit cg6_remove(struct of_device *dev) |
758 | if (!strcmp(sdev->prom_name, "cgsix") || | 771 | { |
759 | !strcmp(sdev->prom_name, "cgthree+")) | 772 | struct all_info *all = dev_get_drvdata(&dev->dev); |
760 | cg6_init_one(sdev); | 773 | |
761 | } | 774 | unregister_framebuffer(&all->info); |
775 | fb_dealloc_cmap(&all->info.cmap); | ||
776 | |||
777 | cg6_unmap_regs(all); | ||
778 | |||
779 | kfree(all); | ||
780 | |||
781 | dev_set_drvdata(&dev->dev, NULL); | ||
762 | 782 | ||
763 | return 0; | 783 | return 0; |
764 | } | 784 | } |
765 | 785 | ||
766 | void __exit cg6_exit(void) | 786 | static struct of_device_id cg6_match[] = { |
767 | { | 787 | { |
768 | struct list_head *pos, *tmp; | 788 | .name = "cgsix", |
789 | }, | ||
790 | { | ||
791 | .name = "cgthree+", | ||
792 | }, | ||
793 | {}, | ||
794 | }; | ||
795 | MODULE_DEVICE_TABLE(of, cg6_match); | ||
769 | 796 | ||
770 | list_for_each_safe(pos, tmp, &cg6_list) { | 797 | static struct of_platform_driver cg6_driver = { |
771 | struct all_info *all = list_entry(pos, typeof(*all), list); | 798 | .name = "cg6", |
799 | .match_table = cg6_match, | ||
800 | .probe = cg6_probe, | ||
801 | .remove = __devexit_p(cg6_remove), | ||
802 | }; | ||
772 | 803 | ||
773 | unregister_framebuffer(&all->info); | 804 | static int __init cg6_init(void) |
774 | fb_dealloc_cmap(&all->info.cmap); | 805 | { |
775 | kfree(all); | 806 | if (fb_get_options("cg6fb", NULL)) |
776 | } | 807 | return -ENODEV; |
808 | |||
809 | return of_register_driver(&cg6_driver, &of_bus_type); | ||
777 | } | 810 | } |
778 | 811 | ||
779 | int __init | 812 | static void __exit cg6_exit(void) |
780 | cg6_setup(char *arg) | ||
781 | { | 813 | { |
782 | /* No cmdline options yet... */ | 814 | of_unregister_driver(&cg6_driver); |
783 | return 0; | ||
784 | } | 815 | } |
785 | 816 | ||
786 | module_init(cg6_init); | 817 | module_init(cg6_init); |
787 | |||
788 | #ifdef MODULE | ||
789 | module_exit(cg6_exit); | 818 | module_exit(cg6_exit); |
790 | #endif | ||
791 | 819 | ||
792 | MODULE_DESCRIPTION("framebuffer driver for CGsix chipsets"); | 820 | MODULE_DESCRIPTION("framebuffer driver for CGsix chipsets"); |
793 | MODULE_AUTHOR("David S. Miller <davem@redhat.com>"); | 821 | MODULE_AUTHOR("David S. Miller <davem@davemloft.net>"); |
822 | MODULE_VERSION("2.0"); | ||
794 | MODULE_LICENSE("GPL"); | 823 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/video/chipsfb.c b/drivers/video/chipsfb.c index d76bbfac92cc..0e465c80ef24 100644 --- a/drivers/video/chipsfb.c +++ b/drivers/video/chipsfb.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * more details. | 14 | * more details. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
19 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
20 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index dda240eb7360..7355da09c721 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c | |||
@@ -36,7 +36,6 @@ | |||
36 | 36 | ||
37 | #define CIRRUSFB_VERSION "2.0-pre2" | 37 | #define CIRRUSFB_VERSION "2.0-pre2" |
38 | 38 | ||
39 | #include <linux/config.h> | ||
40 | #include <linux/module.h> | 39 | #include <linux/module.h> |
41 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
42 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c index eea422eb1ab5..308850df16fe 100644 --- a/drivers/video/console/bitblit.c +++ b/drivers/video/console/bitblit.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * more details. | 10 | * more details. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/string.h> | 14 | #include <linux/string.h> |
16 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c index 1ecda91e5a9c..878707a04398 100644 --- a/drivers/video/console/dummycon.c +++ b/drivers/video/console/dummycon.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #define DUMMY_ROWS ORIG_VIDEO_LINES | 22 | #define DUMMY_ROWS ORIG_VIDEO_LINES |
23 | #elif defined(__hppa__) | 23 | #elif defined(__hppa__) |
24 | /* set by Kconfig. Use 80x25 for 640x480 and 160x64 for 1280x1024 */ | 24 | /* set by Kconfig. Use 80x25 for 640x480 and 160x64 for 1280x1024 */ |
25 | #include <linux/config.h> | ||
26 | #define DUMMY_COLUMNS CONFIG_DUMMY_CONSOLE_COLUMNS | 25 | #define DUMMY_COLUMNS CONFIG_DUMMY_CONSOLE_COLUMNS |
27 | #define DUMMY_ROWS CONFIG_DUMMY_CONSOLE_ROWS | 26 | #define DUMMY_ROWS CONFIG_DUMMY_CONSOLE_ROWS |
28 | #else | 27 | #else |
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 5dc4083552d8..94e9f7069bef 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -58,7 +58,6 @@ | |||
58 | 58 | ||
59 | #undef FBCONDEBUG | 59 | #undef FBCONDEBUG |
60 | 60 | ||
61 | #include <linux/config.h> | ||
62 | #include <linux/module.h> | 61 | #include <linux/module.h> |
63 | #include <linux/types.h> | 62 | #include <linux/types.h> |
64 | #include <linux/sched.h> | 63 | #include <linux/sched.h> |
diff --git a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h index 3487a636370a..f244ad066d68 100644 --- a/drivers/video/console/fbcon.h +++ b/drivers/video/console/fbcon.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #ifndef _VIDEO_FBCON_H | 11 | #ifndef _VIDEO_FBCON_H |
12 | #define _VIDEO_FBCON_H | 12 | #define _VIDEO_FBCON_H |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/types.h> | 14 | #include <linux/types.h> |
16 | #include <linux/vt_buffer.h> | 15 | #include <linux/vt_buffer.h> |
17 | #include <linux/vt_kern.h> | 16 | #include <linux/vt_kern.h> |
diff --git a/drivers/video/console/fbcon_ccw.c b/drivers/video/console/fbcon_ccw.c index 990289a69b78..4481c80b8b2a 100644 --- a/drivers/video/console/fbcon_ccw.c +++ b/drivers/video/console/fbcon_ccw.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * more details. | 8 | * more details. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/string.h> | 12 | #include <linux/string.h> |
14 | #include <linux/fb.h> | 13 | #include <linux/fb.h> |
diff --git a/drivers/video/console/fbcon_cw.c b/drivers/video/console/fbcon_cw.c index d44c5fa515fb..7f92c06afea7 100644 --- a/drivers/video/console/fbcon_cw.c +++ b/drivers/video/console/fbcon_cw.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * more details. | 8 | * more details. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/string.h> | 12 | #include <linux/string.h> |
14 | #include <linux/fb.h> | 13 | #include <linux/fb.h> |
diff --git a/drivers/video/console/fbcon_rotate.c b/drivers/video/console/fbcon_rotate.c index 2dc091fbd5c9..00884e013f0f 100644 --- a/drivers/video/console/fbcon_rotate.c +++ b/drivers/video/console/fbcon_rotate.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * more details. | 8 | * more details. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/string.h> | 12 | #include <linux/string.h> |
14 | #include <linux/fb.h> | 13 | #include <linux/fb.h> |
diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c index f56ed068a5bc..ab91005e64dc 100644 --- a/drivers/video/console/fbcon_ud.c +++ b/drivers/video/console/fbcon_ud.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * more details. | 8 | * more details. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/string.h> | 12 | #include <linux/string.h> |
14 | #include <linux/fb.h> | 13 | #include <linux/fb.h> |
diff --git a/drivers/video/console/font_acorn_8x8.c b/drivers/video/console/font_acorn_8x8.c index 2d2e39632e2d..40f3d4eeb198 100644 --- a/drivers/video/console/font_acorn_8x8.c +++ b/drivers/video/console/font_acorn_8x8.c | |||
@@ -1,6 +1,5 @@ | |||
1 | /* Acorn-like font definition, with PC graphics characters */ | 1 | /* Acorn-like font definition, with PC graphics characters */ |
2 | 2 | ||
3 | #include <linux/config.h> | ||
4 | #include <linux/font.h> | 3 | #include <linux/font.h> |
5 | 4 | ||
6 | static const unsigned char acorndata_8x8[] = { | 5 | static const unsigned char acorndata_8x8[] = { |
diff --git a/drivers/video/console/fonts.c b/drivers/video/console/fonts.c index 0cc1bfda76a6..c960728b7e82 100644 --- a/drivers/video/console/fonts.c +++ b/drivers/video/console/fonts.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * for more details. | 12 | * for more details. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/types.h> | 16 | #include <linux/types.h> |
18 | #include <linux/string.h> | 17 | #include <linux/string.h> |
diff --git a/drivers/video/console/promcon.c b/drivers/video/console/promcon.c index d6e6ad537f9f..5cd5e114d1e6 100644 --- a/drivers/video/console/promcon.c +++ b/drivers/video/console/promcon.c | |||
@@ -5,7 +5,6 @@ | |||
5 | * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) | 5 | * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <linux/module.h> | 8 | #include <linux/module.h> |
10 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
11 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index 74ac2acaf72c..88e7038eab88 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
18 | #include <linux/types.h> | 17 | #include <linux/types.h> |
19 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
diff --git a/drivers/video/console/tileblit.c b/drivers/video/console/tileblit.c index 153352ca9461..d981fe4d86c6 100644 --- a/drivers/video/console/tileblit.c +++ b/drivers/video/console/tileblit.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * more details. | 8 | * more details. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/string.h> | 12 | #include <linux/string.h> |
14 | #include <linux/fb.h> | 13 | #include <linux/fb.h> |
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 01401cd63ac0..05735ff4e9c5 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c | |||
@@ -33,7 +33,6 @@ | |||
33 | * more details. | 33 | * more details. |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/config.h> | ||
37 | #include <linux/module.h> | 36 | #include <linux/module.h> |
38 | #include <linux/types.h> | 37 | #include <linux/types.h> |
39 | #include <linux/sched.h> | 38 | #include <linux/sched.h> |
diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c index 655301a8671c..acdd6a103dbb 100644 --- a/drivers/video/controlfb.c +++ b/drivers/video/controlfb.c | |||
@@ -31,7 +31,6 @@ | |||
31 | * more details. | 31 | * more details. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/config.h> | ||
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
36 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
37 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c index 55a3514157ed..2e2924957d8f 100644 --- a/drivers/video/cyber2000fb.c +++ b/drivers/video/cyber2000fb.c | |||
@@ -36,7 +36,6 @@ | |||
36 | * (which, incidentally, is about the same saving as a 2.5in hard disk | 36 | * (which, incidentally, is about the same saving as a 2.5in hard disk |
37 | * entering standby mode.) | 37 | * entering standby mode.) |
38 | */ | 38 | */ |
39 | #include <linux/config.h> | ||
40 | #include <linux/module.h> | 39 | #include <linux/module.h> |
41 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
42 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
diff --git a/drivers/video/cyber2000fb.h b/drivers/video/cyber2000fb.h index bd7e1c040781..de4fc43e51c1 100644 --- a/drivers/video/cyber2000fb.h +++ b/drivers/video/cyber2000fb.h | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | * Integraphics Cyber2000 frame buffer device | 10 | * Integraphics Cyber2000 frame buffer device |
11 | */ | 11 | */ |
12 | #include <linux/config.h> | ||
13 | 12 | ||
14 | /* | 13 | /* |
15 | * Internal CyberPro sizes and offsets. | 14 | * Internal CyberPro sizes and offsets. |
diff --git a/drivers/video/cyblafb.c b/drivers/video/cyblafb.c index 0ae0a97b0fed..94a66c2d2cf5 100644 --- a/drivers/video/cyblafb.c +++ b/drivers/video/cyblafb.c | |||
@@ -14,7 +14,6 @@ | |||
14 | 14 | ||
15 | #define CYBLAFB_PIXMAPSIZE 8192 | 15 | #define CYBLAFB_PIXMAPSIZE 8192 |
16 | 16 | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
19 | #include <linux/string.h> | 18 | #include <linux/string.h> |
20 | #include <linux/fb.h> | 19 | #include <linux/fb.h> |
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index a171daab0ad0..33034f81114d 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * for more details. | 11 | * for more details. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | 15 | ||
17 | #include <linux/compat.h> | 16 | #include <linux/compat.h> |
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c index 7633e41adda1..2a0e8210d398 100644 --- a/drivers/video/ffb.c +++ b/drivers/video/ffb.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* ffb.c: Creator/Elite3D frame buffer driver | 1 | /* ffb.c: Creator/Elite3D frame buffer driver |
2 | * | 2 | * |
3 | * Copyright (C) 2003 David S. Miller (davem@redhat.com) | 3 | * Copyright (C) 2003, 2006 David S. Miller (davem@davemloft.net) |
4 | * Copyright (C) 1997,1998,1999 Jakub Jelinek (jj@ultra.linux.cz) | 4 | * Copyright (C) 1997,1998,1999 Jakub Jelinek (jj@ultra.linux.cz) |
5 | * | 5 | * |
6 | * Driver layout based loosely on tgafb.c, see that file for credits. | 6 | * Driver layout based loosely on tgafb.c, see that file for credits. |
@@ -19,7 +19,8 @@ | |||
19 | 19 | ||
20 | #include <asm/io.h> | 20 | #include <asm/io.h> |
21 | #include <asm/upa.h> | 21 | #include <asm/upa.h> |
22 | #include <asm/oplib.h> | 22 | #include <asm/prom.h> |
23 | #include <asm/of_device.h> | ||
23 | #include <asm/fbio.h> | 24 | #include <asm/fbio.h> |
24 | 25 | ||
25 | #include "sbuslib.h" | 26 | #include "sbuslib.h" |
@@ -184,161 +185,161 @@ static struct fb_ops ffb_ops = { | |||
184 | 185 | ||
185 | struct ffb_fbc { | 186 | struct ffb_fbc { |
186 | /* Next vertex registers */ | 187 | /* Next vertex registers */ |
187 | u32 xxx1[3]; | 188 | u32 xxx1[3]; |
188 | volatile u32 alpha; | 189 | u32 alpha; |
189 | volatile u32 red; | 190 | u32 red; |
190 | volatile u32 green; | 191 | u32 green; |
191 | volatile u32 blue; | 192 | u32 blue; |
192 | volatile u32 depth; | 193 | u32 depth; |
193 | volatile u32 y; | 194 | u32 y; |
194 | volatile u32 x; | 195 | u32 x; |
195 | u32 xxx2[2]; | 196 | u32 xxx2[2]; |
196 | volatile u32 ryf; | 197 | u32 ryf; |
197 | volatile u32 rxf; | 198 | u32 rxf; |
198 | u32 xxx3[2]; | 199 | u32 xxx3[2]; |
199 | 200 | ||
200 | volatile u32 dmyf; | 201 | u32 dmyf; |
201 | volatile u32 dmxf; | 202 | u32 dmxf; |
202 | u32 xxx4[2]; | 203 | u32 xxx4[2]; |
203 | volatile u32 ebyi; | 204 | u32 ebyi; |
204 | volatile u32 ebxi; | 205 | u32 ebxi; |
205 | u32 xxx5[2]; | 206 | u32 xxx5[2]; |
206 | volatile u32 by; | 207 | u32 by; |
207 | volatile u32 bx; | 208 | u32 bx; |
208 | u32 dy; | 209 | u32 dy; |
209 | u32 dx; | 210 | u32 dx; |
210 | volatile u32 bh; | 211 | u32 bh; |
211 | volatile u32 bw; | 212 | u32 bw; |
212 | u32 xxx6[2]; | 213 | u32 xxx6[2]; |
213 | 214 | ||
214 | u32 xxx7[32]; | 215 | u32 xxx7[32]; |
215 | 216 | ||
216 | /* Setup unit vertex state register */ | 217 | /* Setup unit vertex state register */ |
217 | volatile u32 suvtx; | 218 | u32 suvtx; |
218 | u32 xxx8[63]; | 219 | u32 xxx8[63]; |
219 | 220 | ||
220 | /* Control registers */ | 221 | /* Control registers */ |
221 | volatile u32 ppc; | 222 | u32 ppc; |
222 | volatile u32 wid; | 223 | u32 wid; |
223 | volatile u32 fg; | 224 | u32 fg; |
224 | volatile u32 bg; | 225 | u32 bg; |
225 | volatile u32 consty; | 226 | u32 consty; |
226 | volatile u32 constz; | 227 | u32 constz; |
227 | volatile u32 xclip; | 228 | u32 xclip; |
228 | volatile u32 dcss; | 229 | u32 dcss; |
229 | volatile u32 vclipmin; | 230 | u32 vclipmin; |
230 | volatile u32 vclipmax; | 231 | u32 vclipmax; |
231 | volatile u32 vclipzmin; | 232 | u32 vclipzmin; |
232 | volatile u32 vclipzmax; | 233 | u32 vclipzmax; |
233 | volatile u32 dcsf; | 234 | u32 dcsf; |
234 | volatile u32 dcsb; | 235 | u32 dcsb; |
235 | volatile u32 dczf; | 236 | u32 dczf; |
236 | volatile u32 dczb; | 237 | u32 dczb; |
237 | 238 | ||
238 | u32 xxx9; | 239 | u32 xxx9; |
239 | volatile u32 blendc; | 240 | u32 blendc; |
240 | volatile u32 blendc1; | 241 | u32 blendc1; |
241 | volatile u32 blendc2; | 242 | u32 blendc2; |
242 | volatile u32 fbramitc; | 243 | u32 fbramitc; |
243 | volatile u32 fbc; | 244 | u32 fbc; |
244 | volatile u32 rop; | 245 | u32 rop; |
245 | volatile u32 cmp; | 246 | u32 cmp; |
246 | volatile u32 matchab; | 247 | u32 matchab; |
247 | volatile u32 matchc; | 248 | u32 matchc; |
248 | volatile u32 magnab; | 249 | u32 magnab; |
249 | volatile u32 magnc; | 250 | u32 magnc; |
250 | volatile u32 fbcfg0; | 251 | u32 fbcfg0; |
251 | volatile u32 fbcfg1; | 252 | u32 fbcfg1; |
252 | volatile u32 fbcfg2; | 253 | u32 fbcfg2; |
253 | volatile u32 fbcfg3; | 254 | u32 fbcfg3; |
254 | 255 | ||
255 | u32 ppcfg; | 256 | u32 ppcfg; |
256 | volatile u32 pick; | 257 | u32 pick; |
257 | volatile u32 fillmode; | 258 | u32 fillmode; |
258 | volatile u32 fbramwac; | 259 | u32 fbramwac; |
259 | volatile u32 pmask; | 260 | u32 pmask; |
260 | volatile u32 xpmask; | 261 | u32 xpmask; |
261 | volatile u32 ypmask; | 262 | u32 ypmask; |
262 | volatile u32 zpmask; | 263 | u32 zpmask; |
263 | volatile u32 clip0min; | 264 | u32 clip0min; |
264 | volatile u32 clip0max; | 265 | u32 clip0max; |
265 | volatile u32 clip1min; | 266 | u32 clip1min; |
266 | volatile u32 clip1max; | 267 | u32 clip1max; |
267 | volatile u32 clip2min; | 268 | u32 clip2min; |
268 | volatile u32 clip2max; | 269 | u32 clip2max; |
269 | volatile u32 clip3min; | 270 | u32 clip3min; |
270 | volatile u32 clip3max; | 271 | u32 clip3max; |
271 | 272 | ||
272 | /* New 3dRAM III support regs */ | 273 | /* New 3dRAM III support regs */ |
273 | volatile u32 rawblend2; | 274 | u32 rawblend2; |
274 | volatile u32 rawpreblend; | 275 | u32 rawpreblend; |
275 | volatile u32 rawstencil; | 276 | u32 rawstencil; |
276 | volatile u32 rawstencilctl; | 277 | u32 rawstencilctl; |
277 | volatile u32 threedram1; | 278 | u32 threedram1; |
278 | volatile u32 threedram2; | 279 | u32 threedram2; |
279 | volatile u32 passin; | 280 | u32 passin; |
280 | volatile u32 rawclrdepth; | 281 | u32 rawclrdepth; |
281 | volatile u32 rawpmask; | 282 | u32 rawpmask; |
282 | volatile u32 rawcsrc; | 283 | u32 rawcsrc; |
283 | volatile u32 rawmatch; | 284 | u32 rawmatch; |
284 | volatile u32 rawmagn; | 285 | u32 rawmagn; |
285 | volatile u32 rawropblend; | 286 | u32 rawropblend; |
286 | volatile u32 rawcmp; | 287 | u32 rawcmp; |
287 | volatile u32 rawwac; | 288 | u32 rawwac; |
288 | volatile u32 fbramid; | 289 | u32 fbramid; |
289 | 290 | ||
290 | volatile u32 drawop; | 291 | u32 drawop; |
291 | u32 xxx10[2]; | 292 | u32 xxx10[2]; |
292 | volatile u32 fontlpat; | 293 | u32 fontlpat; |
293 | u32 xxx11; | 294 | u32 xxx11; |
294 | volatile u32 fontxy; | 295 | u32 fontxy; |
295 | volatile u32 fontw; | 296 | u32 fontw; |
296 | volatile u32 fontinc; | 297 | u32 fontinc; |
297 | volatile u32 font; | 298 | u32 font; |
298 | u32 xxx12[3]; | 299 | u32 xxx12[3]; |
299 | volatile u32 blend2; | 300 | u32 blend2; |
300 | volatile u32 preblend; | 301 | u32 preblend; |
301 | volatile u32 stencil; | 302 | u32 stencil; |
302 | volatile u32 stencilctl; | 303 | u32 stencilctl; |
303 | 304 | ||
304 | u32 xxx13[4]; | 305 | u32 xxx13[4]; |
305 | volatile u32 dcss1; | 306 | u32 dcss1; |
306 | volatile u32 dcss2; | 307 | u32 dcss2; |
307 | volatile u32 dcss3; | 308 | u32 dcss3; |
308 | volatile u32 widpmask; | 309 | u32 widpmask; |
309 | volatile u32 dcs2; | 310 | u32 dcs2; |
310 | volatile u32 dcs3; | 311 | u32 dcs3; |
311 | volatile u32 dcs4; | 312 | u32 dcs4; |
312 | u32 xxx14; | 313 | u32 xxx14; |
313 | volatile u32 dcd2; | 314 | u32 dcd2; |
314 | volatile u32 dcd3; | 315 | u32 dcd3; |
315 | volatile u32 dcd4; | 316 | u32 dcd4; |
316 | u32 xxx15; | 317 | u32 xxx15; |
317 | 318 | ||
318 | volatile u32 pattern[32]; | 319 | u32 pattern[32]; |
319 | 320 | ||
320 | u32 xxx16[256]; | 321 | u32 xxx16[256]; |
321 | 322 | ||
322 | volatile u32 devid; | 323 | u32 devid; |
323 | u32 xxx17[63]; | 324 | u32 xxx17[63]; |
324 | 325 | ||
325 | volatile u32 ucsr; | 326 | u32 ucsr; |
326 | u32 xxx18[31]; | 327 | u32 xxx18[31]; |
327 | 328 | ||
328 | volatile u32 mer; | 329 | u32 mer; |
329 | }; | 330 | }; |
330 | 331 | ||
331 | struct ffb_dac { | 332 | struct ffb_dac { |
332 | volatile u32 type; | 333 | u32 type; |
333 | volatile u32 value; | 334 | u32 value; |
334 | volatile u32 type2; | 335 | u32 type2; |
335 | volatile u32 value2; | 336 | u32 value2; |
336 | }; | 337 | }; |
337 | 338 | ||
338 | struct ffb_par { | 339 | struct ffb_par { |
339 | spinlock_t lock; | 340 | spinlock_t lock; |
340 | struct ffb_fbc *fbc; | 341 | struct ffb_fbc __iomem *fbc; |
341 | struct ffb_dac *dac; | 342 | struct ffb_dac __iomem *dac; |
342 | 343 | ||
343 | u32 flags; | 344 | u32 flags; |
344 | #define FFB_FLAG_AFB 0x00000001 | 345 | #define FFB_FLAG_AFB 0x00000001 |
@@ -353,16 +354,13 @@ struct ffb_par { | |||
353 | unsigned long physbase; | 354 | unsigned long physbase; |
354 | unsigned long fbsize; | 355 | unsigned long fbsize; |
355 | 356 | ||
356 | char name[64]; | ||
357 | int prom_node; | ||
358 | int prom_parent_node; | ||
359 | int dac_rev; | 357 | int dac_rev; |
360 | int board_type; | 358 | int board_type; |
361 | }; | 359 | }; |
362 | 360 | ||
363 | static void FFBFifo(struct ffb_par *par, int n) | 361 | static void FFBFifo(struct ffb_par *par, int n) |
364 | { | 362 | { |
365 | struct ffb_fbc *fbc; | 363 | struct ffb_fbc __iomem *fbc; |
366 | int cache = par->fifo_cache; | 364 | int cache = par->fifo_cache; |
367 | 365 | ||
368 | if (cache - n < 0) { | 366 | if (cache - n < 0) { |
@@ -375,7 +373,7 @@ static void FFBFifo(struct ffb_par *par, int n) | |||
375 | 373 | ||
376 | static void FFBWait(struct ffb_par *par) | 374 | static void FFBWait(struct ffb_par *par) |
377 | { | 375 | { |
378 | struct ffb_fbc *fbc; | 376 | struct ffb_fbc __iomem *fbc; |
379 | int limit = 10000; | 377 | int limit = 10000; |
380 | 378 | ||
381 | fbc = par->fbc; | 379 | fbc = par->fbc; |
@@ -408,8 +406,8 @@ static __inline__ void ffb_rop(struct ffb_par *par, u32 rop) | |||
408 | 406 | ||
409 | static void ffb_switch_from_graph(struct ffb_par *par) | 407 | static void ffb_switch_from_graph(struct ffb_par *par) |
410 | { | 408 | { |
411 | struct ffb_fbc *fbc = par->fbc; | 409 | struct ffb_fbc __iomem *fbc = par->fbc; |
412 | struct ffb_dac *dac = par->dac; | 410 | struct ffb_dac __iomem *dac = par->dac; |
413 | unsigned long flags; | 411 | unsigned long flags; |
414 | 412 | ||
415 | spin_lock_irqsave(&par->lock, flags); | 413 | spin_lock_irqsave(&par->lock, flags); |
@@ -462,7 +460,7 @@ static int ffb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) | |||
462 | static void ffb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) | 460 | static void ffb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) |
463 | { | 461 | { |
464 | struct ffb_par *par = (struct ffb_par *) info->par; | 462 | struct ffb_par *par = (struct ffb_par *) info->par; |
465 | struct ffb_fbc *fbc = par->fbc; | 463 | struct ffb_fbc __iomem *fbc = par->fbc; |
466 | unsigned long flags; | 464 | unsigned long flags; |
467 | u32 fg; | 465 | u32 fg; |
468 | 466 | ||
@@ -505,7 +503,7 @@ static void | |||
505 | ffb_copyarea(struct fb_info *info, const struct fb_copyarea *area) | 503 | ffb_copyarea(struct fb_info *info, const struct fb_copyarea *area) |
506 | { | 504 | { |
507 | struct ffb_par *par = (struct ffb_par *) info->par; | 505 | struct ffb_par *par = (struct ffb_par *) info->par; |
508 | struct ffb_fbc *fbc = par->fbc; | 506 | struct ffb_fbc __iomem *fbc = par->fbc; |
509 | unsigned long flags; | 507 | unsigned long flags; |
510 | 508 | ||
511 | if (area->dx != area->sx || | 509 | if (area->dx != area->sx || |
@@ -541,7 +539,7 @@ ffb_copyarea(struct fb_info *info, const struct fb_copyarea *area) | |||
541 | static void ffb_imageblit(struct fb_info *info, const struct fb_image *image) | 539 | static void ffb_imageblit(struct fb_info *info, const struct fb_image *image) |
542 | { | 540 | { |
543 | struct ffb_par *par = (struct ffb_par *) info->par; | 541 | struct ffb_par *par = (struct ffb_par *) info->par; |
544 | struct ffb_fbc *fbc = par->fbc; | 542 | struct ffb_fbc __iomem *fbc = par->fbc; |
545 | const u8 *data = image->data; | 543 | const u8 *data = image->data; |
546 | unsigned long flags; | 544 | unsigned long flags; |
547 | u32 fg, bg, xy; | 545 | u32 fg, bg, xy; |
@@ -664,7 +662,7 @@ static int | |||
664 | ffb_blank(int blank, struct fb_info *info) | 662 | ffb_blank(int blank, struct fb_info *info) |
665 | { | 663 | { |
666 | struct ffb_par *par = (struct ffb_par *) info->par; | 664 | struct ffb_par *par = (struct ffb_par *) info->par; |
667 | struct ffb_dac *dac = par->dac; | 665 | struct ffb_dac __iomem *dac = par->dac; |
668 | unsigned long flags; | 666 | unsigned long flags; |
669 | u32 tmp; | 667 | u32 tmp; |
670 | 668 | ||
@@ -883,78 +881,42 @@ ffb_init_fix(struct fb_info *info) | |||
883 | info->fix.accel = FB_ACCEL_SUN_CREATOR; | 881 | info->fix.accel = FB_ACCEL_SUN_CREATOR; |
884 | } | 882 | } |
885 | 883 | ||
886 | static int ffb_apply_upa_parent_ranges(int parent, | ||
887 | struct linux_prom64_registers *regs) | ||
888 | { | ||
889 | struct linux_prom64_ranges ranges[PROMREG_MAX]; | ||
890 | char name[128]; | ||
891 | int len, i; | ||
892 | |||
893 | prom_getproperty(parent, "name", name, sizeof(name)); | ||
894 | if (strcmp(name, "upa") != 0) | ||
895 | return 0; | ||
896 | |||
897 | len = prom_getproperty(parent, "ranges", (void *) ranges, sizeof(ranges)); | ||
898 | if (len <= 0) | ||
899 | return 1; | ||
900 | |||
901 | len /= sizeof(struct linux_prom64_ranges); | ||
902 | for (i = 0; i < len; i++) { | ||
903 | struct linux_prom64_ranges *rng = &ranges[i]; | ||
904 | u64 phys_addr = regs->phys_addr; | ||
905 | |||
906 | if (phys_addr >= rng->ot_child_base && | ||
907 | phys_addr < (rng->ot_child_base + rng->or_size)) { | ||
908 | regs->phys_addr -= rng->ot_child_base; | ||
909 | regs->phys_addr += rng->ot_parent_base; | ||
910 | return 0; | ||
911 | } | ||
912 | } | ||
913 | |||
914 | return 1; | ||
915 | } | ||
916 | |||
917 | struct all_info { | 884 | struct all_info { |
918 | struct fb_info info; | 885 | struct fb_info info; |
919 | struct ffb_par par; | 886 | struct ffb_par par; |
920 | u32 pseudo_palette[256]; | 887 | u32 pseudo_palette[256]; |
921 | struct list_head list; | ||
922 | }; | 888 | }; |
923 | static LIST_HEAD(ffb_list); | ||
924 | 889 | ||
925 | static void ffb_init_one(int node, int parent) | 890 | static int ffb_init_one(struct of_device *op) |
926 | { | 891 | { |
927 | struct linux_prom64_registers regs[2*PROMREG_MAX]; | 892 | struct device_node *dp = op->node; |
928 | struct ffb_fbc *fbc; | 893 | struct ffb_fbc __iomem *fbc; |
929 | struct ffb_dac *dac; | 894 | struct ffb_dac __iomem *dac; |
930 | struct all_info *all; | 895 | struct all_info *all; |
896 | int err; | ||
931 | 897 | ||
932 | if (prom_getproperty(node, "reg", (void *) regs, sizeof(regs)) <= 0) { | 898 | all = kzalloc(sizeof(*all), GFP_KERNEL); |
933 | printk("ffb: Cannot get reg device node property.\n"); | 899 | if (!all) |
934 | return; | 900 | return -ENOMEM; |
935 | } | ||
936 | 901 | ||
937 | if (ffb_apply_upa_parent_ranges(parent, ®s[0])) { | 902 | spin_lock_init(&all->par.lock); |
938 | printk("ffb: Cannot apply parent ranges to regs.\n"); | 903 | all->par.fbc = of_ioremap(&op->resource[2], 0, |
939 | return; | 904 | sizeof(struct ffb_fbc), "ffb fbc"); |
905 | if (!all->par.fbc) { | ||
906 | kfree(all); | ||
907 | return -ENOMEM; | ||
940 | } | 908 | } |
941 | 909 | ||
942 | all = kmalloc(sizeof(*all), GFP_KERNEL); | 910 | all->par.dac = of_ioremap(&op->resource[1], 0, |
943 | if (!all) { | 911 | sizeof(struct ffb_dac), "ffb dac"); |
944 | printk(KERN_ERR "ffb: Cannot allocate memory.\n"); | 912 | if (!all->par.dac) { |
945 | return; | 913 | of_iounmap(all->par.fbc, sizeof(struct ffb_fbc)); |
914 | kfree(all); | ||
915 | return -ENOMEM; | ||
946 | } | 916 | } |
947 | memset(all, 0, sizeof(*all)); | ||
948 | |||
949 | INIT_LIST_HEAD(&all->list); | ||
950 | 917 | ||
951 | spin_lock_init(&all->par.lock); | ||
952 | all->par.fbc = (struct ffb_fbc *)(regs[0].phys_addr + FFB_FBC_REGS_POFF); | ||
953 | all->par.dac = (struct ffb_dac *)(regs[0].phys_addr + FFB_DAC_POFF); | ||
954 | all->par.rop_cache = FFB_ROP_NEW; | 918 | all->par.rop_cache = FFB_ROP_NEW; |
955 | all->par.physbase = regs[0].phys_addr; | 919 | all->par.physbase = op->resource[0].start; |
956 | all->par.prom_node = node; | ||
957 | all->par.prom_parent_node = parent; | ||
958 | 920 | ||
959 | /* Don't mention copyarea, so SCROLL_REDRAW is always | 921 | /* Don't mention copyarea, so SCROLL_REDRAW is always |
960 | * used. It is the fastest on this chip. | 922 | * used. It is the fastest on this chip. |
@@ -968,7 +930,7 @@ static void ffb_init_one(int node, int parent) | |||
968 | all->info.par = &all->par; | 930 | all->info.par = &all->par; |
969 | all->info.pseudo_palette = all->pseudo_palette; | 931 | all->info.pseudo_palette = all->pseudo_palette; |
970 | 932 | ||
971 | sbusfb_fill_var(&all->info.var, all->par.prom_node, 32); | 933 | sbusfb_fill_var(&all->info.var, dp->node, 32); |
972 | all->par.fbsize = PAGE_ALIGN(all->info.var.xres * | 934 | all->par.fbsize = PAGE_ALIGN(all->info.var.xres * |
973 | all->info.var.yres * | 935 | all->info.var.yres * |
974 | 4); | 936 | 4); |
@@ -976,14 +938,13 @@ static void ffb_init_one(int node, int parent) | |||
976 | 938 | ||
977 | all->info.var.accel_flags = FB_ACCELF_TEXT; | 939 | all->info.var.accel_flags = FB_ACCELF_TEXT; |
978 | 940 | ||
979 | prom_getstring(node, "name", all->par.name, sizeof(all->par.name)); | 941 | if (!strcmp(dp->name, "SUNW,afb")) |
980 | if (!strcmp(all->par.name, "SUNW,afb")) | ||
981 | all->par.flags |= FFB_FLAG_AFB; | 942 | all->par.flags |= FFB_FLAG_AFB; |
982 | 943 | ||
983 | all->par.board_type = prom_getintdefault(node, "board_type", 0); | 944 | all->par.board_type = of_getintprop_default(dp, "board_type", 0); |
984 | 945 | ||
985 | fbc = all->par.fbc; | 946 | fbc = all->par.fbc; |
986 | if((upa_readl(&fbc->ucsr) & FFB_UCSR_ALL_ERRORS) != 0) | 947 | if ((upa_readl(&fbc->ucsr) & FFB_UCSR_ALL_ERRORS) != 0) |
987 | upa_writel(FFB_UCSR_ALL_ERRORS, &fbc->ucsr); | 948 | upa_writel(FFB_UCSR_ALL_ERRORS, &fbc->ucsr); |
988 | 949 | ||
989 | ffb_switch_from_graph(&all->par); | 950 | ffb_switch_from_graph(&all->par); |
@@ -1008,81 +969,88 @@ static void ffb_init_one(int node, int parent) | |||
1008 | if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { | 969 | if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { |
1009 | printk(KERN_ERR "ffb: Could not allocate color map.\n"); | 970 | printk(KERN_ERR "ffb: Could not allocate color map.\n"); |
1010 | kfree(all); | 971 | kfree(all); |
1011 | return; | 972 | return -ENOMEM; |
1012 | } | 973 | } |
1013 | 974 | ||
1014 | ffb_init_fix(&all->info); | 975 | ffb_init_fix(&all->info); |
1015 | 976 | ||
1016 | if (register_framebuffer(&all->info) < 0) { | 977 | err = register_framebuffer(&all->info); |
978 | if (err < 0) { | ||
1017 | printk(KERN_ERR "ffb: Could not register framebuffer.\n"); | 979 | printk(KERN_ERR "ffb: Could not register framebuffer.\n"); |
1018 | fb_dealloc_cmap(&all->info.cmap); | 980 | fb_dealloc_cmap(&all->info.cmap); |
1019 | kfree(all); | 981 | kfree(all); |
1020 | return; | 982 | return err; |
1021 | } | 983 | } |
1022 | 984 | ||
1023 | list_add(&all->list, &ffb_list); | 985 | dev_set_drvdata(&op->dev, all); |
1024 | 986 | ||
1025 | printk("ffb: %s at %016lx type %d DAC %d\n", | 987 | printk("%s: %s at %016lx, type %d, DAC revision %d\n", |
988 | dp->full_name, | ||
1026 | ((all->par.flags & FFB_FLAG_AFB) ? "AFB" : "FFB"), | 989 | ((all->par.flags & FFB_FLAG_AFB) ? "AFB" : "FFB"), |
1027 | regs[0].phys_addr, all->par.board_type, all->par.dac_rev); | 990 | all->par.physbase, all->par.board_type, all->par.dac_rev); |
991 | |||
992 | return 0; | ||
1028 | } | 993 | } |
1029 | 994 | ||
1030 | static void ffb_scan_siblings(int root) | 995 | static int __devinit ffb_probe(struct of_device *dev, const struct of_device_id *match) |
1031 | { | 996 | { |
1032 | int node, child; | 997 | struct of_device *op = to_of_device(&dev->dev); |
1033 | 998 | ||
1034 | child = prom_getchild(root); | 999 | return ffb_init_one(op); |
1035 | for (node = prom_searchsiblings(child, "SUNW,ffb"); node; | ||
1036 | node = prom_searchsiblings(prom_getsibling(node), "SUNW,ffb")) | ||
1037 | ffb_init_one(node, root); | ||
1038 | for (node = prom_searchsiblings(child, "SUNW,afb"); node; | ||
1039 | node = prom_searchsiblings(prom_getsibling(node), "SUNW,afb")) | ||
1040 | ffb_init_one(node, root); | ||
1041 | } | 1000 | } |
1042 | 1001 | ||
1043 | int __init ffb_init(void) | 1002 | static int __devexit ffb_remove(struct of_device *dev) |
1044 | { | 1003 | { |
1045 | int root; | 1004 | struct all_info *all = dev_get_drvdata(&dev->dev); |
1046 | 1005 | ||
1047 | if (fb_get_options("ffb", NULL)) | 1006 | unregister_framebuffer(&all->info); |
1048 | return -ENODEV; | 1007 | fb_dealloc_cmap(&all->info.cmap); |
1049 | 1008 | ||
1050 | ffb_scan_siblings(prom_root_node); | 1009 | of_iounmap(all->par.fbc, sizeof(struct ffb_fbc)); |
1010 | of_iounmap(all->par.dac, sizeof(struct ffb_dac)); | ||
1051 | 1011 | ||
1052 | root = prom_getchild(prom_root_node); | 1012 | kfree(all); |
1053 | for (root = prom_searchsiblings(root, "upa"); root; | 1013 | |
1054 | root = prom_searchsiblings(prom_getsibling(root), "upa")) | 1014 | dev_set_drvdata(&dev->dev, NULL); |
1055 | ffb_scan_siblings(root); | ||
1056 | 1015 | ||
1057 | return 0; | 1016 | return 0; |
1058 | } | 1017 | } |
1059 | 1018 | ||
1060 | void __exit ffb_exit(void) | 1019 | static struct of_device_id ffb_match[] = { |
1061 | { | 1020 | { |
1062 | struct list_head *pos, *tmp; | 1021 | .name = "SUNW,ffb", |
1022 | }, | ||
1023 | { | ||
1024 | .name = "SUNW,afb", | ||
1025 | }, | ||
1026 | {}, | ||
1027 | }; | ||
1028 | MODULE_DEVICE_TABLE(of, ffb_match); | ||
1029 | |||
1030 | static struct of_platform_driver ffb_driver = { | ||
1031 | .name = "ffb", | ||
1032 | .match_table = ffb_match, | ||
1033 | .probe = ffb_probe, | ||
1034 | .remove = __devexit_p(ffb_remove), | ||
1035 | }; | ||
1063 | 1036 | ||
1064 | list_for_each_safe(pos, tmp, &ffb_list) { | 1037 | int __init ffb_init(void) |
1065 | struct all_info *all = list_entry(pos, typeof(*all), list); | 1038 | { |
1039 | if (fb_get_options("ffb", NULL)) | ||
1040 | return -ENODEV; | ||
1066 | 1041 | ||
1067 | unregister_framebuffer(&all->info); | 1042 | return of_register_driver(&ffb_driver, &of_bus_type); |
1068 | fb_dealloc_cmap(&all->info.cmap); | ||
1069 | kfree(all); | ||
1070 | } | ||
1071 | } | 1043 | } |
1072 | 1044 | ||
1073 | int __init | 1045 | void __exit ffb_exit(void) |
1074 | ffb_setup(char *arg) | ||
1075 | { | 1046 | { |
1076 | /* No cmdline options yet... */ | 1047 | of_unregister_driver(&ffb_driver); |
1077 | return 0; | ||
1078 | } | 1048 | } |
1079 | 1049 | ||
1080 | module_init(ffb_init); | 1050 | module_init(ffb_init); |
1081 | |||
1082 | #ifdef MODULE | ||
1083 | module_exit(ffb_exit); | 1051 | module_exit(ffb_exit); |
1084 | #endif | ||
1085 | 1052 | ||
1086 | MODULE_DESCRIPTION("framebuffer driver for Creator/Elite3D chipsets"); | 1053 | MODULE_DESCRIPTION("framebuffer driver for Creator/Elite3D chipsets"); |
1087 | MODULE_AUTHOR("David S. Miller <davem@redhat.com>"); | 1054 | MODULE_AUTHOR("David S. Miller <davem@davemloft.net>"); |
1055 | MODULE_VERSION("2.0"); | ||
1088 | MODULE_LICENSE("GPL"); | 1056 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c index 5e25b9860196..bf0e60b5a3b6 100644 --- a/drivers/video/gbefb.c +++ b/drivers/video/gbefb.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * more details. | 9 | * more details. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
14 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
15 | #include <linux/dma-mapping.h> | 14 | #include <linux/dma-mapping.h> |
diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c index f04ca721f94c..01864767450d 100644 --- a/drivers/video/hitfb.c +++ b/drivers/video/hitfb.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * more details. | 11 | * more details. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
17 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
diff --git a/drivers/video/i810/i810-i2c.c b/drivers/video/i810/i810-i2c.c index 3fe3ae1aff12..c1f7b49975dd 100644 --- a/drivers/video/i810/i810-i2c.c +++ b/drivers/video/i810/i810-i2c.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * License. See the file COPYING in the main directory of this archive for | 8 | * License. See the file COPYING in the main directory of this archive for |
9 | * more details. | 9 | * more details. |
10 | */ | 10 | */ |
11 | #include <linux/config.h> | ||
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c index a1f7d80f0ac1..fbe8a2c4b04c 100644 --- a/drivers/video/i810/i810_main.c +++ b/drivers/video/i810/i810_main.c | |||
@@ -29,7 +29,6 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/config.h> | ||
33 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
34 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
35 | #include <linux/string.h> | 34 | #include <linux/string.h> |
diff --git a/drivers/video/imacfb.c b/drivers/video/imacfb.c index 7b1c168c834d..cdbae173d69a 100644 --- a/drivers/video/imacfb.c +++ b/drivers/video/imacfb.c | |||
@@ -207,10 +207,6 @@ static int __init imacfb_probe(struct platform_device *dev) | |||
207 | size_remap = size_total; | 207 | size_remap = size_total; |
208 | imacfb_fix.smem_len = size_remap; | 208 | imacfb_fix.smem_len = size_remap; |
209 | 209 | ||
210 | #ifndef __i386__ | ||
211 | screen_info.imacpm_seg = 0; | ||
212 | #endif | ||
213 | |||
214 | if (!request_mem_region(imacfb_fix.smem_start, size_total, "imacfb")) { | 210 | if (!request_mem_region(imacfb_fix.smem_start, size_total, "imacfb")) { |
215 | printk(KERN_WARNING | 211 | printk(KERN_WARNING |
216 | "imacfb: cannot reserve video memory at 0x%lx\n", | 212 | "imacfb: cannot reserve video memory at 0x%lx\n", |
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c index f73c642b50c2..5f393d985b11 100644 --- a/drivers/video/imsttfb.c +++ b/drivers/video/imsttfb.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * more details. | 16 | * more details. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/config.h> | ||
20 | #include <linux/module.h> | 19 | #include <linux/module.h> |
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
22 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index 1718baaeed2a..0f9b2fdc28b1 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c | |||
@@ -18,7 +18,6 @@ | |||
18 | 18 | ||
19 | //#define DEBUG 1 | 19 | //#define DEBUG 1 |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
23 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
24 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index 0a0a8b199ecc..3f39d84015f1 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c | |||
@@ -108,7 +108,6 @@ | |||
108 | * | 108 | * |
109 | */ | 109 | */ |
110 | 110 | ||
111 | #include <linux/config.h> | ||
112 | #include <linux/module.h> | 111 | #include <linux/module.h> |
113 | #include <linux/kernel.h> | 112 | #include <linux/kernel.h> |
114 | #include <linux/errno.h> | 113 | #include <linux/errno.h> |
diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c index 7533b3dd08ac..3b78a57924f0 100644 --- a/drivers/video/intelfb/intelfbhw.c +++ b/drivers/video/intelfb/intelfbhw.c | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | /* $DHD: intelfb/intelfbhw.c,v 1.9 2003/06/27 15:06:25 dawes Exp $ */ | 20 | /* $DHD: intelfb/intelfbhw.c,v 1.9 2003/06/27 15:06:25 dawes Exp $ */ |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | #include <linux/module.h> | 22 | #include <linux/module.h> |
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
25 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c index 477ad297de4e..2fdbe9b2b04b 100644 --- a/drivers/video/kyro/fbdev.c +++ b/drivers/video/kyro/fbdev.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * for more details. | 9 | * for more details. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/drivers/video/leo.c b/drivers/video/leo.c index a23cfdb9d826..f3a24338d9ac 100644 --- a/drivers/video/leo.c +++ b/drivers/video/leo.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* leo.c: LEO frame buffer driver | 1 | /* leo.c: LEO frame buffer driver |
2 | * | 2 | * |
3 | * Copyright (C) 2003 David S. Miller (davem@redhat.com) | 3 | * Copyright (C) 2003, 2006 David S. Miller (davem@davemloft.net) |
4 | * Copyright (C) 1996-1999 Jakub Jelinek (jj@ultra.linux.cz) | 4 | * Copyright (C) 1996-1999 Jakub Jelinek (jj@ultra.linux.cz) |
5 | * Copyright (C) 1997 Michal Rehacek (Michal.Rehacek@st.mff.cuni.cz) | 5 | * Copyright (C) 1997 Michal Rehacek (Michal.Rehacek@st.mff.cuni.cz) |
6 | * | 6 | * |
@@ -18,8 +18,8 @@ | |||
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | 19 | ||
20 | #include <asm/io.h> | 20 | #include <asm/io.h> |
21 | #include <asm/sbus.h> | 21 | #include <asm/prom.h> |
22 | #include <asm/oplib.h> | 22 | #include <asm/of_device.h> |
23 | #include <asm/fbio.h> | 23 | #include <asm/fbio.h> |
24 | 24 | ||
25 | #include "sbuslib.h" | 25 | #include "sbuslib.h" |
@@ -80,10 +80,10 @@ static struct fb_ops leo_ops = { | |||
80 | 80 | ||
81 | struct leo_cursor { | 81 | struct leo_cursor { |
82 | u8 xxx0[16]; | 82 | u8 xxx0[16]; |
83 | volatile u32 cur_type; | 83 | u32 cur_type; |
84 | volatile u32 cur_misc; | 84 | u32 cur_misc; |
85 | volatile u32 cur_cursxy; | 85 | u32 cur_cursxy; |
86 | volatile u32 cur_data; | 86 | u32 cur_data; |
87 | }; | 87 | }; |
88 | 88 | ||
89 | #define LEO_KRN_TYPE_CLUT0 0x00001000 | 89 | #define LEO_KRN_TYPE_CLUT0 0x00001000 |
@@ -99,27 +99,27 @@ struct leo_cursor { | |||
99 | #define LEO_KRN_CSR_UNK2 0x00000001 | 99 | #define LEO_KRN_CSR_UNK2 0x00000001 |
100 | 100 | ||
101 | struct leo_lx_krn { | 101 | struct leo_lx_krn { |
102 | volatile u32 krn_type; | 102 | u32 krn_type; |
103 | volatile u32 krn_csr; | 103 | u32 krn_csr; |
104 | volatile u32 krn_value; | 104 | u32 krn_value; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | struct leo_lc_ss0_krn { | 107 | struct leo_lc_ss0_krn { |
108 | volatile u32 misc; | 108 | u32 misc; |
109 | u8 xxx0[0x800-4]; | 109 | u8 xxx0[0x800-4]; |
110 | volatile u32 rev; | 110 | u32 rev; |
111 | }; | 111 | }; |
112 | 112 | ||
113 | struct leo_lc_ss0_usr { | 113 | struct leo_lc_ss0_usr { |
114 | volatile u32 csr; | 114 | u32 csr; |
115 | volatile u32 addrspace; | 115 | u32 addrspace; |
116 | volatile u32 fontmsk; | 116 | u32 fontmsk; |
117 | volatile u32 fontt; | 117 | u32 fontt; |
118 | volatile u32 extent; | 118 | u32 extent; |
119 | volatile u32 src; | 119 | u32 src; |
120 | u32 dst; | 120 | u32 dst; |
121 | volatile u32 copy; | 121 | u32 copy; |
122 | volatile u32 fill; | 122 | u32 fill; |
123 | }; | 123 | }; |
124 | 124 | ||
125 | struct leo_lc_ss1_krn { | 125 | struct leo_lc_ss1_krn { |
@@ -132,47 +132,47 @@ struct leo_lc_ss1_usr { | |||
132 | 132 | ||
133 | struct leo_ld { | 133 | struct leo_ld { |
134 | u8 xxx0[0xe00]; | 134 | u8 xxx0[0xe00]; |
135 | volatile u32 csr; | 135 | u32 csr; |
136 | volatile u32 wid; | 136 | u32 wid; |
137 | volatile u32 wmask; | 137 | u32 wmask; |
138 | volatile u32 widclip; | 138 | u32 widclip; |
139 | volatile u32 vclipmin; | 139 | u32 vclipmin; |
140 | volatile u32 vclipmax; | 140 | u32 vclipmax; |
141 | volatile u32 pickmin; /* SS1 only */ | 141 | u32 pickmin; /* SS1 only */ |
142 | volatile u32 pickmax; /* SS1 only */ | 142 | u32 pickmax; /* SS1 only */ |
143 | volatile u32 fg; | 143 | u32 fg; |
144 | volatile u32 bg; | 144 | u32 bg; |
145 | volatile u32 src; /* Copy/Scroll (SS0 only) */ | 145 | u32 src; /* Copy/Scroll (SS0 only) */ |
146 | volatile u32 dst; /* Copy/Scroll/Fill (SS0 only) */ | 146 | u32 dst; /* Copy/Scroll/Fill (SS0 only) */ |
147 | volatile u32 extent; /* Copy/Scroll/Fill size (SS0 only) */ | 147 | u32 extent; /* Copy/Scroll/Fill size (SS0 only) */ |
148 | u32 xxx1[3]; | 148 | u32 xxx1[3]; |
149 | volatile u32 setsem; /* SS1 only */ | 149 | u32 setsem; /* SS1 only */ |
150 | volatile u32 clrsem; /* SS1 only */ | 150 | u32 clrsem; /* SS1 only */ |
151 | volatile u32 clrpick; /* SS1 only */ | 151 | u32 clrpick; /* SS1 only */ |
152 | volatile u32 clrdat; /* SS1 only */ | 152 | u32 clrdat; /* SS1 only */ |
153 | volatile u32 alpha; /* SS1 only */ | 153 | u32 alpha; /* SS1 only */ |
154 | u8 xxx2[0x2c]; | 154 | u8 xxx2[0x2c]; |
155 | volatile u32 winbg; | 155 | u32 winbg; |
156 | volatile u32 planemask; | 156 | u32 planemask; |
157 | volatile u32 rop; | 157 | u32 rop; |
158 | volatile u32 z; | 158 | u32 z; |
159 | volatile u32 dczf; /* SS1 only */ | 159 | u32 dczf; /* SS1 only */ |
160 | volatile u32 dczb; /* SS1 only */ | 160 | u32 dczb; /* SS1 only */ |
161 | volatile u32 dcs; /* SS1 only */ | 161 | u32 dcs; /* SS1 only */ |
162 | volatile u32 dczs; /* SS1 only */ | 162 | u32 dczs; /* SS1 only */ |
163 | volatile u32 pickfb; /* SS1 only */ | 163 | u32 pickfb; /* SS1 only */ |
164 | volatile u32 pickbb; /* SS1 only */ | 164 | u32 pickbb; /* SS1 only */ |
165 | volatile u32 dcfc; /* SS1 only */ | 165 | u32 dcfc; /* SS1 only */ |
166 | volatile u32 forcecol; /* SS1 only */ | 166 | u32 forcecol; /* SS1 only */ |
167 | volatile u32 door[8]; /* SS1 only */ | 167 | u32 door[8]; /* SS1 only */ |
168 | volatile u32 pick[5]; /* SS1 only */ | 168 | u32 pick[5]; /* SS1 only */ |
169 | }; | 169 | }; |
170 | 170 | ||
171 | #define LEO_SS1_MISC_ENABLE 0x00000001 | 171 | #define LEO_SS1_MISC_ENABLE 0x00000001 |
172 | #define LEO_SS1_MISC_STEREO 0x00000002 | 172 | #define LEO_SS1_MISC_STEREO 0x00000002 |
173 | struct leo_ld_ss1 { | 173 | struct leo_ld_ss1 { |
174 | u8 xxx0[0xef4]; | 174 | u8 xxx0[0xef4]; |
175 | volatile u32 ss1_misc; | 175 | u32 ss1_misc; |
176 | }; | 176 | }; |
177 | 177 | ||
178 | struct leo_ld_gbl { | 178 | struct leo_ld_gbl { |
@@ -193,9 +193,8 @@ struct leo_par { | |||
193 | #define LEO_FLAG_BLANKED 0x00000001 | 193 | #define LEO_FLAG_BLANKED 0x00000001 |
194 | 194 | ||
195 | unsigned long physbase; | 195 | unsigned long physbase; |
196 | unsigned long which_io; | ||
196 | unsigned long fbsize; | 197 | unsigned long fbsize; |
197 | |||
198 | struct sbus_dev *sdev; | ||
199 | }; | 198 | }; |
200 | 199 | ||
201 | static void leo_wait(struct leo_lx_krn __iomem *lx_krn) | 200 | static void leo_wait(struct leo_lx_krn __iomem *lx_krn) |
@@ -368,8 +367,7 @@ static int leo_mmap(struct fb_info *info, struct vm_area_struct *vma) | |||
368 | 367 | ||
369 | return sbusfb_mmap_helper(leo_mmap_map, | 368 | return sbusfb_mmap_helper(leo_mmap_map, |
370 | par->physbase, par->fbsize, | 369 | par->physbase, par->fbsize, |
371 | par->sdev->reg_addrs[0].which_io, | 370 | par->which_io, vma); |
372 | vma); | ||
373 | } | 371 | } |
374 | 372 | ||
375 | static int leo_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) | 373 | static int leo_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) |
@@ -385,11 +383,9 @@ static int leo_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) | |||
385 | */ | 383 | */ |
386 | 384 | ||
387 | static void | 385 | static void |
388 | leo_init_fix(struct fb_info *info) | 386 | leo_init_fix(struct fb_info *info, struct device_node *dp) |
389 | { | 387 | { |
390 | struct leo_par *par = (struct leo_par *)info->par; | 388 | strlcpy(info->fix.id, dp->name, sizeof(info->fix.id)); |
391 | |||
392 | strlcpy(info->fix.id, par->sdev->prom_name, sizeof(info->fix.id)); | ||
393 | 389 | ||
394 | info->fix.type = FB_TYPE_PACKED_PIXELS; | 390 | info->fix.type = FB_TYPE_PACKED_PIXELS; |
395 | info->fix.visual = FB_VISUAL_TRUECOLOR; | 391 | info->fix.visual = FB_VISUAL_TRUECOLOR; |
@@ -532,60 +528,74 @@ static void leo_fixup_var_rgb(struct fb_var_screeninfo *var) | |||
532 | struct all_info { | 528 | struct all_info { |
533 | struct fb_info info; | 529 | struct fb_info info; |
534 | struct leo_par par; | 530 | struct leo_par par; |
535 | struct list_head list; | ||
536 | }; | 531 | }; |
537 | static LIST_HEAD(leo_list); | ||
538 | 532 | ||
539 | static void leo_init_one(struct sbus_dev *sdev) | 533 | static void leo_unmap_regs(struct all_info *all) |
540 | { | 534 | { |
541 | struct all_info *all; | 535 | if (all->par.lc_ss0_usr) |
542 | int linebytes; | 536 | of_iounmap(all->par.lc_ss0_usr, 0x1000); |
537 | if (all->par.ld_ss0) | ||
538 | of_iounmap(all->par.ld_ss0, 0x1000); | ||
539 | if (all->par.ld_ss1) | ||
540 | of_iounmap(all->par.ld_ss1, 0x1000); | ||
541 | if (all->par.lx_krn) | ||
542 | of_iounmap(all->par.lx_krn, 0x1000); | ||
543 | if (all->par.cursor) | ||
544 | of_iounmap(all->par.cursor, sizeof(struct leo_cursor)); | ||
545 | if (all->info.screen_base) | ||
546 | of_iounmap(all->info.screen_base, 0x800000); | ||
547 | } | ||
543 | 548 | ||
544 | all = kmalloc(sizeof(*all), GFP_KERNEL); | 549 | static int __devinit leo_init_one(struct of_device *op) |
545 | if (!all) { | 550 | { |
546 | printk(KERN_ERR "leo: Cannot allocate memory.\n"); | 551 | struct device_node *dp = op->node; |
547 | return; | 552 | struct all_info *all; |
548 | } | 553 | int linebytes, err; |
549 | memset(all, 0, sizeof(*all)); | ||
550 | 554 | ||
551 | INIT_LIST_HEAD(&all->list); | 555 | all = kzalloc(sizeof(*all), GFP_KERNEL); |
556 | if (!all) | ||
557 | return -ENOMEM; | ||
552 | 558 | ||
553 | spin_lock_init(&all->par.lock); | 559 | spin_lock_init(&all->par.lock); |
554 | all->par.sdev = sdev; | ||
555 | 560 | ||
556 | all->par.physbase = sdev->reg_addrs[0].phys_addr; | 561 | all->par.physbase = op->resource[0].start; |
562 | all->par.which_io = op->resource[0].flags & IORESOURCE_BITS; | ||
557 | 563 | ||
558 | sbusfb_fill_var(&all->info.var, sdev->prom_node, 32); | 564 | sbusfb_fill_var(&all->info.var, dp->node, 32); |
559 | leo_fixup_var_rgb(&all->info.var); | 565 | leo_fixup_var_rgb(&all->info.var); |
560 | 566 | ||
561 | linebytes = prom_getintdefault(sdev->prom_node, "linebytes", | 567 | linebytes = of_getintprop_default(dp, "linebytes", |
562 | all->info.var.xres); | 568 | all->info.var.xres); |
563 | all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); | 569 | all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); |
564 | 570 | ||
565 | #ifdef CONFIG_SPARC32 | ||
566 | all->info.screen_base = (char __iomem *) | ||
567 | prom_getintdefault(sdev->prom_node, "address", 0); | ||
568 | #endif | ||
569 | if (!all->info.screen_base) | ||
570 | all->info.screen_base = | ||
571 | sbus_ioremap(&sdev->resource[0], LEO_OFF_SS0, | ||
572 | 0x800000, "leo ram"); | ||
573 | |||
574 | all->par.lc_ss0_usr = | 571 | all->par.lc_ss0_usr = |
575 | sbus_ioremap(&sdev->resource[0], LEO_OFF_LC_SS0_USR, | 572 | of_ioremap(&op->resource[0], LEO_OFF_LC_SS0_USR, |
576 | 0x1000, "leolc ss0usr"); | 573 | 0x1000, "leolc ss0usr"); |
577 | all->par.ld_ss0 = | 574 | all->par.ld_ss0 = |
578 | sbus_ioremap(&sdev->resource[0], LEO_OFF_LD_SS0, | 575 | of_ioremap(&op->resource[0], LEO_OFF_LD_SS0, |
579 | 0x1000, "leold ss0"); | 576 | 0x1000, "leold ss0"); |
580 | all->par.ld_ss1 = | 577 | all->par.ld_ss1 = |
581 | sbus_ioremap(&sdev->resource[0], LEO_OFF_LD_SS1, | 578 | of_ioremap(&op->resource[0], LEO_OFF_LD_SS1, |
582 | 0x1000, "leold ss1"); | 579 | 0x1000, "leold ss1"); |
583 | all->par.lx_krn = | 580 | all->par.lx_krn = |
584 | sbus_ioremap(&sdev->resource[0], LEO_OFF_LX_KRN, | 581 | of_ioremap(&op->resource[0], LEO_OFF_LX_KRN, |
585 | 0x1000, "leolx krn"); | 582 | 0x1000, "leolx krn"); |
586 | all->par.cursor = | 583 | all->par.cursor = |
587 | sbus_ioremap(&sdev->resource[0], LEO_OFF_LX_CURSOR, | 584 | of_ioremap(&op->resource[0], LEO_OFF_LX_CURSOR, |
588 | sizeof(struct leo_cursor), "leolx cursor"); | 585 | sizeof(struct leo_cursor), "leolx cursor"); |
586 | all->info.screen_base = | ||
587 | of_ioremap(&op->resource[0], LEO_OFF_SS0, | ||
588 | 0x800000, "leo ram"); | ||
589 | if (!all->par.lc_ss0_usr || | ||
590 | !all->par.ld_ss0 || | ||
591 | !all->par.ld_ss1 || | ||
592 | !all->par.lx_krn || | ||
593 | !all->par.cursor || | ||
594 | !all->info.screen_base) { | ||
595 | leo_unmap_regs(all); | ||
596 | kfree(all); | ||
597 | return -ENOMEM; | ||
598 | } | ||
589 | 599 | ||
590 | all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; | 600 | all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; |
591 | all->info.fbops = &leo_ops; | 601 | all->info.fbops = &leo_ops; |
@@ -597,69 +607,85 @@ static void leo_init_one(struct sbus_dev *sdev) | |||
597 | leo_blank(0, &all->info); | 607 | leo_blank(0, &all->info); |
598 | 608 | ||
599 | if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { | 609 | if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { |
600 | printk(KERN_ERR "leo: Could not allocate color map.\n"); | 610 | leo_unmap_regs(all); |
601 | kfree(all); | 611 | kfree(all); |
602 | return; | 612 | return -ENOMEM;; |
603 | } | 613 | } |
604 | 614 | ||
605 | leo_init_fix(&all->info); | 615 | leo_init_fix(&all->info, dp); |
606 | 616 | ||
607 | if (register_framebuffer(&all->info) < 0) { | 617 | err = register_framebuffer(&all->info); |
608 | printk(KERN_ERR "leo: Could not register framebuffer.\n"); | 618 | if (err < 0) { |
609 | fb_dealloc_cmap(&all->info.cmap); | 619 | fb_dealloc_cmap(&all->info.cmap); |
620 | leo_unmap_regs(all); | ||
610 | kfree(all); | 621 | kfree(all); |
611 | return; | 622 | return err; |
612 | } | 623 | } |
613 | 624 | ||
614 | list_add(&all->list, &leo_list); | 625 | dev_set_drvdata(&op->dev, all); |
626 | |||
627 | printk("%s: leo at %lx:%lx\n", | ||
628 | dp->full_name, | ||
629 | all->par.which_io, all->par.physbase); | ||
615 | 630 | ||
616 | printk("leo: %s at %lx:%lx\n", | 631 | return 0; |
617 | sdev->prom_name, | ||
618 | (long) sdev->reg_addrs[0].which_io, | ||
619 | (long) sdev->reg_addrs[0].phys_addr); | ||
620 | } | 632 | } |
621 | 633 | ||
622 | int __init leo_init(void) | 634 | static int __devinit leo_probe(struct of_device *dev, const struct of_device_id *match) |
623 | { | 635 | { |
624 | struct sbus_bus *sbus; | 636 | struct of_device *op = to_of_device(&dev->dev); |
625 | struct sbus_dev *sdev; | ||
626 | 637 | ||
627 | if (fb_get_options("leofb", NULL)) | 638 | return leo_init_one(op); |
628 | return -ENODEV; | 639 | } |
629 | 640 | ||
630 | for_all_sbusdev(sdev, sbus) { | 641 | static int __devexit leo_remove(struct of_device *dev) |
631 | if (!strcmp(sdev->prom_name, "leo")) | 642 | { |
632 | leo_init_one(sdev); | 643 | struct all_info *all = dev_get_drvdata(&dev->dev); |
633 | } | 644 | |
645 | unregister_framebuffer(&all->info); | ||
646 | fb_dealloc_cmap(&all->info.cmap); | ||
647 | |||
648 | leo_unmap_regs(all); | ||
649 | |||
650 | kfree(all); | ||
651 | |||
652 | dev_set_drvdata(&dev->dev, NULL); | ||
634 | 653 | ||
635 | return 0; | 654 | return 0; |
636 | } | 655 | } |
637 | 656 | ||
638 | void __exit leo_exit(void) | 657 | static struct of_device_id leo_match[] = { |
639 | { | 658 | { |
640 | struct list_head *pos, *tmp; | 659 | .name = "leo", |
660 | }, | ||
661 | {}, | ||
662 | }; | ||
663 | MODULE_DEVICE_TABLE(of, leo_match); | ||
664 | |||
665 | static struct of_platform_driver leo_driver = { | ||
666 | .name = "leo", | ||
667 | .match_table = leo_match, | ||
668 | .probe = leo_probe, | ||
669 | .remove = __devexit_p(leo_remove), | ||
670 | }; | ||
641 | 671 | ||
642 | list_for_each_safe(pos, tmp, &leo_list) { | 672 | static int __init leo_init(void) |
643 | struct all_info *all = list_entry(pos, typeof(*all), list); | 673 | { |
674 | if (fb_get_options("leofb", NULL)) | ||
675 | return -ENODEV; | ||
644 | 676 | ||
645 | unregister_framebuffer(&all->info); | 677 | return of_register_driver(&leo_driver, &of_bus_type); |
646 | fb_dealloc_cmap(&all->info.cmap); | ||
647 | kfree(all); | ||
648 | } | ||
649 | } | 678 | } |
650 | 679 | ||
651 | int __init | 680 | static void __exit leo_exit(void) |
652 | leo_setup(char *arg) | ||
653 | { | 681 | { |
654 | /* No cmdline options yet... */ | 682 | of_unregister_driver(&leo_driver); |
655 | return 0; | ||
656 | } | 683 | } |
657 | 684 | ||
658 | module_init(leo_init); | 685 | module_init(leo_init); |
659 | #ifdef MODULE | ||
660 | module_exit(leo_exit); | 686 | module_exit(leo_exit); |
661 | #endif | ||
662 | 687 | ||
663 | MODULE_DESCRIPTION("framebuffer driver for LEO chipsets"); | 688 | MODULE_DESCRIPTION("framebuffer driver for LEO chipsets"); |
664 | MODULE_AUTHOR("David S. Miller <davem@redhat.com>"); | 689 | MODULE_AUTHOR("David S. Miller <davem@davemloft.net>"); |
690 | MODULE_VERSION("2.0"); | ||
665 | MODULE_LICENSE("GPL"); | 691 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/video/logo/logo.c b/drivers/video/logo/logo.c index 788fa812c871..80c03618eb53 100644 --- a/drivers/video/logo/logo.c +++ b/drivers/video/logo/logo.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * Copyright (C) 2003 Geert Uytterhoeven <geert@linux-m68k.org> | 9 | * Copyright (C) 2003 Geert Uytterhoeven <geert@linux-m68k.org> |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/linux_logo.h> | 12 | #include <linux/linux_logo.h> |
14 | #include <linux/stddef.h> | 13 | #include <linux/stddef.h> |
15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
diff --git a/drivers/video/macmodes.c b/drivers/video/macmodes.c index d21321ca7c39..ab2149531a04 100644 --- a/drivers/video/macmodes.c +++ b/drivers/video/macmodes.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * more details. | 15 | * more details. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
20 | #include <linux/fb.h> | 19 | #include <linux/fb.h> |
21 | #include <linux/string.h> | 20 | #include <linux/string.h> |
diff --git a/drivers/video/matrox/matroxfb_DAC1064.c b/drivers/video/matrox/matroxfb_DAC1064.c index a456e67a5b00..c4b570b4a4df 100644 --- a/drivers/video/matrox/matroxfb_DAC1064.c +++ b/drivers/video/matrox/matroxfb_DAC1064.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | 15 | ||
17 | #include "matroxfb_DAC1064.h" | 16 | #include "matroxfb_DAC1064.h" |
18 | #include "matroxfb_misc.h" | 17 | #include "matroxfb_misc.h" |
diff --git a/drivers/video/matrox/matroxfb_DAC1064.h b/drivers/video/matrox/matroxfb_DAC1064.h index 56513a5d220b..df39c3193735 100644 --- a/drivers/video/matrox/matroxfb_DAC1064.h +++ b/drivers/video/matrox/matroxfb_DAC1064.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef __MATROXFB_DAC1064_H__ | 1 | #ifndef __MATROXFB_DAC1064_H__ |
2 | #define __MATROXFB_DAC1064_H__ | 2 | #define __MATROXFB_DAC1064_H__ |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | 4 | ||
6 | #include "matroxfb_base.h" | 5 | #include "matroxfb_base.h" |
7 | 6 | ||
diff --git a/drivers/video/matrox/matroxfb_Ti3026.c b/drivers/video/matrox/matroxfb_Ti3026.c index 23ebad0a12d8..a5690a5f29d5 100644 --- a/drivers/video/matrox/matroxfb_Ti3026.c +++ b/drivers/video/matrox/matroxfb_Ti3026.c | |||
@@ -78,7 +78,6 @@ | |||
78 | * | 78 | * |
79 | */ | 79 | */ |
80 | 80 | ||
81 | #include <linux/config.h> | ||
82 | 81 | ||
83 | #include "matroxfb_Ti3026.h" | 82 | #include "matroxfb_Ti3026.h" |
84 | #include "matroxfb_misc.h" | 83 | #include "matroxfb_misc.h" |
diff --git a/drivers/video/matrox/matroxfb_Ti3026.h b/drivers/video/matrox/matroxfb_Ti3026.h index 536e5f69de9f..27872aaa0a17 100644 --- a/drivers/video/matrox/matroxfb_Ti3026.h +++ b/drivers/video/matrox/matroxfb_Ti3026.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef __MATROXFB_TI3026_H__ | 1 | #ifndef __MATROXFB_TI3026_H__ |
2 | #define __MATROXFB_TI3026_H__ | 2 | #define __MATROXFB_TI3026_H__ |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | 4 | ||
6 | #include "matroxfb_base.h" | 5 | #include "matroxfb_base.h" |
7 | 6 | ||
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c index f4ddd3431f17..8b5bf7972ee3 100644 --- a/drivers/video/matrox/matroxfb_base.c +++ b/drivers/video/matrox/matroxfb_base.c | |||
@@ -99,7 +99,6 @@ | |||
99 | * | 99 | * |
100 | */ | 100 | */ |
101 | 101 | ||
102 | #include <linux/config.h> | ||
103 | #include <linux/version.h> | 102 | #include <linux/version.h> |
104 | 103 | ||
105 | #define __OLD_VIDIOC_ | 104 | #define __OLD_VIDIOC_ |
diff --git a/drivers/video/matrox/matroxfb_base.h b/drivers/video/matrox/matroxfb_base.h index b71737178d0d..b95779b57c06 100644 --- a/drivers/video/matrox/matroxfb_base.h +++ b/drivers/video/matrox/matroxfb_base.h | |||
@@ -25,7 +25,6 @@ | |||
25 | /* Guard accelerator accesses with spin_lock_irqsave... */ | 25 | /* Guard accelerator accesses with spin_lock_irqsave... */ |
26 | #undef MATROXFB_USE_SPINLOCKS | 26 | #undef MATROXFB_USE_SPINLOCKS |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
31 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
diff --git a/drivers/video/matrox/matroxfb_misc.c b/drivers/video/matrox/matroxfb_misc.c index 263d801ef78f..18886b629cb1 100644 --- a/drivers/video/matrox/matroxfb_misc.c +++ b/drivers/video/matrox/matroxfb_misc.c | |||
@@ -84,7 +84,6 @@ | |||
84 | * | 84 | * |
85 | */ | 85 | */ |
86 | 86 | ||
87 | #include <linux/config.h> | ||
88 | 87 | ||
89 | #include "matroxfb_misc.h" | 88 | #include "matroxfb_misc.h" |
90 | #include <linux/interrupt.h> | 89 | #include <linux/interrupt.h> |
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c index 2f156b724d1c..773855a311e8 100644 --- a/drivers/video/neofb.c +++ b/drivers/video/neofb.c | |||
@@ -54,7 +54,6 @@ | |||
54 | * | 54 | * |
55 | */ | 55 | */ |
56 | 56 | ||
57 | #include <linux/config.h> | ||
58 | #include <linux/module.h> | 57 | #include <linux/module.h> |
59 | #include <linux/kernel.h> | 58 | #include <linux/kernel.h> |
60 | #include <linux/errno.h> | 59 | #include <linux/errno.h> |
diff --git a/drivers/video/nvidia/nv_i2c.c b/drivers/video/nvidia/nv_i2c.c index 1edb1c432b75..19eef3a09023 100644 --- a/drivers/video/nvidia/nv_i2c.c +++ b/drivers/video/nvidia/nv_i2c.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * for more details. | 10 | * for more details. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
diff --git a/drivers/video/nvidia/nv_of.c b/drivers/video/nvidia/nv_of.c index 7a03d040b1a3..8209106e26ee 100644 --- a/drivers/video/nvidia/nv_of.c +++ b/drivers/video/nvidia/nv_of.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * for more details. | 10 | * for more details. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index 7b5cffb27851..b02d6033cc0c 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
diff --git a/drivers/video/offb.c b/drivers/video/offb.c index ad1434e3f227..bfeb11bd4712 100644 --- a/drivers/video/offb.c +++ b/drivers/video/offb.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * more details. | 12 | * more details. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
diff --git a/drivers/video/p9100.c b/drivers/video/p9100.c index 0d1957505359..56ac51d6a7f3 100644 --- a/drivers/video/p9100.c +++ b/drivers/video/p9100.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* p9100.c: P9100 frame buffer driver | 1 | /* p9100.c: P9100 frame buffer driver |
2 | * | 2 | * |
3 | * Copyright (C) 2003 David S. Miller (davem@redhat.com) | 3 | * Copyright (C) 2003, 2006 David S. Miller (davem@davemloft.net) |
4 | * Copyright 1999 Derrick J Brashear (shadow@dementia.org) | 4 | * Copyright 1999 Derrick J Brashear (shadow@dementia.org) |
5 | * | 5 | * |
6 | * Driver layout based loosely on tgafb.c, see that file for credits. | 6 | * Driver layout based loosely on tgafb.c, see that file for credits. |
@@ -17,8 +17,8 @@ | |||
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | 18 | ||
19 | #include <asm/io.h> | 19 | #include <asm/io.h> |
20 | #include <asm/sbus.h> | 20 | #include <asm/prom.h> |
21 | #include <asm/oplib.h> | 21 | #include <asm/of_device.h> |
22 | #include <asm/fbio.h> | 22 | #include <asm/fbio.h> |
23 | 23 | ||
24 | #include "sbuslib.h" | 24 | #include "sbuslib.h" |
@@ -72,60 +72,60 @@ static struct fb_ops p9100_ops = { | |||
72 | 72 | ||
73 | struct p9100_regs { | 73 | struct p9100_regs { |
74 | /* Registers for the system control */ | 74 | /* Registers for the system control */ |
75 | volatile u32 sys_base; | 75 | u32 sys_base; |
76 | volatile u32 sys_config; | 76 | u32 sys_config; |
77 | volatile u32 sys_intr; | 77 | u32 sys_intr; |
78 | volatile u32 sys_int_ena; | 78 | u32 sys_int_ena; |
79 | volatile u32 sys_alt_rd; | 79 | u32 sys_alt_rd; |
80 | volatile u32 sys_alt_wr; | 80 | u32 sys_alt_wr; |
81 | volatile u32 sys_xxx[58]; | 81 | u32 sys_xxx[58]; |
82 | 82 | ||
83 | /* Registers for the video control */ | 83 | /* Registers for the video control */ |
84 | volatile u32 vid_base; | 84 | u32 vid_base; |
85 | volatile u32 vid_hcnt; | 85 | u32 vid_hcnt; |
86 | volatile u32 vid_htotal; | 86 | u32 vid_htotal; |
87 | volatile u32 vid_hsync_rise; | 87 | u32 vid_hsync_rise; |
88 | volatile u32 vid_hblank_rise; | 88 | u32 vid_hblank_rise; |
89 | volatile u32 vid_hblank_fall; | 89 | u32 vid_hblank_fall; |
90 | volatile u32 vid_hcnt_preload; | 90 | u32 vid_hcnt_preload; |
91 | volatile u32 vid_vcnt; | 91 | u32 vid_vcnt; |
92 | volatile u32 vid_vlen; | 92 | u32 vid_vlen; |
93 | volatile u32 vid_vsync_rise; | 93 | u32 vid_vsync_rise; |
94 | volatile u32 vid_vblank_rise; | 94 | u32 vid_vblank_rise; |
95 | volatile u32 vid_vblank_fall; | 95 | u32 vid_vblank_fall; |
96 | volatile u32 vid_vcnt_preload; | 96 | u32 vid_vcnt_preload; |
97 | volatile u32 vid_screenpaint_addr; | 97 | u32 vid_screenpaint_addr; |
98 | volatile u32 vid_screenpaint_timectl1; | 98 | u32 vid_screenpaint_timectl1; |
99 | volatile u32 vid_screenpaint_qsfcnt; | 99 | u32 vid_screenpaint_qsfcnt; |
100 | volatile u32 vid_screenpaint_timectl2; | 100 | u32 vid_screenpaint_timectl2; |
101 | volatile u32 vid_xxx[15]; | 101 | u32 vid_xxx[15]; |
102 | 102 | ||
103 | /* Registers for the video control */ | 103 | /* Registers for the video control */ |
104 | volatile u32 vram_base; | 104 | u32 vram_base; |
105 | volatile u32 vram_memcfg; | 105 | u32 vram_memcfg; |
106 | volatile u32 vram_refresh_pd; | 106 | u32 vram_refresh_pd; |
107 | volatile u32 vram_refresh_cnt; | 107 | u32 vram_refresh_cnt; |
108 | volatile u32 vram_raslo_max; | 108 | u32 vram_raslo_max; |
109 | volatile u32 vram_raslo_cur; | 109 | u32 vram_raslo_cur; |
110 | volatile u32 pwrup_cfg; | 110 | u32 pwrup_cfg; |
111 | volatile u32 vram_xxx[25]; | 111 | u32 vram_xxx[25]; |
112 | 112 | ||
113 | /* Registers for IBM RGB528 Palette */ | 113 | /* Registers for IBM RGB528 Palette */ |
114 | volatile u32 ramdac_cmap_wridx; | 114 | u32 ramdac_cmap_wridx; |
115 | volatile u32 ramdac_palette_data; | 115 | u32 ramdac_palette_data; |
116 | volatile u32 ramdac_pixel_mask; | 116 | u32 ramdac_pixel_mask; |
117 | volatile u32 ramdac_palette_rdaddr; | 117 | u32 ramdac_palette_rdaddr; |
118 | volatile u32 ramdac_idx_lo; | 118 | u32 ramdac_idx_lo; |
119 | volatile u32 ramdac_idx_hi; | 119 | u32 ramdac_idx_hi; |
120 | volatile u32 ramdac_idx_data; | 120 | u32 ramdac_idx_data; |
121 | volatile u32 ramdac_idx_ctl; | 121 | u32 ramdac_idx_ctl; |
122 | volatile u32 ramdac_xxx[1784]; | 122 | u32 ramdac_xxx[1784]; |
123 | }; | 123 | }; |
124 | 124 | ||
125 | struct p9100_cmd_parameng { | 125 | struct p9100_cmd_parameng { |
126 | volatile u32 parameng_status; | 126 | u32 parameng_status; |
127 | volatile u32 parameng_bltcmd; | 127 | u32 parameng_bltcmd; |
128 | volatile u32 parameng_quadcmd; | 128 | u32 parameng_quadcmd; |
129 | }; | 129 | }; |
130 | 130 | ||
131 | struct p9100_par { | 131 | struct p9100_par { |
@@ -136,9 +136,8 @@ struct p9100_par { | |||
136 | #define P9100_FLAG_BLANKED 0x00000001 | 136 | #define P9100_FLAG_BLANKED 0x00000001 |
137 | 137 | ||
138 | unsigned long physbase; | 138 | unsigned long physbase; |
139 | unsigned long which_io; | ||
139 | unsigned long fbsize; | 140 | unsigned long fbsize; |
140 | |||
141 | struct sbus_dev *sdev; | ||
142 | }; | 141 | }; |
143 | 142 | ||
144 | /** | 143 | /** |
@@ -227,8 +226,7 @@ static int p9100_mmap(struct fb_info *info, struct vm_area_struct *vma) | |||
227 | 226 | ||
228 | return sbusfb_mmap_helper(p9100_mmap_map, | 227 | return sbusfb_mmap_helper(p9100_mmap_map, |
229 | par->physbase, par->fbsize, | 228 | par->physbase, par->fbsize, |
230 | par->sdev->reg_addrs[0].which_io, | 229 | par->which_io, vma); |
231 | vma); | ||
232 | } | 230 | } |
233 | 231 | ||
234 | static int p9100_ioctl(struct fb_info *info, unsigned int cmd, | 232 | static int p9100_ioctl(struct fb_info *info, unsigned int cmd, |
@@ -245,12 +243,9 @@ static int p9100_ioctl(struct fb_info *info, unsigned int cmd, | |||
245 | * Initialisation | 243 | * Initialisation |
246 | */ | 244 | */ |
247 | 245 | ||
248 | static void | 246 | static void p9100_init_fix(struct fb_info *info, int linebytes, struct device_node *dp) |
249 | p9100_init_fix(struct fb_info *info, int linebytes) | ||
250 | { | 247 | { |
251 | struct p9100_par *par = (struct p9100_par *)info->par; | 248 | strlcpy(info->fix.id, dp->name, sizeof(info->fix.id)); |
252 | |||
253 | strlcpy(info->fix.id, par->sdev->prom_name, sizeof(info->fix.id)); | ||
254 | 249 | ||
255 | info->fix.type = FB_TYPE_PACKED_PIXELS; | 250 | info->fix.type = FB_TYPE_PACKED_PIXELS; |
256 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; | 251 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; |
@@ -263,121 +258,137 @@ p9100_init_fix(struct fb_info *info, int linebytes) | |||
263 | struct all_info { | 258 | struct all_info { |
264 | struct fb_info info; | 259 | struct fb_info info; |
265 | struct p9100_par par; | 260 | struct p9100_par par; |
266 | struct list_head list; | ||
267 | }; | 261 | }; |
268 | static LIST_HEAD(p9100_list); | ||
269 | 262 | ||
270 | static void p9100_init_one(struct sbus_dev *sdev) | 263 | static int __devinit p9100_init_one(struct of_device *op) |
271 | { | 264 | { |
265 | struct device_node *dp = op->node; | ||
272 | struct all_info *all; | 266 | struct all_info *all; |
273 | int linebytes; | 267 | int linebytes, err; |
274 | |||
275 | all = kmalloc(sizeof(*all), GFP_KERNEL); | ||
276 | if (!all) { | ||
277 | printk(KERN_ERR "p9100: Cannot allocate memory.\n"); | ||
278 | return; | ||
279 | } | ||
280 | memset(all, 0, sizeof(*all)); | ||
281 | 268 | ||
282 | INIT_LIST_HEAD(&all->list); | 269 | all = kzalloc(sizeof(*all), GFP_KERNEL); |
270 | if (!all) | ||
271 | return -ENOMEM; | ||
283 | 272 | ||
284 | spin_lock_init(&all->par.lock); | 273 | spin_lock_init(&all->par.lock); |
285 | all->par.sdev = sdev; | ||
286 | 274 | ||
287 | /* This is the framebuffer and the only resource apps can mmap. */ | 275 | /* This is the framebuffer and the only resource apps can mmap. */ |
288 | all->par.physbase = sdev->reg_addrs[2].phys_addr; | 276 | all->par.physbase = op->resource[2].start; |
277 | all->par.which_io = op->resource[2].flags & IORESOURCE_BITS; | ||
289 | 278 | ||
290 | sbusfb_fill_var(&all->info.var, sdev->prom_node, 8); | 279 | sbusfb_fill_var(&all->info.var, dp->node, 8); |
291 | all->info.var.red.length = 8; | 280 | all->info.var.red.length = 8; |
292 | all->info.var.green.length = 8; | 281 | all->info.var.green.length = 8; |
293 | all->info.var.blue.length = 8; | 282 | all->info.var.blue.length = 8; |
294 | 283 | ||
295 | linebytes = prom_getintdefault(sdev->prom_node, "linebytes", | 284 | linebytes = of_getintprop_default(dp, "linebytes", |
296 | all->info.var.xres); | 285 | all->info.var.xres); |
297 | all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); | 286 | all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); |
298 | 287 | ||
299 | all->par.regs = sbus_ioremap(&sdev->resource[0], 0, | 288 | all->par.regs = of_ioremap(&op->resource[0], 0, |
300 | sizeof(struct p9100_regs), "p9100 regs"); | 289 | sizeof(struct p9100_regs), "p9100 regs"); |
290 | if (!all->par.regs) { | ||
291 | kfree(all); | ||
292 | return -ENOMEM; | ||
293 | } | ||
301 | 294 | ||
302 | all->info.flags = FBINFO_DEFAULT; | 295 | all->info.flags = FBINFO_DEFAULT; |
303 | all->info.fbops = &p9100_ops; | 296 | all->info.fbops = &p9100_ops; |
304 | #ifdef CONFIG_SPARC32 | 297 | all->info.screen_base = of_ioremap(&op->resource[2], 0, |
305 | all->info.screen_base = (char __iomem *) | 298 | all->par.fbsize, "p9100 ram"); |
306 | prom_getintdefault(sdev->prom_node, "address", 0); | 299 | if (!all->info.screen_base) { |
307 | #endif | 300 | of_iounmap(all->par.regs, sizeof(struct p9100_regs)); |
308 | if (!all->info.screen_base) | 301 | kfree(all); |
309 | all->info.screen_base = sbus_ioremap(&sdev->resource[2], 0, | 302 | return -ENOMEM; |
310 | all->par.fbsize, "p9100 ram"); | 303 | } |
311 | all->info.par = &all->par; | 304 | all->info.par = &all->par; |
312 | 305 | ||
313 | p9100_blank(0, &all->info); | 306 | p9100_blank(0, &all->info); |
314 | 307 | ||
315 | if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { | 308 | if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { |
316 | printk(KERN_ERR "p9100: Could not allocate color map.\n"); | 309 | of_iounmap(all->par.regs, sizeof(struct p9100_regs)); |
310 | of_iounmap(all->info.screen_base, all->par.fbsize); | ||
317 | kfree(all); | 311 | kfree(all); |
318 | return; | 312 | return -ENOMEM; |
319 | } | 313 | } |
320 | 314 | ||
321 | p9100_init_fix(&all->info, linebytes); | 315 | p9100_init_fix(&all->info, linebytes, dp); |
322 | 316 | ||
323 | if (register_framebuffer(&all->info) < 0) { | 317 | err = register_framebuffer(&all->info); |
324 | printk(KERN_ERR "p9100: Could not register framebuffer.\n"); | 318 | if (err < 0) { |
325 | fb_dealloc_cmap(&all->info.cmap); | 319 | fb_dealloc_cmap(&all->info.cmap); |
320 | of_iounmap(all->par.regs, sizeof(struct p9100_regs)); | ||
321 | of_iounmap(all->info.screen_base, all->par.fbsize); | ||
326 | kfree(all); | 322 | kfree(all); |
327 | return; | 323 | return err; |
328 | } | 324 | } |
329 | fb_set_cmap(&all->info.cmap, &all->info); | 325 | fb_set_cmap(&all->info.cmap, &all->info); |
330 | 326 | ||
331 | list_add(&all->list, &p9100_list); | 327 | dev_set_drvdata(&op->dev, all); |
328 | |||
329 | printk("%s: p9100 at %lx:%lx\n", | ||
330 | dp->full_name, | ||
331 | all->par.which_io, all->par.physbase); | ||
332 | 332 | ||
333 | printk("p9100: %s at %lx:%lx\n", | 333 | return 0; |
334 | sdev->prom_name, | ||
335 | (long) sdev->reg_addrs[0].which_io, | ||
336 | (long) sdev->reg_addrs[0].phys_addr); | ||
337 | } | 334 | } |
338 | 335 | ||
339 | int __init p9100_init(void) | 336 | static int __devinit p9100_probe(struct of_device *dev, const struct of_device_id *match) |
340 | { | 337 | { |
341 | struct sbus_bus *sbus; | 338 | struct of_device *op = to_of_device(&dev->dev); |
342 | struct sbus_dev *sdev; | ||
343 | 339 | ||
344 | if (fb_get_options("p9100fb", NULL)) | 340 | return p9100_init_one(op); |
345 | return -ENODEV; | 341 | } |
346 | 342 | ||
347 | for_all_sbusdev(sdev, sbus) { | 343 | static int __devexit p9100_remove(struct of_device *dev) |
348 | if (!strcmp(sdev->prom_name, "p9100")) | 344 | { |
349 | p9100_init_one(sdev); | 345 | struct all_info *all = dev_get_drvdata(&dev->dev); |
350 | } | 346 | |
347 | unregister_framebuffer(&all->info); | ||
348 | fb_dealloc_cmap(&all->info.cmap); | ||
349 | |||
350 | of_iounmap(all->par.regs, sizeof(struct p9100_regs)); | ||
351 | of_iounmap(all->info.screen_base, all->par.fbsize); | ||
352 | |||
353 | kfree(all); | ||
354 | |||
355 | dev_set_drvdata(&dev->dev, NULL); | ||
351 | 356 | ||
352 | return 0; | 357 | return 0; |
353 | } | 358 | } |
354 | 359 | ||
355 | void __exit p9100_exit(void) | 360 | static struct of_device_id p9100_match[] = { |
356 | { | 361 | { |
357 | struct list_head *pos, *tmp; | 362 | .name = "p9100", |
363 | }, | ||
364 | {}, | ||
365 | }; | ||
366 | MODULE_DEVICE_TABLE(of, p9100_match); | ||
358 | 367 | ||
359 | list_for_each_safe(pos, tmp, &p9100_list) { | 368 | static struct of_platform_driver p9100_driver = { |
360 | struct all_info *all = list_entry(pos, typeof(*all), list); | 369 | .name = "p9100", |
370 | .match_table = p9100_match, | ||
371 | .probe = p9100_probe, | ||
372 | .remove = __devexit_p(p9100_remove), | ||
373 | }; | ||
361 | 374 | ||
362 | unregister_framebuffer(&all->info); | 375 | static int __init p9100_init(void) |
363 | fb_dealloc_cmap(&all->info.cmap); | 376 | { |
364 | kfree(all); | 377 | if (fb_get_options("p9100fb", NULL)) |
365 | } | 378 | return -ENODEV; |
379 | |||
380 | return of_register_driver(&p9100_driver, &of_bus_type); | ||
366 | } | 381 | } |
367 | 382 | ||
368 | int __init | 383 | static void __exit p9100_exit(void) |
369 | p9100_setup(char *arg) | ||
370 | { | 384 | { |
371 | /* No cmdline options yet... */ | 385 | of_unregister_driver(&p9100_driver); |
372 | return 0; | ||
373 | } | 386 | } |
374 | 387 | ||
375 | module_init(p9100_init); | 388 | module_init(p9100_init); |
376 | |||
377 | #ifdef MODULE | ||
378 | module_exit(p9100_exit); | 389 | module_exit(p9100_exit); |
379 | #endif | ||
380 | 390 | ||
381 | MODULE_DESCRIPTION("framebuffer driver for P9100 chipsets"); | 391 | MODULE_DESCRIPTION("framebuffer driver for P9100 chipsets"); |
382 | MODULE_AUTHOR("David S. Miller <davem@redhat.com>"); | 392 | MODULE_AUTHOR("David S. Miller <davem@davemloft.net>"); |
393 | MODULE_VERSION("2.0"); | ||
383 | MODULE_LICENSE("GPL"); | 394 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c index 335e37465559..450e802e0aa8 100644 --- a/drivers/video/platinumfb.c +++ b/drivers/video/platinumfb.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * more details. | 17 | * more details. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/module.h> | 20 | #include <linux/module.h> |
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
23 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
diff --git a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c index 4e963930b50a..49a203e1591c 100644 --- a/drivers/video/pm2fb.c +++ b/drivers/video/pm2fb.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/moduleparam.h> | 31 | #include <linux/moduleparam.h> |
33 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
diff --git a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c index 52c18a35fb41..0e0f977b05ee 100644 --- a/drivers/video/pm3fb.c +++ b/drivers/video/pm3fb.c | |||
@@ -52,7 +52,6 @@ | |||
52 | * Wed Feb 21 14:47:06 CET 2001, v 1.0.0: First working version | 52 | * Wed Feb 21 14:47:06 CET 2001, v 1.0.0: First working version |
53 | */ | 53 | */ |
54 | 54 | ||
55 | #include <linux/config.h> | ||
56 | #include <linux/module.h> | 55 | #include <linux/module.h> |
57 | #include <linux/kernel.h> | 56 | #include <linux/kernel.h> |
58 | #include <linux/errno.h> | 57 | #include <linux/errno.h> |
diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c index ec4bacf9dd2e..4a1e0e856920 100644 --- a/drivers/video/pvr2fb.c +++ b/drivers/video/pvr2fb.c | |||
@@ -56,7 +56,6 @@ | |||
56 | #include <linux/tty.h> | 56 | #include <linux/tty.h> |
57 | #include <linux/slab.h> | 57 | #include <linux/slab.h> |
58 | #include <linux/delay.h> | 58 | #include <linux/delay.h> |
59 | #include <linux/config.h> | ||
60 | #include <linux/interrupt.h> | 59 | #include <linux/interrupt.h> |
61 | #include <linux/fb.h> | 60 | #include <linux/fb.h> |
62 | #include <linux/init.h> | 61 | #include <linux/init.h> |
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 809fc5eefc15..54663a9baf43 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/module.h> | 25 | #include <linux/module.h> |
27 | #include <linux/moduleparam.h> | 26 | #include <linux/moduleparam.h> |
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index 12af58c5cf1f..2788655e6e7d 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c | |||
@@ -29,7 +29,6 @@ | |||
29 | * doublescan modes are broken | 29 | * doublescan modes are broken |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/config.h> | ||
33 | #include <linux/module.h> | 32 | #include <linux/module.h> |
34 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
35 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
diff --git a/drivers/video/riva/rivafb-i2c.c b/drivers/video/riva/rivafb-i2c.c index 8b1967fc116a..9751c37c0bfd 100644 --- a/drivers/video/riva/rivafb-i2c.c +++ b/drivers/video/riva/rivafb-i2c.c | |||
@@ -12,7 +12,6 @@ | |||
12 | * for more details. | 12 | * for more details. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
18 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
diff --git a/drivers/video/riva/rivafb.h b/drivers/video/riva/rivafb.h index 440ff445689b..7fa13fc9c413 100644 --- a/drivers/video/riva/rivafb.h +++ b/drivers/video/riva/rivafb.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef __RIVAFB_H | 1 | #ifndef __RIVAFB_H |
2 | #define __RIVAFB_H | 2 | #define __RIVAFB_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/fb.h> | 4 | #include <linux/fb.h> |
6 | #include <video/vga.h> | 5 | #include <video/vga.h> |
7 | #include <linux/i2c.h> | 6 | #include <linux/i2c.h> |
diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c index feec47bdd479..a5333c190789 100644 --- a/drivers/video/s1d13xxxfb.c +++ b/drivers/video/s1d13xxxfb.c | |||
@@ -28,7 +28,6 @@ | |||
28 | * more details. | 28 | * more details. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | #include <linux/module.h> | 31 | #include <linux/module.h> |
33 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
34 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c index d9831fd42341..553fd84af44f 100644 --- a/drivers/video/sa1100fb.c +++ b/drivers/video/sa1100fb.c | |||
@@ -160,7 +160,6 @@ | |||
160 | * - Add patch 681/1 and clean up stork definitions. | 160 | * - Add patch 681/1 and clean up stork definitions. |
161 | */ | 161 | */ |
162 | 162 | ||
163 | #include <linux/config.h> | ||
164 | #include <linux/module.h> | 163 | #include <linux/module.h> |
165 | #include <linux/kernel.h> | 164 | #include <linux/kernel.h> |
166 | #include <linux/sched.h> | 165 | #include <linux/sched.h> |
diff --git a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c index 21debed863ac..e83befd16d63 100644 --- a/drivers/video/savage/savagefb-i2c.c +++ b/drivers/video/savage/savagefb-i2c.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * for more details. | 10 | * for more details. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c index 78883cf66a4d..4729af477fbf 100644 --- a/drivers/video/savage/savagefb_driver.c +++ b/drivers/video/savage/savagefb_driver.c | |||
@@ -41,7 +41,6 @@ | |||
41 | * | 41 | * |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/config.h> | ||
45 | #include <linux/module.h> | 44 | #include <linux/module.h> |
46 | #include <linux/kernel.h> | 45 | #include <linux/kernel.h> |
47 | #include <linux/errno.h> | 46 | #include <linux/errno.h> |
diff --git a/drivers/video/sgivwfb.c b/drivers/video/sgivwfb.c index c0cc5e3ba7b5..ebb6756aea08 100644 --- a/drivers/video/sgivwfb.c +++ b/drivers/video/sgivwfb.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * more details. | 9 | * more details. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
diff --git a/drivers/video/sis/init.h b/drivers/video/sis/init.h index 634c0a9d219b..7ecab87cef02 100644 --- a/drivers/video/sis/init.h +++ b/drivers/video/sis/init.h | |||
@@ -73,7 +73,6 @@ | |||
73 | #ifdef SIS_CP | 73 | #ifdef SIS_CP |
74 | #undef SIS_CP | 74 | #undef SIS_CP |
75 | #endif | 75 | #endif |
76 | #include <linux/config.h> | ||
77 | #include <linux/version.h> | 76 | #include <linux/version.h> |
78 | #include <linux/types.h> | 77 | #include <linux/types.h> |
79 | #include <asm/io.h> | 78 | #include <asm/io.h> |
diff --git a/drivers/video/sis/init301.c b/drivers/video/sis/init301.c index c3e070a6effd..f13faddc6181 100644 --- a/drivers/video/sis/init301.c +++ b/drivers/video/sis/init301.c | |||
@@ -8043,8 +8043,8 @@ SiS_SetCHTVReg(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short | |||
8043 | SiS_SetCH700x(SiS_Pr,0x01,0x28); | 8043 | SiS_SetCH700x(SiS_Pr,0x01,0x28); |
8044 | 8044 | ||
8045 | /* Set video bandwidth | 8045 | /* Set video bandwidth |
8046 | High bandwith Luma composite video filter(S0=1) | 8046 | High bandwidth Luma composite video filter(S0=1) |
8047 | low bandwith Luma S-video filter (S2-1=00) | 8047 | low bandwidth Luma S-video filter (S2-1=00) |
8048 | disable peak filter in S-video channel (S3=0) | 8048 | disable peak filter in S-video channel (S3=0) |
8049 | high bandwidth Chroma Filter (S5-4=11) | 8049 | high bandwidth Chroma Filter (S5-4=11) |
8050 | =00110001=0x31 | 8050 | =00110001=0x31 |
diff --git a/drivers/video/sis/init301.h b/drivers/video/sis/init301.h index f475b21a85cf..bc321dc57e92 100644 --- a/drivers/video/sis/init301.h +++ b/drivers/video/sis/init301.h | |||
@@ -67,7 +67,6 @@ | |||
67 | #ifdef SIS_CP | 67 | #ifdef SIS_CP |
68 | #undef SIS_CP | 68 | #undef SIS_CP |
69 | #endif | 69 | #endif |
70 | #include <linux/config.h> | ||
71 | #include <linux/version.h> | 70 | #include <linux/version.h> |
72 | #include <linux/types.h> | 71 | #include <linux/types.h> |
73 | #include <asm/io.h> | 72 | #include <asm/io.h> |
diff --git a/drivers/video/sis/initextlfb.c b/drivers/video/sis/initextlfb.c index cc856d90903c..09f5d758b6c0 100644 --- a/drivers/video/sis/initextlfb.c +++ b/drivers/video/sis/initextlfb.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include "vgatypes.h" | 30 | #include "vgatypes.h" |
31 | #include "vstruct.h" | 31 | #include "vstruct.h" |
32 | 32 | ||
33 | #include <linux/config.h> | ||
34 | #include <linux/version.h> | 33 | #include <linux/version.h> |
35 | #include <linux/types.h> | 34 | #include <linux/types.h> |
36 | #include <linux/fb.h> | 35 | #include <linux/fb.h> |
diff --git a/drivers/video/sis/osdef.h b/drivers/video/sis/osdef.h index 841ca3190cd4..f59568020eb2 100644 --- a/drivers/video/sis/osdef.h +++ b/drivers/video/sis/osdef.h | |||
@@ -90,7 +90,6 @@ | |||
90 | /**********************************************************************/ | 90 | /**********************************************************************/ |
91 | 91 | ||
92 | #ifdef SIS_LINUX_KERNEL | 92 | #ifdef SIS_LINUX_KERNEL |
93 | #include <linux/config.h> | ||
94 | #include <linux/version.h> | 93 | #include <linux/version.h> |
95 | 94 | ||
96 | #ifdef CONFIG_FB_SIS_300 | 95 | #ifdef CONFIG_FB_SIS_300 |
diff --git a/drivers/video/sis/sis.h b/drivers/video/sis/sis.h index 0b6e625d7331..a259446ca7fe 100644 --- a/drivers/video/sis/sis.h +++ b/drivers/video/sis/sis.h | |||
@@ -24,7 +24,6 @@ | |||
24 | #ifndef _SIS_H_ | 24 | #ifndef _SIS_H_ |
25 | #define _SIS_H_ | 25 | #define _SIS_H_ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | #include <linux/version.h> | 27 | #include <linux/version.h> |
29 | 28 | ||
30 | #include "osdef.h" | 29 | #include "osdef.h" |
diff --git a/drivers/video/sis/sis_accel.c b/drivers/video/sis/sis_accel.c index bab933e6c6a6..3b7ce032e2ed 100644 --- a/drivers/video/sis/sis_accel.c +++ b/drivers/video/sis/sis_accel.c | |||
@@ -28,7 +28,6 @@ | |||
28 | * for more information and updates) | 28 | * for more information and updates) |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/config.h> | ||
32 | #include <linux/version.h> | 31 | #include <linux/version.h> |
33 | #include <linux/module.h> | 32 | #include <linux/module.h> |
34 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c index c63c0e721b82..b848ca7db7f9 100644 --- a/drivers/video/sis/sis_main.c +++ b/drivers/video/sis/sis_main.c | |||
@@ -33,7 +33,6 @@ | |||
33 | * | 33 | * |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/config.h> | ||
37 | #include <linux/version.h> | 36 | #include <linux/version.h> |
38 | #include <linux/module.h> | 37 | #include <linux/module.h> |
39 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) | 38 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) |
diff --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c index c44de90ca12e..dad54e73147b 100644 --- a/drivers/video/sstfb.c +++ b/drivers/video/sstfb.c | |||
@@ -82,7 +82,6 @@ | |||
82 | * Includes | 82 | * Includes |
83 | */ | 83 | */ |
84 | 84 | ||
85 | #include <linux/config.h> | ||
86 | #include <linux/string.h> | 85 | #include <linux/string.h> |
87 | #include <linux/kernel.h> | 86 | #include <linux/kernel.h> |
88 | #include <linux/module.h> | 87 | #include <linux/module.h> |
diff --git a/drivers/video/stifb.c b/drivers/video/stifb.c index 4a292aae6eb2..3e16e2d9d55d 100644 --- a/drivers/video/stifb.c +++ b/drivers/video/stifb.c | |||
@@ -54,7 +54,6 @@ | |||
54 | #undef DEBUG_STIFB_REGS /* debug sti register accesses */ | 54 | #undef DEBUG_STIFB_REGS /* debug sti register accesses */ |
55 | 55 | ||
56 | 56 | ||
57 | #include <linux/config.h> | ||
58 | #include <linux/module.h> | 57 | #include <linux/module.h> |
59 | #include <linux/kernel.h> | 58 | #include <linux/kernel.h> |
60 | #include <linux/errno.h> | 59 | #include <linux/errno.h> |
diff --git a/drivers/video/sun3fb.c b/drivers/video/sun3fb.c index 9b36b9df535f..e046e20f02b9 100644 --- a/drivers/video/sun3fb.c +++ b/drivers/video/sun3fb.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * more details. | 25 | * more details. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
31 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
diff --git a/drivers/video/tcx.c b/drivers/video/tcx.c index 95b918229d9b..6990ab11cd06 100644 --- a/drivers/video/tcx.c +++ b/drivers/video/tcx.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* tcx.c: TCX frame buffer driver | 1 | /* tcx.c: TCX frame buffer driver |
2 | * | 2 | * |
3 | * Copyright (C) 2003 David S. Miller (davem@redhat.com) | 3 | * Copyright (C) 2003, 2006 David S. Miller (davem@davemloft.net) |
4 | * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz) | 4 | * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz) |
5 | * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) | 5 | * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) |
6 | * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) | 6 | * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) |
@@ -19,8 +19,8 @@ | |||
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | 20 | ||
21 | #include <asm/io.h> | 21 | #include <asm/io.h> |
22 | #include <asm/sbus.h> | 22 | #include <asm/prom.h> |
23 | #include <asm/oplib.h> | 23 | #include <asm/of_device.h> |
24 | #include <asm/fbio.h> | 24 | #include <asm/fbio.h> |
25 | 25 | ||
26 | #include "sbuslib.h" | 26 | #include "sbuslib.h" |
@@ -77,32 +77,32 @@ static struct fb_ops tcx_ops = { | |||
77 | 77 | ||
78 | /* The contents are unknown */ | 78 | /* The contents are unknown */ |
79 | struct tcx_tec { | 79 | struct tcx_tec { |
80 | volatile u32 tec_matrix; | 80 | u32 tec_matrix; |
81 | volatile u32 tec_clip; | 81 | u32 tec_clip; |
82 | volatile u32 tec_vdc; | 82 | u32 tec_vdc; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | struct tcx_thc { | 85 | struct tcx_thc { |
86 | volatile u32 thc_rev; | 86 | u32 thc_rev; |
87 | u32 thc_pad0[511]; | 87 | u32 thc_pad0[511]; |
88 | volatile u32 thc_hs; /* hsync timing */ | 88 | u32 thc_hs; /* hsync timing */ |
89 | volatile u32 thc_hsdvs; | 89 | u32 thc_hsdvs; |
90 | volatile u32 thc_hd; | 90 | u32 thc_hd; |
91 | volatile u32 thc_vs; /* vsync timing */ | 91 | u32 thc_vs; /* vsync timing */ |
92 | volatile u32 thc_vd; | 92 | u32 thc_vd; |
93 | volatile u32 thc_refresh; | 93 | u32 thc_refresh; |
94 | volatile u32 thc_misc; | 94 | u32 thc_misc; |
95 | u32 thc_pad1[56]; | 95 | u32 thc_pad1[56]; |
96 | volatile u32 thc_cursxy; /* cursor x,y position (16 bits each) */ | 96 | u32 thc_cursxy; /* cursor x,y position (16 bits each) */ |
97 | volatile u32 thc_cursmask[32]; /* cursor mask bits */ | 97 | u32 thc_cursmask[32]; /* cursor mask bits */ |
98 | volatile u32 thc_cursbits[32]; /* what to show where mask enabled */ | 98 | u32 thc_cursbits[32]; /* what to show where mask enabled */ |
99 | }; | 99 | }; |
100 | 100 | ||
101 | struct bt_regs { | 101 | struct bt_regs { |
102 | volatile u32 addr; | 102 | u32 addr; |
103 | volatile u32 color_map; | 103 | u32 color_map; |
104 | volatile u32 control; | 104 | u32 control; |
105 | volatile u32 cursor; | 105 | u32 cursor; |
106 | }; | 106 | }; |
107 | 107 | ||
108 | #define TCX_MMAP_ENTRIES 14 | 108 | #define TCX_MMAP_ENTRIES 14 |
@@ -112,24 +112,23 @@ struct tcx_par { | |||
112 | struct bt_regs __iomem *bt; | 112 | struct bt_regs __iomem *bt; |
113 | struct tcx_thc __iomem *thc; | 113 | struct tcx_thc __iomem *thc; |
114 | struct tcx_tec __iomem *tec; | 114 | struct tcx_tec __iomem *tec; |
115 | volatile u32 __iomem *cplane; | 115 | u32 __iomem *cplane; |
116 | 116 | ||
117 | u32 flags; | 117 | u32 flags; |
118 | #define TCX_FLAG_BLANKED 0x00000001 | 118 | #define TCX_FLAG_BLANKED 0x00000001 |
119 | 119 | ||
120 | unsigned long physbase; | 120 | unsigned long physbase; |
121 | unsigned long which_io; | ||
121 | unsigned long fbsize; | 122 | unsigned long fbsize; |
122 | 123 | ||
123 | struct sbus_mmap_map mmap_map[TCX_MMAP_ENTRIES]; | 124 | struct sbus_mmap_map mmap_map[TCX_MMAP_ENTRIES]; |
124 | int lowdepth; | 125 | int lowdepth; |
125 | |||
126 | struct sbus_dev *sdev; | ||
127 | }; | 126 | }; |
128 | 127 | ||
129 | /* Reset control plane so that WID is 8-bit plane. */ | 128 | /* Reset control plane so that WID is 8-bit plane. */ |
130 | static void __tcx_set_control_plane (struct tcx_par *par) | 129 | static void __tcx_set_control_plane (struct tcx_par *par) |
131 | { | 130 | { |
132 | volatile u32 __iomem *p, *pend; | 131 | u32 __iomem *p, *pend; |
133 | 132 | ||
134 | if (par->lowdepth) | 133 | if (par->lowdepth) |
135 | return; | 134 | return; |
@@ -307,8 +306,7 @@ static int tcx_mmap(struct fb_info *info, struct vm_area_struct *vma) | |||
307 | 306 | ||
308 | return sbusfb_mmap_helper(par->mmap_map, | 307 | return sbusfb_mmap_helper(par->mmap_map, |
309 | par->physbase, par->fbsize, | 308 | par->physbase, par->fbsize, |
310 | par->sdev->reg_addrs[0].which_io, | 309 | par->which_io, vma); |
311 | vma); | ||
312 | } | 310 | } |
313 | 311 | ||
314 | static int tcx_ioctl(struct fb_info *info, unsigned int cmd, | 312 | static int tcx_ioctl(struct fb_info *info, unsigned int cmd, |
@@ -350,48 +348,71 @@ tcx_init_fix(struct fb_info *info, int linebytes) | |||
350 | struct all_info { | 348 | struct all_info { |
351 | struct fb_info info; | 349 | struct fb_info info; |
352 | struct tcx_par par; | 350 | struct tcx_par par; |
353 | struct list_head list; | ||
354 | }; | 351 | }; |
355 | static LIST_HEAD(tcx_list); | ||
356 | 352 | ||
357 | static void tcx_init_one(struct sbus_dev *sdev) | 353 | static void tcx_unmap_regs(struct all_info *all) |
358 | { | 354 | { |
359 | struct all_info *all; | 355 | if (all->par.tec) |
360 | int linebytes, i; | 356 | of_iounmap(all->par.tec, sizeof(struct tcx_tec)); |
357 | if (all->par.thc) | ||
358 | of_iounmap(all->par.thc, sizeof(struct tcx_thc)); | ||
359 | if (all->par.bt) | ||
360 | of_iounmap(all->par.bt, sizeof(struct bt_regs)); | ||
361 | if (all->par.cplane) | ||
362 | of_iounmap(all->par.cplane, all->par.fbsize * sizeof(u32)); | ||
363 | if (all->info.screen_base) | ||
364 | of_iounmap(all->info.screen_base, all->par.fbsize); | ||
365 | } | ||
361 | 366 | ||
362 | all = kmalloc(sizeof(*all), GFP_KERNEL); | 367 | static int __devinit tcx_init_one(struct of_device *op) |
363 | if (!all) { | 368 | { |
364 | printk(KERN_ERR "tcx: Cannot allocate memory.\n"); | 369 | struct device_node *dp = op->node; |
365 | return; | 370 | struct all_info *all; |
366 | } | 371 | int linebytes, i, err; |
367 | memset(all, 0, sizeof(*all)); | ||
368 | 372 | ||
369 | INIT_LIST_HEAD(&all->list); | 373 | all = kzalloc(sizeof(*all), GFP_KERNEL); |
374 | if (!all) | ||
375 | return -ENOMEM; | ||
370 | 376 | ||
371 | spin_lock_init(&all->par.lock); | 377 | spin_lock_init(&all->par.lock); |
372 | all->par.sdev = sdev; | ||
373 | 378 | ||
374 | all->par.lowdepth = prom_getbool(sdev->prom_node, "tcx-8-bit"); | 379 | all->par.lowdepth = |
380 | (of_find_property(dp, "tcx-8-bit", NULL) != NULL); | ||
375 | 381 | ||
376 | sbusfb_fill_var(&all->info.var, sdev->prom_node, 8); | 382 | sbusfb_fill_var(&all->info.var, dp->node, 8); |
377 | all->info.var.red.length = 8; | 383 | all->info.var.red.length = 8; |
378 | all->info.var.green.length = 8; | 384 | all->info.var.green.length = 8; |
379 | all->info.var.blue.length = 8; | 385 | all->info.var.blue.length = 8; |
380 | 386 | ||
381 | linebytes = prom_getintdefault(sdev->prom_node, "linebytes", | 387 | linebytes = of_getintprop_default(dp, "linebytes", |
382 | all->info.var.xres); | 388 | all->info.var.xres); |
383 | all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); | 389 | all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); |
384 | 390 | ||
385 | all->par.tec = sbus_ioremap(&sdev->resource[7], 0, | 391 | all->par.tec = of_ioremap(&op->resource[7], 0, |
386 | sizeof(struct tcx_tec), "tcx tec"); | 392 | sizeof(struct tcx_tec), "tcx tec"); |
387 | all->par.thc = sbus_ioremap(&sdev->resource[9], 0, | 393 | all->par.thc = of_ioremap(&op->resource[9], 0, |
388 | sizeof(struct tcx_thc), "tcx thc"); | 394 | sizeof(struct tcx_thc), "tcx thc"); |
389 | all->par.bt = sbus_ioremap(&sdev->resource[8], 0, | 395 | all->par.bt = of_ioremap(&op->resource[8], 0, |
390 | sizeof(struct bt_regs), "tcx dac"); | 396 | sizeof(struct bt_regs), "tcx dac"); |
397 | all->info.screen_base = of_ioremap(&op->resource[0], 0, | ||
398 | all->par.fbsize, "tcx ram"); | ||
399 | if (!all->par.tec || !all->par.thc || | ||
400 | !all->par.bt || !all->info.screen_base) { | ||
401 | tcx_unmap_regs(all); | ||
402 | kfree(all); | ||
403 | return -ENOMEM; | ||
404 | } | ||
405 | |||
391 | memcpy(&all->par.mmap_map, &__tcx_mmap_map, sizeof(all->par.mmap_map)); | 406 | memcpy(&all->par.mmap_map, &__tcx_mmap_map, sizeof(all->par.mmap_map)); |
392 | if (!all->par.lowdepth) { | 407 | if (!all->par.lowdepth) { |
393 | all->par.cplane = sbus_ioremap(&sdev->resource[4], 0, | 408 | all->par.cplane = of_ioremap(&op->resource[4], 0, |
394 | all->par.fbsize * sizeof(u32), "tcx cplane"); | 409 | all->par.fbsize * sizeof(u32), |
410 | "tcx cplane"); | ||
411 | if (!all->par.cplane) { | ||
412 | tcx_unmap_regs(all); | ||
413 | kfree(all); | ||
414 | return -ENOMEM; | ||
415 | } | ||
395 | } else { | 416 | } else { |
396 | all->par.mmap_map[1].size = SBUS_MMAP_EMPTY; | 417 | all->par.mmap_map[1].size = SBUS_MMAP_EMPTY; |
397 | all->par.mmap_map[4].size = SBUS_MMAP_EMPTY; | 418 | all->par.mmap_map[4].size = SBUS_MMAP_EMPTY; |
@@ -400,6 +421,8 @@ static void tcx_init_one(struct sbus_dev *sdev) | |||
400 | } | 421 | } |
401 | 422 | ||
402 | all->par.physbase = 0; | 423 | all->par.physbase = 0; |
424 | all->par.which_io = op->resource[0].flags & IORESOURCE_BITS; | ||
425 | |||
403 | for (i = 0; i < TCX_MMAP_ENTRIES; i++) { | 426 | for (i = 0; i < TCX_MMAP_ENTRIES; i++) { |
404 | int j; | 427 | int j; |
405 | 428 | ||
@@ -416,18 +439,11 @@ static void tcx_init_one(struct sbus_dev *sdev) | |||
416 | j = i; | 439 | j = i; |
417 | break; | 440 | break; |
418 | }; | 441 | }; |
419 | all->par.mmap_map[i].poff = sdev->reg_addrs[j].phys_addr; | 442 | all->par.mmap_map[i].poff = op->resource[j].start; |
420 | } | 443 | } |
421 | 444 | ||
422 | all->info.flags = FBINFO_DEFAULT; | 445 | all->info.flags = FBINFO_DEFAULT; |
423 | all->info.fbops = &tcx_ops; | 446 | all->info.fbops = &tcx_ops; |
424 | #ifdef CONFIG_SPARC32 | ||
425 | all->info.screen_base = (char __iomem *) | ||
426 | prom_getintdefault(sdev->prom_node, "address", 0); | ||
427 | #endif | ||
428 | if (!all->info.screen_base) | ||
429 | all->info.screen_base = sbus_ioremap(&sdev->resource[0], 0, | ||
430 | all->par.fbsize, "tcx ram"); | ||
431 | all->info.par = &all->par; | 447 | all->info.par = &all->par; |
432 | 448 | ||
433 | /* Initialize brooktree DAC. */ | 449 | /* Initialize brooktree DAC. */ |
@@ -445,72 +461,88 @@ static void tcx_init_one(struct sbus_dev *sdev) | |||
445 | tcx_blank(FB_BLANK_UNBLANK, &all->info); | 461 | tcx_blank(FB_BLANK_UNBLANK, &all->info); |
446 | 462 | ||
447 | if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { | 463 | if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { |
448 | printk(KERN_ERR "tcx: Could not allocate color map.\n"); | 464 | tcx_unmap_regs(all); |
449 | kfree(all); | 465 | kfree(all); |
450 | return; | 466 | return -ENOMEM; |
451 | } | 467 | } |
452 | 468 | ||
453 | fb_set_cmap(&all->info.cmap, &all->info); | 469 | fb_set_cmap(&all->info.cmap, &all->info); |
454 | tcx_init_fix(&all->info, linebytes); | 470 | tcx_init_fix(&all->info, linebytes); |
455 | 471 | ||
456 | if (register_framebuffer(&all->info) < 0) { | 472 | err = register_framebuffer(&all->info); |
457 | printk(KERN_ERR "tcx: Could not register framebuffer.\n"); | 473 | if (err < 0) { |
458 | fb_dealloc_cmap(&all->info.cmap); | 474 | fb_dealloc_cmap(&all->info.cmap); |
475 | tcx_unmap_regs(all); | ||
459 | kfree(all); | 476 | kfree(all); |
460 | return; | 477 | return err; |
461 | } | 478 | } |
462 | 479 | ||
463 | list_add(&all->list, &tcx_list); | 480 | dev_set_drvdata(&op->dev, all); |
464 | 481 | ||
465 | printk("tcx: %s at %lx:%lx, %s\n", | 482 | printk("%s: TCX at %lx:%lx, %s\n", |
466 | sdev->prom_name, | 483 | dp->full_name, |
467 | (long) sdev->reg_addrs[0].which_io, | 484 | all->par.which_io, |
468 | (long) sdev->reg_addrs[0].phys_addr, | 485 | op->resource[0].start, |
469 | all->par.lowdepth ? "8-bit only" : "24-bit depth"); | 486 | all->par.lowdepth ? "8-bit only" : "24-bit depth"); |
487 | |||
488 | return 0; | ||
470 | } | 489 | } |
471 | 490 | ||
472 | int __init tcx_init(void) | 491 | static int __devinit tcx_probe(struct of_device *dev, const struct of_device_id *match) |
473 | { | 492 | { |
474 | struct sbus_bus *sbus; | 493 | struct of_device *op = to_of_device(&dev->dev); |
475 | struct sbus_dev *sdev; | ||
476 | 494 | ||
477 | if (fb_get_options("tcxfb", NULL)) | 495 | return tcx_init_one(op); |
478 | return -ENODEV; | 496 | } |
479 | 497 | ||
480 | for_all_sbusdev(sdev, sbus) { | 498 | static int __devexit tcx_remove(struct of_device *dev) |
481 | if (!strcmp(sdev->prom_name, "SUNW,tcx")) | 499 | { |
482 | tcx_init_one(sdev); | 500 | struct all_info *all = dev_get_drvdata(&dev->dev); |
483 | } | 501 | |
502 | unregister_framebuffer(&all->info); | ||
503 | fb_dealloc_cmap(&all->info.cmap); | ||
504 | |||
505 | tcx_unmap_regs(all); | ||
506 | |||
507 | kfree(all); | ||
508 | |||
509 | dev_set_drvdata(&dev->dev, NULL); | ||
484 | 510 | ||
485 | return 0; | 511 | return 0; |
486 | } | 512 | } |
487 | 513 | ||
488 | void __exit tcx_exit(void) | 514 | static struct of_device_id tcx_match[] = { |
489 | { | 515 | { |
490 | struct list_head *pos, *tmp; | 516 | .name = "SUNW,tcx", |
517 | }, | ||
518 | {}, | ||
519 | }; | ||
520 | MODULE_DEVICE_TABLE(of, tcx_match); | ||
491 | 521 | ||
492 | list_for_each_safe(pos, tmp, &tcx_list) { | 522 | static struct of_platform_driver tcx_driver = { |
493 | struct all_info *all = list_entry(pos, typeof(*all), list); | 523 | .name = "tcx", |
524 | .match_table = tcx_match, | ||
525 | .probe = tcx_probe, | ||
526 | .remove = __devexit_p(tcx_remove), | ||
527 | }; | ||
494 | 528 | ||
495 | unregister_framebuffer(&all->info); | 529 | int __init tcx_init(void) |
496 | fb_dealloc_cmap(&all->info.cmap); | 530 | { |
497 | kfree(all); | 531 | if (fb_get_options("tcxfb", NULL)) |
498 | } | 532 | return -ENODEV; |
533 | |||
534 | return of_register_driver(&tcx_driver, &of_bus_type); | ||
499 | } | 535 | } |
500 | 536 | ||
501 | int __init | 537 | void __exit tcx_exit(void) |
502 | tcx_setup(char *arg) | ||
503 | { | 538 | { |
504 | /* No cmdline options yet... */ | 539 | of_unregister_driver(&tcx_driver); |
505 | return 0; | ||
506 | } | 540 | } |
507 | 541 | ||
508 | module_init(tcx_init); | 542 | module_init(tcx_init); |
509 | |||
510 | #ifdef MODULE | ||
511 | module_exit(tcx_exit); | 543 | module_exit(tcx_exit); |
512 | #endif | ||
513 | 544 | ||
514 | MODULE_DESCRIPTION("framebuffer driver for TCX chipsets"); | 545 | MODULE_DESCRIPTION("framebuffer driver for TCX chipsets"); |
515 | MODULE_AUTHOR("David S. Miller <davem@redhat.com>"); | 546 | MODULE_AUTHOR("David S. Miller <davem@davemloft.net>"); |
547 | MODULE_VERSION("2.0"); | ||
516 | MODULE_LICENSE("GPL"); | 548 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c index 5e5328d682db..239b1496874b 100644 --- a/drivers/video/tdfxfb.c +++ b/drivers/video/tdfxfb.c | |||
@@ -58,7 +58,6 @@ | |||
58 | * | 58 | * |
59 | */ | 59 | */ |
60 | 60 | ||
61 | #include <linux/config.h> | ||
62 | #include <linux/module.h> | 61 | #include <linux/module.h> |
63 | #include <linux/kernel.h> | 62 | #include <linux/kernel.h> |
64 | #include <linux/errno.h> | 63 | #include <linux/errno.h> |
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c index 41f8c2d93892..14175cdb9c9c 100644 --- a/drivers/video/tridentfb.c +++ b/drivers/video/tridentfb.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * TGUI acceleration | 15 | * TGUI acceleration |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/module.h> | 18 | #include <linux/module.h> |
20 | #include <linux/fb.h> | 19 | #include <linux/fb.h> |
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
diff --git a/drivers/video/valkyriefb.c b/drivers/video/valkyriefb.c index 2bdeb4baa952..1d76c035050e 100644 --- a/drivers/video/valkyriefb.c +++ b/drivers/video/valkyriefb.c | |||
@@ -39,7 +39,6 @@ | |||
39 | * more details. | 39 | * more details. |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include <linux/config.h> | ||
43 | #include <linux/module.h> | 42 | #include <linux/module.h> |
44 | #include <linux/kernel.h> | 43 | #include <linux/kernel.h> |
45 | #include <linux/errno.h> | 44 | #include <linux/errno.h> |
diff --git a/drivers/video/vgastate.c b/drivers/video/vgastate.c index 15179ec62339..d94efafc77b5 100644 --- a/drivers/video/vgastate.c +++ b/drivers/video/vgastate.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * archive for more details. | 13 | * archive for more details. |
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | #include <linux/config.h> | ||
17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
18 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
19 | #include <linux/fb.h> | 18 | #include <linux/fb.h> |
diff --git a/drivers/zorro/names.c b/drivers/zorro/names.c index 0dd532d3a5d6..e8517c3d8e82 100644 --- a/drivers/zorro/names.c +++ b/drivers/zorro/names.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * David Mosberger-Tang, Martin Mares | 9 | * David Mosberger-Tang, Martin Mares |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/types.h> | 14 | #include <linux/types.h> |