summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2015-06-16 19:43:05 -0700
committerGreg Kroah-Hartman <gregkh@google.com>2015-06-16 19:43:05 -0700
commitfd7b435f21239a022057b014aff0836403bfa54a (patch)
treefb04ebbe0d401de7c6c3d2afa5f3e2a622f231f2 /drivers/staging/greybus/core.c
parent9df94499c443d59291d247046cf3381ca06c1d36 (diff)
greybus: Revert "greybus: reserve host cport id 0"
This reverts commit 698d4bd3e7541a660a3c3665f0af9e787650a239 as Alex says it is broken. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/core.c')
-rw-r--r--drivers/staging/greybus/core.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c
index bc9c1ebf7983..d4fffecb1abc 100644
--- a/drivers/staging/greybus/core.c
+++ b/drivers/staging/greybus/core.c
@@ -170,7 +170,6 @@ struct greybus_host_device *greybus_create_hd(struct greybus_host_driver *driver
size_t buffer_size_max)
{
struct greybus_host_device *hd;
- int ret;
/*
* Validate that the driver implements all of the callbacks
@@ -201,19 +200,12 @@ struct greybus_host_device *greybus_create_hd(struct greybus_host_driver *driver
if (!hd)
return ERR_PTR(-ENOMEM);
- ida_init(&hd->cport_id_map);
- /* Reserve CPort id 0 */
- ret = ida_simple_get(&hd->cport_id_map, 0, 1, GFP_KERNEL);
- if (ret < 0) {
- kfree(hd);
- return ERR_PTR(ret);
- }
-
kref_init(&hd->kref);
hd->parent = parent;
hd->driver = driver;
INIT_LIST_HEAD(&hd->interfaces);
INIT_LIST_HEAD(&hd->connections);
+ ida_init(&hd->cport_id_map);
hd->buffer_size_max = buffer_size_max;
return hd;