Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756489AbZJPRXq (ORCPT ); Fri, 16 Oct 2009 13:23:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754194AbZJPRSf (ORCPT ); Fri, 16 Oct 2009 13:18:35 -0400 Received: from kroah.org ([198.145.64.141]:48559 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754207AbZJPRSb (ORCPT ); Fri, 16 Oct 2009 13:18:31 -0400 X-Mailbox-Line: From linux@linux.site Fri Oct 16 10:12:00 2009 Message-Id: <20091016171159.669531487@linux.site> User-Agent: quilt/0.47-14.9 Date: Fri, 16 Oct 2009 10:10:18 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Marcel Holtmann , Greg Kroah-Hartman Subject: [25/46] Bluetooth: Disconnect HIDRAW devices on disconnect References: <20091016170953.128828149@linux.site> Content-Disposition: inline; filename=bluetooth-disconnect-hidraw-devices-on-disconnect.patch In-Reply-To: <20091016171422.GA13339@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1468 Lines: 38 2.6.31-stable review patch. If anyone has any objections, please let us know. ------------------ From: Marcel Holtmann commit 364f63519d94442ed373ac7da79033c8282df46a upstream. Currently the HID subsystem will create HIDRAW devices for the transport driver, but it will not disconnect them. Until the HID subsytem gets fixed, ensure that HIDRAW and HIDDEV devices are disconnected when the Bluetooth HID device gets removed. Based on a patch from Brian Rogers Signed-off-by: Marcel Holtmann Signed-off-by: Greg Kroah-Hartman --- net/bluetooth/hidp/core.c | 3 +++ 1 file changed, 3 insertions(+) --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c @@ -40,6 +40,7 @@ #include #include +#include #include #include @@ -573,6 +574,8 @@ static int hidp_session(void *arg) if (session->hid) { if (session->hid->claimed & HID_CLAIMED_INPUT) hidinput_disconnect(session->hid); + if (session->hid->claimed & HID_CLAIMED_HIDRAW) + hidraw_disconnect(session->hid); hid_destroy_device(session->hid); } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/