From patchwork Mon Aug 28 07:02:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9924299 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 11A1D60375 for ; Mon, 28 Aug 2017 07:04:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 023AF2654B for ; Mon, 28 Aug 2017 07:04:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB30C27CEA; Mon, 28 Aug 2017 07:04:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1D582654B for ; Mon, 28 Aug 2017 07:04:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751825AbdH1HDw (ORCPT ); Mon, 28 Aug 2017 03:03:52 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35702 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751564AbdH1HDr (ORCPT ); Mon, 28 Aug 2017 03:03:47 -0400 Received: by mail-pf0-f194.google.com with SMTP id g13so3607591pfm.2; Mon, 28 Aug 2017 00:03:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9MfVvwn96B8Kc5u/6vnYcgbbKz9DtsTjQaBqGN8iqcI=; b=P/MuuUeZiMzWG0bkt+9x3VtaPPfb/QeBnq4m/+cujic/Z9YJNkT/SOkTorQAq9Jxzj qYviDsO6iq0F9RWd3ajoLsgQ8OYrd20Yg0hYpWSFCDMWBhbajP9k8Ccr6QQ36iA6bi6x eu1O/NR6ScXHYO2+oWQTOp/CN1gqQmtmx5s7HoY4V5XQGS9qztMEsqBKtwdaZlF/XNxc WNid2hkyfx+wDjpEoCO3DetzaaoY4FFhxuIP0HluE4XnuyxYK6HGr/tT85TkQe3BRbU1 N6NYgXXR/grdkbQK2FVEVm2oLi7Xb7j49ZCm+OFKOrMIZQHobYLbSu2Qe4WNP8RXtk0x nY0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9MfVvwn96B8Kc5u/6vnYcgbbKz9DtsTjQaBqGN8iqcI=; b=n18CWLz5tMaqA8woQOCx8mqMueHpp6Xsw7uoi/4jtRlfQt/pzDRvP1R3ePUAwQwojA xCpmSbUoLxgH7Tq+uRSreXq0PNvfJxoHRaY2px3MkLFwYD9/HfSp3LDXMCGvktckQWDP P4Ixl13LnwTvqEi5+72EZNXhkwGL6UqzQzApP+3Z3VJjukofcM89wGLwU1wwW/R8b/PC tX9QsDfqLi9wkQnJGM10GS3pfuoz88qtQeoSf3W5SnGJhOKO5YRTUnB8JmhBUeIJ+GY5 VsOMSWnVNokb/fXG7eWrNAXDwN+UOQpkn7JYgWQ/ZiqGa/na8pNV7y/dKPwOYCmqeZ0J tDXg== X-Gm-Message-State: AHYfb5hvATI/Yfit6ffNlKOwk6x3mP5ODiFRIX1TaD2jjH+BwoRtXlnw svO3fNATiOBhFQ== X-Received: by 10.101.91.13 with SMTP id y13mr6364502pgq.250.1503903826846; Mon, 28 Aug 2017 00:03:46 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id j12sm2685853pgn.64.2017.08.28.00.03.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Aug 2017 00:03:46 -0700 (PDT) From: Arvind Yadav To: sboyd@codeaurora.org, mturquette@baylibre.com, ulf.hansson@linaro.org, linus.walleij@linaro.org, mturquette@linaro.org Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] clk: ux500: prcmu: constify clk_ops. Date: Mon, 28 Aug 2017 12:32:39 +0530 Message-Id: <1503903761-21730-2-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503903761-21730-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1503903761-21730-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP clk_ops are not supposed to change at runtime. All functions working with clk_ops provided by work with const clk_ops. So mark the non-const clk_ops as const. Here, Function "clk_reg_prcmu" is used to initialized clk_init_data. clk_init_data is working with const clk_ops. So make clk_reg_prcmu non-const clk_ops argument as const. Signed-off-by: Arvind Yadav --- drivers/clk/ux500/clk-prcmu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/clk/ux500/clk-prcmu.c b/drivers/clk/ux500/clk-prcmu.c index 7f34382..6e3e16b 100644 --- a/drivers/clk/ux500/clk-prcmu.c +++ b/drivers/clk/ux500/clk-prcmu.c @@ -186,7 +186,7 @@ static void clk_prcmu_opp_volt_unprepare(struct clk_hw *hw) clk->is_prepared = 0; } -static struct clk_ops clk_prcmu_scalable_ops = { +static const struct clk_ops clk_prcmu_scalable_ops = { .prepare = clk_prcmu_prepare, .unprepare = clk_prcmu_unprepare, .is_prepared = clk_prcmu_is_prepared, @@ -198,7 +198,7 @@ static void clk_prcmu_opp_volt_unprepare(struct clk_hw *hw) .set_rate = clk_prcmu_set_rate, }; -static struct clk_ops clk_prcmu_gate_ops = { +static const struct clk_ops clk_prcmu_gate_ops = { .prepare = clk_prcmu_prepare, .unprepare = clk_prcmu_unprepare, .is_prepared = clk_prcmu_is_prepared, @@ -208,19 +208,19 @@ static void clk_prcmu_opp_volt_unprepare(struct clk_hw *hw) .recalc_rate = clk_prcmu_recalc_rate, }; -static struct clk_ops clk_prcmu_scalable_rate_ops = { +static const struct clk_ops clk_prcmu_scalable_rate_ops = { .is_enabled = clk_prcmu_is_enabled, .recalc_rate = clk_prcmu_recalc_rate, .round_rate = clk_prcmu_round_rate, .set_rate = clk_prcmu_set_rate, }; -static struct clk_ops clk_prcmu_rate_ops = { +static const struct clk_ops clk_prcmu_rate_ops = { .is_enabled = clk_prcmu_is_enabled, .recalc_rate = clk_prcmu_recalc_rate, }; -static struct clk_ops clk_prcmu_opp_gate_ops = { +static const struct clk_ops clk_prcmu_opp_gate_ops = { .prepare = clk_prcmu_opp_prepare, .unprepare = clk_prcmu_opp_unprepare, .is_prepared = clk_prcmu_is_prepared, @@ -230,7 +230,7 @@ static void clk_prcmu_opp_volt_unprepare(struct clk_hw *hw) .recalc_rate = clk_prcmu_recalc_rate, }; -static struct clk_ops clk_prcmu_opp_volt_scalable_ops = { +static const struct clk_ops clk_prcmu_opp_volt_scalable_ops = { .prepare = clk_prcmu_opp_volt_prepare, .unprepare = clk_prcmu_opp_volt_unprepare, .is_prepared = clk_prcmu_is_prepared, @@ -247,7 +247,7 @@ static struct clk *clk_reg_prcmu(const char *name, u8 cg_sel, unsigned long rate, unsigned long flags, - struct clk_ops *clk_prcmu_ops) + const struct clk_ops *clk_prcmu_ops) { struct clk_prcmu *clk; struct clk_init_data clk_prcmu_init;