regmap: clean up regmap allocation
[oweals/u-boot.git] / include / regmap.h
index 8d18b07c30c3a0c82314163c3c2913f3d4e2134c..d827a0bd523b6a4938ca6c55f52bf6c1b292f978 100644 (file)
@@ -21,15 +21,12 @@ struct regmap_range {
 /**
  * struct regmap - a way of accessing hardware/bus registers
  *
- * @base:      Base address of register map
  * @range_count: Number of ranges available within the map
- * @range:     Pointer to the list of ranges, allocated if @range_count > 1
- * @base_range:        If @range_count is <= 1, @range points here
+ * @ranges:    Array of ranges
  */
 struct regmap {
-       phys_addr_t base;
        int range_count;
-       struct regmap_range *range, base_range;
+       struct regmap_range ranges[0];
 };
 
 /*