The 'device in use' error comes from the fact that there is a process running which has an open/active file descriptor associated with the device. You must determine the process(es) which is(are) associated with the device and kill it(them).
If the device is a tty then you have to determine which tty is in use (mouse, modems, console, logins, etc) and make sure when you kill the process that you are not killing the shell you are working in. For example, if you are at a console and logged in to the system, you cannot kill that tty. If you do, you will be kicked off, because your shell process (associated with the tty) will die.
Enjoy the detective work! It not too hard of a detective-problem and should be rewarding finding out which TTYs are associated with what process