From patchwork Fri May 23 10:31:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 30747 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 802F72066E for ; Fri, 23 May 2014 10:44:03 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id f73sf18106842yha.7 for ; Fri, 23 May 2014 03:44:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=j81afv9AhroMnptzllMaBABe/W+UqJxj63t72rO0848=; b=DJ9taYKCo7m973+0HiA63RduI9fG3RuRi9AKCB44Q1O4Ck/GdXMXHkWzYxansyxqK5 KpXgy8R5+R/AVTKgtqprd+UVp7xKvaEJenjMMyi7URdr+6+c3E3UDyS5tPMi0v3xwWZL tIYq2IHlIMUG99IpqFpX8KvypuC7qL4CcDs1wtgdG55GIhORaEfO9wfYAefrmY2gHWaB e6/P5Is/18P9jT6yLTGFJhGxMFBF/pmTJCaERxeUH8RGEgxoiLZWXgDTBNcymUQzQYVD TV6HhTl3rxXutk92FDrUqGQQncXpLoVbkKhikUIOt9OJN4EeE5GkTIsGbMOYuJ49Xfra Btjg== X-Gm-Message-State: ALoCoQlFtA8+9nXygo+FC44GjhEIMujpv9l//sngmWrEV0VPOpvy0FrPK6CWcG06OTexO0iJIOBI X-Received: by 10.58.155.3 with SMTP id vs3mr1827439veb.16.1400841843249; Fri, 23 May 2014 03:44:03 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.103.118 with SMTP id x109ls1621481qge.74.gmail; Fri, 23 May 2014 03:44:03 -0700 (PDT) X-Received: by 10.52.96.8 with SMTP id do8mr1785493vdb.4.1400841843082; Fri, 23 May 2014 03:44:03 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id px2si1397995veb.37.2014.05.23.03.44.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 03:44:03 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id im17so5990276vcb.38 for ; Fri, 23 May 2014 03:44:03 -0700 (PDT) X-Received: by 10.52.164.237 with SMTP id yt13mr2945639vdb.18.1400841843014; Fri, 23 May 2014 03:44:03 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp20494vcb; Fri, 23 May 2014 03:44:02 -0700 (PDT) X-Received: by 10.66.120.201 with SMTP id le9mr4754349pab.98.1400841842302; Fri, 23 May 2014 03:44:02 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bu1si3281016pbc.136.2014.05.23.03.44.01 for ; Fri, 23 May 2014 03:44:01 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752347AbaEWKn4 (ORCPT + 27 others); Fri, 23 May 2014 06:43:56 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:63605 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417AbaEWKcW (ORCPT ); Fri, 23 May 2014 06:32:22 -0400 Received: by mail-wi0-f181.google.com with SMTP id n15so625963wiw.2 for ; Fri, 23 May 2014 03:32:21 -0700 (PDT) X-Received: by 10.180.211.36 with SMTP id mz4mr2503370wic.20.1400841141390; Fri, 23 May 2014 03:32:21 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-404-187.w82-125.abo.wanadoo.fr. [82.125.3.187]) by mx.google.com with ESMTPSA id s9sm2200908wix.13.2014.05.23.03.32.20 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 03:32:20 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 37/71] clocksource: sh_mtu2: Turn sh_mtu2_priv fields into local variables Date: Fri, 23 May 2014 12:31:17 +0200 Message-Id: <1400841111-6683-37-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1400841111-6683-1-git-send-email-daniel.lezcano@linaro.org> References: <537F214C.8000700@linaro.org> <1400841111-6683-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Laurent Pinchart The rate and periodic fields are used in a single function only, as local variables. Remove them from the structure. Signed-off-by: Laurent Pinchart Tested-by: Wolfram Sang --- drivers/clocksource/sh_mtu2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c index 77992e0..6668455 100644 --- a/drivers/clocksource/sh_mtu2.c +++ b/drivers/clocksource/sh_mtu2.c @@ -39,8 +39,6 @@ struct sh_mtu2_priv { struct clk *clk; int irq; struct platform_device *pdev; - unsigned long rate; - unsigned long periodic; struct clock_event_device ced; }; @@ -122,6 +120,8 @@ static void sh_mtu2_start_stop_ch(struct sh_mtu2_priv *p, int start) static int sh_mtu2_enable(struct sh_mtu2_priv *p) { + unsigned long periodic; + unsigned long rate; int ret; pm_runtime_get_sync(&p->pdev->dev); @@ -137,13 +137,13 @@ static int sh_mtu2_enable(struct sh_mtu2_priv *p) /* make sure channel is disabled */ sh_mtu2_start_stop_ch(p, 0); - p->rate = clk_get_rate(p->clk) / 64; - p->periodic = (p->rate + HZ/2) / HZ; + rate = clk_get_rate(p->clk) / 64; + periodic = (rate + HZ/2) / HZ; /* "Periodic Counter Operation" */ sh_mtu2_write(p, TCR, 0x23); /* TGRA clear, divide clock by 64 */ sh_mtu2_write(p, TIOR, 0); - sh_mtu2_write(p, TGR, p->periodic); + sh_mtu2_write(p, TGR, periodic); sh_mtu2_write(p, TCNT, 0); sh_mtu2_write(p, TMDR, 0); sh_mtu2_write(p, TIER, 0x01);