提交 2d440707 编写于 作者: L Linus Torvalds

Merge tag 'module_init-device_initcall-v4.1-rc8' of...

Merge tag 'module_init-device_initcall-v4.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux

Pull module_init replacement part one from Paul Gortmaker:
 "Replace module_init with equivalent device_initcall in non modules.

  This series of commits converts non-modular code that is using the
  module_init() call to hook itself into the system to instead use
  device_initcall().

  The conversion is a runtime no-op, since module_init actually becomes
  __initcall in the non-modular case, and that in turn gets mapped onto
  device_initcall.  A couple files show a larger negative diffstat,
  representing ones that had a module_exit function that we remove here
  vs previously relying on the linker to dispose of it.

  We make this conversion now, so that we can relocate module_init from
  init.h into module.h in the future.

  The files changed here are just limited to those that would otherwise
  have to add module.h to obviously non-modular code, in order to avoid
  a compile fail, as testing has shown"

* tag 'module_init-device_initcall-v4.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
  MIPS: don't use module_init in non-modular cobalt/mtd.c file
  drivers/leds: don't use module_init in non-modular leds-cobalt-raq.c
  cris: don't use module_init for non-modular core eeprom.c code
  tty/metag_da: Avoid module_init/module_exit in non-modular code
  drivers/clk: don't use module_init in clk-nomadik.c which is non-modular
  xtensa: don't use module_init for non-modular core network.c code
  sh: don't use module_init in non-modular psw.c code
  mn10300: don't use module_init in non-modular flash.c code
  parisc64: don't use module_init for non-modular core perf code
  parisc: don't use module_init for non-modular core pdc_cons code
  cris: don't use module_init for non-modular core intmem.c code
  ia64: don't use module_init in non-modular sim/simscsi.c code
  ia64: don't use module_init for non-modular core kernel/mca.c code
  arm: don't use module_init in non-modular mach-vexpress/spc.c code
  powerpc: don't use module_init in non-modular 83xx suspend code
  powerpc: use device_initcall for registering rtc devices
  x86: don't use module_init in non-modular devicetree.c code
  x86: don't use module_init in non-modular intel_mid_vrtc.c
......@@ -589,4 +589,4 @@ static int __init ve_spc_clk_init(void)
platform_device_register_simple("vexpress-spc-cpufreq", -1, NULL, 0);
return 0;
}
module_init(ve_spc_clk_init);
device_initcall(ve_spc_clk_init);
......@@ -848,5 +848,4 @@ static void eeprom_disable_write_protect(void)
/* Write protect disabled */
}
}
module_init(eeprom_init);
device_initcall(eeprom_init);
......@@ -145,6 +145,5 @@ unsigned long crisv32_intmem_virt_to_phys(void* addr)
(unsigned long)intmem_virtual + MEM_INTMEM_START +
RESERVED_SIZE);
}
module_init(crisv32_intmem_init);
device_initcall(crisv32_intmem_init);
......@@ -368,13 +368,4 @@ simscsi_init(void)
scsi_host_put(host);
return error;
}
static void __exit
simscsi_exit(void)
{
scsi_remove_host(host);
scsi_host_put(host);
}
module_init(simscsi_init);
module_exit(simscsi_exit);
device_initcall(simscsi_init);
......@@ -142,5 +142,4 @@ static int __init sn_salinfo_init(void)
salinfo_platform_oemdata = &sn_salinfo_platform_oemdata;
return 0;
}
module_init(sn_salinfo_init)
device_initcall(sn_salinfo_init);
......@@ -96,5 +96,4 @@ static int __init asb2303_mtd_init(void)
platform_device_register(&asb2303_sysflash);
return 0;
}
module_init(asb2303_mtd_init);
device_initcall(asb2303_mtd_init);
......@@ -207,8 +207,7 @@ static int __init pdc_console_tty_driver_init(void)
return 0;
}
module_init(pdc_console_tty_driver_init);
device_initcall(pdc_console_tty_driver_init);
static struct tty_driver * pdc_console_device (struct console *c, int *index)
{
......
......@@ -543,6 +543,7 @@ static int __init perf_init(void)
return 0;
}
device_initcall(perf_init);
/*
* perf_start_counters(void)
......@@ -847,5 +848,3 @@ printk("perf_rdr_write\n");
}
printk("perf_rdr_write done\n");
}
module_init(perf_init);
......@@ -1124,4 +1124,4 @@ static int __init rtc_init(void)
return PTR_ERR_OR_ZERO(pdev);
}
module_init(rtc_init);
device_initcall(rtc_init);
......@@ -445,5 +445,4 @@ static int pmc_init(void)
{
return platform_driver_register(&pmc_driver);
}
module_init(pmc_init);
device_initcall(pmc_init);
......@@ -92,5 +92,4 @@ static int __init ps3_rtc_init(void)
return PTR_ERR_OR_ZERO(pdev);
}
module_init(ps3_rtc_init);
device_initcall(ps3_rtc_init);
......@@ -140,4 +140,4 @@ static int __init psw_init(void)
{
return platform_add_devices(psw_devices, ARRAY_SIZE(psw_devices));
}
module_init(psw_init);
device_initcall(psw_init);
......@@ -65,7 +65,7 @@ static int __init add_bus_probe(void)
return of_platform_bus_probe(NULL, ce4100_ids, NULL);
}
module_init(add_bus_probe);
device_initcall(add_bus_probe);
#ifdef CONFIG_PCI
struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus)
......
......@@ -173,5 +173,4 @@ static int __init intel_mid_device_create(void)
return platform_device_register(&vrtc_device);
}
module_init(intel_mid_device_create);
device_initcall(intel_mid_device_create);
......@@ -681,6 +681,4 @@ static int iss_net_init(void)
return 1;
}
module_init(iss_net_init);
device_initcall(iss_net_init);
......@@ -503,8 +503,7 @@ static int __init nomadik_src_clk_init_debugfs(void)
NULL, NULL, &nomadik_src_clk_debugfs_ops);
return 0;
}
module_init(nomadik_src_clk_init_debugfs);
device_initcall(nomadik_src_clk_init_debugfs);
#endif
......
......@@ -640,25 +640,7 @@ static int __init dashtty_init(void)
put_tty_driver(channel_driver);
return ret;
}
static void dashtty_exit(void)
{
int nport;
struct dashtty_port *dport;
del_timer_sync(&put_timer);
kthread_stop(dashtty_thread);
del_timer_sync(&poll_timer);
tty_unregister_driver(channel_driver);
for (nport = 0; nport < NUM_TTY_CHANNELS; nport++) {
dport = &dashtty_ports[nport];
tty_port_destroy(&dport->port);
}
put_tty_driver(channel_driver);
}
module_init(dashtty_init);
module_exit(dashtty_exit);
device_initcall(dashtty_init);
#ifdef CONFIG_DA_CONSOLE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册