diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2011-06-21 14:57:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-22 16:09:58 -0400 |
commit | cd15598707aff52da4302d9b6a3fc878bca27383 (patch) | |
tree | ecf5e01003366373cc4873e56d6ef72fd2592ba3 /drivers/ssb | |
parent | 999a7a88f1b062af5617fa55df317446af86a3da (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>
Diffstat (limited to 'drivers/ssb')
-rw-r--r-- | drivers/ssb/driver_gige.c | 13 | ||||
-rw-r--r-- | drivers/ssb/driver_pcicore.c | 10 | ||||
-rw-r--r-- | drivers/ssb/main.c | 29 | ||||
-rw-r--r-- | drivers/ssb/pcihost_wrapper.c | 6 |
4 files changed, 31 insertions, 27 deletions
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 | ||
109 | static int ssb_gige_pci_read_config(struct pci_bus *bus, unsigned int devfn, | 109 | static 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 | ||
139 | static int ssb_gige_pci_write_config(struct pci_bus *bus, unsigned int devfn, | 140 | static 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 | ||
169 | static int ssb_gige_probe(struct ssb_device *sdev, const struct ssb_device_id *id) | 171 | static 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 | ||
317 | static void ssb_pcicore_init_hostmode(struct ssb_pcicore *pc) | 317 | static 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 | ||
382 | static int pcicore_is_in_hostmode(struct ssb_pcicore *pc) | 382 | static 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 | ||
415 | static void ssb_pcicore_fix_sprom_core_index(struct ssb_pcicore *pc) | 415 | static 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 | ||
517 | static void ssb_pcicore_init_clientmode(struct ssb_pcicore *pc) | 517 | static 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 | ||
523 | void ssb_pcicore_init(struct ssb_pcicore *pc) | 523 | void __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() */ |
560 | static int ssb_attach_queued_buses(void) | 560 | static 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 | ||
771 | static int ssb_bus_register(struct ssb_bus *bus, | 771 | static 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 |
854 | int ssb_bus_pcibus_register(struct ssb_bus *bus, | 854 | int __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 |
878 | int ssb_bus_pcmciabus_register(struct ssb_bus *bus, | 878 | int __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 |
900 | int ssb_bus_sdiobus_register(struct ssb_bus *bus, struct sdio_func *func, | 900 | int __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, | |||
918 | EXPORT_SYMBOL(ssb_bus_sdiobus_register); | 919 | EXPORT_SYMBOL(ssb_bus_sdiobus_register); |
919 | #endif /* CONFIG_SSB_PCMCIAHOST */ | 920 | #endif /* CONFIG_SSB_PCMCIAHOST */ |
920 | 921 | ||
921 | int ssb_bus_ssbbus_register(struct ssb_bus *bus, | 922 | int __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 | ||
56 | static int ssb_pcihost_probe(struct pci_dev *dev, | 56 | static 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 | ||
113 | int ssb_pcihost_register(struct pci_driver *driver) | 113 | int __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; |