- static struct sr_dev_driver **combined_list = NULL;
- struct sr_dev_driver ***lists, **drivers;
- GArray *array;
-
- if (combined_list)
- return combined_list;
-
- array = g_array_new(TRUE, FALSE, sizeof(struct sr_dev_driver *));
- for (lists = drivers_lists; *lists; lists++)
- for (drivers = *lists; *drivers; drivers++)
- g_array_append_val(array, *drivers);
- combined_list = (struct sr_dev_driver **)array->data;
- g_array_free(array, FALSE);