Skip to contentSkip to conversation

Replace module_init with device_initcall in non modules

PATCH In review Paul Gortmaker 2 participants 18 messages May 29, 2015

Subsystems (14)
lore
Share & tools
lore
#0 lore raw

cover Replace module_init with 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.

We fix this up now, so that we can relocate module_init from init.h into module.h in a future series.

The files changed here are just limited to those that would otherwise have to add module.h to obviously non-modular code, since we don't want to do that.

This work is factored out from what was a previously larger series[1] so that there is a common theme and lower patch count to ease review.

Paul.

[1] https://marc.info/?l=linux-kernel&m=139033951228828

---

Cc Benjamin Herrenschmidt <[email protected]>
Cc Chris Zankel <[email protected]>
Cc David Howells <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Geoff Levand <[email protected]>
Cc Helge Deller <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Ivan Kokshaysky <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc Jesper Nilsson <[email protected]>
Cc Koichi Yasutake <[email protected]>
Cc Matt Turner <[email protected]>
Cc Max Filippov <[email protected]>
Cc Mikael Starvik <[email protected]>
Cc Mike Turquette <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Paul Mundt <[email protected]>
Cc Richard Henderson <[email protected]>
Cc Russell King <[email protected]>
Cc Scott Wood <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Thomas Meyer <[email protected]>
Cc Tony Luck <[email protected]>

Paul Gortmaker (15):
x86: don't use module_init in non-modular intel_mid_vrtc.c
x86: don't use module_init in non-modular devicetree.c code
powerpc: use device_initcall for registering rtc devices
powerpc: don't use module_init in non-modular 83xx suspend code
arm: don't use module_init in non-modular mach-vexpress/spc.c code
alpha: don't use module_init for non-modular core code
ia64: don't use module_init for non-modular core kernel/mca.c code
ia64: don't use module_init in non-modular sim/simscsi.c code
cris: don't use module_init for non-modular core intmem.c code
parisc: don't use module_init for non-modular core pdc_cons code
parisc64: don't use module_init for non-modular core perf code
mn10300: don't use module_init in non-modular flash.c code
sh: don't use module_init in non-modular psw.c code
xtensa: don't use module_init for non-modular core network.c code drivers/clk: don't use module_init in clk-nomadik.c which is
non-modular

 arch/alpha/kernel/srmcons.c                  |  3 +--
 arch/arm/mach-vexpress/spc.c                 |  2 +-
 arch/cris/arch-v32/mm/intmem.c               |  3 +--
 arch/ia64/hp/sim/simscsi.c                   | 11 +----------
 arch/ia64/sn/kernel/mca.c                    |  3 +--
 arch/mn10300/unit-asb2303/flash.c            |  3 +--
 arch/parisc/kernel/pdc_cons.c                |  3 +--
 arch/parisc/kernel/perf.c                    |  3 +--
 arch/powerpc/kernel/time.c                   |  2 +-
 arch/powerpc/platforms/83xx/suspend.c        |  3 +--
 arch/powerpc/platforms/ps3/time.c            |  3 +--
 arch/sh/boards/mach-landisk/psw.c            |  2 +-
 arch/x86/kernel/devicetree.c                 |  2 +-
 arch/x86/platform/intel-mid/intel_mid_vrtc.c |  3 +--
 arch/xtensa/platforms/iss/network.c          |  4 +---
 drivers/clk/clk-nomadik.c                    |  3 +--
 16 files changed, 16 insertions(+), 37 deletions(-)
Signature · 1 line
2.2.1
#1 lore raw

PATCH 1/15 x86: don't use module_init in non-modular intel_mid_vrtc.c

The X86_INTEL_MID option is bool, and hence this code is either present or absent. It will never be modular, so using module_init as an alias for __initcall is rather misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Note that direct use of __initcall is discouraged, vs. one of the priority categorized subgroups. As __initcall gets mapped onto device_initcall, our use of device_initcall directly in this change means that the runtime impact is zero -- it will remain at level 6 in initcall ordering.

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
---
 arch/x86/platform/intel-mid/intel_mid_vrtc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/platform/intel-mid/intel_mid_vrtc.c +1 -2
index 32947ba0f62d..ee40fcb6e54d 100644
@@ -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);
Signature · 1 line
2.2.1
#2 lore raw

PATCH 2/15 x86: don't use module_init in non-modular devicetree.c code

In reply to Paul Gortmaker

