Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

reset: berlin: make it explicitly non-modular

The Kconfig currently controlling compilation of this code is:

drivers/reset/Kconfig:config RESET_BERLIN
drivers/reset/Kconfig: bool "Berlin Reset Driver" if COMPILE_TEST
drivers/reset/Kconfig: default ARCH_BERLIN

or

arch/arm/mach-berlin/Kconfig:menuconfig ARCH_BERLIN
arch/arm/mach-berlin/Kconfig: bool "Marvell Berlin SoCs" if ARCH_MULTI_V7

or

arch/arm64/Kconfig.platforms:config ARCH_BERLIN
arch/arm64/Kconfig.platforms: bool "Marvell Berlin SoC Family"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

Since module_platform_driver() uses the same init level priority as
builtin_platform_driver() the init ordering remains unchanged with
this commit.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.

Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

authored by

Paul Gortmaker and committed by
Philipp Zabel
ed4dba99 211bc8c3

+4 -8
+4 -8
drivers/reset/reset-berlin.c
··· 1 1 /* 2 2 * Copyright (C) 2014 Marvell Technology Group Ltd. 3 3 * 4 + * Marvell Berlin reset driver 5 + * 4 6 * Antoine Tenart <antoine.tenart@free-electrons.com> 5 7 * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> 6 8 * ··· 14 12 #include <linux/delay.h> 15 13 #include <linux/io.h> 16 14 #include <linux/mfd/syscon.h> 17 - #include <linux/module.h> 15 + #include <linux/init.h> 18 16 #include <linux/of.h> 19 17 #include <linux/of_address.h> 20 18 #include <linux/platform_device.h> ··· 93 91 { .compatible = "marvell,berlin2-reset" }, 94 92 { }, 95 93 }; 96 - MODULE_DEVICE_TABLE(of, berlin_reset_dt_match); 97 94 98 95 static struct platform_driver berlin_reset_driver = { 99 96 .probe = berlin2_reset_probe, ··· 101 100 .of_match_table = berlin_reset_dt_match, 102 101 }, 103 102 }; 104 - module_platform_driver(berlin_reset_driver); 105 - 106 - MODULE_AUTHOR("Antoine Tenart <antoine.tenart@free-electrons.com>"); 107 - MODULE_AUTHOR("Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>"); 108 - MODULE_DESCRIPTION("Marvell Berlin reset driver"); 109 - MODULE_LICENSE("GPL"); 103 + builtin_platform_driver(berlin_reset_driver);