From patchwork Wed Apr 8 13:22:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 6179691 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 758B19F349 for ; Wed, 8 Apr 2015 13:22:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 80EA820376 for ; Wed, 8 Apr 2015 13:22:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 06C7220373 for ; Wed, 8 Apr 2015 13:22:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752479AbbDHNWj (ORCPT ); Wed, 8 Apr 2015 09:22:39 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:42307 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753979AbbDHNWg (ORCPT ); Wed, 8 Apr 2015 09:22:36 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NMH002UCPCE7G10@mailout1.w1.samsung.com>; Wed, 08 Apr 2015 14:26:38 +0100 (BST) X-AuditID: cbfec7f4-b7f106d0000013ec-42-55252aec20ad Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id FE.79.05100.CEA25255; Wed, 08 Apr 2015 14:19:40 +0100 (BST) Received: from AMDC1943.digital.local ([106.116.151.171]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NMH008F3P5ED550@eusync2.samsung.com>; Wed, 08 Apr 2015 14:22:33 +0100 (BST) From: Krzysztof Kozlowski To: Ralf Baechle , Max Filippov , Mike Turquette , Stephen Boyd , Heiko Stuebner , Sylwester Nawrocki , Tomasz Figa , Kukjin Kim , Barry Song , Peter De Schrijver , Prashant Gaikwad , Stephen Warren , Thierry Reding , Alexandre Courbot , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 3/8] clk: Constify pointers to parent names in init data Date: Wed, 08 Apr 2015 15:22:14 +0200 Message-id: <1428499339-29569-4-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1428499339-29569-1-git-send-email-k.kozlowski@samsung.com> References: <1428499339-29569-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCLMWRmVeSWpSXmKPExsVy+t/xK7pvtFRDDTY+ErR4cqiX2eLcq0cs Fv8fvWa1+PZwIaPF6xeGFv2PXzNbbHp8jdXiY889VovLu+awWXx68J/ZYsb5fUwWnV9msVk8 nXCRzWLS2qmMFjfnp1lc2qNicfhNO6vFjzPdLBavDraxWPzcNY/FYtWuP4wOoh6X+3qZPHbO usvusWlVJ5vHnWt72DyOrlzL5LF5Sb1Hb/M7No++LasYPbZfm8fs8XmTnMfGuaEB3FFcNimp OZllqUX6dglcGae2HGYq+CxX0d//l62B8YBkFyMnh4SAicScBb+ZIWwxiQv31rOB2EICSxkl tuyO7mLkArL7mCSWLHnDApJgEzCW2Lx8CRtIQkTgI6vE04MfGEESzAKGEj/f/WEHsYUFPCR+ T53CBGKzCKhKHGn6wQpi8wq4S5w8dB1qm5zEyWOTweKcQPWzlx8HGsoBtM1d4uhR5QmMvAsY GVYxiqaWJhcUJ6XnGuoVJ+YWl+al6yXn525ihMTElx2Mi49ZHWIU4GBU4uG1OKYSKsSaWFZc mXuIUYKDWUmE97+yaqgQb0piZVVqUX58UWlOavEhRiYOTqkGRo7g5X//12wPbQ2by+K+OfTr nDnxAS5zjp8+PvFW3HN9a32GhCNKvR+yIqZetTASOZH69i97rltx6zvR6RMTwuIE70U2ph/4 ZhoilnJuXY7ih0rv0qL98ut2pS6592Z+eaPju7kzTFq+7Sw9v+ksh2um1paFqb4z5U7tZjkm b79nwWcbP4FOYyWW4oxEQy3mouJEAFOoRfRnAgAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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=unavailable 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 'parent_names' member of 'clk_init_data' is not modified so it can be made as an array of const pointers to constant strings. Some drivers (e.g. arch/mips/alchemy/common/clock.c) already pass such data. Signed-off-by: Krzysztof Kozlowski --- drivers/clk/clk-composite.c | 2 +- drivers/clk/clk-mux.c | 8 ++++---- include/linux/clk-provider.h | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c index 956b7e54fa1c..077f4c7148f1 100644 --- a/drivers/clk/clk-composite.c +++ b/drivers/clk/clk-composite.c @@ -188,7 +188,7 @@ static void clk_composite_disable(struct clk_hw *hw) } struct clk *clk_register_composite(struct device *dev, const char *name, - const char **parent_names, int num_parents, + const char * const *parent_names, int num_parents, struct clk_hw *mux_hw, const struct clk_ops *mux_ops, struct clk_hw *rate_hw, const struct clk_ops *rate_ops, struct clk_hw *gate_hw, const struct clk_ops *gate_ops, diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c index 69a094c3783d..962e2a056381 100644 --- a/drivers/clk/clk-mux.c +++ b/drivers/clk/clk-mux.c @@ -114,8 +114,8 @@ const struct clk_ops clk_mux_ro_ops = { EXPORT_SYMBOL_GPL(clk_mux_ro_ops); struct clk *clk_register_mux_table(struct device *dev, const char *name, - const char **parent_names, u8 num_parents, unsigned long flags, - void __iomem *reg, u8 shift, u32 mask, + const char * const *parent_names, u8 num_parents, + unsigned long flags, void __iomem *reg, u8 shift, u32 mask, u8 clk_mux_flags, u32 *table, spinlock_t *lock) { struct clk_mux *mux; @@ -166,8 +166,8 @@ struct clk *clk_register_mux_table(struct device *dev, const char *name, EXPORT_SYMBOL_GPL(clk_register_mux_table); struct clk *clk_register_mux(struct device *dev, const char *name, - const char **parent_names, u8 num_parents, unsigned long flags, - void __iomem *reg, u8 shift, u8 width, + const char * const *parent_names, u8 num_parents, + unsigned long flags, void __iomem *reg, u8 shift, u8 width, u8 clk_mux_flags, spinlock_t *lock) { u32 mask = BIT(width) - 1; diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 28abf1badb40..0bf0308963da 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -209,7 +209,7 @@ struct clk_ops { struct clk_init_data { const char *name; const struct clk_ops *ops; - const char **parent_names; + const char * const *parent_names; u8 num_parents; unsigned long flags; }; @@ -426,13 +426,13 @@ extern const struct clk_ops clk_mux_ops; extern const struct clk_ops clk_mux_ro_ops; struct clk *clk_register_mux(struct device *dev, const char *name, - const char **parent_names, u8 num_parents, unsigned long flags, - void __iomem *reg, u8 shift, u8 width, + const char * const *parent_names, u8 num_parents, + unsigned long flags, void __iomem *reg, u8 shift, u8 width, u8 clk_mux_flags, spinlock_t *lock); struct clk *clk_register_mux_table(struct device *dev, const char *name, - const char **parent_names, u8 num_parents, unsigned long flags, - void __iomem *reg, u8 shift, u32 mask, + const char * const *parent_names, u8 num_parents, + unsigned long flags, void __iomem *reg, u8 shift, u32 mask, u8 clk_mux_flags, u32 *table, spinlock_t *lock); void clk_unregister_mux(struct clk *clk); @@ -518,7 +518,7 @@ struct clk_composite { }; struct clk *clk_register_composite(struct device *dev, const char *name, - const char **parent_names, int num_parents, + const char * const *parent_names, int num_parents, struct clk_hw *mux_hw, const struct clk_ops *mux_ops, struct clk_hw *rate_hw, const struct clk_ops *rate_ops, struct clk_hw *gate_hw, const struct clk_ops *gate_ops,