portal: clean up a bit and register the character devices

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>