From patchwork Thu Dec 19 18:32:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 182153 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp850514iln; Thu, 19 Dec 2019 10:36:07 -0800 (PST) X-Google-Smtp-Source: APXvYqza7Ree6XnT5vqL/ICXEJuW15lSUGkHIuZf2JsnKlCm0rgaifxRvJYkXg7kWmDGkxVSDO1t X-Received: by 2002:a05:6830:3016:: with SMTP id a22mr3610152otn.177.1576780566994; Thu, 19 Dec 2019 10:36:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576780566; cv=none; d=google.com; s=arc-20160816; b=arLUutAozpkRz+zS53z00PE/nalHZbuJuBl2r5Wst8ONFLBQebD+gL4RntVLTHNSS0 WRuu+nyLqLW/Atd9KwwI9CrxBjp/cy5XPANlODrLCcNm5sBPb5G8iikWT/InZLezhaA9 jC3KMyuGy1/DuEbymt9dDs+VLBcaRi4BoeGMUUmD6VsrOjKbiMwyQWzN4bjPb2t0t9rt 4v453fxTSjlqFBuaqHVFDvFRzM3TKC8spjc2J+j5QwT7WPDeRW/Mmmc7ax+8CWFCGAov nwNlcnwKBepgClkuazhUOIAL4C8aO0Ak1eWjD7WyNXdwEM0ePUC4pIXbpwlPHHyLMtIP ZAHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=o7qcsdTm5r5QYwOm0T7LfrDrjEDgR32ah8ikCmWoGsk=; b=OXqcBmB2qtZI22JgzWRyc6JVVxmECKBfNZy1XebcPep7OLEOMTelScsv2xwDOIUA1Y wYRtQFY28DVqaPUghHODhLAKISLbKMiC01WMQFCnUxrtSsCimKbO1nxUbj8CH1AoSiMe bfzJSqCRc91fYQSy8AX2zmryamA2uH8i3lr2KFq+uy7KU4L5Upmdcwbvv+HiZUiMbVs5 514+gxjJZBG6nE7VJwGYmM2V9cZHvG4WRzDq0YBVKRiEa/I2s7AF0MIK1/OsyQqfixMG BeSVD321uRVyiwGe6CwtQr/0X1+6KUa6MfAgrQ2xSBz4bLILNxmFHgmwDA6ge9TzjYSl XWBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RJGyTSc+; 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 45si739769oty.188.2019.12.19.10.36.06; Thu, 19 Dec 2019 10:36:06 -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=pass header.i=@kernel.org header.s=default header.b=RJGyTSc+; 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 S1727443AbfLSSgF (ORCPT + 27 others); Thu, 19 Dec 2019 13:36:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:52830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727411AbfLSSgC (ORCPT ); Thu, 19 Dec 2019 13:36:02 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 584202467B; Thu, 19 Dec 2019 18:36:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576780561; bh=k2Tugx47zeg+LMX++8o2J3UvSOhXZuufBvGIQnE3IIw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RJGyTSc+xIfqnbapY2y8sxnOHEteXropBRt91jV4dPwCWFHkrVyFwYCBQhfFN8GlC ulQP6E4PbwZwZ1GBexsmOAipegWaDsy+IZra/qW5lP9bqIkK14gUt99wfAHk+S2kOd UaQ6ZVvB/JB5kdjLs03WEaz2C1LamnZad08NYdas= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Cheng-Yi Chiang , Mark Brown , Douglas Anderson , Sasha Levin Subject: [PATCH 4.4 024/162] regulator: Fix return value of _set_load() stub Date: Thu, 19 Dec 2019 19:32:12 +0100 Message-Id: <20191219183208.988306001@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183150.477687052@linuxfoundation.org> References: <20191219183150.477687052@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mark Brown [ Upstream commit f1abf67217de91f5cd3c757ae857632ca565099a ] The stub implementation of _set_load() returns a mode value which is within the bounds of valid return codes for success (the documentation just says that failures are negative error codes) but not sensible or what the actual implementation does. Fix it to just return 0. Reported-by: Cheng-Yi Chiang Signed-off-by: Mark Brown Reviewed-by: Douglas Anderson Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- include/linux/regulator/consumer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 9e0e76992be08..bf62713af290e 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -485,7 +485,7 @@ static inline unsigned int regulator_get_mode(struct regulator *regulator) static inline int regulator_set_load(struct regulator *regulator, int load_uA) { - return REGULATOR_MODE_NORMAL; + return 0; } static inline int regulator_allow_bypass(struct regulator *regulator,