diff options
author | Stephen Warren <swarren@nvidia.com> | 2014-06-11 16:03:35 -0600 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-08-09 11:16:59 -0400 |
commit | cb7bd2e07e70aed7802e28619ce93d15d7ce10dc (patch) | |
tree | 148fe54e8893860c7c3054cdbb1bc84f1bddda5d /drivers/dfu | |
parent | 7ac1b410ac9b66150170718a6f807ce52ffd8400 (diff) | |
download | u-boot-imx-cb7bd2e07e70aed7802e28619ce93d15d7ce10dc.zip u-boot-imx-cb7bd2e07e70aed7802e28619ce93d15d7ce10dc.tar.gz u-boot-imx-cb7bd2e07e70aed7802e28619ce93d15d7ce10dc.tar.bz2 |
dfu: add free_entity() to struct dfu_entity
This allows the backend to free any resources allocated during the
relevant dfu_fill_entity_*() call. This will soon be used by the
SF backend.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'drivers/dfu')
-rw-r--r-- | drivers/dfu/dfu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c index b8d382d..897dfab 100644 --- a/drivers/dfu/dfu.c +++ b/drivers/dfu/dfu.c @@ -401,6 +401,7 @@ static int dfu_fill_entity(struct dfu_entity *dfu, char *s, int alt, dfu->alt = alt; dfu->max_buf_size = 0; + dfu->free_entity = NULL; /* Specific for mmc device */ if (strcmp(interface, "mmc") == 0) { @@ -427,6 +428,8 @@ void dfu_free_entities(void) list_for_each_entry_safe_reverse(dfu, p, &dfu_list, list) { list_del(&dfu->list); + if (dfu->free_entity) + dfu->free_entity(dfu); t = dfu; } if (t) |