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>
Change-Id: Idbc431d733c5bfba710b9d455e1dc564e2e3c302
Signed-off-by: himanshu <h.himanshu@samsung.com>
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);