From patchwork Mon Aug 28 07:02:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9924295 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 3592560375 for ; Mon, 28 Aug 2017 07:04:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 256A02654B for ; Mon, 28 Aug 2017 07:04:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 188DB26E47; Mon, 28 Aug 2017 07:04:13 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 C1D512654B for ; Mon, 28 Aug 2017 07:04:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751864AbdH1HD4 (ORCPT ); Mon, 28 Aug 2017 03:03:56 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34649 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751823AbdH1HDx (ORCPT ); Mon, 28 Aug 2017 03:03:53 -0400 Received: by mail-pg0-f66.google.com with SMTP id 63so5722872pgc.1; Mon, 28 Aug 2017 00:03:53 -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=Edh+xFSGIg9eqHfK/7Bf+WIfZSQK4kAHbX9TOThsrRM=; b=FbW9fGuFnvGQ4YqNNDYdgGFGx0F1dDB8te6AH2m88W5axwnJeRqsAa3OJR9GFh67o3 oACXhi/LpiE6kPc9dU5EPzu5Kcl0P1ZbiPE10eyiN4XZKY24TRzix6k1iQmK8dmSFiqQ 923WjuVb5JzLJw3iAHYDWbnacNfPu/PERGaru5wXn/5gWizMEF9xiuSQGVPOTiAVkg9h OjqgAXb7zKEZ7exI91hzA86yMFke4cY/rxlwXrpyZma0pSrUA5hlzPX37E2C4+Rxyu3/ SQzR/8CDDa/TiNecO9SLYAWJRODacCC4mvhzoQSeELNvdxuHcQd3fGDj1Y3sxeCSFrlB eJUA== 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=Edh+xFSGIg9eqHfK/7Bf+WIfZSQK4kAHbX9TOThsrRM=; b=nDJF8G+DkW7+EXq7wqP/gsfOQMgZYbMIvHiVK2lBoxlDb7MYuam85CO60E3FRmdNvD A9hgswd6tJxg0s0mKZJZCA0Emt/tayQewHyLroyXABgnQnM1GMCw6f9Vng0WYRhbjmMn SV0CmP2W6KBat2E4+IRGBTK35Y4eEFbMrs6qRDKUQ1ibYfab75OXWzjVpQ7m3RuTy2yE rwIkOjBn/HqdYoOu2luCJjfFtwFOFzKlrmgiydegryPcG/dWSE8oopOD75dN3sbZtany l5fvVSU/bnzOvYr3gmOfRPS4ZgTps0aN0XPsVz0e5PdqMYJlKc4/gHvgQuw1LoRIBw9E 4J/A== X-Gm-Message-State: AHYfb5iNSP9W9oyLYvZyX8g0eQEr1QRH6Me7kz+Ku2Z5jd7FUNeIphVP 2qo1biUNuR+tkw== X-Received: by 10.84.194.163 with SMTP id h32mr7338993pld.74.1503903833230; Mon, 28 Aug 2017 00:03:53 -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.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Aug 2017 00:03:52 -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 3/3] clk: ux500: prcc: constify clk_ops. Date: Mon, 28 Aug 2017 12:32:41 +0530 Message-Id: <1503903761-21730-4-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_prcc" is used to initialized clk_init_data. clk_init_data is working with const clk_ops. So make clk_reg_prcc non-const clk_ops argument as const. Signed-off-by: Arvind Yadav --- drivers/clk/ux500/clk-prcc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/ux500/clk-prcc.c b/drivers/clk/ux500/clk-prcc.c index 0e95076..f505927 100644 --- a/drivers/clk/ux500/clk-prcc.c +++ b/drivers/clk/ux500/clk-prcc.c @@ -79,13 +79,13 @@ static int clk_prcc_is_enabled(struct clk_hw *hw) return clk->is_enabled; } -static struct clk_ops clk_prcc_pclk_ops = { +static const struct clk_ops clk_prcc_pclk_ops = { .enable = clk_prcc_pclk_enable, .disable = clk_prcc_pclk_disable, .is_enabled = clk_prcc_is_enabled, }; -static struct clk_ops clk_prcc_kclk_ops = { +static const struct clk_ops clk_prcc_kclk_ops = { .enable = clk_prcc_kclk_enable, .disable = clk_prcc_kclk_disable, .is_enabled = clk_prcc_is_enabled, @@ -96,7 +96,7 @@ static struct clk *clk_reg_prcc(const char *name, resource_size_t phy_base, u32 cg_sel, unsigned long flags, - struct clk_ops *clk_prcc_ops) + const struct clk_ops *clk_prcc_ops) { struct clk_prcc *clk; struct clk_init_data clk_prcc_init;