Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp678935rdb; Sat, 6 Jan 2024 04:56:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpQzUq/C6HwSae/VkzfgfztO+RKWdeU5bn6SCsjLogLpe166RE6hnSPcyPYekSpcgO0Zbw X-Received: by 2002:a05:6e02:1648:b0:35f:deea:1c86 with SMTP id v8-20020a056e02164800b0035fdeea1c86mr1595505ilu.3.1704545798768; Sat, 06 Jan 2024 04:56:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704545798; cv=none; d=google.com; s=arc-20160816; b=tLJ4pgHXOrxK+kemBURQySRwMa0HpnDZXGr/vPgZnCvdms1OiX1PhYvfFeN7Zf2Rqh 6ZZkCe+RalvwRViA7POeDnwWG7FvbttI6FaF9yuRRYv+uMMapz9S0eSBBLtvV9ETV6OU KSzlJSPXEgIVB2HAy9q/aA1/KVfj/yZ0pyuZih9Pty/G7LpqY1gbXAGD7tyTBfcF9bOV i8rwGtLZP+tFMTpag+4zOrHFk2ipP+B/bJ17kxRFimhbw3rL6ZL37CzSbMhKfN0UQQ3T iFPa3kT8ErQqhdG554pxi6FVVCqm2jcaLFbGpwtv7qgoMmOPxhFiyJt+DWP980Sc0U+k 1rVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5WCU2WxftK4MgUCqjvT44D3T0b8CqtpjpLooTBQtBWk=; fh=0UPFP90gldirhqQItG7MarXZzZzu1qJS4qV+HOzTuCs=; b=zRoJufhJc+NHQJguBIokl2DKw4XUt1I3rS+jcqoGr/3wqsYMd77Twq8G7uDy9WN8rH mBvHqWelh1cXH0zNVF7wcYb8lNfjmCM4KaCCBmLu2i9nCYb6K6aFeeNCwE8nH5xhShtF A+FsGmNPLSX80wHyuD6rZ7EXoulGvjLHx5VF9CF9KEScWDYGtNwftRZXff5yiTkeLnaN loGFA5L0JWtF6MStzRxsKksWDfSQaMJIQPckxLknnlPm5z+yvCqr6qh+C0BxC8SQ0bdm tuFZ7fl9gVMR33k+ADieK32yNb+HKO7dqzi+8yoDP0TcZfy70BtGZqTR2E8xN2e0Ona5 StTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b="X/ZovKK4"; spf=pass (google.com: domain of linux-kernel+bounces-18576-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18576-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y65-20020a636444000000b005c668a5a906si2905407pgb.282.2024.01.06.04.56.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 04:56:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18576-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b="X/ZovKK4"; spf=pass (google.com: domain of linux-kernel+bounces-18576-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18576-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 537C8B21AF6 for ; Sat, 6 Jan 2024 12:56:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 24BCB7483; Sat, 6 Jan 2024 12:56:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="X/ZovKK4" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.smtpout.orange.fr (smtp-19.smtpout.orange.fr [80.12.242.19]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 181C96FC9 for ; Sat, 6 Jan 2024 12:56:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Received: from pop-os.home ([92.140.202.140]) by smtp.orange.fr with ESMTPA id M66OrfxTUx8edM66SrYd73; Sat, 06 Jan 2024 13:48:42 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1704545322; bh=5WCU2WxftK4MgUCqjvT44D3T0b8CqtpjpLooTBQtBWk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=X/ZovKK4B5kCsbaGN/VkvDOM79iMk/4lfy2Wgp19k3Tox+ZhyGypNcSxEwlbjL3a0 a2x4JoG7TBcQZcBq7uA1Y9wiF9Ut7BQCWdHLP+qMeMKM1rL0SIqU3AsfW+pMhHtsM0 7z3K6T5320xwn5uEe03nPl6SAKVI9aL051ttmRR45ErrBHqx5JusWzzrFJ1YyfET3E zQRaVn8055NbT/oqfuiLCAins+y7llv3FWDtxT5fsU36buSonpQ8xAbH2MxlP+iUAj AiAFQ3Bq4rQDsRutOtZEyrRErDTfqiUEYe7oKBIpoeFCs1yL2czsNXqw5Sik5fRI96 qYyAbVTlnW6Tg== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 06 Jan 2024 13:48:42 +0100 X-ME-IP: 92.140.202.140 From: Christophe JAILLET To: Ard Biesheuvel , Andi Shyti Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-i2c@vger.kernel.org Subject: [PATCH 2/2] i2c: synquacer: Remove a clk reference from struct synquacer_i2c Date: Sat, 6 Jan 2024 13:48:25 +0100 Message-Id: <01e5b93d75eaeb071c6864f8b43355a7c24e0c91.1704545258.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 'pclk' is only used locally in the probe. Remove it from the 'synquacer_i2c' structure. Also remove a useless debug message. Signed-off-by: Christophe JAILLET --- drivers/i2c/busses/i2c-synquacer.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-synquacer.c b/drivers/i2c/busses/i2c-synquacer.c index a73f5bb9a164..e774b9f499b6 100644 --- a/drivers/i2c/busses/i2c-synquacer.c +++ b/drivers/i2c/busses/i2c-synquacer.c @@ -138,7 +138,6 @@ struct synquacer_i2c { int irq; struct device *dev; void __iomem *base; - struct clk *pclk; u32 pclkrate; u32 speed_khz; u32 timeout_ms; @@ -535,6 +534,7 @@ static const struct i2c_adapter synquacer_i2c_ops = { static int synquacer_i2c_probe(struct platform_device *pdev) { struct synquacer_i2c *i2c; + struct clk *pclk; u32 bus_speed; int ret; @@ -550,13 +550,12 @@ static int synquacer_i2c_probe(struct platform_device *pdev) device_property_read_u32(&pdev->dev, "socionext,pclk-rate", &i2c->pclkrate); - i2c->pclk = devm_clk_get_enabled(&pdev->dev, "pclk"); - if (IS_ERR(i2c->pclk)) - return dev_err_probe(&pdev->dev, PTR_ERR(i2c->pclk), + pclk = devm_clk_get_enabled(&pdev->dev, "pclk"); + if (IS_ERR(pclk)) + return dev_err_probe(&pdev->dev, PTR_ERR(pclk), "failed to get and enable clock\n"); - dev_dbg(&pdev->dev, "clock source %p\n", i2c->pclk); - i2c->pclkrate = clk_get_rate(i2c->pclk); + i2c->pclkrate = clk_get_rate(pclk); if (i2c->pclkrate < SYNQUACER_I2C_MIN_CLK_RATE || i2c->pclkrate > SYNQUACER_I2C_MAX_CLK_RATE) -- 2.34.1