From patchwork Mon Aug 2 09:24:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 116471 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o729LKtd002096 for ; Mon, 2 Aug 2010 09:23:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753349Ab0HBJXJ (ORCPT ); Mon, 2 Aug 2010 05:23:09 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:45384 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752846Ab0HBJXI (ORCPT ); Mon, 2 Aug 2010 05:23:08 -0400 Received: by pzk26 with SMTP id 26so1273375pzk.19 for ; Mon, 02 Aug 2010 02:23:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=QWXcCsykZR8gl2vOPle7OCgObiFFvKzTwIq4BXvg/14=; b=fUI66KGLXLMmhm/d9CrhFQz0uark7L9HoqmS2o2F70LRu6TjxT0MSugBqBGM4L0eBf xcnqN6ZuEl7M7IaYe2K/LPIAbaihyTXt5AqdIAsVTVV36KdmSiQ9f7Z3iSSRwTy0/e0r FL0Swka4S8rYz8dA3slAm03p29wcyEggDhp8I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=Lznf/b/cRhp25WwX9ItXUsQFzMCIHLcprQY5R4lke+dyl9yTyhChiQ0RMqa+HEgj2q /ifcSO1l+gjQh04QEb+TxHw0kVrOgzmWht2lfy1baaKLYq952o5CF8oBDXH5AYZLBVF8 OAUAG6+CNVpAv1jsMfvffXq+0Ll8HVthXdmvE= Received: by 10.142.173.15 with SMTP id v15mr5263668wfe.69.1280740987797; Mon, 02 Aug 2010 02:23:07 -0700 (PDT) Received: from [127.0.0.1] (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id t11sm7437030wfc.16.2010.08.02.02.23.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 02 Aug 2010 02:23:06 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: johnstul@us.ibm.com, Magnus Damm , lethal@linux-sh.org Date: Mon, 02 Aug 2010 18:24:05 +0900 Message-Id: <20100802092405.30680.9349.sendpatchset@t400s> Subject: [PATCH] clocksource: sh_cmt: Rate calculation fix Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 02 Aug 2010 09:23:09 +0000 (UTC) --- 0001/drivers/clocksource/sh_cmt.c +++ work/drivers/clocksource/sh_cmt.c 2010-08-02 16:52:29.000000000 +0900 @@ -445,7 +445,7 @@ static int sh_cmt_register_clocksource(s /* clk_get_rate() needs an enabled clock */ clk_enable(p->clk); - p->rate = clk_get_rate(p->clk) / (p->width == 16) ? 512 : 8; + p->rate = clk_get_rate(p->clk) / ((p->width == 16) ? 512 : 8); clk_disable(p->clk); /* TODO: calculate good shift from rate and counter bit width */