From 6106e51b742b32954351e6020cdb789bc33bf120 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Wed, 25 Nov 2015 15:59:07 +0100 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/svc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c index 8f4efb340f96..5aa21f7c591d 100644 --- a/drivers/staging/greybus/svc.c +++ b/drivers/staging/greybus/svc.c @@ -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; } -- 2.20.1