From patchwork Thu Jun 4 18:22:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 6548891 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 83685C0020 for ; Thu, 4 Jun 2015 18:22:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 86D6720649 for ; Thu, 4 Jun 2015 18:22:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9AD0520798 for ; Thu, 4 Jun 2015 18:22:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752773AbbFDSWe (ORCPT ); Thu, 4 Jun 2015 14:22:34 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:46922 "EHLO laurent.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752501AbbFDSWc (ORCPT ); Thu, 4 Jun 2015 14:22:32 -0400 Received: from ayla.of.borg ([84.193.93.87]) by laurent.telenet-ops.be with bizsmtp id cJNW1q00Y1t5w8s01JNWzk; Thu, 04 Jun 2015 20:22:30 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1Z0Zmg-0006DW-6i; Thu, 04 Jun 2015 20:22:30 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1Z0Zmo-00055g-DI; Thu, 04 Jun 2015 20:22:38 +0200 From: Geert Uytterhoeven To: Simon Horman , Magnus Damm Cc: Ulrich Hecht , linux-sh@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 06/11] ARM: shmobile: R-Car: Make struct rcar_sysc_ch * parameters const Date: Thu, 4 Jun 2015 20:22:30 +0200 Message-Id: <1433442155-19492-7-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1433442155-19492-1-git-send-email-geert+renesas@glider.be> References: <1433442155-19492-1-git-send-email-geert+renesas@glider.be> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 The passed struct rcar_sysc_ch is never modified, so it can be const. Signed-off-by: Geert Uytterhoeven --- 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 a5e4c3a88ec4f127..b1a7f2a7f7572152 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 06ebf00a6a5a78b8..1b901db4a24c4633 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 */