From patchwork Wed Dec 6 11:43:46 2023 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: 13481631 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 8E46CC4167B for ; Wed, 6 Dec 2023 11:50:18 +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=JZJmTrhgdUOk3fkkctIYERVEKRe4H6wI4bYfk4nmqPQ=; b=oV29+sx21vt3/M gwoZbwVEzq5VjDLx9SBg+ItnwP+bicWNZeOgI1jkiBYHdvc2Qwgfk88HU66XWKZpcOftufRFewRFs GzGSTbPFodO6u8fTz2PZujy8E7LlWi8ETpoUR9icYagXDWTEKexYu2eVjxqCZullEpPwQYRH2FCIB gfBC4zRUb4gk7SLbDD9TtsxKEcfnRrhNX7wXG+o96Pi5Akvv1utnNB6mz4NKcichAPDClaOl28/sr QzkVQzpyXf4wZaI4YVraAZbMUYwKSDqIn8G1y8I9VV3F2iEblEA9cnWi/2Tft5qOgE7Nhw5LaUVWx MnP3YJKankr3NXSc8aQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rAqPV-00A7ME-0l; Wed, 06 Dec 2023 11:49:49 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rAqOQ-00A6K7-1Q for linux-arm-kernel@bombadil.infradead.org; Wed, 06 Dec 2023 11:48:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Sender:Reply-To:Content-ID:Content-Description; bh=1Dezd84vSydilVJog1N6zTk/uDqM0LKJYlYch775Ask=; b=rP6pFifqLO88QhjjZ4XFA0Zmlt oFhINVcBvq72kOGhl2A9th0P5RvCDX8gat7hk/xN+0m4pYGtoI+GHBmwF7aqIi4XEKumF5HrdQDI8 XlVFLoYf3ljLguf0X8i+fsiAj9a52ZwBEFeAPmdMLZpRDcLaOFwSi+cUeNWAyAAzy/lRqtYpLQP2/ hhzbDrACJiXxDNb80TXor9nw/0Otc6gwxCPqe3VFAkXeyZwYCOj2fbXuYACSLSVG5eT/I2hCUMlmK /C/7kt/8hGVbqjr/5ZJXYINNhguE1APyOzpuftZR9/mSA72K36p37Lv/TTuVKrVJkDElLwuTXu56j w4/6jrzg==; Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rAqOM-0059Uo-1R for linux-arm-kernel@lists.infradead.org; Wed, 06 Dec 2023 11:48:41 +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 1rAqOA-0006Ls-CS; Wed, 06 Dec 2023 12:48:26 +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 1rAqO9-00DwtN-Uf; Wed, 06 Dec 2023 12:48:25 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1rAqO9-00FQya-Li; Wed, 06 Dec 2023 12:48:25 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thierry Reding Cc: kernel@pengutronix.de, Fabrice Gasnier , Maxime Coquelin , Alexandre Torgue , linux-pwm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 032/115] pwm: stm32-lp: Make use of pwmchip_parent() macro Date: Wed, 6 Dec 2023 12:43:46 +0100 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1687; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=8GTUfYbqD+5GD5mrEVpFS9bTtV3cMkLFhtuMi1iJw5k=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlcF6G7un905HHfA/LXXzvzNjnU6AdxmMub7RNl LYax0QqA3CJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZXBehgAKCRCPgPtYfRL+ Tm1rCAC3RTd0mfQnKD8mThUZ+hnBLc7lcxLx0DmKDP+7CnPzGnM8NWYuqHckQqHg1cHs/zqtUeC h5IM1PIL1TD5IXfQqHBIIcQX/CC43gCnGsSCMqKoEry+CWG9cnI6E6pQ9FshAnl6JANs79QHpLb 792WjXMkJMR3zoDMJi+xaKQcx/fcByFvwrmxNDZ+UuDkj4Up2Ja3ujwpMu/5CWqFo0Fa/v9wwMA UAZNEHSldWcdwTj3X+s9yysXYrP0lQ9bM2xPa+iW0qXVYgJETvjFbxqXFfIoKijGTIhyNj17o8z vr1FflwXP+sBNVRLlER3ASS9bDX30n2L1gN8nPzFETGhruTx 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-20231206_114838_805488_9C5C5123 X-CRM114-Status: GOOD ( 12.57 ) 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 struct pwm_chip::dev is about to change. To not have to touch this driver in the same commit as struct pwm_chip::dev, use the macro provided for exactly this purpose. Signed-off-by: Uwe Kleine-König --- drivers/pwm/pwm-stm32-lp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c index 439068f3eca1..3754faeca838 100644 --- a/drivers/pwm/pwm-stm32-lp.c +++ b/drivers/pwm/pwm-stm32-lp.c @@ -61,7 +61,7 @@ static int stm32_pwm_lp_apply(struct pwm_chip *chip, struct pwm_device *pwm, do_div(div, NSEC_PER_SEC); if (!div) { /* Clock is too slow to achieve requested period. */ - dev_dbg(priv->chip.dev, "Can't reach %llu ns\n", state->period); + dev_dbg(pwmchip_parent(chip), "Can't reach %llu ns\n", state->period); return -EINVAL; } @@ -69,7 +69,7 @@ static int stm32_pwm_lp_apply(struct pwm_chip *chip, struct pwm_device *pwm, while (div > STM32_LPTIM_MAX_ARR) { presc++; if ((1 << presc) > STM32_LPTIM_MAX_PRESCALER) { - dev_err(priv->chip.dev, "max prescaler exceeded\n"); + dev_err(pwmchip_parent(chip), "max prescaler exceeded\n"); return -EINVAL; } div = prd >> presc; @@ -130,7 +130,7 @@ static int stm32_pwm_lp_apply(struct pwm_chip *chip, struct pwm_device *pwm, (val & STM32_LPTIM_CMPOK_ARROK) == STM32_LPTIM_CMPOK_ARROK, 100, 1000); if (ret) { - dev_err(priv->chip.dev, "ARR/CMP registers write issue\n"); + dev_err(pwmchip_parent(chip), "ARR/CMP registers write issue\n"); goto err; } ret = regmap_write(priv->regmap, STM32_LPTIM_ICR,