linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: Haakon Drews <haadr@negentropy.io>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH] Set vendor, product and version for all HoG instances
Date: Mon, 18 May 2020 14:31:18 -0700	[thread overview]
Message-ID: <CABBYNZJj1PhYJ+fY7NcggY2aQS_Nt=6LXWnGopRAe+W9GRAUSw@mail.gmail.com> (raw)
In-Reply-To: <20200516210238.3184629-1-haadr@negentropy.io>

Hi Haakon,

On Sat, May 16, 2020 at 2:15 PM Haakon Drews <haadr@negentropy.io> wrote:
>
> Set the the correct vendor and product ids for all UHID/HoG
> devices when they are unknown at HoG creation time.
>
> Before this change, when connecting a BT device with multiple HoG
> services for the first time, only the first HoG instance's vendor,
> product and version fields would be set by the DIS callback. This meant
> that all HoG instances except the first would be left with unset values
> and their UHID devices would then be created with '0000:0000' as their
> vendor:product ids.
>
> Signed-off-by: Haakon Drews <haadr@negentropy.io>

Ive dropped the line above, we don't use that on userspace.

> ---
>  profiles/input/hog-lib.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/profiles/input/hog-lib.c b/profiles/input/hog-lib.c
> index 8fb0283ca..a544e062c 100644
> --- a/profiles/input/hog-lib.c
> +++ b/profiles/input/hog-lib.c
> @@ -1387,10 +1387,19 @@ static void dis_notify(uint8_t source, uint16_t vendor, uint16_t product,
>                                         uint16_t version, void *user_data)
>  {
>         struct bt_hog *hog = user_data;
> +       GSList *l;
>
>         hog->vendor = vendor;
>         hog->product = product;
>         hog->version = version;
> +
> +       for (l = hog->instances; l; l = l->next) {
> +               struct bt_hog *instance = l->data;
> +
> +               instance->vendor = vendor;
> +               instance->product = product;
> +               instance->version = version;
> +       }
>  }
>
>  struct bt_hog *bt_hog_new(int fd, const char *name, uint16_t vendor,
> --
> 2.26.2

Applied, thanks.

-- 
Luiz Augusto von Dentz

      reply	other threads:[~2020-05-18 21:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-16 21:02 [PATCH] Set vendor, product and version for all HoG instances Haakon Drews
2020-05-18 21:31 ` Luiz Augusto von Dentz [this message]

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='CABBYNZJj1PhYJ+fY7NcggY2aQS_Nt=6LXWnGopRAe+W9GRAUSw@mail.gmail.com' \
    --to=luiz.dentz@gmail.com \
    --cc=haadr@negentropy.io \
    --cc=linux-bluetooth@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).