diff options
author | Alex Elder <elder@linaro.org> | 2015-06-13 11:02:09 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-06-15 16:49:00 -0700 |
commit | fb690ca96f9a7aff8bc8135ce23606e243f4cbae (patch) | |
tree | 57a404e32984edcc4ce3363a530e4022aefabeff /drivers/staging/greybus/connection.c | |
parent | d29b3d631e572400b45b5f9e48e432493663b0fc (diff) | |
download | linux-stable-fb690ca96f9a7aff8bc8135ce23606e243f4cbae.tar.gz linux-stable-fb690ca96f9a7aff8bc8135ce23606e243f4cbae.tar.bz2 linux-stable-fb690ca96f9a7aff8bc8135ce23606e243f4cbae.zip |
greybus: rename HOST_DEV_CPORT_ID_MAX
We limit the number of host-side CPorts to a fixed maximum (which
is less than the 4096 that UniPro allows). This patch imposes a
similar limit on the CPort IDs defined by modules (signaling an
error if one too large is found in a manifest).
It seems reasonable to use the same value for both limits. Change
the name of the constant that defines the host limit and use it for
both. Update cport_id_valid() to enforce the maximum.
(Ultimately we should impose a limit like this; this change is being
made in preparation for supporting multiple connections over a
single CPort.)
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/connection.c')
-rw-r--r-- | drivers/staging/greybus/connection.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index 7236e47ea9c8..9467aaba2b32 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -158,7 +158,7 @@ struct gb_connection *gb_connection_create(struct gb_bundle *bundle, if (!connection) return NULL; - retval = ida_simple_get(id_map, 0, HOST_DEV_CPORT_ID_MAX, GFP_KERNEL); + retval = ida_simple_get(id_map, 0, CPORT_ID_MAX, GFP_KERNEL); if (retval < 0) { kfree(connection); return NULL; |