The devicetree.o is built for "OF" -- which is bool, and hence this code is either present or absent. It will never be modular, so using module_init as an alias for __initcall can be somewhat misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Note that direct use of __initcall is discouraged, vs. one of the priority categorized subgroups. As __initcall gets mapped onto device_initcall, our use of device_initcall directly in this change means that the runtime impact is zero -- it will remain at level 6 in initcall ordering.

---
 arch/x86/kernel/devicetree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/devicetree.c +1 -1
index 6367a780cc8c..3743b92089de 100644
@@ -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)
Signature · 1 line
2.2.1
#3 lore raw

PATCH 3/15 powerpc: use device_initcall for registering rtc devices

In reply to Paul Gortmaker

Currently these two RTC devices are in core platform code where it is not possible for them to be modular. It will never be modular, so using module_init as an alias for __initcall can be somewhat misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Note that direct use of __initcall is discouraged, vs. one of the priority categorized subgroups. As __initcall gets mapped onto device_initcall, our use of device_initcall directly in this change means that the runtime impact is zero -- they will remain at level 6 in initcall ordering.

---
 arch/powerpc/kernel/time.c        | 2 +-
 arch/powerpc/platforms/ps3/time.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
arch/powerpc/kernel/time.c +1 -1
index 56f44848b044..43922509a483 100644
@@ -1124,4 +1124,4 @@ static int __init rtc_init(void)
 	return PTR_ERR_OR_ZERO(pdev);
 }
 
-module_init(rtc_init);
+device_initcall(rtc_init);
arch/powerpc/platforms/ps3/time.c +1 -2
index ce73ce865613..791c6142c4a7 100644
@@ -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);
Signature · 1 line
2.2.1
#4 lore raw

PATCH 4/15 powerpc: don't use module_init in non-modular 83xx suspend code

In reply to Paul Gortmaker

The suspend.o is built for SUSPEND -- which is bool, and hence this code is either present or absent. It will never be modular, so using module_init as an alias for __initcall can be somewhat misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Note that direct use of __initcall is discouraged, vs. one of the priority categorized subgroups. As __initcall gets mapped onto device_initcall, our use of device_initcall directly in this change means that the runtime impact is zero -- it will remain at level 6 in initcall ordering.

Cc Scott Wood <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
---
 arch/powerpc/platforms/83xx/suspend.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/powerpc/platforms/83xx/suspend.c +1 -2
index c9adbfb65006..fcbea4b51a78 100644
@@ -445,5 +445,4 @@ static int pmc_init(void)
 {
 	return platform_driver_register(&pmc_driver);
 }
-
-module_init(pmc_init);
+device_initcall(pmc_init);
Signature · 1 line
2.2.1
#5 lore raw

PATCH 5/15 arm: don't use module_init in non-modular mach-vexpress/spc.c code

In reply to Paul Gortmaker

The spc.o is built for ARCH_VEXPRESS_SPC -- which is bool, and hence this code is either present or absent. It will never be modular, so using module_init as an alias for __initcall can be somewhat misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Note that direct use of __initcall is discouraged, vs. one of the priority categorized subgroups. As __initcall gets mapped onto device_initcall, our use of device_initcall directly in this change means that the runtime impact is zero -- it will remain at level 6 in initcall ordering.

Cc Russell King <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
---
 arch/arm/mach-vexpress/spc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-vexpress/spc.c +1 -1
index f61158c6ce71..5766ce2be32b 100644
@@ -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);
Signature · 1 line
2.2.1
#6 lore raw

PATCH 6/15 alpha: don't use module_init for non-modular core code

In reply to Paul Gortmaker

The srm console is always built in. It will never be modular, so using module_init as an alias for __initcall is rather misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Direct use of __initcall is discouraged, vs prioritized ones. Use of device_initcall is consistent with what __initcall maps onto, and hence does not change the init order, making the
impact of this change zero. Should someone with real hardware
for boot testing want to change it later to arch_initcall or console_initcall, they can do that at a later date.

---
 arch/alpha/kernel/srmcons.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/alpha/kernel/srmcons.c +1 -2
index 6f01d9ad7b81..72b59511e59a 100644
@@ -237,8 +237,7 @@ srmcons_init(void)
 
 	return -ENODEV;
 }
