Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp610840pxb; Tue, 5 Apr 2022 15:54:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyY2wNKTQXzOVU/xSzcNBR7s6IVy9sPuB9628/0emFxcSU7po2w19Bxx2KvJBZl76Df8WxE X-Received: by 2002:a92:6a01:0:b0:2b6:87b7:180b with SMTP id f1-20020a926a01000000b002b687b7180bmr2912780ilc.82.1649199288173; Tue, 05 Apr 2022 15:54:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649199288; cv=none; d=google.com; s=arc-20160816; b=anuok6pp/4EIAJJtxrNis986O9OhC2+jKlfpOxKgl5dBi1+p6el1Wm9jUlSQupR2D5 wcjvc5yTMYMCCz/bq15LwRP6LO6AZCun+LbNsnb3R6bWFomseja/NuLXbhRJ+qCmB5Pk SBffSnP8M7PdXvrOtA5++IPrh9EocHNdvU6AThyW4t3OG4v28a4pJX79jtZ9xIIdElBU dPVDdMdAFutxdTvnGRrIFeMv+Mwl4pRzwk1olQvMWXA/n8lG/OWp/hAqgoFC0sIaiSaO 71CbHbSYn6/1Gzp4Bijx12vEeNLfpzTvs3Evlo5LdRtqqDA6nJ6CXP1GyTXOCiVsX059 I1HA== 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=d4BYWGKikH+HBzAd4CTO1AeBFQFLTtTwajCqbejLvrTnp+iY8B9jP7WI5U0QZvCz1x +/+URd+z0ebXKHYg5QHO0dHsrs1JVQ1hCQDu5sjPJPYR26Y89AnNrLpbKPmF3TI+Hzff sxsvcRJ3OIOpuhHRjzkrq8sOwwPHIEmmqCyLhwKXKbR9T0NESJECSrqOv9y30JvB06Eq lOSapo4roUnPcoVDgzpGo1nhBnCanL/US04izV0SRYJaCM7EL2sGKeE0DbAmdbXrKeed z0CdOFVWjcDNMnvoQw0WNwrrQtdzM9grCCilX/4eWGL8+PhcmzoJfEUFrLhha6ZWdhO/ E+/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DcFaZAPC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t12-20020a056638204c00b003240e4ba7c6si692617jaj.85.2022.04.05.15.54.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 15:54:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DcFaZAPC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 70F38160FFF; Tue, 5 Apr 2022 15:36:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243841AbiDENDo (ORCPT + 99 others); Tue, 5 Apr 2022 09:03:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242665AbiDEJIQ (ORCPT ); Tue, 5 Apr 2022 05:08:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60B6A7463A; Tue, 5 Apr 2022 01:57:10 -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 B987661562; Tue, 5 Apr 2022 08:57:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD010C385A0; Tue, 5 Apr 2022 08:57:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149029; bh=x8e3y/VMMWTKGFja9YZi+iTh0PRvryetCxFkEUBsjgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DcFaZAPCKpVEHoHaMKm/HQ1k2mbcvKSQzC2CICnTjjLwqE0+UAbLqByNqMhil1D0h DkvntJ0VZzb2czOGE8BCWqk4V6cihf179n5FOFUjon9MNOepHjp3KmcMgj9CqqshRR cnAsm0ewoQCMBCq8rrBDJfguARYfn1hf9w15F8Tw= 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.16 0568/1017] i2c: xiic: Make bus names unique Date: Tue, 5 Apr 2022 09:24:41 +0200 Message-Id: <20220405070411.139968942@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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