added code to set device data to struct

Signed-off-by: Stefan Venz <ikstream86@gmail.com>