Received: by 10.213.65.68 with SMTP id h4csp472706imn; Tue, 13 Mar 2018 10:07:45 -0700 (PDT) X-Google-Smtp-Source: AG47ELsfhruIwjH6lFT70OrQ6Z3snOX9g1yON+gxuBqNpOZ2xbgZWOjOLa9CwHPKD7hZ7ddAoxcM X-Received: by 2002:a17:902:e83:: with SMTP id 3-v6mr1256473plx.158.1520960865596; Tue, 13 Mar 2018 10:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520960865; cv=none; d=google.com; s=arc-20160816; b=e0EXLkmLgG/kFowTkwMRfw/djH3LnEiPnL2UHGZeMxbdq+OfCeRmO0VIJ295H+I9+D Yf+aFnR5fq2NveCqlfmjqOLCKCVY4OnAY+mdqTCky0YrQX6P2IGxYtEFxyrShPOJkdCd ed3BdyFdDCb75sm8Pa5GLsWVzUhKAkLrAMrEqPtZQvryxKJmrlgRutrUtXA49vUXljT7 fv6hZWrT0oahXwzOOX4S5bkiAxkP79Isw1odNw36roqx+5FU/2R8Iv5mMfRtXlXyKZjH liJ90ja5qSzlvBisvKzRpDowHQd29P6bvjoNpEJ3GA81+5GAA0BjiXerjCP2UCXd1Xx/ saAw== 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=9rphx8PBOSSwXUoELe2gcAp3+07qASwgUKr5gOUqjfI=; b=rELvtd/iCoO/AOY/lwy+DlqGsNON4Y9s0l4i2+FtBM3RUO7noLS02VTeBivfqBGtS4 xwHZen/Fw6Z8tUAyXFwejwB3kN8jJL+ngGDShddGs6mqRZ4srndvebYgIsjTw0qeZ94t i+uXN16LBxNfNZC9KJuCOBfSweYbOx1i1QCjAQWH7hSLF2b7nJ+O6r/hpJxfOzZ6RykF ELmDoIfhhHqjEaAzL9qCrcV3reIjLiDn1BcxrYJAl0g9S8X/QILabcF8QQ6dSP+xeiHW a5F/zxzuUQK2S/01nu+k3AnvuWkil9ypwXfxuuUkwCaJK5koDA9fJQge5A2aOUR9tzIQ TSrA== 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 u82si323462pfg.389.2018.03.13.10.07.30; Tue, 13 Mar 2018 10:07:45 -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 S932864AbeCMRFG (ORCPT + 99 others); Tue, 13 Mar 2018 13:05:06 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57450 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751766AbeCMP2J (ORCPT ); Tue, 13 Mar 2018 11:28:09 -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 E908211DA; Tue, 13 Mar 2018 15:28:08 +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.15 008/146] regulator: stm32-vrefbuf: fix check on ready flag Date: Tue, 13 Mar 2018 16:22:55 +0100 Message-Id: <20180313152321.251254349@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152320.439085687@linuxfoundation.org> References: <20180313152320.439085687@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.15-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);