From 6551cce888e171d1640ae927e55c975e1a2cb4b6 Mon Sep 17 00:00:00 2001 From: Srinivas Kandagatla Date: Fri, 21 Dec 2018 09:46:04 +0000 Subject: apps_user: make open_dev non static Make open non static so that rpcmem can use the same device to do dmabuf allocations. Signed-off-by: Srinivas Kandagatla --- src/fastrpc_apps_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/fastrpc_apps_user.c b/src/fastrpc_apps_user.c index 4e8f509..19ea601 100644 --- a/src/fastrpc_apps_user.c +++ b/src/fastrpc_apps_user.c @@ -243,6 +243,7 @@ static void create_dev(void) dev = open(FASTRPC_DEVICE, O_NONBLOCK); VERIFY(dev >= 0); + gdev = dev; VERIFY(!apps_std_fopen_with_env("ADSP_LIBRARY_PATH", ";", "fastrpc_shell_0", "r", &fh)); VERIFY(!apps_std_flen(fh, &len)); VERIFY(len < INT_MAX); @@ -252,7 +253,6 @@ static void create_dev(void) VERIFY(!apps_std_fread(fh, ginit.file, len, &readlen, &eof)); VERIFY(ginit.filelen == readlen); ginit.filefd = rpcmem_to_fd((void *)ginit.file); - gdev = dev; VERIFY(0 == ioctl(dev, FASTRPC_IOCTL_INIT_CREATE, (unsigned long)&ginit)); dev = -1; } @@ -281,7 +281,7 @@ static void create_listener(void) glist = listener_init(); } -static int open_dev(int attach) +int open_dev(int attach) { if (gdev == -1) { -- cgit v1.2.3