From 659b385aca594035a93a04dbb8e1ecf8ccf6eec1 Mon Sep 17 00:00:00 2001 From: Jiankang Chen Date: Mon, 28 Oct 2019 20:29:38 +0800 Subject: [PATCH] svm: add open function for this svm drv; ascend inclusion category: feature bugzilla: 16554 CVE: NA -------- add open function to this svm drv, and this open function is a empty function; Signed-off-by: Jiankang Chen Signed-off-by: Lijun Fang Reviewed-by: Li Zefan Reviewed-by: Kefeng Wang Signed-off-by: Yang Yingliang --- drivers/char/svm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/char/svm.c b/drivers/char/svm.c index db3191c9c3ba..9448688f3d2b 100644 --- a/drivers/char/svm.c +++ b/drivers/char/svm.c @@ -81,6 +81,12 @@ struct svm_context { struct list_head process_head; atomic_t ref; }; + +static int svm_open(struct inode *inode, struct file *file) +{ + return 0; +} + /*svm ioctl will include some case for HI1980 and HI1910*/ static long svm_ioctl(struct file *file, unsigned int cmd, unsigned long arg) @@ -91,6 +97,7 @@ static long svm_ioctl(struct file *file, unsigned int cmd, static const struct file_operations svm_fops = { .owner = THIS_MODULE, + .open = svm_open, .unlocked_ioctl = svm_ioctl, }; /*svm device probe this is init the svm device*/ -- GitLab