Commit cd155987 authored by Hauke Mehrtens's avatar Hauke Mehrtens Committed by John W. Linville

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: default avatarRalf Baechle <ralf@linux-mips.org>
Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 999a7a88
...@@ -2335,7 +2335,7 @@ static struct ssb_driver b44_ssb_driver = { ...@@ -2335,7 +2335,7 @@ static struct ssb_driver b44_ssb_driver = {
.resume = b44_resume, .resume = b44_resume,
}; };
static inline int b44_pci_init(void) static inline int __init b44_pci_init(void)
{ {
int err = 0; int err = 0;
#ifdef CONFIG_B44_PCI #ifdef CONFIG_B44_PCI
...@@ -2344,7 +2344,7 @@ static inline int b44_pci_init(void) ...@@ -2344,7 +2344,7 @@ static inline int b44_pci_init(void)
return err; return err;
} }
static inline void b44_pci_exit(void) static inline void __exit b44_pci_exit(void)
{ {
#ifdef CONFIG_B44_PCI #ifdef CONFIG_B44_PCI
ssb_pcihost_unregister(&b44_pci_driver); ssb_pcihost_unregister(&b44_pci_driver);
......
...@@ -93,8 +93,8 @@ void b43_sdio_free_irq(struct b43_wldev *dev) ...@@ -93,8 +93,8 @@ void b43_sdio_free_irq(struct b43_wldev *dev)
sdio->irq_handler = NULL; sdio->irq_handler = NULL;
} }
static int b43_sdio_probe(struct sdio_func *func, static int __devinit b43_sdio_probe(struct sdio_func *func,
const struct sdio_device_id *id) const struct sdio_device_id *id)
{ {
struct b43_sdio *sdio; struct b43_sdio *sdio;
struct sdio_func_tuple *tuple; struct sdio_func_tuple *tuple;
...@@ -171,7 +171,7 @@ static int b43_sdio_probe(struct sdio_func *func, ...@@ -171,7 +171,7 @@ static int b43_sdio_probe(struct sdio_func *func,
return error; return error;
} }
static void b43_sdio_remove(struct sdio_func *func) static void __devexit b43_sdio_remove(struct sdio_func *func)
{ {
struct b43_sdio *sdio = sdio_get_drvdata(func); struct b43_sdio *sdio = sdio_get_drvdata(func);
......
...@@ -106,8 +106,9 @@ void gige_pcicfg_write32(struct ssb_gige *dev, ...@@ -106,8 +106,9 @@ void gige_pcicfg_write32(struct ssb_gige *dev,
gige_write32(dev, SSB_GIGE_PCICFG + offset, value); gige_write32(dev, SSB_GIGE_PCICFG + offset, value);
} }
static int ssb_gige_pci_read_config(struct pci_bus *bus, unsigned int devfn, static int __devinit ssb_gige_pci_read_config(struct pci_bus *bus,
int reg, int size, u32 *val) unsigned int devfn, int reg,
int size, u32 *val)
{ {
struct ssb_gige *dev = container_of(bus->ops, struct ssb_gige, pci_ops); struct ssb_gige *dev = container_of(bus->ops, struct ssb_gige, pci_ops);
unsigned long flags; unsigned long flags;
...@@ -136,8 +137,9 @@ static int ssb_gige_pci_read_config(struct pci_bus *bus, unsigned int devfn, ...@@ -136,8 +137,9 @@ static int ssb_gige_pci_read_config(struct pci_bus *bus, unsigned int devfn,
return PCIBIOS_SUCCESSFUL; return PCIBIOS_SUCCESSFUL;
} }
static int ssb_gige_pci_write_config(struct pci_bus *bus, unsigned int devfn, static int __devinit ssb_gige_pci_write_config(struct pci_bus *bus,
int reg, int size, u32 val) unsigned int devfn, int reg,
int size, u32 val)
{ {
struct ssb_gige *dev = container_of(bus->ops, struct ssb_gige, pci_ops); struct ssb_gige *dev = container_of(bus->ops, struct ssb_gige, pci_ops);
unsigned long flags; unsigned long flags;
...@@ -166,7 +168,8 @@ static int ssb_gige_pci_write_config(struct pci_bus *bus, unsigned int devfn, ...@@ -166,7 +168,8 @@ static int ssb_gige_pci_write_config(struct pci_bus *bus, unsigned int devfn,
return PCIBIOS_SUCCESSFUL; return PCIBIOS_SUCCESSFUL;
} }
static int ssb_gige_probe(struct ssb_device *sdev, const struct ssb_device_id *id) static int __devinit ssb_gige_probe(struct ssb_device *sdev,
const struct ssb_device_id *id)
{ {
struct ssb_gige *dev; struct ssb_gige *dev;
u32 base, tmslow, tmshigh; u32 base, tmslow, tmshigh;
......
...@@ -314,7 +314,7 @@ int ssb_pcicore_pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) ...@@ -314,7 +314,7 @@ int ssb_pcicore_pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
return ssb_mips_irq(extpci_core->dev) + 2; return ssb_mips_irq(extpci_core->dev) + 2;
} }
static void ssb_pcicore_init_hostmode(struct ssb_pcicore *pc) static void __devinit ssb_pcicore_init_hostmode(struct ssb_pcicore *pc)
{ {
u32 val; u32 val;
...@@ -379,7 +379,7 @@ static void ssb_pcicore_init_hostmode(struct ssb_pcicore *pc) ...@@ -379,7 +379,7 @@ static void ssb_pcicore_init_hostmode(struct ssb_pcicore *pc)
register_pci_controller(&ssb_pcicore_controller); register_pci_controller(&ssb_pcicore_controller);
} }
static int pcicore_is_in_hostmode(struct ssb_pcicore *pc) static int __devinit pcicore_is_in_hostmode(struct ssb_pcicore *pc)
{ {
struct ssb_bus *bus = pc->dev->bus; struct ssb_bus *bus = pc->dev->bus;
u16 chipid_top; u16 chipid_top;
...@@ -412,7 +412,7 @@ static int pcicore_is_in_hostmode(struct ssb_pcicore *pc) ...@@ -412,7 +412,7 @@ static int pcicore_is_in_hostmode(struct ssb_pcicore *pc)
* Workarounds. * Workarounds.
**************************************************/ **************************************************/
static void ssb_pcicore_fix_sprom_core_index(struct ssb_pcicore *pc) static void __devinit ssb_pcicore_fix_sprom_core_index(struct ssb_pcicore *pc)
{ {
u16 tmp = pcicore_read16(pc, SSB_PCICORE_SPROM(0)); u16 tmp = pcicore_read16(pc, SSB_PCICORE_SPROM(0));
if (((tmp & 0xF000) >> 12) != pc->dev->core_index) { if (((tmp & 0xF000) >> 12) != pc->dev->core_index) {
...@@ -514,13 +514,13 @@ static void ssb_pcicore_pcie_setup_workarounds(struct ssb_pcicore *pc) ...@@ -514,13 +514,13 @@ static void ssb_pcicore_pcie_setup_workarounds(struct ssb_pcicore *pc)
* Generic and Clientmode operation code. * Generic and Clientmode operation code.
**************************************************/ **************************************************/
static void ssb_pcicore_init_clientmode(struct ssb_pcicore *pc) static void __devinit ssb_pcicore_init_clientmode(struct ssb_pcicore *pc)
{ {
/* Disable PCI interrupts. */ /* Disable PCI interrupts. */
ssb_write32(pc->dev, SSB_INTVEC, 0); ssb_write32(pc->dev, SSB_INTVEC, 0);
} }
void ssb_pcicore_init(struct ssb_pcicore *pc) void __devinit ssb_pcicore_init(struct ssb_pcicore *pc)
{ {
struct ssb_device *dev = pc->dev; struct ssb_device *dev = pc->dev;
......
...@@ -557,7 +557,7 @@ static int ssb_devices_register(struct ssb_bus *bus) ...@@ -557,7 +557,7 @@ static int ssb_devices_register(struct ssb_bus *bus)
} }
/* Needs ssb_buses_lock() */ /* Needs ssb_buses_lock() */
static int ssb_attach_queued_buses(void) static int __devinit ssb_attach_queued_buses(void)
{ {
struct ssb_bus *bus, *n; struct ssb_bus *bus, *n;
int err = 0; int err = 0;
...@@ -768,9 +768,9 @@ static int ssb_fetch_invariants(struct ssb_bus *bus, ...@@ -768,9 +768,9 @@ static int ssb_fetch_invariants(struct ssb_bus *bus,
return err; return err;
} }
static int ssb_bus_register(struct ssb_bus *bus, static int __devinit ssb_bus_register(struct ssb_bus *bus,
ssb_invariants_func_t get_invariants, ssb_invariants_func_t get_invariants,
unsigned long baseaddr) unsigned long baseaddr)
{ {
int err; int err;
...@@ -851,8 +851,8 @@ static int ssb_bus_register(struct ssb_bus *bus, ...@@ -851,8 +851,8 @@ static int ssb_bus_register(struct ssb_bus *bus,
} }
#ifdef CONFIG_SSB_PCIHOST #ifdef CONFIG_SSB_PCIHOST
int ssb_bus_pcibus_register(struct ssb_bus *bus, int __devinit ssb_bus_pcibus_register(struct ssb_bus *bus,
struct pci_dev *host_pci) struct pci_dev *host_pci)
{ {
int err; int err;
...@@ -875,9 +875,9 @@ EXPORT_SYMBOL(ssb_bus_pcibus_register); ...@@ -875,9 +875,9 @@ EXPORT_SYMBOL(ssb_bus_pcibus_register);
#endif /* CONFIG_SSB_PCIHOST */ #endif /* CONFIG_SSB_PCIHOST */
#ifdef CONFIG_SSB_PCMCIAHOST #ifdef CONFIG_SSB_PCMCIAHOST
int ssb_bus_pcmciabus_register(struct ssb_bus *bus, int __devinit ssb_bus_pcmciabus_register(struct ssb_bus *bus,
struct pcmcia_device *pcmcia_dev, struct pcmcia_device *pcmcia_dev,
unsigned long baseaddr) unsigned long baseaddr)
{ {
int err; int err;
...@@ -897,8 +897,9 @@ EXPORT_SYMBOL(ssb_bus_pcmciabus_register); ...@@ -897,8 +897,9 @@ EXPORT_SYMBOL(ssb_bus_pcmciabus_register);
#endif /* CONFIG_SSB_PCMCIAHOST */ #endif /* CONFIG_SSB_PCMCIAHOST */
#ifdef CONFIG_SSB_SDIOHOST #ifdef CONFIG_SSB_SDIOHOST
int ssb_bus_sdiobus_register(struct ssb_bus *bus, struct sdio_func *func, int __devinit ssb_bus_sdiobus_register(struct ssb_bus *bus,
unsigned int quirks) struct sdio_func *func,
unsigned int quirks)
{ {
int err; int err;
...@@ -918,9 +919,9 @@ int ssb_bus_sdiobus_register(struct ssb_bus *bus, struct sdio_func *func, ...@@ -918,9 +919,9 @@ int ssb_bus_sdiobus_register(struct ssb_bus *bus, struct sdio_func *func,
EXPORT_SYMBOL(ssb_bus_sdiobus_register); EXPORT_SYMBOL(ssb_bus_sdiobus_register);
#endif /* CONFIG_SSB_PCMCIAHOST */ #endif /* CONFIG_SSB_PCMCIAHOST */
int ssb_bus_ssbbus_register(struct ssb_bus *bus, int __devinit ssb_bus_ssbbus_register(struct ssb_bus *bus,
unsigned long baseaddr, unsigned long baseaddr,
ssb_invariants_func_t get_invariants) ssb_invariants_func_t get_invariants)
{ {
int err; int err;
......
...@@ -53,8 +53,8 @@ static int ssb_pcihost_resume(struct pci_dev *dev) ...@@ -53,8 +53,8 @@ static int ssb_pcihost_resume(struct pci_dev *dev)
# define ssb_pcihost_resume NULL # define ssb_pcihost_resume NULL
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
static int ssb_pcihost_probe(struct pci_dev *dev, static int __devinit ssb_pcihost_probe(struct pci_dev *dev,
const struct pci_device_id *id) const struct pci_device_id *id)
{ {
struct ssb_bus *ssb; struct ssb_bus *ssb;
int err = -ENOMEM; int err = -ENOMEM;
...@@ -110,7 +110,7 @@ static void ssb_pcihost_remove(struct pci_dev *dev) ...@@ -110,7 +110,7 @@ static void ssb_pcihost_remove(struct pci_dev *dev)
pci_set_drvdata(dev, NULL); pci_set_drvdata(dev, NULL);
} }
int ssb_pcihost_register(struct pci_driver *driver) int __devinit ssb_pcihost_register(struct pci_driver *driver)
{ {
driver->probe = ssb_pcihost_probe; driver->probe = ssb_pcihost_probe;
driver->remove = ssb_pcihost_remove; driver->remove = ssb_pcihost_remove;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment