For UBI partitions ("partubi" in dfu_alt_info), dfu_fill_entity_mtd sets
the mtd.ubi flag; however other functions incorrectly check for nand.ubi
instead. Fix this by checking for the correct flag.
Signed-off-by: Guillermo Rodriguez <guille.rodriguez@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
int ret;
/* in case of ubi partition, erase rest of the partition */
- if (dfu->data.nand.ubi) {
+ if (dfu->data.mtd.ubi) {
struct erase_info erase_op = {};
erase_op.mtd = dfu->data.mtd.info;
* ubi partition, as sectors which are not used need
* to be erased
*/
- if (dfu->data.nand.ubi)
+ if (dfu->data.mtd.ubi)
return DFU_MANIFEST_POLL_TIMEOUT;
return DFU_DEFAULT_POLL_TIMEOUT;