Move sysfs device register into separate function

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>