diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2019-06-14 17:31:25 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@codecoup.pl> | 2019-07-15 14:41:59 +0200 |
commit | d6cafa1f0c3ea1989f8a580e52f418b0998a3552 (patch) | |
tree | 6e84a00b2c70420143e23e407fcae86dd773ee45 /profiles/input | |
parent | 14bbd6537fe563381ef1bcfab9ba9071d61c83e5 (diff) | |
download | bluez-d6cafa1f0c3ea1989f8a580e52f418b0998a3552.tar.gz |
input/hog: Remove HID device after HoG device disconnects
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
user-space.
This also fixes the input subsystem never seeing the device reattaching,
causing settings that should be applied on connection not to be applied.
https://bugzilla.kernel.org/show_bug.cgi?id=202909
Tested-by: Bastien Nocera <hadess@hadess.net>
Diffstat (limited to 'profiles/input')
-rw-r--r-- | profiles/input/hog.c | 2 |
1 files changed, 2 insertions, 0 deletions
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_detach(dev->hog); + bt_hog_unref(dev->hog); + dev->hog = NULL; btd_service_disconnecting_complete(service, 0); |