spi: rockchip: test: update sys class operation with linux 4.19

Change-Id: I1d5602ab66b357ceca1ade0fb8cbb6c6c5222a92
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
Jon Lin
2020-01-10 20:11:35 +08:00
parent 87ec170ff7
commit b38f44bb32

View File

@@ -229,12 +229,12 @@ static ssize_t spi_test_write(struct file *file,
}
if (argc > 3) {
fd = sys_open(name, O_RDONLY, 0);
fd = ksys_open(name, O_RDONLY, 0);
if (fd < 0) {
printk("open %s fail\n", name);
} else {
sys_read(fd, (char __user *)txbuf, size);
sys_close(fd);
ksys_read(fd, (char __user *)txbuf, size);
ksys_close(fd);
}
set_fs(old_fs);
} else {