summaryrefstree
path: root/kernel/security/dsms/dsms_init.c
blob: c9cedcdffe28805be321a4a4fe1d8de6bf4fa68f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2
 * as published by the Free Software Foundation.
 */

#include <asm/uaccess.h>

#include <linux/dsms.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kmod.h>
#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/slab.h>
#include <linux/stddef.h>
#include <linux/string.h>

#include "dsms_debug.h"
#include "dsms_init.h"

static int is_dsms_initialized_flag = false;

int dsms_is_initialized(void)
{
	return is_dsms_initialized_flag;
}

static __init int dsms_init(void)
{
	printk(DSMS_TAG "Started"
#ifdef DSMS_DEBUG_ENABLE
		" (DSMS_DEBUG_ENABLE"
#ifdef DSMS_DEBUG_TRACE_DSMS_CALLS
		" DSMS_DEBUG_TRACE_DSMS_CALLS"
#endif //DSMS_DEBUG_TRACE_DSMS_CALLS
#ifdef DSMS_DEBUG_WHITELIST
		" DSMS_DEBUG_WHITELIST"
#endif //DSMS_DEBUG_WHITELIST
		")"
#endif //DSMS_DEBUG_ENABLE
		".");
	is_dsms_initialized_flag = true;
	return 0;
}

module_init(dsms_init);