summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/svc.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-11-25 15:59:07 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2015-11-25 15:30:03 -0800
commit6106e51b742b32954351e6020cdb789bc33bf120 (patch)
treef4c8bd769cdfc434b539ede3b759ee85efb61fe5 /drivers/staging/greybus/svc.c
parentefe6ef76ba97f20302d200368d9f99848350bae1 (diff)
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>
Diffstat (limited to 'drivers/staging/greybus/svc.c')
-rw-r--r--drivers/staging/greybus/svc.c3
1 files changed, 1 insertions, 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;
}