Received: by 10.213.65.68 with SMTP id h4csp500522imn; Fri, 16 Mar 2018 09:38:33 -0700 (PDT) X-Google-Smtp-Source: AG47ELvK5Rq7GvJ2RwEHMYNXMbIkmMQa9CbUrrJVzlIvnWbttxR5QWuvKFNCf8jriI+VzuTkx8Ei X-Received: by 10.99.4.214 with SMTP id 205mr1909299pge.375.1521218313051; Fri, 16 Mar 2018 09:38:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521218313; cv=none; d=google.com; s=arc-20160816; b=ETzzXnVtXd2Rnw1bpHX6KkWa0Qv89muoHJlEi7jXp9HPuYps72roOGy0kO8VeEBldG sMOolDfoRbiP1SBMHyIflTB4lbW2uE3OTgnKPqQiu1CQzOMMw22rZytYkEroHiiSnHkN p+23BSFnJs9hBKVd5et6mZ4gKGU2k3r6/r+rJ9Ks5tc8XhkpmuT2BggN/abnUG+9+iUz fjOa6TsazqNDcPpLdCX2S4/eyMmkcr7kg+ZD5SgG+b54AGJQOfteOs6tstPgQeeWDYGk RK66ZCMfQcET44tvZa2XR3R/fWbDssdFDkhMJF0zKBsuBl8KSVmc2ejQlaPtO32N1JNe +vIQ== 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=bpXkbahbgWXBnvYgKXAnIxJxMMqoKbq9dhWBT5nFHDQ=; b=Q9zG638QeFllqAPwi0Ff5r3fpZRjyvUkskKIRuAyGnPYKe6i3xYKhjWZOwvKT0/0do Tdo/ptRjDoF/dE8BxklGyz6io7aLYnH7NEbghkEjHcRtUDXUPVMa5cgHnOtwxss3Pyer rpWGvpZOzwCmoIKycqjrw+vyjB8iSnDZc2+36aT/jBTCPnQNx6fBEBYq1wHduzISOdum KFOLDqkUHnv/YzjuouncuM7JL+Uh9KgRUtcnHH50gieO/jpNw+bEdyYCsEhQuZohdzxO DjcJVBx+XbDy8hfj2aYy5Dvk3OQrE74IWc2bqKpvwVYLwRkMP0UPwJHN3AOqaLa0deR2 ihFA== 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 p66si4864781pfk.100.2018.03.16.09.38.18; Fri, 16 Mar 2018 09:38:33 -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 S964827AbeCPPhj (ORCPT + 99 others); Fri, 16 Mar 2018 11:37:39 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41396 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934067AbeCPPhg (ORCPT ); Fri, 16 Mar 2018 11:37:36 -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 16C2C124C; Fri, 16 Mar 2018 15:37:24 +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.14 080/109] spi: sun6i: disable/unprepare clocks on remove Date: Fri, 16 Mar 2018 16:23:49 +0100 Message-Id: <20180316152334.307913464@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152329.844663293@linuxfoundation.org> References: <20180316152329.844663293@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.14-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 @@ -541,7 +541,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; }