Commit 6106e51b authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: svc: clean up svc initialisation

Make sure to initialise the svc device fully before adding it to the
host device.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent efe6ef76
...@@ -699,6 +699,7 @@ static int gb_svc_connection_init(struct gb_connection *connection) ...@@ -699,6 +699,7 @@ static int gb_svc_connection_init(struct gb_connection *connection)
dev_set_name(&svc->dev, "%d-svc", hd->bus_id); dev_set_name(&svc->dev, "%d-svc", hd->bus_id);
ida_init(&svc->device_id_map);
svc->state = GB_SVC_STATE_RESET; svc->state = GB_SVC_STATE_RESET;
svc->connection = connection; svc->connection = connection;
connection->private = svc; connection->private = svc;
...@@ -708,8 +709,6 @@ static int gb_svc_connection_init(struct gb_connection *connection) ...@@ -708,8 +709,6 @@ static int gb_svc_connection_init(struct gb_connection *connection)
WARN_ON(connection->hd->initial_svc_connection); WARN_ON(connection->hd->initial_svc_connection);
connection->hd->initial_svc_connection = connection; connection->hd->initial_svc_connection = connection;
ida_init(&svc->device_id_map);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment