dm: core: Allow a list of devices to be declared in one step
authorSimon Glass <sjg@chromium.org>
Thu, 2 Oct 2014 01:57:21 +0000 (19:57 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 22 Oct 2014 16:36:54 +0000 (10:36 -0600)
The U_BOOT_DEVICE macro allows the declaration of a single U-Boot device.
Add an equivalent macro to declare an array of devices, for convenience.

Signed-off-by: Simon Glass <sjg@chromium.org>
include/dm/platdata.h

index 0d4d561089a03c7db0416f42bf2a84cde5cc89c8..fbc8a6b3adda18424bd485a0ea39df981143f55e 100644 (file)
@@ -27,4 +27,8 @@ struct driver_info {
 #define U_BOOT_DEVICE(__name)                                          \
        ll_entry_declare(struct driver_info, __name, driver_info)
 
+/* Declare a list of devices. The argument is a driver_info[] array */
+#define U_BOOT_DEVICES(__name)                                         \
+       ll_entry_declare_list(struct driver_info, __name, driver_info)
+
 #endif