]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
dfu: Delete superfluous initialization of the dfu_buf_size static variable
authorLukasz Majewski <l.majewski@majess.pl>
Wed, 8 Jul 2015 21:43:18 +0000 (23:43 +0200)
committerMarek Vasut <marex@denx.de>
Mon, 7 Sep 2015 11:41:04 +0000 (13:41 +0200)
After extension of the dfu_get_buf() to also setup (implicitly) the dfu_buf_size
variable it is not needed to set dfu_buf_size to CONFIG_SYS_DFU_DATA_BUF_SIZE.

This variable is set in the dfu_get_buf() by not only considering
CONFIG_SYS_DFU_DATA_BUF but more importantly the "dfu_bufsiz" env variable.
Therefore, dfu_get_buf() should be used for initialization.

Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
Reviewed-by: Przemyslaw Marczak <p.marczak@samsung.com>
drivers/dfu/dfu.c

index 675162d927d8863a96952f407c0fced396e9c48c..2267dbfb5183279d3e94e3a534eca8f3590af8f7 100644 (file)
@@ -76,7 +76,7 @@ int dfu_init_env_entities(char *interface, char *devstr)
 }
 
 static unsigned char *dfu_buf;
-static unsigned long dfu_buf_size = CONFIG_SYS_DFU_DATA_BUF_SIZE;
+static unsigned long dfu_buf_size;
 
 unsigned char *dfu_free_buf(void)
 {