From patchwork Sun Mar 7 15:55:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Melchior FRANZ X-Patchwork-Id: 83969 X-Patchwork-Delegate: jikos@jikos.cz Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o27G2D43017467 for ; Sun, 7 Mar 2010 16:02:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754489Ab0CGQBx (ORCPT ); Sun, 7 Mar 2010 11:01:53 -0500 Received: from nat-warsl417-01.aon.at ([195.3.96.119]:46792 "EHLO email.aon.at" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754446Ab0CGQBu (ORCPT ); Sun, 7 Mar 2010 11:01:50 -0500 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 07 Mar 2010 16:02:13 +0000 (UTC) X-Greylist: delayed 400 seconds by postgrey-1.27 at vger.kernel.org; Sun, 07 Mar 2010 11:01:50 EST Received: (qmail 17288 invoked from network); 7 Mar 2010 15:55:09 -0000 Received: from smarthub93.highway.telekom.at (HELO email.aon.at) ([172.18.5.237]) (envelope-sender ) by fallback44.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 7 Mar 2010 15:55:09 -0000 Received: (qmail 12579 invoked from network); 7 Mar 2010 15:55:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on WARSBL502.highway.telekom.at X-Spam-Level: **** Received: from 91-115-184-94.adsl.highway.telekom.at (HELO server.lan) ([91.115.184.94]) (envelope-sender ) by smarthub93.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 7 Mar 2010 15:55:07 -0000 Received: from server.localnet (localhost [127.0.0.1]) by server.lan (Postfix) with ESMTP id 6141B34D306 for ; Sun, 7 Mar 2010 16:55:07 +0100 (CET) From: Melchior FRANZ To: linux-input@vger.kernel.org Subject: [BUG?] hid-core.c: hid->name = dev->manufacturer + dev->product ... why not + dev->serial? Date: Sun, 7 Mar 2010 16:55:06 +0100 User-Agent: KMail/1.12.4 (Linux/2.6.33; KDE/4.3.5; x86_64; ; ) X-Fingerprint: 9FFB C079 5B78 4F27 099C C6C6 7399 02D1 919B D903 X-PGP: http://members.aon.at/mfranz/melchior.franz MIME-Version: 1.0 Message-Id: <201003071655.06644@rk-nord.at> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org --- a/drivers/hid/usbhid/hid-core.c 2010-03-04 02:49:38.676850618 +0100 +++ b/drivers/hid/usbhid/hid-core.c 2010-03-04 03:03:43.269006052 +0100 @@ -1131,6 +1131,12 @@ strlcat(hid->name, dev->product, sizeof(hid->name)); } + if (dev->serial) { + if (hid->name[0]) + strlcat(hid->name, " ", sizeof(hid->name)); + strlcat(hid->name, dev->serial, sizeof(hid->name)); + } + if (!strlen(hid->name)) snprintf(hid->name, sizeof(hid->name), "HID %04x:%04x", le16_to_cpu(dev->descriptor.idVendor),