From 3eb2af84b3a95351cba71b09c6296beb12a576f3 Mon Sep 17 00:00:00 2001 From: Rin Cat Date: Mon, 6 May 2019 11:54:15 -0400 Subject: [PATCH] Linux 5.1 compat: get_ds() --- os_dep/osdep_service.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 2dca007..e9ae057 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -2187,7 +2187,7 @@ static int isFileReadable(const char *path, u32 *sz) ret = PTR_ERR(fp); else { oldfs = get_fs(); - set_fs(get_ds()); + set_fs(KERNEL_DS); if (1 != readFile(fp, &buf, 1)) ret = PTR_ERR(fp); @@ -2225,7 +2225,7 @@ static int retriveFromFile(const char *path, u8 *buf, u32 sz) RTW_INFO("%s openFile path:%s fp=%p\n", __FUNCTION__, path , fp); oldfs = get_fs(); - set_fs(get_ds()); + set_fs(KERNEL_DS); ret = readFile(fp, buf, sz); set_fs(oldfs); closeFile(fp); @@ -2260,7 +2260,7 @@ static int storeToFile(const char *path, u8 *buf, u32 sz) RTW_INFO("%s openFile path:%s fp=%p\n", __FUNCTION__, path , fp); oldfs = get_fs(); - set_fs(get_ds()); + set_fs(KERNEL_DS); ret = writeFile(fp, buf, sz); set_fs(oldfs); closeFile(fp);