Fix dmesg errors about hid2hci not claiming interface before usage.
PATCH 1/1 Fix dmesg errors about hid2hci not claiming interface before usage.
These errors were caused from trying to detach the kernel driver from
the interface, which was unnecessary. A simple usb_claim_interface is all that is necessary. It is however, important to ensure the interface claim is successful.
--- tools/hid2hci.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-)
Signature · 3 lines
Mario Limonciello *Dell | Linux Engineering* [email protected]
From b10d3ab279a4da6a22c9c1272595e8ef8fc80cd0 Mon Sep 17 00:00:00 2001
From: Mario Limonciello <[email protected]>
Date: Fri, 15 May 2009 18:30:27 -0500
Subject: [PATCH] Fix dmesg errors about hid2hci not claiming interface before usage.
These errors were caused from trying to detach the kernel driver from the interface, which was unnecessary. A simple usb_claim_interface is all that is necessary. It is however, important to ensure the interface claim is successful.
--- tools/hid2hci.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-)
tools/hid2hci.c +4 -8
@@ -222,15 +222,11 @@ static int switch_dell(struct device_info *devinfo) } handle =usb_open (devinfo->dev); -if (handle) { -usb_claim_interface (handle,0 ); -usb_detach_kernel_driver_np (handle,0 ); - } - - err =usb_control_msg (handle, +if (handle &&usb_claim_interface (handle,0 ) ==0 ) + err =usb_control_msg (handle,USB_ENDPOINT_OUT |USB_TYPE_CLASS |USB_RECIP_INTERFACE , -0x09 ,0x7f | (0x03 <<8 ),0 , - report,sizeof (report),10000 ); +USB_REQ_SET_CONFIGURATION ,0x7f | (0x03 <<8 ),0 , + report,sizeof (report),5000 );if (err ==0 ) { err =-1 ;
Signature · 1 line
1.6.0.4
Marcel Holtmann
maintainerHi Mario,
Quoted 8 lines
These errors were caused from trying to detach the kernel driver from
the interface, which was unnecessary. A simpleusb_claim_interfaceis all that is necessary. It is however, important to ensure the interface claim is successful.--- tools/hid2hci.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-)
patch has been applied. Again, please line-break your commit messages properly.
Regards
Marcel