From patchwork Tue Apr 11 20:34:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 104410 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp128668qgf; Tue, 11 Apr 2017 13:35:00 -0700 (PDT) X-Received: by 10.99.101.135 with SMTP id z129mr51518116pgb.164.1491942900267; Tue, 11 Apr 2017 13:35:00 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7si8906759pfd.210.2017.04.11.13.35.00; Tue, 11 Apr 2017 13:35:00 -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 S1753493AbdDKUes (ORCPT + 22 others); Tue, 11 Apr 2017 16:34:48 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:51240 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753305AbdDKUep (ORCPT ); Tue, 11 Apr 2017 16:34:45 -0400 Received: from [2001:470:1f1d:6b5::3] (helo=debutante) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cy2Us-0002po-0r; Tue, 11 Apr 2017 20:34:44 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1cy2Up-0007RX-8r; Tue, 11 Apr 2017 21:34:39 +0100 From: Mark Brown To: Dong Aisheng Cc: Liam Girdwood , linux-kernel@vger.kernel.org, shawnguo@kernel.org, yibin.gong@nxp.com, Mark Brown Date: Tue, 11 Apr 2017 21:34:37 +0100 Message-Id: <20170411203437.28572-1-broonie@kernel.org> X-Mailer: git-send-email 2.11.0 X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: [PATCH] regulator: core: Allow dummy regulators for supplies X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rather than just not resolving the supply when there is explicitly no supply mapping fall through and allow a dummy supply to be substituted. Signed-off-by: Mark Brown --- drivers/regulator/core.c | 8 -------- 1 file changed, 8 deletions(-) -- 2.11.0 diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 82205cc5daa7..1e7e6d361238 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1533,14 +1533,6 @@ static int regulator_resolve_supply(struct regulator_dev *rdev) if (IS_ERR(r)) { ret = PTR_ERR(r); - if (ret == -ENODEV) { - /* - * No supply was specified for this regulator and - * there will never be one. - */ - return 0; - } - /* Did the lookup explicitly defer for us? */ if (ret == -EPROBE_DEFER) return ret;