Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp689064pxb; Tue, 5 Apr 2022 18:53:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEI23saykJs15yIDptd1Sf0t9uwQ1DjVVbgmeNX/0dwRtRTDGa4hzPaLrTrJwjn2KXkPdK X-Received: by 2002:a05:6a00:1683:b0:4f7:e497:6a55 with SMTP id k3-20020a056a00168300b004f7e4976a55mr6380739pfc.21.1649210001640; Tue, 05 Apr 2022 18:53:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649210001; cv=none; d=google.com; s=arc-20160816; b=sfhbvJutvdGfQRN1FzwK6CXP764kVqtfLvxSlCo5y/uCPWy3GLdmOOP32n5FiEagOv KcNc9plCKv2F8ib0BgIzD2nG+h1k51c1buchA1ClyY3dlTCXyV5EO/lxR4fszAou9dWv +qeYKug7Hf4dp9bsfv6RrlMHvY7DN41Ro8RnaepAmTz8locRMC+CSbKGFjhiJkeBR7vX xvQknrXziOp1Rn693SHjvGkbq8XyLXHXussPl4PmT0sN4ajP8QsJBIBz9vcep4+vsTt4 FhAouU+HprQP/WGHwcQ7q1NKtRafHClQef7KQ5Hzg9RcUzvv3Kx2UPfTBFumiycs5TjG AlUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=m8/VKzX1ZsKGaf0M5RVRbOgv+avIq8Rc5tdh43FKrxI=; b=jetfKbBbM8kDD7mduyviO1oOZLdo4bAXuioMLmpMMDpmnYxKWmbeF2Cb86QA7S9sQU ufXl49GhLZRE6aWYc66tEH8aRCBlUOr7b5VJczHtGeoyhsv0qp00ZqyAITX4N7dgdgnB iZ2z19LNmFC70KndcN3iapkFv7L3r7YR89/KVXsC++UG7VtQy0AyUn3iv3hAFEMFDEEh fMqEj6Et+vfywErFXBRRbK/832gNLi5lkEthTxs6zY9cwGj/efdhPvBSD+01Gvgc+7ZS QNgaq8IJYaz7s+kBg6CbB/nB3732InLGCrl9D6D4duD9bDXv0HyJhlTs4Z2dIhqBAeoB TNgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OQ8uydqC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w25-20020a634759000000b003986443b1f0si14323644pgk.832.2022.04.05.18.53.06; Tue, 05 Apr 2022 18:53:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OQ8uydqC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351456AbiDEKC0 (ORCPT + 99 others); Tue, 5 Apr 2022 06:02:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237865AbiDEIS2 (ORCPT ); Tue, 5 Apr 2022 04:18:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1634B7C53; Tue, 5 Apr 2022 01:07:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 69D586167D; Tue, 5 Apr 2022 08:07:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77BCFC385A1; Tue, 5 Apr 2022 08:07:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649146060; bh=x8e3y/VMMWTKGFja9YZi+iTh0PRvryetCxFkEUBsjgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OQ8uydqCOAtpWCN5gfRHWrHfynxcKgiB8qiwWMjBK64Lk8cdlC27krUz1QI1YvK+N oVw4pmg6jNtVAJBe/n73WgLS3MU2N8D2ZIY/CFwTaYCicA6SsnasP32X+vsNH1Rn1P xoJa5yt3csKqKHIUNWEBYPb1VyXqk+ZONG0tuk+g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Robert Hancock , Michal Simek , Wolfram Sang , Sasha Levin Subject: [PATCH 5.17 0627/1126] i2c: xiic: Make bus names unique Date: Tue, 5 Apr 2022 09:22:54 +0200 Message-Id: <20220405070426.040705011@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robert Hancock [ Upstream commit 1d366c2f9df8279df2adbb60471f86fc40a1c39e ] This driver is for an FPGA logic core, so there can be arbitrarily many instances of the bus on a given system. Previously all of the I2C bus names were "xiic-i2c" which caused issues with lm_sensors when trying to map human-readable names to sensor inputs because it could not properly distinguish the busses, for example. Append the platform device name to the I2C bus name so it is unique between different instances. Fixes: e1d5b6598cdc ("i2c: Add support for Xilinx XPS IIC Bus Interface") Signed-off-by: Robert Hancock Tested-by: Michal Simek Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/busses/i2c-xiic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index eb789cfb9973..ffefe3c482e9 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -734,7 +734,6 @@ static const struct i2c_adapter_quirks xiic_quirks = { static const struct i2c_adapter xiic_adapter = { .owner = THIS_MODULE, - .name = DRIVER_NAME, .class = I2C_CLASS_DEPRECATED, .algo = &xiic_algorithm, .quirks = &xiic_quirks, @@ -771,6 +770,8 @@ static int xiic_i2c_probe(struct platform_device *pdev) i2c_set_adapdata(&i2c->adap, i2c); i2c->adap.dev.parent = &pdev->dev; i2c->adap.dev.of_node = pdev->dev.of_node; + snprintf(i2c->adap.name, sizeof(i2c->adap.name), + DRIVER_NAME " %s", pdev->name); mutex_init(&i2c->lock); -- 2.34.1