Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3854388pxv; Mon, 19 Jul 2021 10:19:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSeQxSmEW2XDB7mweUVpEcxWqWy/5HIPTtqDQpF0V3ztTNwkDn9u9ahGt/hYuNL038SZNO X-Received: by 2002:a05:6638:250b:: with SMTP id v11mr23057194jat.105.1626715140791; Mon, 19 Jul 2021 10:19:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626715140; cv=none; d=google.com; s=arc-20160816; b=i1ZNpj9pu3xNjHUHKs3cGVKa/cTD3Igh7CTdUXId4Txvj0YB5tQ/QF6XdcDk3Ll7v0 +8d1LhIIMJ4qvp9/V+80Ni986T1zhsA4MNtBrk7XLNZkbWE6BPN6gLrFwg55dxeu6Mfh 98bgWNX/8dFnstxMfVGjr9CmObn0QOe84STNtYxSFT3W/1ra22+wAdx6jbI8K87gFEUh MLwNMT1hGhS/tD9hUv/YuSTYeleN3kwX2D87LRL3ghSQOkkJ/q9LuXxrM9MjqPjMsfxa ng7IpDAjboxKL7Maz2za+J5FXk3TIflO0aXM6GIAqNd9PCT4b9Dh0vk45TTjEwKp/cTZ 3y/w== 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=s9+Q5QqoA9f/USS97eg0lbVCMyZ4q+MOAFSx7w3NKaQ=; b=nQxxqeibvPTKdYQlzlnhXIhw4BY3a1RJHBP16QqY2mwEw2nDOIBvgKOBP9BYpEicoQ u47fHz3qOyCisp77VOPDb0iA516PmBL1+hOH1GAXC7c9VU3/II6AS2QR6NKcbtKZumnO e26NLygBvzIPCxKoK8iGsY3xOIRj1xdP6vifX6ioCJI7mZOctw37euM4ga+A9mLYsrg/ vk2i7kJkuKSoeYhqwoKTrnVN/p3VwJ5QQfUybWy5Q0Bv7Gb2wFxPlX1W3g3a/Jawsbqa 7D9XS2bj8FrFUIcKX18QtWCJORV8YozoIjEFXdOdSXNF77v7FfTNBdyG2vAKGvjuV/I0 1fRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S0+jozdP; 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 c7si20447628iot.72.2021.07.19.10.18.48; Mon, 19 Jul 2021 10:19:00 -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=S0+jozdP; 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 S1352733AbhGSQdu (ORCPT + 99 others); Mon, 19 Jul 2021 12:33:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:59628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346642AbhGSPRp (ORCPT ); Mon, 19 Jul 2021 11:17:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5005461248; Mon, 19 Jul 2021 15:57:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626710266; bh=lwqM6PvVga1wrNPdaKICIzDas3E2Hl7kjyv++ULeiNA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S0+jozdPH48u2uqLerUpQxOQBtUzQ9vAhcHeAgrrNk7P2ufNzSDWYeKioHlrG5B9h k9hsxWyjw7Z3pb/5W2tsdQVinPDakCTUBUbztcSJJlZOoGHSbwSYr+Aar0o8gSTmj8 UAHBMMTQcG0NTujqOI4Yy/yl2UOD0m/TTFrj+g1I= 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 113/243] pwm: spear: Dont modify HW state in .remove callback Date: Mon, 19 Jul 2021 16:52:22 +0200 Message-Id: <20210719144944.558644158@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144940.904087935@linuxfoundation.org> References: <20210719144940.904087935@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 b601a18f12383001e7a8da238de7ca1559ebc450 ] 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. So drop the hardware modification from the .remove() callback. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin --- drivers/pwm/pwm-spear.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/pwm/pwm-spear.c b/drivers/pwm/pwm-spear.c index 6c6b44fd3f43..2d11ac277de8 100644 --- a/drivers/pwm/pwm-spear.c +++ b/drivers/pwm/pwm-spear.c @@ -231,10 +231,6 @@ static int spear_pwm_probe(struct platform_device *pdev) static int spear_pwm_remove(struct platform_device *pdev) { struct spear_pwm_chip *pc = platform_get_drvdata(pdev); - int i; - - for (i = 0; i < NUM_PWM; i++) - pwm_disable(&pc->chip.pwms[i]); /* clk was prepared in probe, hence unprepare it here */ clk_unprepare(pc->clk); -- 2.30.2