Received: by 10.213.65.68 with SMTP id h4csp14680imn; Mon, 19 Mar 2018 17:57:19 -0700 (PDT) X-Google-Smtp-Source: AG47ELsZdB3A7jeYZvG5/tPxA36cQwI3fC1CWO0RjD7k3M3n3AT1ClaRRrTYL5sk1dpqhRbEF2A5 X-Received: by 10.98.56.131 with SMTP id f125mr11895071pfa.190.1521507439546; Mon, 19 Mar 2018 17:57:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521507439; cv=none; d=google.com; s=arc-20160816; b=hga3yWvqICNIVmJaO8ZqfO0MssnxjM3qGPIkwNvqUrcVguJn352e2eJThg/CnGTwwf scWUbQRnvnHt36iUjpEOzPAaRq2i4XTs13kKA/Vc94t3aUrjy89F5yKWgT2akk5U1F/I mwaWtvfwIE+4IM7x4AB/cQzm24Ej4ehDC5sAWH0UfvRl8COeRvKc6WtZ/uSVchmaiXPz PZWQLx6NrEt2GirmiV7BxlCYp8KXjqp7aSJaJArtQI6txmcYHcDE8EL1wMu38URdZOQP Aa6e/qf2LfqJOdJAgU7rKYwPR3d4hKzLfUJX9mdVSiGV3P79dxx/uiZnet7Fxc8+p0ks LVAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=bqZIqTtjUBBYii5crSqNIpD1Lj5U9r1LkZGsCwp0Iy0=; b=jwPBDHPhCZK+bEQClkIy1peUyY8woNU70ChZuYKRIfw9gnwVW93IrrKnNDtu4kl/kq oW3Hl2U8lEZL+BlWgxTbPkEb7v7j8USJ7J868TZTNhdWBF8jYxK+pw02y2lwrJteSzIS pf7RLXmebbXOj/2eySK6ftvBzteWQXN0dJOBLh45RIlrVIUZuJP3+JlQ2r/rYc4mbhvE bPmdsVPsHFMgvCtjhY9LIZj+H05kuL7bTFdw/RDPjf9EN0qVJFDMVSWbZ3HO+69xFkNu AShReRsUi/1/Mi/w41WxZc/9ai/h7ltU2OLRCy030+gkTxvDYHkHwaLZAlh7Mp6syrVA pWOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j5-v6si480427plt.25.2018.03.19.17.57.05; Mon, 19 Mar 2018 17:57:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031658AbeCSS0h (ORCPT + 99 others); Mon, 19 Mar 2018 14:26:37 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:50812 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031487AbeCSS0a (ORCPT ); Mon, 19 Mar 2018 14:26:30 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id CA0B31152; Mon, 19 Mar 2018 18:26:29 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tobias Jordan , Maxime Ripard , Mark Brown , Sasha Levin Subject: [PATCH 4.9 192/241] spi: sun6i: disable/unprepare clocks on remove Date: Mon, 19 Mar 2018 19:07:37 +0100 Message-Id: <20180319180759.096633620@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tobias Jordan [ Upstream commit 2d9bbd02c54094ceffa555143b0d68cd06504d63 ] sun6i_spi_probe() uses sun6i_spi_runtime_resume() to prepare/enable clocks, so sun6i_spi_remove() should use sun6i_spi_runtime_suspend() to disable/unprepare them if we're not suspended. Replacing pm_runtime_disable() by pm_runtime_force_suspend() will ensure that sun6i_spi_runtime_suspend() is called if needed. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 3558fe900e8af (spi: sunxi: Add Allwinner A31 SPI controller driver) Signed-off-by: Tobias Jordan Acked-by: Maxime Ripard Signed-off-by: Mark Brown Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-sun6i.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/spi/spi-sun6i.c +++ b/drivers/spi/spi-sun6i.c @@ -464,7 +464,7 @@ err_free_master: static int sun6i_spi_remove(struct platform_device *pdev) { - pm_runtime_disable(&pdev->dev); + pm_runtime_force_suspend(&pdev->dev); return 0; }