From 28ee15c339a4e893e95cac5b8c6fbf2730e0149e Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 25 Oct 2012 12:06:18 +0100 Subject: 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. --- bmm_lib.c | 9 ++------- 1 file 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; } -- cgit