aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Villemoes <[email protected]>2020-01-15 19:41:52 +0100
committerGreg Kroah-Hartman <[email protected]>2020-01-22 15:28:15 +0100
commitfad1db8a351cc913bbfb9ee4fe7ca4939cb19f2e (patch)
treebcb5a27c79d9def7370fe8f66c8e5f8abfddc3dd
parent21766d11d151c82eb41c09338c8e149da6019a8b (diff)
devtmpfs: initify a bit
devtmpfs_mount() is only called from prepare_namespace() in init/do_mounts.c, which is an __init function, so devtmpfs_mount() can also be moved to .init.text. Then the mount_dev static variable is only referenced from __init functions (devtmpfs_mount and its initializer function mount_param). Signed-off-by: Rasmus Villemoes <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/base/devtmpfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
index 693390d9c545..56632fb22fc0 100644
--- a/drivers/base/devtmpfs.c
+++ b/drivers/base/devtmpfs.c
@@ -30,7 +30,7 @@
static struct task_struct *thread;
-static int mount_dev = IS_ENABLED(CONFIG_DEVTMPFS_MOUNT);
+static int __initdata mount_dev = IS_ENABLED(CONFIG_DEVTMPFS_MOUNT);
static DEFINE_SPINLOCK(req_lock);
@@ -355,7 +355,7 @@ static int handle_remove(const char *nodename, struct device *dev)
* If configured, or requested by the commandline, devtmpfs will be
* auto-mounted after the kernel mounted the root filesystem.
*/
-int devtmpfs_mount(void)
+int __init devtmpfs_mount(void)
{
int err;