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: 13556164 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 9D994C48BED for ; Wed, 14 Feb 2024 09:37:08 +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=DvtiHZEwtlP3/AxXGVc32NuJSWT6wLNWgzvt9CJO2pk=; b=U8qelFWYeDPt0S z/BMD6fIubRa1w1S4vWjIm+/kcbpsKvHkcsrUrQWtK8QXUrm4OA1jBdC3COuNBFh2gV0m3zP0V7cT HxNaJyQ31jg21YsnX4oFFzuixZ5MrK4loq+MGOHs6eTuPcRiG7S1z6To6NRtB4dIv1FRaU0qi1QUT q5WEr4pKjaz+dZH+Hr9eVX2aIupq2O0cjzuq2ztgIBfVcaoKgf3N+J/R7OGWvWNtDR/kMLCz9xZzl BLHpBUSZ09JLoB0lGdWbWelxKnZN9XMXB4/cDxkblQP8vE7wGPMDVgEjuS5SfUbIuxF/RuAh7vMHI LGp80P/423EyHl5YlA/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raBhF-0000000CMN5-2QwL; Wed, 14 Feb 2024 09:36:53 +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 1raBf5-0000000CKNh-2qT8 for linux-arm-kernel@lists.infradead.org; Wed, 14 Feb 2024 09:34:46 +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-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240214_013440_087234_F778E4C3 X-CRM114-Status: GOOD ( 12.81 ) 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-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; }