From patchwork Mon Sep 28 12:15:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 7276781 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2A0869F36A for ; Mon, 28 Sep 2015 12:15:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5EB362076D for ; Mon, 28 Sep 2015 12:15:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7944D20760 for ; Mon, 28 Sep 2015 12:15:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757149AbbI1MPl (ORCPT ); Mon, 28 Sep 2015 08:15:41 -0400 Received: from mga02.intel.com ([134.134.136.20]:31823 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756727AbbI1MPl (ORCPT ); Mon, 28 Sep 2015 08:15:41 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 28 Sep 2015 05:15:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,602,1437462000"; d="scan'208";a="798792939" Received: from black.fi.intel.com ([10.237.72.93]) by fmsmga001.fm.intel.com with ESMTP; 28 Sep 2015 05:15:39 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 9816416A; 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 1/2] HID: Show I2C bus type in hid_connect() Date: Mon, 28 Sep 2015 15:15:07 +0300 Message-Id: <1443442508-94971-1-git-send-email-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.5.1 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 For I2C HID devices output currently looks like: hid-multitouch ... input,hidraw0: HID v1.00 Mouse ... Add knowledge about I2C bus to hid_connect() so that it shows "I2C" correctly instead of "". Signed-off-by: Mika Westerberg --- drivers/hid/hid-core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 70a11ac38119..7f1baba081a1 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1678,6 +1678,9 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask) case BUS_BLUETOOTH: bus = "BLUETOOTH"; break; + case BUS_I2C: + bus = "I2C"; + break; default: bus = ""; }