Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2848659pxb; Mon, 18 Apr 2022 09:29:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfpBgvhTsxoz0UBiAW1FVrWedYeo+k1WN1xsdAqANhe5Mo1nZ6/jVs+a9gjLL0/fIiBy5o X-Received: by 2002:a17:90a:fe8e:b0:1cb:8129:2509 with SMTP id co14-20020a17090afe8e00b001cb81292509mr14033589pjb.12.1650299352495; Mon, 18 Apr 2022 09:29:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650299352; cv=none; d=google.com; s=arc-20160816; b=Ks99YQUa9bREquEyLn2rX0V2dnzNJXhWCHegW94AQ+0xadUe9Cavpe8Gf80eUT+jQT sZs3WnF5l0woqHaYyxWuzR1tnDGjZfOCS0D8Cr+UIJt3XsrZN59LCFkJvkjVNTIf7py6 u9DcJZdpIRneH5xu0NDKhEabiHVqeC40bG7lyI/as9TQIdMGNHzWXWcBuSRjdqLrmprd BhICDTlbcYkkm2gKOXmNJ632f7WcHOxN4/M6JedGW4C6Qw97xjFqPo1EY/lJrQ5VPOtO +vpNIj8Yajk9L2dKdpu9p9jEDXK/9XP0HDYjfjnLg1omRUl2mCmUeXPE+i7TuZyJClBT e+Dg== 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=fXk2HPP/iYAy5SUQgra10Zq/kFSPmqKrFVEHGmX0pkE=; b=sB9qwzwrSxKjkqqE4H4oXxJ6xiEdaG6ZRCQmMk6JMMOtT+3jOgZ1SzecUUiZPrWrP5 RcpLXQVACH52aQllYNNFmr8F3Xq6U+WVUG9dqyzkiG4KFLsB3nPv0tyX/tx56K1/2gho DZuNHHA369IdcCdP/sXQ2iGzAoVgSreHWqnha2oki4EDKrIP/10nqVebs3+E67KB8BLL FLBNHymVbH/ngXitdqPFV/QITkXw3b5M4g89+XunxpR+dW+uqwIBqBL7jbTuK2+ZLW4t FSM5GW/rlgk566W3PIFQ5TW3zAK7frWrGgDJoitRtWUhT9tO7VHqbAYyuVMB0NauBEp0 LuUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ummj0U42; 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 k67-20020a636f46000000b00383f97cb950si9366842pgc.383.2022.04.18.09.28.55; Mon, 18 Apr 2022 09:29:12 -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=ummj0U42; 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 S244815AbiDRNps (ORCPT + 99 others); Mon, 18 Apr 2022 09:45:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241826AbiDRN0I (ORCPT ); Mon, 18 Apr 2022 09:26:08 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FECF3D4A0; Mon, 18 Apr 2022 05:53:04 -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 ams.source.kernel.org (Postfix) with ESMTPS id C3017B80EDB; Mon, 18 Apr 2022 12:52:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC125C385AB; Mon, 18 Apr 2022 12:52:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650286378; bh=O34HfqQmSB8Ffe9PET8fc6aq5j5lIAnMeD0GOTv4ips=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ummj0U42CU6ZcztEZH/5ARTv6swAmdukoCmUabXV3Nqc5dVillVghVo/gL3+ZPEj6 t+XELs6I9y28YlPsxmYlk92jhIE8S29DDa3fn4sBSgHEAYT1qu6xDK7l6JMffNMtvl b7wQzYjgEr/bbw0mq290iypau/6uPIpGFgDsR/Mw= 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 4.14 115/284] i2c: xiic: Make bus names unique Date: Mon, 18 Apr 2022 14:11:36 +0200 Message-Id: <20220418121214.296108828@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121210.689577360@linuxfoundation.org> References: <20220418121210.689577360@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.7 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 5a94f732049e..da526cc471cc 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -731,7 +731,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, @@ -768,6 +767,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); init_waitqueue_head(&i2c->wait); -- 2.34.1