Correctly handle number of alternate when DM_PMIC is not activated.
This patch remove the last UNKNOWN partition in this case.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
struct dfu_entity *dfu;
int alt_nb;
- alt_nb = 3; /* number of virtual = CMD, OTP, PMIC*/
+ alt_nb = 2; /* number of virtual = CMD, OTP*/
+ if (CONFIG_IS_ENABLED(DM_PMIC))
+ alt_nb++; /* PMIC NVMEM*/
+
if (data->part_nb == 0)
alt_nb++; /* +1 for FlashLayout */
else