From patchwork Wed Feb 14 09:32:01 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: 13556126 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 B4116C48BC4 for ; Wed, 14 Feb 2024 09:37:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type: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=Iu21F9N6AsLJuVDEPF3znjNywYwYrNinglrpyASP1no=; b=uw103NmJM81sb5DijL8IODd93T NVz12FIuvIREhb3nP2IlNqDb387YMXMoEic4UF4Tn4Ax/459LAx+Ydq5xA9qM6YrOmy742nF/hsTz pP52AlifZavx+SsRNZ/DzLccusXmn6bdiukn+QJzWSHnPhKH+t+wSqrevxcmFB2mM38NFkyB88tP0 gjIzrp7X+w6+DyFlMEpe8M4g7fuwVAgaPgLSPQ75JtmAVic0O+pWX4HZVbHaCwLzm3lLREU2sU39b jSLg4v8Tm4QGsqzjhc5k+ixqSqNVzptQj2Zumj9QruSQjc5jE/SAQ5VeynvkZHShbR+pQVAkrHDM9 nXyoKQ7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raBhj-0000000CMpW-3DCK; Wed, 14 Feb 2024 09:37:23 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raBfH-0000000CKcN-16uf for linux-mediatek@bombadil.infradead.org; Wed, 14 Feb 2024 09:34:51 +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=Iu21F9N6AsLJuVDEPF3znjNywYwYrNinglrpyASP1no=; b=mIxVEym6/RhcqQyrlUGGzIWH11 eIxagAOVWxi4WUvXsH0dqehI1Nc0LCB3wkSPYS2wfRuRdx8ovpSP9QZHwTWWy1VjRnJqoxaDGaBbU lgna/1BYRldpJzVlWnoO+KwdCnZ4gx3UB0gutsrs1MAp8I50+2FrSKsUw5iaC7rCL9Fa8q5lPGKpO vHMly0QN822SePZmpQ3wxAM5yulj08WG5+GF2kVcqcKY9yn7qXs6Viq2xcNkJy2nwjIE4OgS9S+/q +PxR8N+7G0AHwieo9p1eu7qPWpq6L3TRsWNlgAWfx2N+K7IreI7TLPLD+irxztUG1pic5lBuu3Is6 GsBJwu+Q==; Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raBfD-0000000GAXG-0jQR for linux-mediatek@lists.infradead.org; Wed, 14 Feb 2024 09:34:49 +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 1raBey-00059n-Jr; Wed, 14 Feb 2024 10:34:32 +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 1raBev-000fDL-DC; Wed, 14 Feb 2024 10:34:29 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1raBev-004Y4l-14; Wed, 14 Feb 2024 10:34:29 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Matthias Brugger , AngeloGioacchino Del Regno , linux-pwm@vger.kernel.org Cc: kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v6 074/164] pwm: mtk-disp: Make use of pwmchip_parent() accessor Date: Wed, 14 Feb 2024 10:32:01 +0100 Message-ID: <93ba7ef22f8d26f17e64326249d5da54ab8014ea.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=1790; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=HAz7THBaqE1zk9nd2+emun7+lN7VcaMz4+VVJrgwc3M=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlzIif0wO7RFm/4/BsEVKEHGZ573THDXi+L/vlk Kj9Odwc3S+JATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZcyInwAKCRCPgPtYfRL+ Tmj/B/9Qj8v7A2vPAcgJSB+sK+gj+ELCffwiTM40ITMm/GUjgSRb+fhnLZLulIEs8jCB6xW6jO7 wq97LDk0pK6j0pX6QkFRotwJYQc73WaisDTO0v5BOCVGd0RZxF2rKoVnNh1dMHrvdsq1LOEn6SV zsLrDHGeiHh90fbHGZSAcDRCuj0RWY+Zg6pl0moF2dvaHGpfp6t++1nWNzkdXZsHN5twlq4MzH7 HZAodjYUK0BoQL9nDYwMqE1DU351NtKD5ZpMx/P0yZjOup3LaBqpu+ONzGWdXGUDaEzOFxXL9Er UthAF4IfDBNlVaf13fQcHvAJPP11MpJ6A7Gt6s6BFA3y5dwt 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-mediatek@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240214_093447_698410_7BAD82DD X-CRM114-Status: GOOD ( 11.97 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=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-mtk-disp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pwm/pwm-mtk-disp.c b/drivers/pwm/pwm-mtk-disp.c index a72f7be36996..186aa5c04435 100644 --- a/drivers/pwm/pwm-mtk-disp.c +++ b/drivers/pwm/pwm-mtk-disp.c @@ -91,14 +91,14 @@ static int mtk_disp_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, if (!mdp->enabled) { err = clk_prepare_enable(mdp->clk_main); if (err < 0) { - dev_err(chip->dev, "Can't enable mdp->clk_main: %pe\n", + dev_err(pwmchip_parent(chip), "Can't enable mdp->clk_main: %pe\n", ERR_PTR(err)); return err; } err = clk_prepare_enable(mdp->clk_mm); if (err < 0) { - dev_err(chip->dev, "Can't enable mdp->clk_mm: %pe\n", + dev_err(pwmchip_parent(chip), "Can't enable mdp->clk_mm: %pe\n", ERR_PTR(err)); clk_disable_unprepare(mdp->clk_main); return err; @@ -181,13 +181,13 @@ static int mtk_disp_pwm_get_state(struct pwm_chip *chip, err = clk_prepare_enable(mdp->clk_main); if (err < 0) { - dev_err(chip->dev, "Can't enable mdp->clk_main: %pe\n", ERR_PTR(err)); + dev_err(pwmchip_parent(chip), "Can't enable mdp->clk_main: %pe\n", ERR_PTR(err)); return err; } err = clk_prepare_enable(mdp->clk_mm); if (err < 0) { - dev_err(chip->dev, "Can't enable mdp->clk_mm: %pe\n", ERR_PTR(err)); + dev_err(pwmchip_parent(chip), "Can't enable mdp->clk_mm: %pe\n", ERR_PTR(err)); clk_disable_unprepare(mdp->clk_main); return err; }