summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Vander Stoep2016-10-21 16:29:22 -0500
committerJeff Vander Stoep2016-10-21 16:29:22 -0500
commit1ba4e981dbb75985b320c2d97c7c2567b9ebcf51 (patch)
treefc2740de9ee96e209fa4db4ca215aabfc70fac4b /libion/ion.c
parent27d2d49f4872c26831d3e016765c62def3d2fb01 (diff)
downloadplatform-system-core-1ba4e981dbb75985b320c2d97c7c2567b9ebcf51.tar.gz
platform-system-core-1ba4e981dbb75985b320c2d97c7c2567b9ebcf51.tar.xz
platform-system-core-1ba4e981dbb75985b320c2d97c7c2567b9ebcf51.zip
libion: open /dev/ion read-only
/dev/ion driver does not recognize the write operation [1] so open it read-only. [1] http://lxr.free-electrons.com/source/drivers/staging/android/ion/ion.c?v=4.5#L1369 Test: Angler builds and boots Bug: 32120194 Change-Id: I9b26d43ea32cb24426404668701df1f1648d336c
Diffstat (limited to 'libion/ion.c')
-rw-r--r--libion/ion.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libion/ion.c b/libion/ion.c
index 4565efb80..2db88453e 100644
--- a/libion/ion.c
+++ b/libion/ion.c
@@ -34,7 +34,7 @@
34 34
35int ion_open() 35int ion_open()
36{ 36{
37 int fd = open("/dev/ion", O_RDWR); 37 int fd = open("/dev/ion", O_RDONLY);
38 if (fd < 0) 38 if (fd < 0)
39 ALOGE("open /dev/ion failed!\n"); 39 ALOGE("open /dev/ion failed!\n");
40 return fd; 40 return fd;