From patchwork Wed Feb 14 09:32:51 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: 13556171 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 7604FC48BEE for ; Wed, 14 Feb 2024 09:39:21 +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=Cv9KJLH4OHPHLhtfFmurywigABWts0hSgrgPL2AOwfk=; b=dI6OMCv74Ghurg rPrNmXKrFjX4KlvulnE4Ay5oCUDIQSwaTyeJOeg8x3X/LEjnD9U6Mkb6cTtKen6vsoxj4W168aeno CIfUqB4VAbrU55Nq7uvTkwoX9RCvytOZSiQzt2OoF5645D9+TlQFgN2AOrk2hr4vn9eSjzQnSBfkp umonyBo8sfNMic1CNDc/tHJjHBXNjdj/xe+EvqXk8a2DuKMEW+RC7br/qF2rfGd0vWkMaEezYuaE3 maPdzoRDaMMW1N8+SvvNlqn0zi69ZFCHj8swwvb8vHYHBeq8jZskiroVMz1ctBOtq6Yqq6KUcgoqs Z/1b9EHuPdKSYmy0SXzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raBjO-0000000CNT3-3WO5; Wed, 14 Feb 2024 09:39:06 +0000 Received: from metis.whiteo.stw.pengutronix.de ([185.203.201.7]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raBfD-0000000CKXc-0tV0 for linux-arm-kernel@lists.infradead.org; Wed, 14 Feb 2024 09:34:55 +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 1raBf6-0005rz-Cf; Wed, 14 Feb 2024 10:34:40 +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 1raBf2-000fGP-Uu; Wed, 14 Feb 2024 10:34:36 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1raBf2-004Y89-2q; Wed, 14 Feb 2024 10:34:36 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-pwm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@pengutronix.de Subject: [PATCH v6 124/164] pwm: sun4i: Make use of pwmchip_parent() accessor Date: Wed, 14 Feb 2024 10:32:51 +0100 Message-ID: <3ddaec73f3abefb45625d0a469026fa8d13da8c0.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=1280; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=3dVqSmhY8p5H+vr5Gl/jpAORwwjUu1lh7OQVl0sdU+s=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlzIjZypwfClaOc9oFVyhz5spcDbeQ2oihX1A+s j7YGaJjb8mJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZcyI2QAKCRCPgPtYfRL+ Tst6B/9ab8tf00wMOOj6CQrwM/ghrf+e8czin3fZ3LSlb8g0UCyvYthJlcVRsfrGN0DYiTOVB61 l0WLagICH4i0mF0CBmpJX2JBLMAsAEdTDX5X1npWQ4to/QNVXPu/QCL847a3XxFuTYAwau5pJyh usUbdxiWL5HGFq0m9KcZFglndGeebUVfJaVNcu3kRaYhZf0dIhxSRxLMgKIzT6EdMwJyC6IxRsH dWfYvIOTyMiAhEKbhH6493GDcjLh/7rY4bG5eUPjrgKn8csvGUPAS5o46sgxizlHUFj9qlgQ9xm iqHvvMgpCAXL0xfFITkns0xKrmRojp2HZEWMl9auqKtZt5Jj 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_013447_501276_96CFC418 X-CRM114-Status: GOOD ( 13.30 ) 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 accessor function provided for exactly this purpose. Signed-off-by: Uwe Kleine-König Reviewed-by: Jernej Skrabec --- drivers/pwm/pwm-sun4i.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c index 1a439025540d..44edf1ce5739 100644 --- a/drivers/pwm/pwm-sun4i.c +++ b/drivers/pwm/pwm-sun4i.c @@ -245,7 +245,7 @@ static int sun4i_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, if (!cstate.enabled) { ret = clk_prepare_enable(sun4i_pwm->clk); if (ret) { - dev_err(chip->dev, "failed to enable PWM clock\n"); + dev_err(pwmchip_parent(chip), "failed to enable PWM clock\n"); return ret; } } @@ -253,7 +253,7 @@ static int sun4i_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, ret = sun4i_pwm_calculate(sun4i_pwm, state, &duty, &period, &prescaler, &bypass); if (ret) { - dev_err(chip->dev, "period exceeds the maximum value\n"); + dev_err(pwmchip_parent(chip), "period exceeds the maximum value\n"); if (!cstate.enabled) clk_disable_unprepare(sun4i_pwm->clk); return ret;