From patchwork Thu Dec 19 18:31:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182161 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp857896iln; Thu, 19 Dec 2019 10:43:02 -0800 (PST) X-Google-Smtp-Source: APXvYqxY3fs3dAmaUmotNSvx9GeTJk8TEEJM8ovC/a15GMWTbhr3xl93hltz4wPo/pRXtgWNUnOV X-Received: by 2002:a9d:32a2:: with SMTP id u31mr9707114otb.249.1576780982802; Thu, 19 Dec 2019 10:43:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576780982; cv=none; d=google.com; s=arc-20160816; b=1D9I5dpXW+zJcPLlAdw1oxWlQeskeFGr6UOEU5KA4B8bBr9y+ENnsWKO9X5pjeXQHv OQ8m35f/GS1fUMtHqjcvmchgCmN1Kmj6pwi77Jcn0RZ4iRCzgASZ4ZZQxX00/KQ/xaE8 0P+8caTJhuI1KLl10OqWZPC7jGURFKgi8qpod/og7ica5fiufkLd1OwnBc1rfJIil55R cCCNcF4cYrbhStd1dKPVKG/UeflZSKjQlSw+F/9H+TBwXwFHGLa7Vy0BSqEKgtOXf8Nq d2N4dsTrIbvKzfCNcci2Eq5NH3D/qV/xdnpDPMgY6kVbbrVQsZWEwZs290JQnNJSMIJz PA6A== 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=twPY5/Gi8j87rTpLyu53Evkey//78kuUvJpMRf5BJ3Y=; b=pOuDIdvALoOnR4vZo3GXufZADFPHtsCAr79j5FyMz4n+oVyfmN5uZo5hw1IewCs7qm fqBuZwZ4Fjls/S+x/+W09X9A3jNpYbpRX92rF+WGccDJvdECn4Jc9o1at2NH3jQ+rh8q Js2L348HP/Hw3fEPX+peB5q9K12v+SSwkaWKlVPtQZRszsa99Ous0gDsaAVwJ49zIPQ8 gEJCm1FECPZYAHDtVFNQFUlREMqJnKG+qRtw5pa8yGAxAUcvIQLBs4zlFMtXo6/9wNb/ qJS+tVF3NaEm/NJ2v6Ctk8rB9i5kd4ekWlBE/hOmgDsIyVRlT4muDwM6sXVVukeE2Y7Y 8kBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Wo+2xaPF; 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 w68si3314398oia.223.2019.12.19.10.43.02; Thu, 19 Dec 2019 10:43:02 -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=Wo+2xaPF; 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 S1728225AbfLSSnB (ORCPT + 27 others); Thu, 19 Dec 2019 13:43:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:34418 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728773AbfLSSm6 (ORCPT ); Thu, 19 Dec 2019 13:42:58 -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 1790B222C2; Thu, 19 Dec 2019 18:42:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576780977; bh=7qZGJelULVxUzXvNCcQGpWBoKxbjnvtdeG82dKQgVT4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wo+2xaPF1zes/pqfAeCF7oMfEGrKuFZBQTssrwB7QWtsHg7TtWd/WkxkSty+bizSw nGXX2o6EdnaRKh2LahAuergEt9QRDKGqjb6doJVeMcplGhSz+Tbk/c7PwSO8mXl90H sb9D9HfsbOs+GmNM9k8LGl0Fg2iIa+zam28LljEA= 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.9 031/199] regulator: Fix return value of _set_load() stub Date: Thu, 19 Dec 2019 19:31:53 +0100 Message-Id: <20191219183216.600647207@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183214.629503389@linuxfoundation.org> References: <20191219183214.629503389@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 692108222271a..bab9236e43675 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -479,7 +479,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,