-
-module_init(srmcons_init);
+device_initcall(srmcons_init);
 
 
 /*
Signature · 1 line
2.2.1
maintainer
#7 lore raw

Re: [PATCH 06/15] alpha: don't use module_init for non-modular core code

Quoted 16 lines · Paul Gortmaker

The srm console is always built in. It will never be modular, so using module_init as an alias for __initcall is rather misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Direct use of __initcall is discouraged, vs prioritized ones. Use of device_initcall is consistent with what __initcall maps onto, and hence does not change the init order, making the
impact of this change zero. Should someone with real hardware
for boot testing want to change it later to arch_initcall or console_initcall, they can do that at a later date.

Quoted 7 lines

---

I included this in my pull request to Linus that went upstream yesterday. Thanks!

#8 lore raw

Re: [PATCH 06/15] alpha: don't use module_init for non-modular core code

Quoted 26 lines · Matt Turner
Quoted 16 lines · Paul Gortmaker

The srm console is always built in. It will never be modular, so using module_init as an alias for __initcall is rather misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Direct use of __initcall is discouraged, vs prioritized ones. Use of device_initcall is consistent with what __initcall maps onto, and hence does not change the init order, making the
impact of this change zero. Should someone with real hardware
for boot testing want to change it later to arch_initcall or console_initcall, they can do that at a later date.

Quoted 7 lines

---

Quoted 2 lines

I included this in my pull request to Linus that went upstream yesterday. Thanks!

OK, thanks - I'll drop it from here if/when I rebase onto the 4.1-rc6 pending on Sunday. If I drop it now I'll risk introducing a bisect failure for alpha, since my current baseline of 4.1-rc5 doesn't have this now-upstream change from the old original series.

Paul.
--

Quoted 1 line
#9 lore raw

PATCH 7/15 ia64: don't use module_init for non-modular core kernel/mca.c code

In reply to Paul Gortmaker

The mca.c code is always built in. It will never be modular, so using module_init as an alias for __initcall is rather misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Direct use of __initcall is discouraged, vs prioritized ones. Use of device_initcall is consistent with what __initcall maps onto, and hence does not change the init order, making the
impact of this change zero. Should someone with real hardware
for boot testing want to change it later to arch_initcall or something different, they can do that at a later date.

---
 arch/ia64/sn/kernel/mca.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/ia64/sn/kernel/mca.c +1 -2
index 27793f7aa99c..5b799d4deb74 100644
@@ -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);
Signature · 1 line
2.2.1
#10 lore raw

PATCH 8/15 ia64: don't use module_init in non-modular sim/simscsi.c code

In reply to Paul Gortmaker

The simscsi.o is built for HP_SIMSCSI -- which is bool, and hence this code is either present or absent. It will never be modular, so using module_init as an alias for __initcall can be somewhat misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Note that direct use of __initcall is discouraged, vs. one of the priority categorized subgroups. As __initcall gets mapped onto device_initcall, our use of device_initcall directly in this change means that the runtime impact is zero -- it will remain at level 6 in initcall ordering.

And since it can't be modular, we remove all the __exitcall stuff related to module_exit() -- it is dead code that won't ever be executed.

---
 arch/ia64/hp/sim/simscsi.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
arch/ia64/hp/sim/simscsi.c +1 -10
index 3a428f19a001..085047f3a545 100644
@@ -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);
Signature · 1 line
2.2.1
#11 lore raw

PATCH 9/15 cris: don't use module_init for non-modular core intmem.c code

In reply to Paul Gortmaker

The intmem.c code is always built in. It will never be modular, so using module_init as an alias for __initcall is rather misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Direct use of __initcall is discouraged, vs prioritized ones. Use of device_initcall is consistent with what __initcall maps onto, and hence does not change the init order, making the
impact of this change zero. Should someone with real hardware
for boot testing want to change it later to arch_initcall or something different, they can do that at a later date.

---
 arch/cris/arch-v32/mm/intmem.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/cris/arch-v32/mm/intmem.c +1 -2
index 1b17d92cef8e..9ef56092a4c5 100644
@@ -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);
 
Signature · 1 line
2.2.1
#12 lore raw

PATCH 10/15 parisc: don't use module_init for non-modular core pdc_cons code

In reply to Paul Gortmaker

The pdc_cons.c code is always built in. It will never be modular, so using module_init as an alias for __initcall is rather misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Direct use of __initcall is discouraged, vs prioritized ones. Use of device_initcall is consistent with what __initcall maps onto, and hence does not change the init order, making the
impact of this change zero. Should someone with real hardware
for boot testing want to change it later to arch_initcall or something different, they can do that at a later date.

---
 arch/parisc/kernel/pdc_cons.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/parisc/kernel/pdc_cons.c +1 -2
index d5cae55195ec..10a5ae9553fd 100644
@@ -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)
 {
Signature · 1 line
2.2.1
#13 lore raw

PATCH 11/15 parisc64: don't use module_init for non-modular core perf code

In reply to Paul Gortmaker

The perf.c code depends on CONFIG_64BIT, so it is either built-in or absent. It will never be modular, so using module_init as an alias for __initcall is rather misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing. Aside from it not making sense, it also causes a ~10% increase in CPP overhead due to module.h having a large list of headers itself -- for example compare line counts:

device_initcall() and <linux/init.h>

	20238 arch/parisc/kernel/perf.i

module_init() and <linux/module.h>

	22194 arch/parisc/kernel/perf.i

Direct use of __initcall is discouraged, vs prioritized ones. Use of device_initcall is consistent with what __initcall maps onto, and hence does not change the init order, making the
impact of this change zero. Should someone with real hardware
for boot testing want to change it later to arch_initcall or something different, they can do that at a later date.

Cc "James E.J. Bottomley" <[email protected]>
Cc Helge Deller <[email protected]>
---
 arch/parisc/kernel/perf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/parisc/kernel/perf.c +1 -2
index ba0c053e25ae..518f4f5f1f43 100644
@@ -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);
Signature · 1 line
2.2.1
#14 lore raw

PATCH 12/15 mn10300: don't use module_init in non-modular flash.c code

In reply to Paul Gortmaker

The flash.o is built for obj-y -- and hence this code is always present. It will never be modular, so using module_init as an alias for __initcall can be somewhat misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Note that direct use of __initcall is discouraged, vs. one of the priority categorized subgroups. As __initcall gets mapped onto device_initcall, our use of device_initcall directly in this change means that the runtime impact is zero -- it will remain at level 6 in initcall ordering.

---
 arch/mn10300/unit-asb2303/flash.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/mn10300/unit-asb2303/flash.c +1 -2
index 17fe083fcb6f..b03d8738d67c 100644
@@ -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);
Signature · 1 line
2.2.1
#15 lore raw

PATCH 13/15 sh: don't use module_init in non-modular psw.c code

In reply to Paul Gortmaker

The psw.o is built for obj-y -- and hence this code is always present. It will never be modular, so using module_init as an alias for __initcall can be somewhat misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Note that direct use of __initcall is discouraged, vs. one of the priority categorized subgroups. As __initcall gets mapped onto device_initcall, our use of device_initcall directly in this change means that the runtime impact is zero -- it will remain at level 6 in initcall ordering.

---
 arch/sh/boards/mach-landisk/psw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sh/boards/mach-landisk/psw.c +1 -1
index bef83522f958..5192b1f43ada 100644
@@ -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);
Signature · 1 line
2.2.1
#16 lore raw

PATCH 14/15 xtensa: don't use module_init for non-modular core network.c code

In reply to Paul Gortmaker

The network.c code is piggybacking off of the arch independent CONFIG_NET, which is bool. So the code is either built in or absent. It will never be modular, so using module_init as an alias for __initcall is rather misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Direct use of __initcall is discouraged, vs prioritized ones. Use of device_initcall is consistent with what __initcall maps onto, and hence does not change the init order, making the
impact of this change zero. Should someone with real hardware
for boot testing want to change it later to arch_initcall or something different, they can do that at a later date.

---
 arch/xtensa/platforms/iss/network.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/xtensa/platforms/iss/network.c +1 -3
index 17b1ef3232e4..8ab021b1f141 100644
@@ -681,6 +681,4 @@ static int iss_net_init(void)
 
 	return 1;
 }
-
-module_init(iss_net_init);
-
+device_initcall(iss_net_init);
Signature · 1 line
2.2.1
#17 lore raw

PATCH 15/15 drivers/clk: don't use module_init in clk-nomadik.c which is non-modular

In reply to Paul Gortmaker

The clk-nomadik.o is built for ARCH_NOMADIK -- which is bool, and hence this code is either present or absent. It will never be modular, so using module_init as an alias for __initcall can be somewhat misleading.

Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to obviously non-modular code, and that would be a worse thing.

Note that direct use of __initcall is discouraged, vs. one of the priority categorized subgroups. As __initcall gets mapped onto device_initcall, our use of device_initcall directly in this change means that the runtime impact is zero -- it will remain at level 6 in initcall ordering.

Cc Mike Turquette <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
---
 drivers/clk/clk-nomadik.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/clk/clk-nomadik.c +1 -2
index 05e04ce0f148..c9487179f25f 100644
@@ -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
 
Signature · 1 line
2.2.1