OSDN Git Service

greybus: rename HOST_DEV_CPORT_ID_MAX
authorAlex Elder <elder@linaro.org>
Sat, 13 Jun 2015 16:02:09 +0000 (11:02 -0500)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 15 Jun 2015 23:49:00 +0000 (16:49 -0700)
commitfb690ca96f9a7aff8bc8135ce23606e243f4cbae
tree57a404e32984edcc4ce3363a530e4022aefabeff
parentd29b3d631e572400b45b5f9e48e432493663b0fc
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>
drivers/staging/greybus/connection.c
drivers/staging/greybus/core.c
drivers/staging/greybus/greybus.h
drivers/staging/greybus/manifest.c