From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb: dfu: add static alt num count in dfu_config_entities()
Date: Tue, 04 Mar 2014 12:33:20 +0100 [thread overview]
Message-ID: <20140304123320.737d8296@amdc2363> (raw)
In-Reply-To: <1393610017-19329-2-git-send-email-p.marczak@samsung.com>
Hi Heiko,
> Thanks to this multiple call of function dfu_config_entities()
> gives continuous dfu alt numbering until call dfu_free_entities().
>
> This allows to store dfu entities in multiple variables.
Could you test this patch on your boards, which are using DFU?
Thanks in advance.
>
> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
> Acked-by: ?ukasz Majewski <l.majewski@samsung.com>
> ---
> drivers/dfu/dfu.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
> index 07011e9..56e69fd 100644
> --- a/drivers/dfu/dfu.c
> +++ b/drivers/dfu/dfu.c
> @@ -19,6 +19,7 @@
> static bool dfu_reset_request;
> static LIST_HEAD(dfu_list);
> static int dfu_alt_num;
> +static int alt_num_cnt;
>
> bool dfu_reset(void)
> {
> @@ -377,6 +378,8 @@ void dfu_free_entities(void)
> if (t)
> free(t);
> INIT_LIST_HEAD(&dfu_list);
> +
> + alt_num_cnt = 0;
> }
>
> int dfu_config_entities(char *env, char *interface, int num)
> @@ -394,11 +397,12 @@ int dfu_config_entities(char *env, char
> *interface, int num) for (i = 0; i < dfu_alt_num; i++) {
>
> s = strsep(&env, ";");
> - ret = dfu_fill_entity(&dfu[i], s, i, interface, num);
> + ret = dfu_fill_entity(&dfu[i], s, alt_num_cnt,
> interface, num); if (ret)
> return -1;
>
> list_add_tail(&dfu[i].list, &dfu_list);
> + alt_num_cnt++;
> }
>
> return 0;
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
next prev parent reply other threads:[~2014-03-04 11:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 17:53 [U-Boot] [PATCH] Trats/Trats2: Update Tizen partitions layout and dfu entities Przemyslaw Marczak
2014-02-28 17:53 ` [U-Boot] [PATCH] usb: dfu: add static alt num count in dfu_config_entities() Przemyslaw Marczak
2014-03-04 11:33 ` Lukasz Majewski [this message]
2014-03-04 11:45 ` Heiko Schocher
2014-03-04 11:58 ` Lukasz Majewski
2014-03-11 7:03 ` Heiko Schocher
2014-03-12 7:02 ` Lukasz Majewski
2014-03-12 8:00 ` Lukasz Majewski
2014-03-13 2:00 ` Minkyu Kang
2014-03-13 1:59 ` [U-Boot] [PATCH] Trats/Trats2: Update Tizen partitions layout and dfu entities Minkyu Kang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140304123320.737d8296@amdc2363 \
--to=l.majewski@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox