From patchwork Wed Feb 14 09:32:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13556209 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 82E6FC48BC4 for ; Wed, 14 Feb 2024 09:41:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=l+rzkrjWcxJWecwJjfJE3ZZFN1w/ZMxNcEPZeTFqRWM=; b=h9VsWUxNVd/5uE 1Gn9YfupH9EwDWKcx3RdK/qYt3gJVaTPNg5GufxgqSbQc0REgBJ7Lh6XSMHhl1DJIz4nwICTaOx9i prpyKTQJlIrZbK1IX9ye1wkHNDil4abUWhi6MtteczOCSmqg387C3aTRVmTbXEzZ8bDCPKn2gcQk8 /ZL6wpjibMiXn+vp/PZXLEcV8ZfZLTzcYGi/+ugfJ9hiM1P6KxfHIfDPLipNKnh5o+qon0wStxaSR 4Lxplgztd5PAU/Zxyud5viOY1QqTjGYuTkapEuWHsq4PQ+BYDps5qyL4PaGgpBEXY5PMsTEkyEFeh gT3ugXPMGB1VQ9Wbs2Lg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raBlj-0000000CPQY-40nM; Wed, 14 Feb 2024 09:41:31 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raBfB-0000000CKVK-1tgj for linux-arm-kernel@lists.infradead.org; Wed, 14 Feb 2024 09:34:51 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1raBf5-0005ik-3n; Wed, 14 Feb 2024 10:34:39 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1raBf1-000fFi-8S; Wed, 14 Feb 2024 10:34:35 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1raBf1-004Y7R-0a; Wed, 14 Feb 2024 10:34:35 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Fabrice Gasnier , Maxime Coquelin , Alexandre Torgue , linux-pwm@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH v6 113/164] pwm: stm32: Simplify code to determine the pwmchip's parent device Date: Wed, 14 Feb 2024 10:32:40 +0100 Message-ID: <54ace92a3c02d22f15a79c7ecf00c29f28386a33.1707900770.git.u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=872; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=bZTsW8lAwjzlND0LcwKPlCEPg8gdCtmlWf6i463Sq1k=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlzIjN2bCo4elWQTi51iNbI+Kc+Jt2OcDstTYJh EROUhArW/6JATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZcyIzQAKCRCPgPtYfRL+ TtuFB/0VadLMWhIrTIg38YKPDtgTBx6Tn4VV33yfCIaelHzLHNHL6Cu3b76q6dbMT+sXHYNaOL9 IxrLgjvVR51f+/yumbGQesuyBlJ4wqZknMLGmdSiHcLlrKsprfrovyVcD8Ckf861FWYmNf8p+4D 3e+RNxtmM/3fAs+1dQxqyMi6tlUxJtt7ozjR/7GLp7+tpv4XD0cbxT9tUuHvV2zf+sObWcmV8jA vriK8BShqzzJs2zZW4LSq8wxMvh4b3VOhaSMsKUfI8HU+R3Pskjvw8Hz3cjPhxaw8PCJ2AHQV+S pPS1nsPMXGiwJ/EOgR2rLGzZvmKsRsQCFNKPjUqAIYFOj3Fh X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240214_013445_864563_131C878B X-CRM114-Status: GOOD ( 13.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There is already a pointer to the pwmchip, make use of it directly instead of using the struct stm32_pwm *priv just obtained from it. This also has the advantage of not using struct stm32_pwm::chip any more which will be dropped soon. Signed-off-by: Uwe Kleine-König --- drivers/pwm/pwm-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c index 5f10cba492ec..202114c00ad3 100644 --- a/drivers/pwm/pwm-stm32.c +++ b/drivers/pwm/pwm-stm32.c @@ -170,7 +170,7 @@ static int stm32_pwm_capture(struct pwm_chip *chip, struct pwm_device *pwm, ret = clk_enable(priv->clk); if (ret) { - dev_err(priv->chip.dev, "failed to enable counter clock\n"); + dev_err(chip->dev, "failed to enable counter clock\n"); goto unlock; }