parisc: remove __init from a slew of bus probe routines We get a warning mismatch at compilation with somethin like the following: LD drivers/parisc/built-in.o WARNING: drivers/parisc/built-in.o(.data+0x1ac): Section mismatch in reference from the variable lba_driver to the function .init.text:lba_driver_probe() The variable lba_driver references the function __init lba_driver_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console This is repated for all of these: The variable asp_driver references the function __init asp_init_chip() The variable builtin_serial_mux_driver references the function __init mux_probe() The variable ccio_driver references the function __init ccio_probe() The variable dino_driver references the function __init dino_probe() The variable eisa_driver references the function __init eisa_probe() The variable hp_sdc_driver references the function __init hp_sdc_init_hppa() The variable lasi700_driver references the function __init lasi700_probe() The variable lasi_driver references the function __init lasi_init_chip() The variable lasi_driver references the function __init serial_init_chip() The variable lba_driver references the function __init lba_driver_probe() The variable serial_driver references the function __init serial_init_chip() The variable serial_mux_driver references the function __init mux_probe() The variable superio_driver references the function __init superio_probe() The variable wax_driver references the function __init wax_init_chip() The variable zalon_driver references the function __init zalon_probe() Its all the same issue -- bus drivers are *can* run safely on init but the core bus can also enable deferred probe and so there is no gaurantee these calls are safe to if any of these drivers decide to start using such mechanisms. To avoid issues just avoid __init on these bus probe routines. Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
diff --git a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c index 852858e..b9cbdfd 100644 --- a/drivers/input/serio/hp_sdc.c +++ b/drivers/input/serio/hp_sdc.c
@@ -817,7 +817,7 @@ static const struct parisc_device_id hp_sdc_tbl[] = { MODULE_DEVICE_TABLE(parisc, hp_sdc_tbl); -static int __init hp_sdc_init_hppa(struct parisc_device *d); +static int hp_sdc_init_hppa(struct parisc_device *d); static struct delayed_work moduleloader_work; static struct parisc_driver hp_sdc_driver = { @@ -935,7 +935,7 @@ static void request_module_delayed(struct work_struct *work) request_module("hp_sdc_mlc"); } -static int __init hp_sdc_init_hppa(struct parisc_device *d) +static int hp_sdc_init_hppa(struct parisc_device *d) { int ret;
diff --git a/drivers/parisc/asp.c b/drivers/parisc/asp.c index 6a1ab25..b828ba2 100644 --- a/drivers/parisc/asp.c +++ b/drivers/parisc/asp.c
@@ -70,7 +70,7 @@ static void asp_choose_irq(struct parisc_device *dev, void *ctrl) */ #define ASP_INTERRUPT_ADDR 0xf0800000 -static int __init asp_init_chip(struct parisc_device *dev) +static int asp_init_chip(struct parisc_device *dev) { struct gsc_irq gsc_irq; int ret;
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index 3ed6238..56f6fae 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c
@@ -1531,7 +1531,7 @@ int ccio_request_resource(const struct parisc_device *dev, * If so, initialize the chip and tell other partners in crime they * have work to do. */ -static int __init ccio_probe(struct parisc_device *dev) +static int ccio_probe(struct parisc_device *dev) { int i; struct ioc *ioc, **ioc_p = &ioc_list;
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index 1133b5c..c54165e 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c
@@ -884,7 +884,7 @@ void ccio_cujo20_fixup(struct parisc_device *dev, u32 iovp); ** If so, initialize the chip appropriately (card-mode vs bridge mode). ** Much of the initialization is common though. */ -static int __init dino_probe(struct parisc_device *dev) +static int dino_probe(struct parisc_device *dev) { struct dino_device *dino_dev; // Dino specific control struct const char *version = "unknown";
diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c index 103095b..8812226 100644 --- a/drivers/parisc/eisa.c +++ b/drivers/parisc/eisa.c
@@ -299,7 +299,7 @@ static void init_eisa_pic(void) #define is_mongoose(dev) (dev->id.sversion == 0x00076) -static int __init eisa_probe(struct parisc_device *dev) +static int eisa_probe(struct parisc_device *dev) { int i, result;
diff --git a/drivers/parisc/lasi.c b/drivers/parisc/lasi.c index e65727c..92e9b7f4 100644 --- a/drivers/parisc/lasi.c +++ b/drivers/parisc/lasi.c
@@ -163,7 +163,7 @@ static void lasi_power_off(void) gsc_writel(0x02, datareg); } -static int __init lasi_init_chip(struct parisc_device *dev) +static int lasi_init_chip(struct parisc_device *dev) { extern void (*chassis_power_off)(void); struct gsc_asic *lasi;
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c index 2ec2aef..1fddf53 100644 --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c
@@ -1413,8 +1413,7 @@ static unsigned int lba_next_bus = 0; * If so, initialize the chip and tell other partners in crime they * have work to do. */ -static int __init -lba_driver_probe(struct parisc_device *dev) +static int lba_driver_probe(struct parisc_device *dev) { struct lba_device *lba_dev; LIST_HEAD(resources);
diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c index deeaed5..1c87e77 100644 --- a/drivers/parisc/superio.c +++ b/drivers/parisc/superio.c
@@ -419,7 +419,7 @@ static void __init superio_serial_init(void) } -static void __init superio_parport_init(void) +static void superio_parport_init(void) { #ifdef CONFIG_PARPORT_PC if (!parport_pc_probe_port(sio_dev.pp_base, @@ -447,7 +447,7 @@ static void superio_fixup_pci(struct pci_dev *pdev) DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415, superio_fixup_pci); -static int __init +static int superio_probe(struct pci_dev *dev, const struct pci_device_id *id) { struct superio_device *sio = &sio_dev;
diff --git a/drivers/parisc/wax.c b/drivers/parisc/wax.c index da9d5ad..21aa0f3 100644 --- a/drivers/parisc/wax.c +++ b/drivers/parisc/wax.c
@@ -68,7 +68,7 @@ wax_init_irq(struct gsc_asic *wax) // gsc_writel(0xFFFFFFFF, base+0x2000); /* RS232-B on Wax */ } -static int __init wax_init_chip(struct parisc_device *dev) +static int wax_init_chip(struct parisc_device *dev) { struct gsc_asic *wax; struct parisc_device *parent;
diff --git a/drivers/scsi/lasi700.c b/drivers/scsi/lasi700.c index 5c4ded9..c53a7bd 100644 --- a/drivers/scsi/lasi700.c +++ b/drivers/scsi/lasi700.c
@@ -95,8 +95,7 @@ static struct scsi_host_template lasi700_template = { }; MODULE_DEVICE_TABLE(parisc, lasi700_ids); -static int __init -lasi700_probe(struct parisc_device *dev) +static int lasi700_probe(struct parisc_device *dev) { unsigned long base = dev->hpa.start + LASI_SCSI_CORE_OFFSET; struct NCR_700_Host_Parameters *hostdata;
diff --git a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c index 97ccb03..4b828ca 100644 --- a/drivers/scsi/zalon.c +++ b/drivers/scsi/zalon.c
@@ -82,8 +82,7 @@ static struct scsi_host_template zalon7xx_template = { .proc_name = "zalon7xx", }; -static int __init -zalon_probe(struct parisc_device *dev) +static int zalon_probe(struct parisc_device *dev) { struct gsc_irq gsc_irq; u32 zalon_vers;
diff --git a/drivers/tty/serial/8250/8250_gsc.c b/drivers/tty/serial/8250/8250_gsc.c index b1e6ae9..2b888a8 100644 --- a/drivers/tty/serial/8250/8250_gsc.c +++ b/drivers/tty/serial/8250/8250_gsc.c
@@ -24,7 +24,7 @@ #include "8250.h" -static int __init serial_init_chip(struct parisc_device *dev) +static int serial_init_chip(struct parisc_device *dev) { struct uart_8250_port uart; unsigned long address;
diff --git a/drivers/tty/serial/mux.c b/drivers/tty/serial/mux.c index 8a4be4b..5730237 100644 --- a/drivers/tty/serial/mux.c +++ b/drivers/tty/serial/mux.c
@@ -452,7 +452,7 @@ static struct uart_ops mux_pops = { * Deterimine if the Serial Mux should claim this chip (return 0) * or not (return 1). */ -static int __init mux_probe(struct parisc_device *dev) +static int mux_probe(struct parisc_device *dev) { int i, status;