summaryrefslogtreecommitdiff
path: root/bmm_lib.c
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2012-10-25 12:06:18 +0100
committerRussell King <rmk@arm.linux.org.uk>2012-10-25 12:14:30 +0100
commit28ee15c339a4e893e95cac5b8c6fbf2730e0149e (patch)
treee45176e10091afc976e82e97d889fb1dc652db8a /bmm_lib.c
parent0385e4a5f14b06e3df772aaebc8aee0db7a45d0f (diff)
Avoid making /dev/bmm
Modern systems use udev to manage /dev, and so /dev/bmm should be already created. Nevertheless, having a library try to create a device node is insane; the library doesn't know what context it is being called from. Neither should it try to create device nodes as non-root users. Get rid of this code.
Diffstat (limited to 'bmm_lib.c')
-rw-r--r--bmm_lib.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/bmm_lib.c b/bmm_lib.c
index fa6c350..ab33cde 100644
--- a/bmm_lib.c
+++ b/bmm_lib.c
@@ -35,17 +35,12 @@ static int bmm_fd = -1;
int bmm_init()
{
/* attempt to open the BMM driver */
- if(bmm_fd < 0)
+ if(bmm_fd < 0) {
bmm_fd = open(BMM_DEVICE_FILE, O_RDWR);
- /* if the open failed, try to mount the driver */
- if(bmm_fd < 0 ) {
- system("mknod /dev/bmm c 10 94\n");
- bmm_fd = open(BMM_DEVICE_FILE, O_RDWR);
+ pr_debug("BMM device fd: %d\n", bmm_fd);
}
- pr_debug("BMM device fd: %d", bmm_fd);
-
return bmm_fd;
}