[kernel] fix gpiommc build failure with 3.2
[openwrt.git] / target / linux / brcm47xx / patches-3.2 / 0039-bcma-make-some-functions-__devinit.patch
1 From 3cd3138f2ef77e18abc99737c6740f35d61dbbb3 Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Sun, 15 Jan 2012 23:05:05 +0100
4 Subject: [PATCH 26/32] bcma: make some functions __devinit
5
6 bcma_core_pci_hostmode_init() has to be in __devinit as it will call a
7 function in that section and so all functions calling it also have to
8 be in __devinit.
9
10 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 ---
12 drivers/bcma/bcma_private.h | 4 ++--
13 drivers/bcma/driver_pci.c | 6 +++---
14 drivers/bcma/driver_pci_host.c | 2 +-
15 drivers/bcma/host_pci.c | 4 ++--
16 drivers/bcma/main.c | 2 +-
17 include/linux/bcma/bcma_driver_pci.h | 2 +-
18 6 files changed, 10 insertions(+), 10 deletions(-)
19
20 --- a/drivers/bcma/bcma_private.h
21 +++ b/drivers/bcma/bcma_private.h
22 @@ -13,7 +13,7 @@
23 struct bcma_bus;
24
25 /* main.c */
26 -int bcma_bus_register(struct bcma_bus *bus);
27 +int __devinit bcma_bus_register(struct bcma_bus *bus);
28 void bcma_bus_unregister(struct bcma_bus *bus);
29 int __init bcma_bus_early_register(struct bcma_bus *bus,
30 struct bcma_device *core_cc,
31 @@ -55,7 +55,7 @@ extern void __exit bcma_host_pci_exit(vo
32 #endif /* CONFIG_BCMA_HOST_PCI */
33
34 #ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE
35 -void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc);
36 +void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc);
37 #endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */
38
39 #endif
40 --- a/drivers/bcma/driver_pci.c
41 +++ b/drivers/bcma/driver_pci.c
42 @@ -174,12 +174,12 @@ static void bcma_pcicore_serdes_workarou
43 * Init.
44 **************************************************/
45
46 -static void bcma_core_pci_clientmode_init(struct bcma_drv_pci *pc)
47 +static void __devinit bcma_core_pci_clientmode_init(struct bcma_drv_pci *pc)
48 {
49 bcma_pcicore_serdes_workaround(pc);
50 }
51
52 -static bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc)
53 +static bool __devinit bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc)
54 {
55 struct bcma_bus *bus = pc->core->bus;
56 u16 chipid_top;
57 @@ -204,7 +204,7 @@ static bool bcma_core_pci_is_in_hostmode
58 return true;
59 }
60
61 -void bcma_core_pci_init(struct bcma_drv_pci *pc)
62 +void __devinit bcma_core_pci_init(struct bcma_drv_pci *pc)
63 {
64 if (pc->setup_done)
65 return;
66 --- a/drivers/bcma/driver_pci_host.c
67 +++ b/drivers/bcma/driver_pci_host.c
68 @@ -8,7 +8,7 @@
69 #include "bcma_private.h"
70 #include <linux/bcma/bcma.h>
71
72 -void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc)
73 +void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc)
74 {
75 pr_err("No support for PCI core in hostmode yet\n");
76 }
77 --- a/drivers/bcma/host_pci.c
78 +++ b/drivers/bcma/host_pci.c
79 @@ -154,8 +154,8 @@ const struct bcma_host_ops bcma_host_pci
80 .awrite32 = bcma_host_pci_awrite32,
81 };
82
83 -static int bcma_host_pci_probe(struct pci_dev *dev,
84 - const struct pci_device_id *id)
85 +static int __devinit bcma_host_pci_probe(struct pci_dev *dev,
86 + const struct pci_device_id *id)
87 {
88 struct bcma_bus *bus;
89 int err = -ENOMEM;
90 --- a/drivers/bcma/main.c
91 +++ b/drivers/bcma/main.c
92 @@ -132,7 +132,7 @@ static void bcma_unregister_cores(struct
93 }
94 }
95
96 -int bcma_bus_register(struct bcma_bus *bus)
97 +int __devinit bcma_bus_register(struct bcma_bus *bus)
98 {
99 int err;
100 struct bcma_device *core;
101 --- a/include/linux/bcma/bcma_driver_pci.h
102 +++ b/include/linux/bcma/bcma_driver_pci.h
103 @@ -169,7 +169,7 @@ struct bcma_drv_pci {
104 #define pcicore_read32(pc, offset) bcma_read32((pc)->core, offset)
105 #define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val)
106
107 -extern void bcma_core_pci_init(struct bcma_drv_pci *pc);
108 +extern void __devinit bcma_core_pci_init(struct bcma_drv_pci *pc);
109 extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc,
110 struct bcma_device *core, bool enable);
111
This page took 0.053531 seconds and 5 git commands to generate.