Received: by 10.213.65.68 with SMTP id h4csp39353imn; Mon, 19 Mar 2018 18:50:10 -0700 (PDT) X-Google-Smtp-Source: AG47ELsK57t3Z5RyI0CXQvgXAbUuTuon225S7xJonyb7qfF4tbBQKh/1I1vBv/PjpK0mfWu2XaAM X-Received: by 2002:a17:902:820a:: with SMTP id x10-v6mr4078304pln.105.1521510610749; Mon, 19 Mar 2018 18:50:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521510610; cv=none; d=google.com; s=arc-20160816; b=tJxNVMlfI3t+SDInwGrdFXQjJK3+YvXFSbJVSfdBC+RCMJWy0C3Zxq8vFslGx8uDpZ 55wTK43iCAkDXWNRZG55QSNfs20oUc3D24sTOI4nL+vf71tu6X2NscGGuO1hV2JWoCrP PTmghYHQPjQ99ZdbnrjLXLLLQnzlLllPJGRdnymSoprrAO/QL1NxgtKPjWNrczwlFoAI jjPz+oUBJuym8qP9nvYyS9KBSvYUoYEvbtmTH+BmDoZ52zeViJLViL5bFr53za2CKuzC bZtb/OdUJobaNIVPUfcSR50IYSILMkoiLdOXxWRe9Kt9wFtiFHWohb5LprYzXyft4AwF F4xA== 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=zFictjqTi60zinbDczVqg5q2qb8+AAub/CzgtMe+7+4=; b=h1APOp2L1R6SV/Plw1PejdzMjrc6D/xi/FWdN+KLeyrcYFcyibd+KfO/8DXb4O6tx6 xGiEZ+cA+yz5AzO2nGBMUYY8jTh2sbIVXsxkZi2ymhZl8E1N9ZkVfYkL6+SifH+dqUDY OA8Z8bgrCmlTdsvYx6wfLwFZ7deNB9rEW+7yxg2ddyzty9Razr5ti9F5EjDhvh+gX8Ms ksAHZ8oP2AVgp+49U/Fwj30sZuiQWKWtMOcxTD+TGb7EK1Fuq3z33+MXC2nbpSuUrfdY BPMsrsJgM8pzwJz8frrj9DwV3EnMYO0PuuEzc5hKCX0Xo+ZSm3i0CUBZMv4mvnvA3Qwp obgw== 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 p29si410055pgn.123.2018.03.19.18.49.56; Mon, 19 Mar 2018 18:50:10 -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 S1031285AbeCSUPl (ORCPT + 99 others); Mon, 19 Mar 2018 16:15:41 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44870 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969043AbeCSSQD (ORCPT ); Mon, 19 Mar 2018 14:16:03 -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 03D081165; Mon, 19 Mar 2018 18:16:02 +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.4 096/134] spi: sun6i: disable/unprepare clocks on remove Date: Mon, 19 Mar 2018 19:06:19 +0100 Message-Id: <20180319171903.140193645@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319171849.024066323@linuxfoundation.org> References: <20180319171849.024066323@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.4-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 @@ -457,7 +457,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; }