Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
}