From patchwork Tue Jan 30 12:29:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 126219 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp3316298ljd; Tue, 30 Jan 2018 04:29:09 -0800 (PST) X-Google-Smtp-Source: AH8x224G40UxwwUGp/zB2tOF2wRM8FGdURNtYKHtZJP6OKWLxWIs7uAGcj36tZY9b+ojrdetzdaT X-Received: by 10.98.50.3 with SMTP id y3mr458583pfy.98.1517315349126; Tue, 30 Jan 2018 04:29:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517315349; cv=none; d=google.com; s=arc-20160816; b=FTD1bM69fkscP0DlcjGfMKSbqkntLX61moqyi6dOv5srMiCGmcSOvg2FUxgHzV3Krr I2LlSumF4URDOc2f03hCIm7/j9qqr9z1wXTmmCtWV0Wg1HlMK56zsMUq2U1KaE0S9G2Y 5Bt+y6XeGFHsXKEvwuaOaglrb3BAkdy3qfEzfluTRCI54R/QGbQ8ez+ymQ76/6UJSPEM Z1/YYW3PnxMbrBOmyHz4Q6/CCK7SzkZpQ8vn8rJ/cNPbIdLO2hkQCXRMrGmxKH8o5WET Gdv3ezvjahSLP9cGwnQxCWGmWBJoWYJ4cZrh9dUDNgpSXXa2Hz+YelChfBflzyfPY5dC 27Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=1IaueQsxQTy9RIMXK7sZfs6GFFlRtWH061Zkx+guy/Y=; b=DyFFJuBavqrRJsmdIji7RqUbBZGNuBIk5mcXhH2wl6NzTKxmLqxOF+YSSm6YryB2iH jry+FpcAKo1bdPd0t/l9b35XHFUAySF98TeI+cDlhBNKZkq9whjRE5Zu1XPcnzPUDBXC 6UN6eamF1j5gUWxUbT/27ZyJsLMhyRYDtYCiF+6ZkBTyTYKJ4x55zcCeGwBf923wYkjC Kf7hAZjQIbOFRrPELb7PEkiensZtxDq/jLiF0SP0jPQMOvqpZj+wW8Y6Fy39baX7xdnb 64d0XiA5I5LVzSFuOqmlqoT8dtoQgFPgEDqWcjOUoYptzc8G7HG6k1xS3o6jkeuK2vuF SD/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=hV38Fczx; 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 e65si14448572pfg.255.2018.01.30.04.29.08; Tue, 30 Jan 2018 04:29:09 -0800 (PST) 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; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=hV38Fczx; 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 S1751958AbeA3M3H (ORCPT + 25 others); Tue, 30 Jan 2018 07:29:07 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:37194 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751649AbeA3M3G (ORCPT ); Tue, 30 Jan 2018 07:29:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1IaueQsxQTy9RIMXK7sZfs6GFFlRtWH061Zkx+guy/Y=; b=hV38FczxRJs7Ki8RheY8X2ee+ zaTpNNG37R9VjfxUJceteJp99immngwnhprJJL21EotL71yT8lDMudPOIFdG/enY0zl2VPE6mVvGD aptm0wuV12FCc/ts7y+OV20V/Iu9rEkIooW9b4Wr0rOkTxSFsfKjQEksrllvTJwRsnPNI=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1egV28-0004hd-GE; Tue, 30 Jan 2018 12:29:04 +0000 Received: from broonie by debutante with local (Exim 4.90) (envelope-from ) id 1egV27-0004Pd-V1; Tue, 30 Jan 2018 12:29:03 +0000 From: Mark Brown To: Geert Uytterhoeven , Liam Girdwood , Chunyan Zhang Cc: linux-kernel@vger.kernel.org, Mark Brown Subject: [PATCH] regulator: Fix suspend to idle Date: Tue, 30 Jan 2018 12:29:00 +0000 Message-Id: <20180130122900.16917-1-broonie@kernel.org> X-Mailer: git-send-email 2.15.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When suspending to idle with the new suspend mode configuration support we go through the suspend callbacks with a state of PM_SUSPEND_TO_IDLE which we don't have regulator constraints for, causing an error. Avoid this and similar errors by treating missing constraints as a noop. Reported-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Signed-off-by: Mark Brown --- drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.15.1 diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 42681c10cbe4..dd4708c58480 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -758,7 +758,7 @@ static int suspend_set_state(struct regulator_dev *rdev, rstate = regulator_get_suspend_state(rdev, state); if (rstate == NULL) - return -EINVAL; + return 0; /* If we have no suspend mode configration don't set anything; * only warn if the driver implements set_suspend_voltage or