From patchwork Tue Jan 28 14:04:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 232461 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B7D1C2D0DB for ; Tue, 28 Jan 2020 14:46:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7056B20716 for ; Tue, 28 Jan 2020 14:46:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580222782; bh=W9vJxPU7+5XYWboOQx6gDHeCsUyBYgBvmGMsPlzeYfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=w/K8ro0Hk2xUPa5dmTCaQwi4vtpHjeQuC64B5K6R5l2uAICitcpj1R4H8sM0ZwE0v GgH+2uH79j2hjHG6PVmRyjYbC6nvkcZbSTSh1YCQkgM8r3XQ8BU05UVedtPACdnBMP R+IRWSPlKlXOBH444UCq/9Y6djguXjgUWN3pN0LM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728760AbgA1OpF (ORCPT ); Tue, 28 Jan 2020 09:45:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:57734 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728708AbgA1OJW (ORCPT ); Tue, 28 Jan 2020 09:09:22 -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 8F1AD2468F; Tue, 28 Jan 2020 14:09:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580220562; bh=W9vJxPU7+5XYWboOQx6gDHeCsUyBYgBvmGMsPlzeYfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CWi662vThjd6bJlFGximcJLIOl8Su2Qv053jZ7mmeuNbPid+Y75w0WB2C8F4EIDqq 50MCEX6N5RpjLSg2P/JfzPaOTyPItJYNdadXF14nEXyWspJOzILZw0OYbWER9oHiyO HoXO11jsLuk6q6fVuY6PUmK6DJOSukGPd/exowzA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Axel Lin , Charles Keepax , Mark Brown , Sasha Levin Subject: [PATCH 4.4 056/183] regulator: wm831x-dcdc: Fix list of wm831x_dcdc_ilim from mA to uA Date: Tue, 28 Jan 2020 15:04:35 +0100 Message-Id: <20200128135835.473799236@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135829.486060649@linuxfoundation.org> References: <20200128135829.486060649@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Axel Lin [ Upstream commit c25d47888f0fb3d836d68322d4aea2caf31a75a6 ] The wm831x_dcdc_ilim entries needs to be uA because it is used to compare with min_uA and max_uA. While at it also make the array const and change to use unsigned int. Fixes: e4ee831f949a ("regulator: Add WM831x DC-DC buck convertor support") Signed-off-by: Axel Lin Acked-by: Charles Keepax Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/regulator/wm831x-dcdc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c index 8cbb82ceec405..fad424e20bd5b 100644 --- a/drivers/regulator/wm831x-dcdc.c +++ b/drivers/regulator/wm831x-dcdc.c @@ -327,8 +327,8 @@ static int wm831x_buckv_get_voltage_sel(struct regulator_dev *rdev) } /* Current limit options */ -static u16 wm831x_dcdc_ilim[] = { - 125, 250, 375, 500, 625, 750, 875, 1000 +static const unsigned int wm831x_dcdc_ilim[] = { + 125000, 250000, 375000, 500000, 625000, 750000, 875000, 1000000 }; static int wm831x_buckv_set_current_limit(struct regulator_dev *rdev,