From patchwork Tue Jun 20 15:18:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 9799741 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 70AAE60329 for ; Tue, 20 Jun 2017 15:19:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 411C9283B4 for ; Tue, 20 Jun 2017 15:19:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34F142849F; Tue, 20 Jun 2017 15:19:11 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 23854283B4 for ; Tue, 20 Jun 2017 15:19:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751128AbdFTPTJ (ORCPT ); Tue, 20 Jun 2017 11:19:09 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:33020 "EHLO outils.crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750993AbdFTPTJ (ORCPT ); Tue, 20 Jun 2017 11:19:09 -0400 From: Paul Cercueil To: Ralf Baechle , Michael Turquette , Stephen Boyd , Rob Herring Cc: Paul Burton , Maarten ter Huurne , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, linux-clk@vger.kernel.org, Paul Cercueil Subject: [PATCH v2 01/17] clk: ingenic: Use const pointer to clk_ops in struct Date: Tue, 20 Jun 2017 17:18:39 +0200 Message-Id: <20170620151855.19399-1-paul@crapouillou.net> In-Reply-To: <20170607200439.24450-2-paul@crapouillou.net> References: <20170607200439.24450-2-paul@crapouillou.net> 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 The CGU common code does not modify the pointed clk_ops structure, so it should be marked as const. Signed-off-by: Paul Cercueil --- drivers/clk/ingenic/cgu.h | 2 +- drivers/clk/ingenic/jz4780-cgu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) v2: New patch in this series diff --git a/drivers/clk/ingenic/cgu.h b/drivers/clk/ingenic/cgu.h index 09700b2c555d..da448b0cac18 100644 --- a/drivers/clk/ingenic/cgu.h +++ b/drivers/clk/ingenic/cgu.h @@ -120,7 +120,7 @@ struct ingenic_cgu_gate_info { * @clk_ops: custom clock operation callbacks */ struct ingenic_cgu_custom_info { - struct clk_ops *clk_ops; + const struct clk_ops *clk_ops; }; /** diff --git a/drivers/clk/ingenic/jz4780-cgu.c b/drivers/clk/ingenic/jz4780-cgu.c index b35d6d9dd5aa..a21698fb202c 100644 --- a/drivers/clk/ingenic/jz4780-cgu.c +++ b/drivers/clk/ingenic/jz4780-cgu.c @@ -203,7 +203,7 @@ static int jz4780_otg_phy_set_rate(struct clk_hw *hw, unsigned long req_rate, return 0; } -static struct clk_ops jz4780_otg_phy_ops = { +static const struct clk_ops jz4780_otg_phy_ops = { .get_parent = jz4780_otg_phy_get_parent, .set_parent = jz4780_otg_phy_set_parent,