From patchwork Tue Oct 23 09:05:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen-chien Jesse Sung X-Patchwork-Id: 193398 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id CB9572C01E6 for ; Tue, 23 Oct 2012 20:05:26 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TQaQD-0006f2-Is; Tue, 23 Oct 2012 09:05:13 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TQaQB-0006eH-2o for kernel-team@lists.ubuntu.com; Tue, 23 Oct 2012 09:05:11 +0000 Received: from [112.104.134.155] (helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1TQaQA-000612-FY; Tue, 23 Oct 2012 09:05:11 +0000 From: Jesse Sung To: kernel-team@lists.ubuntu.com Subject: [Precise][PATCH 1/2] UBUNTU: SAUCE: Bluetooth: Getting ID from descriptor instead of matched rule Date: Tue, 23 Oct 2012 17:05:00 +0800 Message-Id: <1350983101-11956-1-git-send-email-jesse.sung@canonical.com> X-Mailer: git-send-email 1.7.10.4 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Wen-chien Jesse Sung BugLink: https://launchpad.net/bugs/1065400 Since the matched rule could be specified by USB_VENDOR_AND_INTERFACE_INFO() instead of USB_DEVICE(), use the ID in descriptor to make sure we can really get the correct one. Signed-off-by: Wen-chien Jesse Sung --- drivers/bluetooth/btusb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 96baae6..ba88eb4 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -944,7 +944,8 @@ static void btusb_load_firmware(struct hci_dev *hdev) return; snprintf(filename, PATCHRAM_NAME_LEN, "fw-%04x_%04x.hcd", - id->idVendor, id->idProduct); + le16_to_cpu(udev->descriptor.idVendor), + le16_to_cpu(udev->descriptor.idProduct)); if (request_firmware(&fw, (const char *) filename, &udev->dev) < 0) { BT_INFO("can't load firmware, may not work correctly"); return;