From patchwork Tue Mar 5 22:16:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2222411 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 3F0B53FCF6 for ; Tue, 5 Mar 2013 22:20:04 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UD0Ay-0008Fk-Lj; Tue, 05 Mar 2013 22:17:36 +0000 Received: from moutng.kundenserver.de ([212.227.126.186]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UD0AI-00083s-RY for linux-arm-kernel@lists.infradead.org; Tue, 05 Mar 2013 22:16:56 +0000 Received: from wuerfel.lan (HSI-KBW-46-223-90-92.hsi.kabel-badenwuerttemberg.de [46.223.90.92]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0M1kWE-1V5VOJ0kbS-00tkWc; Tue, 05 Mar 2013 23:16:45 +0100 From: Arnd Bergmann To: linux-kernel@vger.kernel.org Subject: [PATCH 1/9] clk: vt8500: Fix "fix device clock divisor calculations" Date: Tue, 5 Mar 2013 23:16:41 +0100 Message-Id: <1362521809-22989-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1362521809-22989-1-git-send-email-arnd@arndb.de> References: <1362521809-22989-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:I+xnnFbDUDqHjE0qmz3pr7f0bLC/s8YGSV8zhYFZ06c 4yNjJBG0dKwULtXwjZKCOW0/pqBpqFDv8tad7MmSniylqxzrMy PSkjgDUuEtRnx0DTpQKpD+Tm5VVKRKMVm6+1p0LZtzCAo3/ueO IBCsnMpMdTRGFTKBRthI06pXn6HPFN8r1Vab5Wmwx5Ta1qmjHh vGC28v8noXCYsWpp3gHIG+1CItvHPGVkErpaMAycJU8jRMv/0D qbaiGu89JBVMxMlDYC+WK6GA+xRh/gdqXcYJHlPd5I7TqFZ/0Z ZKKM0EEumemm+nUJJeIeWy2O/n35VyaGsQLsxsm/4OwYd4mSPC UBibK7UWC9jfmf5IteKqiZ51DtgtzjEKT/4XXnEgO X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130305_171655_208983_E9E1B968 X-CRM114-Status: UNSURE ( 9.61 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.186 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: arm@kernel.org, Mike Turquette , Arnd Bergmann , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Patch 72480014b8 "Fix device clock divisor calculations" was apparently rebased incorrectly before it got upstream, causing a build error. Replacing the "prate" pointer with the local parent_rate is most likely the correct solution. Signed-off-by: Arnd Bergmann Cc: Tony Prisk Cc: Mike Turquette --- drivers/clk/clk-vt8500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-vt8500.c b/drivers/clk/clk-vt8500.c index b5538bb..09c6331 100644 --- a/drivers/clk/clk-vt8500.c +++ b/drivers/clk/clk-vt8500.c @@ -157,7 +157,7 @@ static int vt8500_dclk_set_rate(struct clk_hw *hw, unsigned long rate, divisor = parent_rate / rate; /* If prate / rate would be decimal, incr the divisor */ - if (rate * divisor < *prate) + if (rate * divisor < parent_rate) divisor++; if (divisor == cdev->div_mask + 1)