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: 6179831 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4328DBF4A7 for ; Wed, 8 Apr 2015 13:25:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 48B9D20377 for ; Wed, 8 Apr 2015 13:25:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 80FCB20374 for ; Wed, 8 Apr 2015 13:25:24 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yfpyt-0006vq-LY; Wed, 08 Apr 2015 13:25:23 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YfpwY-0003t0-UG; Wed, 08 Apr 2015 13:23:00 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150408_062259_158239_3DC7807E X-CRM114-Status: GOOD ( 10.33 ) X-Spam-Score: -5.0 (-----) Cc: Krzysztof Kozlowski X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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,