summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-04-26 16:30:42 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-04-26 16:30:42 +0200
commit9756397b620c3880b94b9db3da96892fa952a3cf (patch)
tree08828e21a7c26f8303e34798558ab82203b49597 /libc
parentb713a0b26f59e059ba2c73ab802fb03a4e785c03 (diff)
arm: use PATH_MEM in ioperm()
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/arm/ioperm.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/libc/sysdeps/linux/arm/ioperm.c b/libc/sysdeps/linux/arm/ioperm.c
index a7f6c3067..e1da1875c 100644
--- a/libc/sysdeps/linux/arm/ioperm.c
+++ b/libc/sysdeps/linux/arm/ioperm.c
@@ -33,21 +33,16 @@
the area affected (this is a kernel limitation). So we now just
enable all the ports all of the time. */
+#include <sys/io.h>
+#include <sys/mman.h>
+#include <sys/sysctl.h>
+#include <paths.h>
#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
#include <ctype.h>
-#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/sysctl.h>
-#include <sys/io.h>
-
-
-
+#include <fcntl.h>
#include <linux/version.h>
#define PATH_ARM_SYSTYPE "/etc/arm_systype"
@@ -186,7 +181,7 @@ int ioperm (unsigned long int from, unsigned long int num, int turn_on)
if (! io.base) {
int fd;
- fd = open ("/dev/mem", O_RDWR);
+ fd = open (_PATH_MEM, O_RDWR);
if (fd < 0)
return -1;