From patchwork Fri Jul 10 06:37:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 6762681 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BF394C05AC for ; Fri, 10 Jul 2015 06:37:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BBC1120411 for ; Fri, 10 Jul 2015 06:37:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA0B220383 for ; Fri, 10 Jul 2015 06:37:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753553AbbGJGhw (ORCPT ); Fri, 10 Jul 2015 02:37:52 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:41871 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752971AbbGJGhr (ORCPT ); Fri, 10 Jul 2015 02:37:47 -0400 Received: from ayumi.isobedori.kobe.vergenet.net (p7166-ipbfp1503kobeminato.hyogo.ocn.ne.jp [114.153.234.166]) by kirsty.vergenet.net (Postfix) with ESMTPSA id 1A61125B80E; Fri, 10 Jul 2015 16:37:15 +1000 (AEST) Received: by ayumi.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id DCA13EDEBF5; Fri, 10 Jul 2015 15:37:13 +0900 (JST) From: Simon Horman To: linux-sh@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Magnus Damm , Geert Uytterhoeven , Simon Horman Subject: [PATCH 4/8] ARM: shmobile: R-Car: Make struct rcar_sysc_ch * parameters const Date: Fri, 10 Jul 2015 15:37:09 +0900 Message-Id: <624deb39a1c684b42569a3ec6a0fdcc74b950ed3.1436510166.git.horms+renesas@verge.net.au> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Geert Uytterhoeven The passed struct rcar_sysc_ch is never modified, so it can be const. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/pm-rcar.c | 16 ++++++++-------- arch/arm/mach-shmobile/pm-rcar.h | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-shmobile/pm-rcar.c b/arch/arm/mach-shmobile/pm-rcar.c index a5e4c3a88ec4..b1a7f2a7f757 100644 --- a/arch/arm/mach-shmobile/pm-rcar.c +++ b/arch/arm/mach-shmobile/pm-rcar.c @@ -51,7 +51,7 @@ static void __iomem *rcar_sysc_base; static DEFINE_SPINLOCK(rcar_sysc_lock); /* SMP CPUs + I/O devices */ -static int rcar_sysc_pwr_on_off(struct rcar_sysc_ch *sysc_ch, +static int rcar_sysc_pwr_on_off(const struct rcar_sysc_ch *sysc_ch, int sr_bit, int reg_offs) { int k; @@ -73,18 +73,18 @@ static int rcar_sysc_pwr_on_off(struct rcar_sysc_ch *sysc_ch, return 0; } -static int rcar_sysc_pwr_off(struct rcar_sysc_ch *sysc_ch) +static int rcar_sysc_pwr_off(const struct rcar_sysc_ch *sysc_ch) { return rcar_sysc_pwr_on_off(sysc_ch, SYSCSR_POFFENB, PWROFFCR_OFFS); } -static int rcar_sysc_pwr_on(struct rcar_sysc_ch *sysc_ch) +static int rcar_sysc_pwr_on(const struct rcar_sysc_ch *sysc_ch) { return rcar_sysc_pwr_on_off(sysc_ch, SYSCSR_PONENB, PWRONCR_OFFS); } -static int rcar_sysc_update(struct rcar_sysc_ch *sysc_ch, - int (*on_off_fn)(struct rcar_sysc_ch *)) +static int rcar_sysc_update(const struct rcar_sysc_ch *sysc_ch, + int (*on_off_fn)(const struct rcar_sysc_ch *)) { unsigned int isr_mask = 1 << sysc_ch->isr_bit; unsigned int chan_mask = 1 << sysc_ch->chan_bit; @@ -136,17 +136,17 @@ static int rcar_sysc_update(struct rcar_sysc_ch *sysc_ch, return ret; } -int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch) +int rcar_sysc_power_down(const struct rcar_sysc_ch *sysc_ch) { return rcar_sysc_update(sysc_ch, rcar_sysc_pwr_off); } -int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch) +int rcar_sysc_power_up(const struct rcar_sysc_ch *sysc_ch) { return rcar_sysc_update(sysc_ch, rcar_sysc_pwr_on); } -bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch) +bool rcar_sysc_power_is_off(const struct rcar_sysc_ch *sysc_ch) { unsigned int st; diff --git a/arch/arm/mach-shmobile/pm-rcar.h b/arch/arm/mach-shmobile/pm-rcar.h index 06ebf00a6a5a..1b901db4a24c 100644 --- a/arch/arm/mach-shmobile/pm-rcar.h +++ b/arch/arm/mach-shmobile/pm-rcar.h @@ -7,9 +7,9 @@ struct rcar_sysc_ch { u8 isr_bit; }; -int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch); -int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch); -bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch); +int rcar_sysc_power_down(const struct rcar_sysc_ch *sysc_ch); +int rcar_sysc_power_up(const struct rcar_sysc_ch *sysc_ch); +bool rcar_sysc_power_is_off(const struct rcar_sysc_ch *sysc_ch); void __iomem *rcar_sysc_init(phys_addr_t base); #endif /* PM_RCAR_H */