From patchwork Sat Apr 23 07:40:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiancheng Xue X-Patchwork-Id: 8917121 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: X-Original-To: patchwork-linux-clk@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 84BC69F372 for ; Sat, 23 Apr 2016 07:53:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 86A802021B for ; Sat, 23 Apr 2016 07:53:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6D5BD20219 for ; Sat, 23 Apr 2016 07:53:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751571AbcDWHxt (ORCPT ); Sat, 23 Apr 2016 03:53:49 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:22065 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751363AbcDWHxt (ORCPT ); Sat, 23 Apr 2016 03:53:49 -0400 Received: from 172.24.1.48 (EHLO SZXEML423-HUB.china.huawei.com) ([172.24.1.48]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DJI55044; Sat, 23 Apr 2016 15:51:46 +0800 (CST) Received: from wind-Tecal-RH2285.huawei.com (10.67.212.71) by SZXEML423-HUB.china.huawei.com (10.82.67.154) with Microsoft SMTP Server id 14.3.235.1; Sat, 23 Apr 2016 15:51:35 +0800 From: Jiancheng Xue To: , , CC: , , , , , , , , , , , , Jiancheng Xue Subject: [PATCH 2/3] clk: hisilicon: export some hisilicon APIs to modules Date: Sat, 23 Apr 2016 15:40:29 +0800 Message-ID: <1461397230-1757-3-git-send-email-xuejiancheng@hisilicon.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461397230-1757-1-git-send-email-xuejiancheng@hisilicon.com> References: <1461397230-1757-1-git-send-email-xuejiancheng@hisilicon.com> MIME-Version: 1.0 X-Originating-IP: [10.67.212.71] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.571B2994.0032, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 850ba545d8a264e966427c21927b0ac3 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 From: Jiancheng Xue Change some arguments to constant type. Export some hisilicon APIs to modules. Signed-off-by: Jiancheng Xue --- drivers/clk/hisilicon/clk.c | 23 +++++++++++++++-------- drivers/clk/hisilicon/clk.h | 14 +++++++------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/drivers/clk/hisilicon/clk.c b/drivers/clk/hisilicon/clk.c index 9f8e766..9b15adb 100644 --- a/drivers/clk/hisilicon/clk.c +++ b/drivers/clk/hisilicon/clk.c @@ -37,7 +37,7 @@ static DEFINE_SPINLOCK(hisi_clk_lock); -struct hisi_clock_data __init *hisi_clk_init(struct device_node *np, +struct hisi_clock_data *hisi_clk_init(struct device_node *np, int nr_clks) { struct hisi_clock_data *clk_data; @@ -71,8 +71,9 @@ err_data: err: return NULL; } +EXPORT_SYMBOL_GPL(hisi_clk_init); -void __init hisi_clk_register_fixed_rate(struct hisi_fixed_rate_clock *clks, +void hisi_clk_register_fixed_rate(const struct hisi_fixed_rate_clock *clks, int nums, struct hisi_clock_data *data) { struct clk *clk; @@ -91,8 +92,9 @@ void __init hisi_clk_register_fixed_rate(struct hisi_fixed_rate_clock *clks, data->clk_data.clks[clks[i].id] = clk; } } +EXPORT_SYMBOL_GPL(hisi_clk_register_fixed_rate); -void __init hisi_clk_register_fixed_factor(struct hisi_fixed_factor_clock *clks, +void hisi_clk_register_fixed_factor(const struct hisi_fixed_factor_clock *clks, int nums, struct hisi_clock_data *data) { @@ -112,8 +114,9 @@ void __init hisi_clk_register_fixed_factor(struct hisi_fixed_factor_clock *clks, data->clk_data.clks[clks[i].id] = clk; } } +EXPORT_SYMBOL_GPL(hisi_clk_register_fixed_factor); -void __init hisi_clk_register_mux(struct hisi_mux_clock *clks, +void hisi_clk_register_mux(const struct hisi_mux_clock *clks, int nums, struct hisi_clock_data *data) { struct clk *clk; @@ -141,8 +144,9 @@ void __init hisi_clk_register_mux(struct hisi_mux_clock *clks, data->clk_data.clks[clks[i].id] = clk; } } +EXPORT_SYMBOL_GPL(hisi_clk_register_mux); -void __init hisi_clk_register_divider(struct hisi_divider_clock *clks, +void hisi_clk_register_divider(const struct hisi_divider_clock *clks, int nums, struct hisi_clock_data *data) { struct clk *clk; @@ -170,8 +174,9 @@ void __init hisi_clk_register_divider(struct hisi_divider_clock *clks, data->clk_data.clks[clks[i].id] = clk; } } +EXPORT_SYMBOL_GPL(hisi_clk_register_divider); -void __init hisi_clk_register_gate(struct hisi_gate_clock *clks, +void hisi_clk_register_gate(const struct hisi_gate_clock *clks, int nums, struct hisi_clock_data *data) { struct clk *clk; @@ -198,8 +203,9 @@ void __init hisi_clk_register_gate(struct hisi_gate_clock *clks, data->clk_data.clks[clks[i].id] = clk; } } +EXPORT_SYMBOL_GPL(hisi_clk_register_gate); -void __init hisi_clk_register_gate_sep(struct hisi_gate_clock *clks, +void hisi_clk_register_gate_sep(const struct hisi_gate_clock *clks, int nums, struct hisi_clock_data *data) { struct clk *clk; @@ -226,8 +232,9 @@ void __init hisi_clk_register_gate_sep(struct hisi_gate_clock *clks, data->clk_data.clks[clks[i].id] = clk; } } +EXPORT_SYMBOL_GPL(hisi_clk_register_gate_sep); -void __init hi6220_clk_register_divider(struct hi6220_divider_clock *clks, +void __init hi6220_clk_register_divider(const struct hi6220_divider_clock *clks, int nums, struct hisi_clock_data *data) { struct clk *clk; diff --git a/drivers/clk/hisilicon/clk.h b/drivers/clk/hisilicon/clk.h index b56fbc1..20d64af 100644 --- a/drivers/clk/hisilicon/clk.h +++ b/drivers/clk/hisilicon/clk.h @@ -111,18 +111,18 @@ struct clk *hi6220_register_clkdiv(struct device *dev, const char *name, u8 shift, u8 width, u32 mask_bit, spinlock_t *lock); struct hisi_clock_data *hisi_clk_init(struct device_node *, int); -void hisi_clk_register_fixed_rate(struct hisi_fixed_rate_clock *, +void hisi_clk_register_fixed_rate(const struct hisi_fixed_rate_clock *, int, struct hisi_clock_data *); -void hisi_clk_register_fixed_factor(struct hisi_fixed_factor_clock *, +void hisi_clk_register_fixed_factor(const struct hisi_fixed_factor_clock *, int, struct hisi_clock_data *); -void hisi_clk_register_mux(struct hisi_mux_clock *, int, +void hisi_clk_register_mux(const struct hisi_mux_clock *, int, struct hisi_clock_data *); -void hisi_clk_register_divider(struct hisi_divider_clock *, +void hisi_clk_register_divider(const struct hisi_divider_clock *, int, struct hisi_clock_data *); -void hisi_clk_register_gate(struct hisi_gate_clock *, +void hisi_clk_register_gate(const struct hisi_gate_clock *, int, struct hisi_clock_data *); -void hisi_clk_register_gate_sep(struct hisi_gate_clock *, +void hisi_clk_register_gate_sep(const struct hisi_gate_clock *, int, struct hisi_clock_data *); -void hi6220_clk_register_divider(struct hi6220_divider_clock *, +void hi6220_clk_register_divider(const struct hi6220_divider_clock *, int, struct hisi_clock_data *); #endif /* __HISI_CLK_H */