greybus: svc: clean up svc initialisation
Make sure to initialise the svc device fully before adding it to the host device. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
efe6ef76ba
commit
6106e51b74
|
@ -699,6 +699,7 @@ static int gb_svc_connection_init(struct gb_connection *connection)
|
|||
|
||||
dev_set_name(&svc->dev, "%d-svc", hd->bus_id);
|
||||
|
||||
ida_init(&svc->device_id_map);
|
||||
svc->state = GB_SVC_STATE_RESET;
|
||||
svc->connection = connection;
|
||||
connection->private = svc;
|
||||
|
@ -708,8 +709,6 @@ static int gb_svc_connection_init(struct gb_connection *connection)
|
|||
WARN_ON(connection->hd->initial_svc_connection);
|
||||
connection->hd->initial_svc_connection = connection;
|
||||
|
||||
ida_init(&svc->device_id_map);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue