From: Junghoon Kim Date: Mon, 29 Apr 2019 22:43:58 +0000 (+0900) Subject: misc: tizen-inform-reboot: Use ksys_open() and ksys_close() wrappers X-Git-Tag: submit/tizen/20190614.014912~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e9d1b70001cd26a2d6cc39fb8269a8343ecd639e;p=platform%2Fkernel%2Flinux-rpi3.git 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 --- diff --git a/drivers/misc/tizen-inform-reboot.c b/drivers/misc/tizen-inform-reboot.c index f724e7e215ba..6cd7ce20883b 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");