I can confirm for you that Lt. Davis was mustered out on July 17, 1865, but I'm afraid I have no information about his imprisonment. I do know that the Union officers taken prisoner at the Battle of the Crater (July 30, 1864) were sent to Columbia, South Carolina. (The enlisted men were sent to Danville, Virginia.) Perhaps the same procedure was followed two months later. Best of luck in your research!