Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754902AbbGGEGf (ORCPT ); Tue, 7 Jul 2015 00:06:35 -0400 Received: from mail-bn1on0092.outbound.protection.outlook.com ([157.56.110.92]:20944 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753188AbbGGEFe (ORCPT ); Tue, 7 Jul 2015 00:05:34 -0400 Authentication-Results: spf=fail (sender IP is 66.35.236.236) smtp.mailfrom=opensource.altera.com; vger.kernel.org; dkim=none (message not signed) header.d=none; Authentication-Results: codeaurora.org; dkim=none (message not signed) header.d=none; From: To: , CC: , , , Dinh Nguyen , Tero Kristo Subject: [PATCHv2 6/6] clk: ti: make use of of_clk_parent_fill helper function Date: Mon, 6 Jul 2015 22:59:06 -0500 Message-ID: <1436241546-16731-7-git-send-email-dinguyen@opensource.altera.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1436241546-16731-1-git-send-email-dinguyen@opensource.altera.com> References: <1436241546-16731-1-git-send-email-dinguyen@opensource.altera.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: BLUPR01CA060.prod.exchangelabs.com (25.160.23.50) To CY1PR03MB1375.namprd03.prod.outlook.com (25.163.16.29) X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1375;2:jPTHInyJuczhYHvNEVDJxx4EgT9dcX2D3vvx3noqa5Fxc0jrRDKsPRl6Q2SULcqT;3:RNVy22M8qmYm6eqcpBbHHig7Oh2cwrMw9aGGJXC1Pm3mBCCPgb80LA55kP2UGL8jXvaNN6oQWZ9F+aCaWAAzbLHhgfwLHEBA+YIoxD/YdG/QwskX2WpX8e87lh/bgyt5T48mwotWVxVPYT7F3r6D7g==;25:dF7FbEFDkMcgtfZtn9T72Zp/APiA9HXXYGmWPWMWXx9vFDoMoxsytdJINinFFaFER/wYzWubHPGmgpIAKJpwyfNiBIZXcEO4OGgr0PLWscEuGmWzcy+UD/8jN1bCuDCtoO5smywo8kLibqmuneAzSAkyO59Lki617aTwR7fpeSRXviDcX9p2goX4LIu2vHGa4h0sTTLc63kJlQBCcFJOgan1VTeav1y0PFs18+RcRYX9gOAlboBpoxj28pKIVq+v;20:hU3vZnDdakMhmp6eO6UXIT37KceXFivXwuU0EJOOykYhxYEnS93oQqkLOX+9g6fDr4eh0b3us+TcNLJzrkdQX8bXsaCvlvG9tjIm9COzBDF9nZvbX88ERAyyfWnTtXws+kp2InfDrCox/6aOUxsZ/SYbjszoIKS9BjvVeQ9PUEA=;4:3q7FcETDm637AUJLs9la5p7tODpuIVQAzF/NOUJTPymGhJG9XP4KSoH9an2eu2jchnUSdU9sehP11cBSQsDBae0B6dXSX3d8YQ83dSjp5eu8RdD3uHw/L4/bTXCNPqrgOlLyr3yl3iLX6kA+UNFVU7eH72Qxtt2RwMAUakUgX1dJFZ84eRTSp+MImZsGu/iXBx+HjKVIuOLxJHNzAw3jolLjIw5XH6z4WjKhx/2TmXqZTx5Gyjk4bd9ixMLp4LP7EnWUFNdc41bQePaG9iZu1ONlcY9WDqWtKBT1iC6zx3A= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1375;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB303; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:;UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:CY1PR03MB1375;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1375;BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:DM2PR03MB303;BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB303; X-Forefront-PRVS: 0630013541 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(6009001)(19580395003)(92566002)(189998001)(66066001)(77096005)(122386002)(62966003)(40100003)(87976001)(5003940100001)(5001770100001)(50466002)(77156002)(42186005)(50226001)(50986999)(5001960100002)(5001920100001)(86152002)(2950100001)(76176999)(19580405001)(46102003)(33646002)(53416004)(229853001)(47776003)(86362001)(48376002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR03MB1375;H:linux-builds1.altera.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1375;23:QH1bsoRLwnGwuKMM56ah9riJIjkzDSuIFEhReUFXWI18V1+qsvdVuunbTUxcz9+znZMUFo3u74t1neWRjp4VxXs9iZYCQphKqgbKJqR8sI4UjP10qQpit9zxdmgntkz2Mo682/9ch5F+i/lWcNRVZG5pFCEC2fMeLpruo8IjowvLaDWnsErh+Y3yPFRA9HP4/ZO0jalFQvW0FJScN3ll+fY6NE5FGJrgzkPK7VaBwJsQQrG0ayZKWGFcHHxWTTuXrPnPwBwaKcdKatjz86g1+efeYmnHMxg3iKa41dI2ZPjH2cA3gz2uUBTXCQmwvBesjpZcRLi1KITtP2ZEx8vZ2BeaA2nUoDmUQPecaXpoi1Z6TEVonG9v5S8TcaOMcGzmwhfco8NPi/vvZhCsiTNuCgLzBYx5GwcLrRVieVSTLEOE8U6kJgBSI2DLnWuR+pXza5KuT1AvMgrXqWihdB1B+MCTLBAP4XEVHHKp1/WRN/PglHNHT3xiBcp1BCjdpweKY8LYeMkmk9LgUIwZrx3CeRHKhUx1CZSD56Fh/7xbJqGTCaxdjd2pV4Xy49iAC9af1f3ImS43MO8E8fOG3axjEm+Nrcr45MtOKi4iI3SlAcbv/Val037z3YkXK/I5dRbodsiwpsdMsAHHv9OF/E52rsBEO2zSMK5HAJqTa4jCgOIDseBGj1tLgWi5b84lVJOkIVwe9l97MsYpCWy7/kOCCFMxBsPiAPD24Hwo/zLz6AGWpyZZI9TEV7h8H6v2EZk2Ecytgd/zFruMQruknU1gYY48BQMEkyo1GjbDVO+hczQ0O/L1UPi/YUe3Z7qyPaKcMgAJX7zsAVFtAPR7SuOc80aH4gG+9yeXQ/dyw4BIQQU= X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1375;5:BHxH7pKhklMTDfXthq+/7Bht4r6p46bMRbI8MvO5rdu6CyzWaQeTNyLztZ+ceXy0oCSVC5OT/9b6l66LbyZD/o3+SyV3Plf8llBwO4xfIMN1lNvIjf+WGp6x9XgoYU2DpUzVi9iVqtyGQlcOvZ+gbw==;24:/VYf/VG03rmv9rUcP1MZALHi9W4eyaIaASxfIBk87OTCH2U9CEIUwN+5aX5uupXYO2Zglmf7UNhRZ/5PaUladVnZHKwNSj58QGk3WgJ8x24=;20:ucj8Ei0nct4NjFCqHpkpdQw5HkXrJpwtR1G5WCvoJ0jnbTzG8wxro4ki7YETPPmhzDAkRiElgbzm2TmX75pEgqEPoNLohQJnIaI8tFeGExiWjUbtrPJql2oGf6jk/Nk4hWPXgP8jFi1Mq0Ql4TnRdOMLmDalZa2haYX+MGNwcuw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1375 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN1BFFO11FD013.protection.gbl X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD013;1:6BtfsaP6a5VY/oARCOPGUGzVseYefsyLxnyez8QWt5Y3PseCqaZBLZwM6oRMiTxcLGQz44tCODiegzyB8cEvdKKLyBjIt8yXD4xxnCvS5cuLDPI1JXPKi+SYmgrO9FmgYAKBFN3OB9ky1ClNTd4oApJV70o/INGl8iSYtVrndo4y9ZShnt2EcALmab8/SaVNUrJhkHoqWF04R99u0qAWkIJBfdUhEuMQW7yxvVjWkXmpd5gI2ToYqtoy9MXBXVanSaSA4aOh7WIsKLHTXwga3OGksnj4/bDkpI7DMh1uYlJBE0xmgVGl7y/ScTjqcprt X-Forefront-Antispam-Report: CIP:66.35.236.236;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(339900001)(85426001)(50986999)(33646002)(48376002)(5001960100002)(19580395003)(87936001)(5001770100001)(76176999)(2950100001)(16796002)(6806004)(86362001)(19580405001)(86152002)(77096005)(62966003)(47776003)(46102003)(5003940100001)(77156002)(189998001)(40100003)(66066001)(50226001)(122386002)(106466001)(229853001)(53416004)(50466002)(105606002)(92566002)(7099028);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR03MB303;H:sj-itexedge04.altera.priv.altera.com;FPR:;SPF:Fail;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;DM2PR03MB303;2:/lqTUhBpsHxxvY3Mdz4OUevbGR5hIa4Bqo07kis30NIFpUfcxI/yWPTeH+kpLnBc;3:6bEGdgZzQexWLsgpRCUBJq5xPG7tiHk1+Gqlj34/Nx0W2/hciEckGduyn/Ykrp3BK2yDy/K3twNsRmO6PmPl6U7X6bCyyOizD1IiFYwZiArrsOfAOMsert7rXTneYr5uR9av5F47gdx/hImd5rGJG4ilsGV14VIME9chDehOH/+IrDw7lz5fWxp3g+PASni+J35lhi4gv4ssgP6uZ0wmGRJ+gO0bQIZcgvHXCYZYFGU=;25:OMkn5v4DbL3nHpxTeYIIb4xQ7PSJRJi/9Jf4idokoiFGS4Zx4rPrjAyxT6odESwU/F2zxclbN0Xli7v6HKtWIYHjQwC5A8pJCKAj+FPU6tiQPFZWfzceD5NDVDwZPLR/guMClvquFRfmvfKS2ZYb6LtBEE9W63IHlCY2P+jLiXT6EZ+0c/shWz8k1KXADJVLvBaZNwyhOEoyIDV+BUtcEu2g7n3ZWxXy127yCXMf8TTI0hvy74YPgWcflU/W8OJn;20:Dh2WaIaUmzz6cNW8Zmnh3yvzfOiZMIsIdWS2VRcw4VZ/uTBMKEK/GQv6DWMttSUQTBbpHWppAOWowPufAOpnLhZS3h+sJKgZjn8MIJxKrLaeERhUUHY/xgreafWD+//DA99dHdtkBHb0eRjAMRcEMHSe7ue4DYxbLabQTsLAA8I= X-Microsoft-Exchange-Diagnostics: 1;DM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Rn7d+xVtlg0r?= =?us-ascii?Q?K3DWl2Dg8BOS3n0Z5JfTEAyraNPiNoGfPayIjQJBXXaLseD9mE3i7tu996x/?= =?us-ascii?Q?JlkJV7owLOdwuTWhviGgsKXMaX0sC+paa5IkUbrsGGRH0GYzAMMAn8281ZHv?= =?us-ascii?Q?zoiqd5g7Y+MwGiyhuIaTkT8v3xD+tgj5YuSn4Y4FklVNENr7GeDb78EYQXlw?= =?us-ascii?Q?S9xvJiYUPRxCTR6sns5YzGVU0k8X0iQq/bFG+XKbTc3JfYtFzjOozo+ADQF+?= =?us-ascii?Q?iNRGpAKWbpS4IdY31aUgg8jKEE2BHNXcbFybmkPovzBBHytf0aMa46XIgIth?= =?us-ascii?Q?f0Zi3930ktCB7bslntDP7oysW+zhWP22jl3hvtqBOKBERkjQzM7zaxFX7D8J?= =?us-ascii?Q?6Faddqx/oHDlkaXR3RmxYfOztyPSdtvK+SjVppLQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR03MB303;5:NaTTZ2tJA7R4OYmWUTSJKvBZWI1N0MrWAkxm7B00qOqnqbeK8d3BF5u8LniOwAgopxPWxO4kUa9fgdHDeNzT6GTTygZrecsPeFxC+43tOswJQI13rKiBjOF8ul8xuAKvJzUScU5y7UE17bEsByuqEQ==;24:+YX5LhWOhYw1kb8LGcgicUh4D4lf/V7xBCyeVzvgMJ4ARG8BZnAvspHmvLCFK8s1IS/+yebxoCM7GSfsONqWkDKyi4HdCDGhhIVcurvh1vc=;20:iJQeubHc5WnbZT2JiKVNOx35qKmnNsa0mCEqANxO47f4m7G/5mkmzfCNKHr5pY7RXFYUF0AryNH0xiN771vAfU1/Zj9oM25jZtKok3TFYP3l/41Nkq0EzcbIMEvPywOQIUFizasz9QhQ7ZQE9fX0Z04bNW+Gn7QY65APKa0AgOY= X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2015 04:05:30.6233 (UTC) X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fbd72e03-d4a5-4110-adce-614d51f2077a;Ip=[66.35.236.236];Helo=[sj-itexedge04.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR03MB303 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4077 Lines: 124 From: Dinh Nguyen Use of_clk_parent_fill to fill in the parent clock names' array. Signed-off-by: Dinh Nguyen Cc: Tero Kristo --- drivers/clk/ti/apll.c | 4 +--- drivers/clk/ti/composite.c | 4 +--- drivers/clk/ti/dpll.c | 4 +--- drivers/clk/ti/fapll.c | 3 +-- drivers/clk/ti/mux.c | 4 +--- 5 files changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/clk/ti/apll.c b/drivers/clk/ti/apll.c index 49baf38..523880e 100644 --- a/drivers/clk/ti/apll.c +++ b/drivers/clk/ti/apll.c @@ -170,7 +170,6 @@ static void __init of_dra7_apll_setup(struct device_node *node) struct clk_hw_omap *clk_hw = NULL; struct clk_init_data *init = NULL; const char **parent_names = NULL; - int i; ad = kzalloc(sizeof(*ad), GFP_KERNEL); clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL); @@ -195,8 +194,7 @@ static void __init of_dra7_apll_setup(struct device_node *node) if (!parent_names) goto cleanup; - for (i = 0; i < init->num_parents; i++) - parent_names[i] = of_clk_get_parent_name(node, i); + of_clk_parent_fill(node, parent_names, init->num_parents); init->parent_names = parent_names; diff --git a/drivers/clk/ti/composite.c b/drivers/clk/ti/composite.c index 96f83ce..dbef218 100644 --- a/drivers/clk/ti/composite.c +++ b/drivers/clk/ti/composite.c @@ -276,7 +276,6 @@ int __init ti_clk_add_component(struct device_node *node, struct clk_hw *hw, int num_parents; const char **parent_names; struct component_clk *clk; - int i; num_parents = of_clk_get_parent_count(node); @@ -289,8 +288,7 @@ int __init ti_clk_add_component(struct device_node *node, struct clk_hw *hw, if (!parent_names) return -ENOMEM; - for (i = 0; i < num_parents; i++) - parent_names[i] = of_clk_get_parent_name(node, i); + of_clk_parent_fill(node, parent_names, num_parents); clk = kzalloc(sizeof(*clk), GFP_KERNEL); if (!clk) { diff --git a/drivers/clk/ti/dpll.c b/drivers/clk/ti/dpll.c index 2aacf7a..49acdf2 100644 --- a/drivers/clk/ti/dpll.c +++ b/drivers/clk/ti/dpll.c @@ -341,7 +341,6 @@ static void __init of_ti_dpll_setup(struct device_node *node, struct clk_init_data *init = NULL; const char **parent_names = NULL; struct dpll_data *dd = NULL; - int i; u8 dpll_mode = 0; dd = kzalloc(sizeof(*dd), GFP_KERNEL); @@ -370,8 +369,7 @@ static void __init of_ti_dpll_setup(struct device_node *node, if (!parent_names) goto cleanup; - for (i = 0; i < init->num_parents; i++) - parent_names[i] = of_clk_get_parent_name(node, i); + of_clk_parent_fill(node, parent_names, init->num_parents); init->parent_names = parent_names; diff --git a/drivers/clk/ti/fapll.c b/drivers/clk/ti/fapll.c index 730aa62..b1c741b 100644 --- a/drivers/clk/ti/fapll.c +++ b/drivers/clk/ti/fapll.c @@ -558,8 +558,7 @@ static void __init ti_fapll_setup(struct device_node *node) goto free; } - parent_name[0] = of_clk_get_parent_name(node, 0); - parent_name[1] = of_clk_get_parent_name(node, 1); + of_clk_parent_fill(node, parent_name, 2); init->parent_names = parent_name; fd->clk_ref = of_clk_get(node, 0); diff --git a/drivers/clk/ti/mux.c b/drivers/clk/ti/mux.c index 5cdeed5..99fe27e 100644 --- a/drivers/clk/ti/mux.c +++ b/drivers/clk/ti/mux.c @@ -190,7 +190,6 @@ static void of_mux_clk_setup(struct device_node *node) void __iomem *reg; int num_parents; const char **parent_names; - int i; u8 clk_mux_flags = 0; u32 mask = 0; u32 shift = 0; @@ -205,8 +204,7 @@ static void of_mux_clk_setup(struct device_node *node) if (!parent_names) goto cleanup; - for (i = 0; i < num_parents; i++) - parent_names[i] = of_clk_get_parent_name(node, i); + of_clk_parent_fill(node, parent_names, num_parents); reg = ti_clk_get_reg_addr(node, 0); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/