greybus: hd: initialise device last
authorJohan Hovold <johan@hovoldconsulting.com>
Mon, 7 Dec 2015 14:05:35 +0000 (15:05 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 8 Dec 2015 20:31:14 +0000 (15:31 -0500)
commitd4c80bad59dbc69a989ca2c4efbcc0fb772a713b
tree32a168ea64dfca42b7c603c55d6e07f8baa3b292
parent0bf1f2441979e290945f4e5af40d76582c61da1e
greybus: hd: initialise device last

Initialise the struct device last when creating the host device.

After device_initialize(), or rather dev_set_name(), we must use
put_device to release the host device. Initialising last will allow for
a simpler release callback.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/hd.c