Linux-Bluetooth Archive on
 help / Atom feed
From: Bastien Nocera <>
Cc: Benjamin Tissoires <>
Subject: [PATCH] input/hog: Remove HID device after HoG device disconnects
Date: Fri, 14 Jun 2019 17:31:25 +0200
Message-ID: <> (raw)

From: Benjamin Tissoires <>

When the Bluetooth LE device disconnects, make sure to also destroy the
uHID device so that we don't have a lingering HID device accessible from

This also fixes the input subsystem never seeing the device reattaching,
causing settings that should be applied on connection not to be applied.

Tested-by: Bastien Nocera <>
 profiles/input/hog.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/profiles/input/hog.c b/profiles/input/hog.c
index 23c9c1529..83c017dcb 100644
--- a/profiles/input/hog.c
+++ b/profiles/input/hog.c
@@ -199,6 +199,8 @@ static int hog_disconnect(struct btd_service *service)
 	struct hog_device *dev = btd_service_get_user_data(service);
+	bt_hog_unref(dev->hog);
+	dev->hog = NULL;
 	btd_service_disconnecting_complete(service, 0);

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Bluetooth Archive on

Archives are clonable:
	git clone --mirror linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ \
	public-inbox-index linux-bluetooth

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox