OSDN Git Service

greybus: fix cport-id defines
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 2 Sep 2015 16:03:21 +0000 (18:03 +0200)
committerJohan Hovold <johan@hovoldconsulting.com>
Thu, 3 Sep 2015 07:45:32 +0000 (09:45 +0200)
The CPORT_ID_MAX define has been used by host drivers as a device limit,
but also for sanity checks when parsing manifests.

Now that it's only used for sanity checks we can increase it to the
specification maximum (4095) and get rid of the config-option that could
be used to override the previous limit (128).

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/staging/greybus/greybus.h

index 27a7724..8e215f8 100644 (file)
        .match_flags    = GREYBUS_DEVICE_ID_MATCH_SERIAL,       \
        .serial_number  = (s),
 
-/* XXX I couldn't get my Kconfig file to be noticed for out-of-tree build */
-#ifndef CONFIG_CPORT_ID_MAX
-#define CONFIG_CPORT_ID_MAX 128
-#endif /* !CONFIG_CPORT_ID_MAX */
-
-/* Maximum number of CPorts usable by a host device */
-/* XXX This should really be determined by the AP module manifest */
-#define CPORT_ID_MAX   CONFIG_CPORT_ID_MAX
-#define CPORT_ID_BAD   U16_MAX         /* UniPro max id is 4095 */
+/* Maximum number of CPorts */
+#define CPORT_ID_MAX   4095            /* UniPro max id is 4095 */
+#define CPORT_ID_BAD   U16_MAX
 
 /* For SP1 hardware, we are going to "hardcode" each device to have all logical
  * blocks in order to be able to address them as one unified "unit".  Then