/* @count: Number of ranges to be allocated for the regmap. Return: A pointer to the newly allocated regmap, or NULL on error.  */
static struct regmap* regmap_alloc(int count)
/* @count: Number of ranges to be allocated for the regmap. Return: A pointer to the newly allocated regmap, or NULL on error.  */
static struct regmap* regmap_alloc(int count)
{
	struct regmap *map;
	map = malloc(sizeof(*map) + sizeof(map->ranges[0]) * count);
	if (!map)
		return NULL;
	map->range_count = count;
	return map;
}