Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2250927imm; Thu, 7 Jun 2018 07:43:13 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIi9UIITddnvKwzpuvy5ZfTVyVg6Qu23EEP/MXzjlbsYXW7w0Bv6IqVwB/5EWYhM6z/gZaA X-Received: by 2002:a63:a00a:: with SMTP id r10-v6mr1874960pge.222.1528382593092; Thu, 07 Jun 2018 07:43:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528382593; cv=none; d=google.com; s=arc-20160816; b=fT53v5J7HrbXdhsrRQDE1vn8e2lQqpV8II98rzih1vXiPdwuRM4kvHs/fgnc68IjL+ 7hM/31wC7g6I4KQdec59HzpLtANgrwrZyhFCHP2y1ctAwcn3kDGWZZfeTfj8PGjLC3no wcTTzrnom23pCISOrmsq+K+Dacuii5q+kGPnyh/UoodZ6rn9eJFY0LKhK6RG2/1awTmZ 40k4fFPrd3uI+GUVfKltUYDGeqpW5j9UTlPL3xKA0HtWLeOwQExmk/5qoAjE/A/PgYD7 3dFsHHbnq228DRQ/+V4JDJ0KJ1b3yjwc4Y6RfrSgNNz6nZl5CGI+uQ2Qfk/TQyWAwTf5 RyFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=4zhvNAG4kkf0TPCEjyICZZ1p5ljw5CeoPYjwhdYpagg=; b=KwFGZTFfy0EpKzPANEGibKE0x4yCtSsgl2odLI4VIwwKHxjVB2ozXKEyRH0SypBve6 WpfIdOqYSN/ejTEaWMpKClUaZC6aN7BSn6AZR9+KF35+t5O1oOu8npLGobdCJruKRKdh 5ww25ImLphCSKduVqti/CF0MsTTQ2uyAlfl/A+RH7mAv5ySHS/jVAKncZSp5V5ZH6hsj 3BAxAbq1B7TW0uKuUklZbP0LmLBFpNK8TK50fxqHC9hunC5cB2//QFVlzm8syD/upii6 xzdIcwaBta4Z57WME1nakeuE2spMybrmRmELiQ+yQa688NnGImnPNaCsJ1x63QPK5tYk blHg== 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 ba5-v6si16790807plb.184.2018.06.07.07.42.58; Thu, 07 Jun 2018 07:43:13 -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 S934724AbeFGOmJ (ORCPT + 99 others); Thu, 7 Jun 2018 10:42:09 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:40620 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933843AbeFGOmE (ORCPT ); Thu, 7 Jun 2018 10:42:04 -0400 Received: from [148.252.241.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fQvbu-0005Zi-6f; Thu, 07 Jun 2018 15:09:54 +0100 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1fQvb0-0002mH-8S; Thu, 07 Jun 2018 15:08:58 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Mark Brown" , "Maxime Ripard" , "Tobias Jordan" Date: Thu, 07 Jun 2018 15:05:21 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 075/410] spi: sun6i: disable/unprepare clocks on remove In-Reply-To: X-SA-Exim-Connect-IP: 148.252.241.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.57-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Tobias Jordan commit 2d9bbd02c54094ceffa555143b0d68cd06504d63 upstream. 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: Ben Hutchings --- 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; }