From: Sasha Levin <sashal@kernel.org> To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>, "Thierry Reding" <thierry.reding@gmail.com>, "Sasha Levin" <sashal@kernel.org>, fabrice.gasnier@foss.st.com, lee.jones@linaro.org, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, linux-pwm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.10 4/8] pwm: stm32-lp: Don't modify HW state in .remove() callback Date: Thu, 16 Sep 2021 22:34:29 -0400 [thread overview] Message-ID: <20210917023437.816574-4-sashal@kernel.org> (raw) In-Reply-To: <20210917023437.816574-1-sashal@kernel.org> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [ Upstream commit d44084c93427bb0a9261432db1a8ca76a42d805e ] A consumer is expected to disable a PWM before calling pwm_put(). And if they didn't there is hopefully a good reason (or the consumer needs fixing). Also if disabling an enabled PWM was the right thing to do, this should better be done in the framework instead of in each low level driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org> --- drivers/pwm/pwm-stm32-lp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c index 134c14621ee0..945a8b2b8564 100644 --- a/drivers/pwm/pwm-stm32-lp.c +++ b/drivers/pwm/pwm-stm32-lp.c @@ -225,8 +225,6 @@ static int stm32_pwm_lp_remove(struct platform_device *pdev) { struct stm32_pwm_lp *priv = platform_get_drvdata(pdev); - pwm_disable(&priv->chip.pwms[0]); - return pwmchip_remove(&priv->chip); } -- 2.30.2
WARNING: multiple messages have this Message-ID (diff)
From: Sasha Levin <sashal@kernel.org> To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>, "Thierry Reding" <thierry.reding@gmail.com>, "Sasha Levin" <sashal@kernel.org>, fabrice.gasnier@foss.st.com, lee.jones@linaro.org, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, linux-pwm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.10 4/8] pwm: stm32-lp: Don't modify HW state in .remove() callback Date: Thu, 16 Sep 2021 22:34:29 -0400 [thread overview] Message-ID: <20210917023437.816574-4-sashal@kernel.org> (raw) In-Reply-To: <20210917023437.816574-1-sashal@kernel.org> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [ Upstream commit d44084c93427bb0a9261432db1a8ca76a42d805e ] A consumer is expected to disable a PWM before calling pwm_put(). And if they didn't there is hopefully a good reason (or the consumer needs fixing). Also if disabling an enabled PWM was the right thing to do, this should better be done in the framework instead of in each low level driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org> --- drivers/pwm/pwm-stm32-lp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c index 134c14621ee0..945a8b2b8564 100644 --- a/drivers/pwm/pwm-stm32-lp.c +++ b/drivers/pwm/pwm-stm32-lp.c @@ -225,8 +225,6 @@ static int stm32_pwm_lp_remove(struct platform_device *pdev) { struct stm32_pwm_lp *priv = platform_get_drvdata(pdev); - pwm_disable(&priv->chip.pwms[0]); - return pwmchip_remove(&priv->chip); } -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-09-17 2:35 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-17 2:34 [PATCH AUTOSEL 5.10 1/8] habanalabs: add validity check for event ID received from F/W Sasha Levin 2021-09-17 2:34 ` [PATCH AUTOSEL 5.10 2/8] pwm: img: Don't modify HW state in .remove() callback Sasha Levin 2021-09-17 2:34 ` [PATCH AUTOSEL 5.10 3/8] pwm: rockchip: " Sasha Levin 2021-09-17 2:34 ` Sasha Levin 2021-09-17 2:34 ` Sasha Levin 2021-09-17 2:34 ` Sasha Levin [this message] 2021-09-17 2:34 ` [PATCH AUTOSEL 5.10 4/8] pwm: stm32-lp: " Sasha Levin 2021-09-17 2:34 ` [PATCH AUTOSEL 5.10 5/8] blk-throttle: fix UAF by deleteing timer in blk_throtl_exit() Sasha Levin 2021-09-17 2:34 ` [PATCH AUTOSEL 5.10 6/8] blk-mq: allow 4x BLK_MAX_REQUEST_COUNT at blk_plug for multiple_queues Sasha Levin 2021-09-17 2:34 ` [PATCH AUTOSEL 5.10 7/8] rtc: rx8010: select REGMAP_I2C Sasha Levin 2021-09-17 2:34 ` [PATCH AUTOSEL 5.10 8/8] sched/idle: Make the idle timer expire in hard interrupt context Sasha Levin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210917023437.816574-4-sashal@kernel.org \ --to=sashal@kernel.org \ --cc=alexandre.torgue@foss.st.com \ --cc=fabrice.gasnier@foss.st.com \ --cc=lee.jones@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pwm@vger.kernel.org \ --cc=linux-stm32@st-md-mailman.stormreply.com \ --cc=mcoquelin.stm32@gmail.com \ --cc=stable@vger.kernel.org \ --cc=thierry.reding@gmail.com \ --cc=u.kleine-koenig@pengutronix.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.