Resolution:
Close some of the open device files which you are not currently accessing, and then try to open the relevant file again. You should then be able to continue to run your program.