From patchwork Tue Apr 23 23:36:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 791324 Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B85A252F9A; Tue, 23 Apr 2024 23:36:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.209 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713915401; cv=none; b=YrHGDMFl1tle3oFeQS6q8Rw4nSu2s5TFxJ3REN9y3HZKw5ICdMfT7jCXelvDBlSC3u3FBCqWk5qoKQls/6/BBvZzbv//EDIaTBv+ge0XWcp7QSlJI9D78WPcm/qvhCfnBPn/7mQO8AgOKAoxY3m7TtVTTQk0f4Eg1WPJYnVbGKw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713915401; c=relaxed/simple; bh=6m6y84bE3islwvb0CpCXCMzujbpcP8U/mUF+/NKShjU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mTWHIiFomoSGH4Y5W+PRR4ZcPRneDT7RVhDgtoqvbHnJeNYhdgNMe07Qb0gePgvmn3PpVdJCmkTWeBilkpQN+2R/BNTCUhSodhsVrH4cTfgb2HUjYb6I/F0O30wlxeeXl1rsRAgz1jV3bRmOhG3J1Y07jK3VYNVOOfwIhRAVNVE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=j6yl5ios; arc=none smtp.client-ip=192.19.144.209 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="j6yl5ios" Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id BE63BC00150C; Tue, 23 Apr 2024 16:36:29 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com BE63BC00150C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1713915389; bh=6m6y84bE3islwvb0CpCXCMzujbpcP8U/mUF+/NKShjU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j6yl5iosGqrvKQFVc4HdP5EsxMr2SAHBnC3Drw+JRixatFWf/bhjklr2IW/PYE+An UnMfQzGZfqVuxZScxJgqTM4SE1tHVZSDJlbXSDxshsApAqfgZjaWx+zAZcjHyg/OjO 0i2utPIZdSZtR5AgdWYxt/uE+EEHHN8KNnJAA9Rw= Received: from fainelli-desktop.igp.broadcom.net (fainelli-desktop.dhcp.broadcom.net [10.67.48.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id C786718041CAC6; Tue, 23 Apr 2024 16:36:27 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Jarkko Nikula , Andy Shevchenko , Mika Westerberg , Jan Dabros , Andi Shyti , Lee Jones , Jiawen Wu , Mengyuan Lou , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maciej Fijalkowski , Andrew Lunn , Duanqiang Wen , linux-i2c@vger.kernel.org (open list:SYNOPSYS DESIGNWARE I2C DRIVER), netdev@vger.kernel.org (open list:WANGXUN ETHERNET DRIVER) Subject: [PATCH 4/4] net: txgbe: Utilize i2c-designware.h Date: Tue, 23 Apr 2024 16:36:22 -0700 Message-Id: <20240423233622.1494708-5-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240423233622.1494708-1-florian.fainelli@broadcom.com> References: <20240423233622.1494708-1-florian.fainelli@broadcom.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Rather than open code the i2c_designware string, utilize the newly defined constant in i2c-designware.h. Signed-off-by: Florian Fainelli --- drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c index 93295916b1d2..c601eea164f1 100644 --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -571,8 +572,8 @@ static int txgbe_clock_register(struct txgbe *txgbe) char clk_name[32]; struct clk *clk; - snprintf(clk_name, sizeof(clk_name), "i2c_designware.%d", - pci_dev_id(pdev)); + snprintf(clk_name, sizeof(clk_name), "%s.%d", + I2C_DESIGNWARE_NAME, pci_dev_id(pdev)); clk = clk_register_fixed_rate(NULL, clk_name, NULL, 0, 156250000); if (IS_ERR(clk)) @@ -634,7 +635,7 @@ static int txgbe_i2c_register(struct txgbe *txgbe) info.parent = &pdev->dev; info.fwnode = software_node_fwnode(txgbe->nodes.group[SWNODE_I2C]); - info.name = "i2c_designware"; + info.name = I2C_DESIGNWARE_NAME; info.id = pci_dev_id(pdev); info.res = &DEFINE_RES_IRQ(pdev->irq);