From 0e1255170c70d6a46b039c213e4aca6d9c1ed8e4 Mon Sep 17 00:00:00 2001 From: Junghoon Kim Date: Tue, 30 Apr 2019 07:43:58 +0900 Subject: [PATCH] misc: tizen-inform-reboot: Use ksys_open() and ksys_close() wrappers Using ksys_open() and ksys_close() wrappers allow us to avoid the in-kernel calls to the sys_open() and sys_close() syscalls. Change-Id: Iea33654daef917f88cede31675c66e8b5becad77 Signed-off-by: Junghoon Kim --- drivers/misc/tizen-inform-reboot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/tizen-inform-reboot.c b/drivers/misc/tizen-inform-reboot.c index f724e7e..6cd7ce2 100644 --- a/drivers/misc/tizen-inform-reboot.c +++ b/drivers/misc/tizen-inform-reboot.c @@ -29,7 +29,7 @@ static int inform_reboot_notifier(struct notifier_block *nb, set_fs(KERNEL_DS); - fd = sys_open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0644); + fd = ksys_open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0644); if (fd >= 0) { file = fget(fd); if (file) { @@ -55,7 +55,7 @@ static int inform_reboot_notifier(struct notifier_block *nb, fput(file); } - sys_close(fd); + ksys_close(fd); } else { pr_err("Reboot parameter passing is failed.\n" "Inform file path should be described correctly in config.\n"); -- 2.7.4