From patchwork Mon Sep 28 12:15:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 7276771 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7C91EBEEA4 for ; Mon, 28 Sep 2015 12:15:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B0B9D20760 for ; Mon, 28 Sep 2015 12:15:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BF15E2075F for ; Mon, 28 Sep 2015 12:15:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756780AbbI1MPN (ORCPT ); Mon, 28 Sep 2015 08:15:13 -0400 Received: from mga01.intel.com ([192.55.52.88]:40968 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756727AbbI1MPM (ORCPT ); Mon, 28 Sep 2015 08:15:12 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 28 Sep 2015 05:15:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,602,1437462000"; d="scan'208";a="778923690" Received: from black.fi.intel.com ([10.237.72.93]) by orsmga001.jf.intel.com with ESMTP; 28 Sep 2015 05:15:09 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id A990911E; Mon, 28 Sep 2015 15:15:08 +0300 (EEST) From: Mika Westerberg To: Jiri Kosina Cc: Benjamin Tissoires , Mika Westerberg , linux-input@vger.kernel.org Subject: [PATCH 2/2] HID: i2c-hid: Fill in physical device providing HID functionality Date: Mon, 28 Sep 2015 15:15:08 +0300 Message-Id: <1443442508-94971-2-git-send-email-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.5.1 In-Reply-To: <1443442508-94971-1-git-send-email-mika.westerberg@linux.intel.com> References: <1443442508-94971-1-git-send-email-mika.westerberg@linux.intel.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently hid_connect() prints out following when I2C connected HID devices is connected: hid-multitouch 0018:03EB:2136.0001: ... [ATML3432:00 03EB:2136] on After "on " should read physical device name but it is left empty by the driver. Make it look better and fill in the physical device name. Signed-off-by: Mika Westerberg Reviewed-by: Daniel Martin Acked-by: Benjamin Tissoires --- drivers/hid/i2c-hid/i2c-hid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index 2871f3c81a4c..10bd8e6e4c9c 100644 --- a/drivers/hid/i2c-hid/i2c-hid.c +++ b/drivers/hid/i2c-hid/i2c-hid.c @@ -1028,6 +1028,7 @@ static int i2c_hid_probe(struct i2c_client *client, snprintf(hid->name, sizeof(hid->name), "%s %04hX:%04hX", client->name, hid->vendor, hid->product); + strlcpy(hid->phys, dev_name(&client->dev), sizeof(hid->phys)); ret = hid_add_device(hid); if (ret) {