From patchwork Mon Aug 28 07:02:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9924301 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 0DD0F60375 for ; Mon, 28 Aug 2017 07:04:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F26622654B for ; Mon, 28 Aug 2017 07:04:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E72BF27CEA; Mon, 28 Aug 2017 07:04:24 +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=ham 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 702CF2654B for ; Mon, 28 Aug 2017 07:04:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751116AbdH1HEY (ORCPT ); Mon, 28 Aug 2017 03:04:24 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36478 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751736AbdH1HDu (ORCPT ); Mon, 28 Aug 2017 03:03:50 -0400 Received: by mail-pf0-f194.google.com with SMTP id a2so3607038pfj.3; Mon, 28 Aug 2017 00:03:50 -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=M58umdkCpJIpvoz6BRWZouGyJ8H6FspsoAN9au+bge0=; b=VA1IjgrC/OLGAJFRqaImU6WLg2NEiga95RjJUiBfPn5K6IA7U+QxuMlrlUFkn4lehR wr9XvFvD4sHbhgjO9KnN3YLPetZ91KIylxvtznL+V9Jpw2e3ww+OXEWGJwI6xFTFNlud ms5aAHeD8Y2o6dWw5SIeOJ4PXOtEZgctfsmuQTplTkrb6w3aTwxa6InCVbcw2OFKnBlj +U9d3w/dBNW4M4IkLiVO8i5OnBlGV8HJppbr21rL0jpGNziECJz86rwONyvIBLv+3iTc hy3ORSGrNCDGniip6jMD5cXnsLc9Yfhw7RHGN3gnq5KzQUXwFkM6lvdpX/5cBwl4odOs oddg== 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=M58umdkCpJIpvoz6BRWZouGyJ8H6FspsoAN9au+bge0=; b=CorGl+CpFz69+8RkpVvQ0Jw2IV33oTG6mi2aeEtiPBMlOmkYbnby89rdsBNfrEBLoT BhpwK+R7/4oN72DLKAEPwJkvB+GASTWMTKV696O/n/978B1p5yMN22K0p75ZzvVqhYmt Vv7sGpCneFs1cKS+FU7sRBCsQQBbLkUg5Srm4MW4jlrjnDwlp+ghmHfrG4lntQhaRXVT wtx7gm4daqS9djDcs/Szt9SGQxXcal7lrzbxqBFMneoyNbXec4YEls7fR50ADoMQgkMm 8FxHA1f8y64KbzR4YzSLQZF6DtG84n6uYelt80aFMAxKt51DupKa6qut2kvNZndUUsJ9 nT8g== X-Gm-Message-State: AHYfb5hfARntmW8G86oib/YZi0IxyrJjjoR+UxKdbfmvNu2Fmxx/fSP/ dpdgFTRJGdPiGSAIMFc= X-Received: by 10.84.131.105 with SMTP id 96mr7188023pld.226.1503903830131; Mon, 28 Aug 2017 00:03:50 -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.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Aug 2017 00:03:49 -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 2/3] clk: ux500: sysctrl: constify clk_ops. Date: Mon, 28 Aug 2017 12:32:40 +0530 Message-Id: <1503903761-21730-3-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_sysctrl" is used to initialized clk_init_data. clk_init_data is working with const clk_ops. So make clk_reg_sysctrl non-const clk_ops argument as const. Signed-off-by: Arvind Yadav --- drivers/clk/ux500/clk-sysctrl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/ux500/clk-sysctrl.c b/drivers/clk/ux500/clk-sysctrl.c index 266ddea..8a4e93c 100644 --- a/drivers/clk/ux500/clk-sysctrl.c +++ b/drivers/clk/ux500/clk-sysctrl.c @@ -98,18 +98,18 @@ static u8 clk_sysctrl_get_parent(struct clk_hw *hw) return clk->parent_index; } -static struct clk_ops clk_sysctrl_gate_ops = { +static const struct clk_ops clk_sysctrl_gate_ops = { .prepare = clk_sysctrl_prepare, .unprepare = clk_sysctrl_unprepare, }; -static struct clk_ops clk_sysctrl_gate_fixed_rate_ops = { +static const struct clk_ops clk_sysctrl_gate_fixed_rate_ops = { .prepare = clk_sysctrl_prepare, .unprepare = clk_sysctrl_unprepare, .recalc_rate = clk_sysctrl_recalc_rate, }; -static struct clk_ops clk_sysctrl_set_parent_ops = { +static const struct clk_ops clk_sysctrl_set_parent_ops = { .set_parent = clk_sysctrl_set_parent, .get_parent = clk_sysctrl_get_parent, }; @@ -124,7 +124,7 @@ static struct clk *clk_reg_sysctrl(struct device *dev, unsigned long rate, unsigned long enable_delay_us, unsigned long flags, - struct clk_ops *clk_sysctrl_ops) + const struct clk_ops *clk_sysctrl_ops) { struct clk_sysctrl *clk; struct clk_init_data clk_sysctrl_init;