From patchwork Wed Feb 14 09:31:35 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: 13556152 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 E245AC48BEB for ; Wed, 14 Feb 2024 09:36:02 +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=s9EupK3Kb8REzDlY9szScl6oGwe6twE8EE4bIti0A/A=; b=kfyIrUodwPb7Mt +pU2ZlGQNQ7idZH8fIcqy79hdVYALTau4AO9+diyUoI9czSKHbBXZQwfcPS6YLd8DGiGPLdp9sbIa 51NbJPgghNMN4NTRzArmpp8Z1LusiCdvM+gUBpGRY+h6Ai70kG2x0k1JYaF+5s54aIKRcL8QkWSjx A0dp6GHRmVTC2glRSjvNM8GleSU5UYwSWJKBah8g2k+YJwQ9wCX0ArvDHtLznPQlvEcvmfV0pn02Q TtBYUMQ7ui64rCvByt2uLTDySZwF6qETRpVhonWW6gl9gd1big5yLg41oY1+JHKdg3tJN/TCNWwQg cn/KOXtGbuQtjAYd3iAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raBgB-0000000CLOR-1tcB; Wed, 14 Feb 2024 09:35:47 +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 1raBey-0000000CKG9-3RbZ for linux-arm-kernel@lists.infradead.org; Wed, 14 Feb 2024 09:34:36 +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 1raBer-0004jL-Uu; Wed, 14 Feb 2024 10:34:25 +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 1raBer-000fBp-Al; Wed, 14 Feb 2024 10:34:25 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1raBer-004Y2v-0m; Wed, 14 Feb 2024 10:34:25 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Shawn Guo , Sascha Hauer , linux-pwm@vger.kernel.org Cc: Fabio Estevam , NXP Linux Team , linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH v6 048/164] pwm: imx27: Make use of pwmchip_parent() accessor Date: Wed, 14 Feb 2024 10:31:35 +0100 Message-ID: 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=1489; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=RuNDzuLdvJRxR0ckpJ+3ys/tCVKtgBXKMYvbIUdoyZg=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlzIiBZ0q35U/jB2Oz5eygTO2iXNMY+QWm/6azQ ShvztQDekKJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZcyIgQAKCRCPgPtYfRL+ TjIjCACeZlXTYvp10oOet167MF9Mb7oGaPaSnHl6Xj/Pdp2HT2IrmANnlQNDwI5qE4oYBKa4t/D IRRTLwy0eOOTYsQOfgx9CT9Hx+gRDtjv4fG7yU7sLd8WHoKwFvK0PAxrDwPF86tFnIaJzYvxkVR RJNiQiIvIsScfUSS8phZ3Ff2Lp5DWQnmXdz7DmpfeuxOiQlPmlmT/4NsVIxdR+DIZ/QOQYXyHpB 8q/nXK9wafiZSY2dwgCvg5P2uLXQJPVi/KMY5lrnmr8B0Yw2X1EBdiwF8OZ0Y03RftP18jZE3pB gOcdcsN1ttMUOBuJ2oDkf6IrPLPazZbGa8Ls3w3OZTnFfDqS 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_013433_095827_0A2BF236 X-CRM114-Status: GOOD ( 13.96 ) 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 --- drivers/pwm/pwm-imx27.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pwm/pwm-imx27.c b/drivers/pwm/pwm-imx27.c index 7d9bc43f12b0..5d796453519a 100644 --- a/drivers/pwm/pwm-imx27.c +++ b/drivers/pwm/pwm-imx27.c @@ -145,7 +145,7 @@ static int pwm_imx27_get_state(struct pwm_chip *chip, state->polarity = PWM_POLARITY_INVERSED; break; default: - dev_warn(chip->dev, "can't set polarity, output disconnected"); + dev_warn(pwmchip_parent(chip), "can't set polarity, output disconnected"); } prescaler = MX3_PWMCR_PRESCALER_GET(val); @@ -177,7 +177,7 @@ static int pwm_imx27_get_state(struct pwm_chip *chip, static void pwm_imx27_sw_reset(struct pwm_chip *chip) { struct pwm_imx27_chip *imx = to_pwm_imx27_chip(chip); - struct device *dev = chip->dev; + struct device *dev = pwmchip_parent(chip); int wait_count = 0; u32 cr; @@ -196,7 +196,7 @@ static void pwm_imx27_wait_fifo_slot(struct pwm_chip *chip, struct pwm_device *pwm) { struct pwm_imx27_chip *imx = to_pwm_imx27_chip(chip); - struct device *dev = chip->dev; + struct device *dev = pwmchip_parent(chip); unsigned int period_ms; int fifoav; u32 sr;