Received: by 10.213.65.68 with SMTP id h4csp439410imn; Tue, 13 Mar 2018 09:05:41 -0700 (PDT) X-Google-Smtp-Source: AG47ELuDsDBbaQcd54QtiWg55RZgHa1OsJhzrq8TshshCR3ikMRsXiKsvhqmhs1bWfQl5Eiy0NAs X-Received: by 10.98.103.136 with SMTP id t8mr1095469pfj.177.1520957141426; Tue, 13 Mar 2018 09:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520957141; cv=none; d=google.com; s=arc-20160816; b=BzWa80IMKJZUVrNtplEeIHvvNDCcvTKN/Lu7FUdFMoHZzzlrj9YVsecOym2dy9g6/Y viG+sIQRGGbSGQDo0MUdefHk0GHvLssm0R2Wvd+j9tXMZSz1bzlpEEwZRziOgD1q1zTy 7NV8E9jEmBRR06tGq1McyozJt8uIlrkm7hDmJ2zq7Kuot9Ld8qJdAsCN2KTbsoh6boR9 Gf4fs0COoxNBIoG5aIjAzqbyY5Ojs9Jpiy7OD6vqm/NbSOUp3boZ+yOARutFkSJ/VP3f EM8OgPoi/BAeLf+BPt16qisCtd0QHyVaTiRAtY+bXP+UBEY6PaULHgZvkyNoxLAccOdd COdA== 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=6WGoGS4jhrZ85uuBOnJwh56HRBxDUn6HfbxRaE5p6Js=; b=J4s8Je1sbj/gMDn+QpVniZsGYv1PtJvrUUp6zk/gn7cZwRjvpxnp0iNYkx2iOkWL98 yOrqDyEe0JuCfrfe5S6iDiJ41LwXrmxmXc8/OP4llKllWMoSTQ7OzHifOG88pmu4Col/ H9Z/hqIkuwxZTwhkOcZ4MAgIQEirTw9+DHoroplBQdxHi4LAg11FmnYvzK/PYPahemAS Qo7pbrVU53iyLMgGg/DJ2xzPqo/KL282eGTjtxgnBmk4URbwpWtzEmh3uTAIF+KtdzqZ pHMjKoie/nsYoicT0uCjYccHQ7pOGiQCuo5Ak2NCry2htohk2jZPLr/VOMrlC+sk+dAM 273w== 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 h32-v6si316493pld.217.2018.03.13.09.05.25; Tue, 13 Mar 2018 09:05:41 -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 S934313AbeCMQB5 (ORCPT + 99 others); Tue, 13 Mar 2018 12:01:57 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33926 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934019AbeCMPhW (ORCPT ); Tue, 13 Mar 2018 11:37:22 -0400 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id ACA66123C; Tue, 13 Mar 2018 15:37:21 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Fabrice Gasnier , Mark Brown Subject: [PATCH 4.14 051/140] regulator: stm32-vrefbuf: fix check on ready flag Date: Tue, 13 Mar 2018 16:24:14 +0100 Message-Id: <20180313152501.694373594@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152458.201155692@linuxfoundation.org> References: <20180313152458.201155692@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: Fabrice Gasnier commit f63248fac563125fd5a2f0bc780ce7a299872cab upstream. stm32_vrefbuf_enable() wrongly checks VRR bit: 0 stands for not ready, 1 for ready. It currently checks the opposite. This makes enable routine to exit immediately without waiting for ready flag. Fixes: 0cdbf481e927 ("regulator: Add support for stm32-vrefbuf") Signed-off-by: Fabrice Gasnier Signed-off-by: Mark Brown Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/regulator/stm32-vrefbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/regulator/stm32-vrefbuf.c +++ b/drivers/regulator/stm32-vrefbuf.c @@ -51,7 +51,7 @@ static int stm32_vrefbuf_enable(struct r * arbitrary timeout. */ ret = readl_poll_timeout(priv->base + STM32_VREFBUF_CSR, val, - !(val & STM32_VRR), 650, 10000); + val & STM32_VRR, 650, 10000); if (ret) { dev_err(&rdev->dev, "stm32 vrefbuf timed out!\n"); val = readl_relaxed(priv->base + STM32_VREFBUF_CSR);