aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2011-06-21 14:57:16 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-06-22 16:09:58 -0400
commitcd15598707aff52da4302d9b6a3fc878bca27383 (patch)
treeecf5e01003366373cc4873e56d6ef72fd2592ba3
parent999a7a88f1b062af5617fa55df317446af86a3da (diff)
ssb: add __devinit to some functions
Two functions in ssb are using register_pci_controller() which is __devinit. The functions ssb_pcicore_init_hostmode() and ssb_gige_probe() should also be __devinit. This fixes the following warning: WARNING: vmlinux.o(.text+0x2727b8): Section mismatch in reference from the function ssb_pcicore_init_hostmode() to the function .devinit.text:register_pci_controller() The function ssb_pcicore_init_hostmode() references the function __devinit register_pci_controller(). This is often because ssb_pcicore_init_hostmode lacks a __devinit annotation or the annotation of register_pci_controller is wrong. WARNING: vmlinux.o(.text+0x273398): Section mismatch in reference from the function ssb_gige_probe() to the function .devinit.text:register_pci_controller() The function ssb_gige_probe() references the function __devinit register_pci_controller(). This is often because ssb_gige_probe lacks a __devinit annotation or the annotation of register_pci_controller is wrong. Reported-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/b44.c4
-rw-r--r--drivers/net/wireless/b43/sdio.c6
-rw-r--r--drivers/ssb/driver_gige.c13
-rw-r--r--drivers/ssb/driver_pcicore.c10
-rw-r--r--drivers/ssb/main.c29
-rw-r--r--drivers/ssb/pcihost_wrapper.c6
6 files changed, 36 insertions, 32 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index a69331e06b8d..91f7e6a0d4f9 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -2335,7 +2335,7 @@ static struct ssb_driver b44_ssb_driver = {
2335 .resume = b44_resume, 2335 .resume = b44_resume,
2336}; 2336};
2337 2337
2338static inline int b44_pci_init(void) 2338static inline int __init b44_pci_init(void)
2339{ 2339{
2340 int err = 0; 2340 int err = 0;
2341#ifdef CONFIG_B44_PCI 2341#ifdef CONFIG_B44_PCI
@@ -2344,7 +2344,7 @@ static inline int b44_pci_init(void)
2344 return err; 2344 return err;
2345} 2345}
2346 2346
2347static inline void b44_pci_exit(void) 2347static inline void __exit b44_pci_exit(void)
2348{ 2348{
2349#ifdef CONFIG_B44_PCI 2349#ifdef CONFIG_B44_PCI
2350 ssb_pcihost_unregister(&b44_pci_driver); 2350 ssb_pcihost_unregister(&b44_pci_driver);
diff --git a/drivers/net/wireless/b43/sdio.c b/drivers/net/wireless/b43/sdio.c
index e6c733d37c94..4fd6775b8c33 100644
--- a/drivers/net/wireless/b43/sdio.c
+++ b/drivers/net/wireless/b43/sdio.c
@@ -93,8 +93,8 @@ void b43_sdio_free_irq(struct b43_wldev *dev)
93 sdio->irq_handler = NULL; 93 sdio->irq_handler = NULL;
94} 94}
95 95
96static int b43_sdio_probe(struct sdio_func *func, 96static int __devinit b43_sdio_probe(struct sdio_func *func,
97 const struct sdio_device_id *id) 97 const struct sdio_device_id *id)
98{ 98{
99 struct b43_sdio *sdio; 99 struct b43_sdio *sdio;
100 struct sdio_func_tuple *tuple; 100 struct sdio_func_tuple *tuple;
@@ -171,7 +171,7 @@ out:
171 return error; 171 return error;
172} 172}
173 173
174static void b43_sdio_remove(struct sdio_func *func) 174static void __devexit b43_sdio_remove(struct sdio_func *func)
175{ 175{
176 struct b43_sdio *sdio = sdio_get_drvdata(func); 176 struct b43_sdio *sdio = sdio_get_drvdata(func);
177 177
diff --git a/drivers/ssb/driver_gige.c b/drivers/ssb/driver_gige.c
index 5ba92a2719a4..d75890909222 100644
--- a/drivers/ssb/driver_gige.c
+++ b/drivers/ssb/driver_gige.c
@@ -106,8 +106,9 @@ void gige_pcicfg_write32(struct ssb_gige *dev,
106 gige_write32(dev, SSB_GIGE_PCICFG + offset, value); 106 gige_write32(dev, SSB_GIGE_PCICFG + offset, value);
107} 107}
108 108
109static int ssb_gige_pci_read_config(struct pci_bus *bus, unsigned int devfn, 109static int __devinit ssb_gige_pci_read_config(struct pci_bus *bus,
110 int reg, int size, u32 *val) 110 unsigned int devfn, int reg,
111 int size, u32 *val)
111{ 112{
112 struct ssb_gige *dev = container_of(bus->ops, struct ssb_gige, pci_ops); 113 struct ssb_gige *dev = container_of(bus->ops, struct ssb_gige, pci_ops);
113 unsigned long flags; 114 unsigned long flags;
@@ -136,8 +137,9 @@ static int ssb_gige_pci_read_config(struct pci_bus *bus, unsigned int devfn,
136 return PCIBIOS_SUCCESSFUL; 137 return PCIBIOS_SUCCESSFUL;
137} 138}
138 139
139static int ssb_gige_pci_write_config(struct pci_bus *bus, unsigned int devfn, 140static int __devinit ssb_gige_pci_write_config(struct pci_bus *bus,
140 int reg, int size, u32 val) 141 unsigned int devfn, int reg,
142 int size, u32 val)
141{ 143{
142 struct ssb_gige *dev = container_of(bus->ops, struct ssb_gige, pci_ops); 144 struct ssb_gige *dev = container_of(bus->ops, struct ssb_gige, pci_ops);
143 unsigned long flags; 145 unsigned long flags;
@@ -166,7 +168,8 @@ static int ssb_gige_pci_write_config(struct pci_bus *bus, unsigned int devfn,
166 return PCIBIOS_SUCCESSFUL; 168 return PCIBIOS_SUCCESSFUL;
167} 169}
168 170
169static int ssb_gige_probe(struct ssb_device *sdev, const struct ssb_device_id *id) 171static int __devinit ssb_gige_probe(struct ssb_device *sdev,
172 const struct ssb_device_id *id)
170{ 173{
171 struct ssb_gige *dev; 174 struct ssb_gige *dev;
172 u32 base, tmslow, tmshigh; 175 u32 base, tmslow, tmshigh;
diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c
index 2a20dabec76d..21b9465f71ad 100644
--- a/drivers/ssb/driver_pcicore.c
+++ b/drivers/ssb/driver_pcicore.c
@@ -314,7 +314,7 @@ int ssb_pcicore_pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
314 return ssb_mips_irq(extpci_core->dev) + 2; 314 return ssb_mips_irq(extpci_core->dev) + 2;
315} 315}
316 316
317static void ssb_pcicore_init_hostmode(struct ssb_pcicore *pc) 317static void __devinit ssb_pcicore_init_hostmode(struct ssb_pcicore *pc)
318{ 318{
319 u32 val; 319 u32 val;
320 320
@@ -379,7 +379,7 @@ static void ssb_pcicore_init_hostmode(struct ssb_pcicore *pc)
379 register_pci_controller(&ssb_pcicore_controller); 379 register_pci_controller(&ssb_pcicore_controller);
380} 380}
381 381
382static int pcicore_is_in_hostmode(struct ssb_pcicore *pc) 382static int __devinit pcicore_is_in_hostmode(struct ssb_pcicore *pc)
383{ 383{
384 struct ssb_bus *bus = pc->dev->bus; 384 struct ssb_bus *bus = pc->dev->bus;
385 u16 chipid_top; 385 u16 chipid_top;
@@ -412,7 +412,7 @@ static int pcicore_is_in_hostmode(struct ssb_pcicore *pc)
412 * Workarounds. 412 * Workarounds.
413 **************************************************/ 413 **************************************************/
414 414
415static void ssb_pcicore_fix_sprom_core_index(struct ssb_pcicore *pc) 415static void __devinit ssb_pcicore_fix_sprom_core_index(struct ssb_pcicore *pc)
416{ 416{
417 u16 tmp = pcicore_read16(pc, SSB_PCICORE_SPROM(0)); 417 u16 tmp = pcicore_read16(pc, SSB_PCICORE_SPROM(0));
418 if (((tmp & 0xF000) >> 12) != pc->dev->core_index) { 418 if (((tmp & 0xF000) >> 12) != pc->dev->core_index) {
@@ -514,13 +514,13 @@ static void ssb_pcicore_pcie_setup_workarounds(struct ssb_pcicore *pc)
514 * Generic and Clientmode operation code. 514 * Generic and Clientmode operation code.
515 **************************************************/ 515 **************************************************/
516 516
517static void ssb_pcicore_init_clientmode(struct ssb_pcicore *pc) 517static void __devinit ssb_pcicore_init_clientmode(struct ssb_pcicore *pc)
518{ 518{
519 /* Disable PCI interrupts. */ 519 /* Disable PCI interrupts. */
520 ssb_write32(pc->dev, SSB_INTVEC, 0); 520 ssb_write32(pc->dev, SSB_INTVEC, 0);
521} 521}
522 522
523void ssb_pcicore_init(struct ssb_pcicore *pc) 523void __devinit ssb_pcicore_init(struct ssb_pcicore *pc)
524{ 524{
525 struct ssb_device *dev = pc->dev; 525 struct ssb_device *dev = pc->dev;
526 526
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index f8a13f863217..e568664f8b9c 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -557,7 +557,7 @@ error:
557} 557}
558 558
559/* Needs ssb_buses_lock() */ 559/* Needs ssb_buses_lock() */
560static int ssb_attach_queued_buses(void) 560static int __devinit ssb_attach_queued_buses(void)
561{ 561{
562 struct ssb_bus *bus, *n; 562 struct ssb_bus *bus, *n;
563 int err = 0; 563 int err = 0;
@@ -768,9 +768,9 @@ out:
768 return err; 768 return err;
769} 769}
770 770
771static int ssb_bus_register(struct ssb_bus *bus, 771static int __devinit ssb_bus_register(struct ssb_bus *bus,
772 ssb_invariants_func_t get_invariants, 772 ssb_invariants_func_t get_invariants,
773 unsigned long baseaddr) 773 unsigned long baseaddr)
774{ 774{
775 int err; 775 int err;
776 776
@@ -851,8 +851,8 @@ err_disable_xtal:
851} 851}
852 852
853#ifdef CONFIG_SSB_PCIHOST 853#ifdef CONFIG_SSB_PCIHOST
854int ssb_bus_pcibus_register(struct ssb_bus *bus, 854int __devinit ssb_bus_pcibus_register(struct ssb_bus *bus,
855 struct pci_dev *host_pci) 855 struct pci_dev *host_pci)
856{ 856{
857 int err; 857 int err;
858 858
@@ -875,9 +875,9 @@ EXPORT_SYMBOL(ssb_bus_pcibus_register);
875#endif /* CONFIG_SSB_PCIHOST */ 875#endif /* CONFIG_SSB_PCIHOST */
876 876
877#ifdef CONFIG_SSB_PCMCIAHOST 877#ifdef CONFIG_SSB_PCMCIAHOST
878int ssb_bus_pcmciabus_register(struct ssb_bus *bus, 878int __devinit ssb_bus_pcmciabus_register(struct ssb_bus *bus,
879 struct pcmcia_device *pcmcia_dev, 879 struct pcmcia_device *pcmcia_dev,
880 unsigned long baseaddr) 880 unsigned long baseaddr)
881{ 881{
882 int err; 882 int err;
883 883
@@ -897,8 +897,9 @@ EXPORT_SYMBOL(ssb_bus_pcmciabus_register);
897#endif /* CONFIG_SSB_PCMCIAHOST */ 897#endif /* CONFIG_SSB_PCMCIAHOST */
898 898
899#ifdef CONFIG_SSB_SDIOHOST 899#ifdef CONFIG_SSB_SDIOHOST
900int ssb_bus_sdiobus_register(struct ssb_bus *bus, struct sdio_func *func, 900int __devinit ssb_bus_sdiobus_register(struct ssb_bus *bus,
901 unsigned int quirks) 901 struct sdio_func *func,
902 unsigned int quirks)
902{ 903{
903 int err; 904 int err;
904 905
@@ -918,9 +919,9 @@ int ssb_bus_sdiobus_register(struct ssb_bus *bus, struct sdio_func *func,
918EXPORT_SYMBOL(ssb_bus_sdiobus_register); 919EXPORT_SYMBOL(ssb_bus_sdiobus_register);
919#endif /* CONFIG_SSB_PCMCIAHOST */ 920#endif /* CONFIG_SSB_PCMCIAHOST */
920 921
921int ssb_bus_ssbbus_register(struct ssb_bus *bus, 922int __devinit ssb_bus_ssbbus_register(struct ssb_bus *bus,
922 unsigned long baseaddr, 923 unsigned long baseaddr,
923 ssb_invariants_func_t get_invariants) 924 ssb_invariants_func_t get_invariants)
924{ 925{
925 int err; 926 int err;
926 927
diff --git a/drivers/ssb/pcihost_wrapper.c b/drivers/ssb/pcihost_wrapper.c
index f6c8c81a0025..d7a98131ebf3 100644
--- a/drivers/ssb/pcihost_wrapper.c
+++ b/drivers/ssb/pcihost_wrapper.c
@@ -53,8 +53,8 @@ static int ssb_pcihost_resume(struct pci_dev *dev)
53# define ssb_pcihost_resume NULL 53# define ssb_pcihost_resume NULL
54#endif /* CONFIG_PM */ 54#endif /* CONFIG_PM */
55 55
56static int ssb_pcihost_probe(struct pci_dev *dev, 56static int __devinit ssb_pcihost_probe(struct pci_dev *dev,
57 const struct pci_device_id *id) 57 const struct pci_device_id *id)
58{ 58{
59 struct ssb_bus *ssb; 59 struct ssb_bus *ssb;
60 int err = -ENOMEM; 60 int err = -ENOMEM;
@@ -110,7 +110,7 @@ static void ssb_pcihost_remove(struct pci_dev *dev)
110 pci_set_drvdata(dev, NULL); 110 pci_set_drvdata(dev, NULL);
111} 111}
112 112
113int ssb_pcihost_register(struct pci_driver *driver) 113int __devinit ssb_pcihost_register(struct pci_driver *driver)
114{ 114{
115 driver->probe = ssb_pcihost_probe; 115 driver->probe = ssb_pcihost_probe;
116 driver->remove = ssb_pcihost_remove; 116 driver->remove = ssb_pcihost_remove;