Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1855211pxb; Fri, 24 Sep 2021 13:36:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxbW8bYPiIYWrBIRC9hX11EALlievyjevTWdCkeRSKt1DbvVkg4W5uRLmAAj8X5JRWfXFy X-Received: by 2002:a17:906:7b54:: with SMTP id n20mr13328774ejo.525.1632515811284; Fri, 24 Sep 2021 13:36:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632515811; cv=none; d=google.com; s=arc-20160816; b=O/puiSRv0GF4zwT1Af7lAl2iHTqFsI7Eink0XWLuc1lbL/9QEm6kuFu+nO89nJWcrm HDoLcBc1lCowB5aMjxkalmynrvh4J7tM2xCvZam3KA2lQEhS1MgWxgTUFnxU7bk3wTVr /b0ExVNw4tD99dHVeKPo2B0sJbfswIeHitGx5dZhnzqPC5yrDgbDTEiSTJ0yiaV58yAP Wojo7JVYMQEaz/7l2GL+Q72jlXxC5Aki43PTASCJEyzifA8AlRq9be8sZNQHw0wXK4PP ri+ByWRI6YARwCblmcOchnMlX/sGgkZsPKitk5jL3H8xPIKKWZXCJiSoo3SyZxawf/2n CDWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aynubaHoknbzRzxj/oF2RZNVsCbEk+3PHFTO0Rvi84Y=; b=MeFsCcduztQl4Gqj+AkVgP68DZ26oi4HNRbVsBoY2+aOpndJdJzeKbJB2ym+B6kg1T v3TJD4UCY6ZtRARe1i/rllanJTPPsZ1/nJuzWJwKaZchtjh9rn1061CxclH7gmhnnBJU +JVXB4ZrFAx16rL8jOltdedCWG3xPoNS8zk/zps8IkS47/97fhz+ty8jS12Ok0z5xzT8 Nx998zJ7Cmqg3cpgns3IzU8zaIO9GXAaQyThvCPddgrqvY1rWhovhldL1F32mfIroOxI 7xEduCoSx2eaNHi4mn2aoQWIngaIeeHIriJu3bX2jKlsq9vQHqWty4VXm0E4BJAcvNe1 31HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ykqCVTie; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d27si9559002ejo.283.2021.09.24.13.36.25; Fri, 24 Sep 2021 13:36:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ykqCVTie; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345453AbhIXNPN (ORCPT + 99 others); Fri, 24 Sep 2021 09:15:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:40514 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346217AbhIXNK0 (ORCPT ); Fri, 24 Sep 2021 09:10:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 70499613A5; Fri, 24 Sep 2021 12:58:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632488296; bh=E9vuz2Rh7x+SOBmUpjvtjEaDYOGDJhW+R5yHAVnGk3g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ykqCVTieUkXQhy9a7OXsBaBylfODSrt93NgwpOe3h/77EJEfbf/6yEFL41Li/Mefr 2Ge8oDYk4PGloBlYjnrCAZqIExL8O7NVxb8kXTrRhqLqBGchGm8VUcBNTaSY6LXOML vHAZoe/5EsmR+ryo8PZMRoZAIK0Ij49/O0sj/IBU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Thierry Reding , Sasha Levin Subject: [PATCH 5.10 58/63] pwm: stm32-lp: Dont modify HW state in .remove() callback Date: Fri, 24 Sep 2021 14:44:58 +0200 Message-Id: <20210924124336.262077415@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210924124334.228235870@linuxfoundation.org> References: <20210924124334.228235870@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Uwe Kleine-König [ 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 Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin --- 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.33.0