Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936465AbcJGBIK (ORCPT ); Thu, 6 Oct 2016 21:08:10 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:40849 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935974AbcJGBIB (ORCPT ); Thu, 6 Oct 2016 21:08:01 -0400 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 X-AuditID: cbfee61b-f79406d000001501-52-57f6ee214936 Content-transfer-encoding: 8BIT Message-id: <57F6EE21.2060903@samsung.com> Date: Fri, 07 Oct 2016 09:36:49 +0900 From: Chanwoo Choi Organization: Samsung Electronics User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: Javier Martinez Canillas , linux-kernel@vger.kernel.org Cc: Markus Reichl , Tobias Jakobi , Michael Turquette , Stephen Boyd , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , linux-clk@vger.kernel.org Subject: Re: [PATCH] clk: max77686: fix number of clocks setup for clk_hw based registration References: <1475765999-14366-1-git-send-email-javier@osg.samsung.com> In-reply-to: <1475765999-14366-1-git-send-email-javier@osg.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMIsWRmVeSWpSXmKPExsVy+t9jAV3Fd9/CDS7PsrTYOGM9q8Wbt2uY LM6f38Bu8bHnHqvF5V1z2CxeHvnBaHHxlKvFjzPdLBZtqz+wOnB6vL/Ryu5xua+XyePWnXqP Tas62Tz+HWP32NJ/l92jb8sqRo/Pm+QCOKLcbDJSE1NSixRS85LzUzLz0m2VQkPcdC2UFPIS c1NtlSJ0fUOClBTKEnNKgTwjAzTg4BzgHqykb5fglnHt8SfWgjW8FQ//9LE0ML7k6mLk4JAQ MJHYuFW2i5ETyBSTuHBvPRuILSSwlFGi8bQ2iM0rICjxY/I9FpByZgF5iSOXskHCzALqEpPm LWKGKH/AKPHkIS9EuZbEhP03GUFsFgFViZ7dR1hBbDag+P4XN8DG8wsoSlz98ZgRZKSoQIRE 94lKkLCIQKjEv4u3gcJcQOPXMkncfATRKywQJzHx4gJWkISQwBxGiVVHboAt4BRwl+h9OYlt AqPgLCSnzkI4dRaSUxcwMq9ilEgtSC4oTkrPNcpLLdcrTswtLs1L10vOz93ECI7QZ9I7GA/v cj/EKMDBqMTDm9H6LVyINbGsuDL3EKMEB7OSCO+750Ah3pTEyqrUovz4otKc1OJDjKZAz05k lhJNzgcmj7ySeEMTcxNzYwMLc0tLEyMlcd7G2c/ChQTSE0tSs1NTC1KLYPqYODilGhh1hQz/ 3Jjcw3tiTZ+1of16lpZ3NT3T3qw4Ht3Ut571wL0p83YsyN295PFNXo//qncFyu5WPZj0qTn8 bevCT/e6lxed3ja799cmpb8+2unHhGV/qNyq7rg+fd/yA7rbDmxK2bD6ukRRqdNa5mJZQ57F 29MvG3M4vv3srnj8bNx/PQWZ3wusv71LUGIpzkg01GIuKk4EAGVoJonmAgAA X-MTR: 20000000000000000@CPGS Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1660 Lines: 48 Hi Javier, On 2016년 10월 06일 23:59, Javier Martinez Canillas wrote: > The commit 9b4cac33adc7 ("clk: max77686: Migrate to clk_hw based OF and > registration APIs") converted the driver to use the new provider API to > register clocks using clk_hw. > > But unfortunately, in the conversion it missed to set the num_clks value > which lead to the following error when trying to register a clk provider: > > [ 1.963782] of_clk_max77686_get: invalid index 0 > [ 1.967460] ERROR: could not get clock /rtc@10070000:rtc_src(1) > [ 1.973638] s3c-rtc 10070000.rtc: failed to find rtc source clock > > Fix it by correctly set the max77686_clk_driver_data num_clks member. > > Fixes: 9b4cac33adc7 ("clk: max77686: Migrate to clk_hw based OF and registration APIs") > Reported-by: Markus Reichl > Suggested-by: Tobias Jakobi > Signed-off-by: Javier Martinez Canillas > Tested-by: Markus Reichl > > --- > > drivers/clk/clk-max77686.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/clk/clk-max77686.c b/drivers/clk/clk-max77686.c > index b637f5979023..eb953d3b0b69 100644 > --- a/drivers/clk/clk-max77686.c > +++ b/drivers/clk/clk-max77686.c > @@ -216,6 +216,7 @@ static int max77686_clk_probe(struct platform_device *pdev) > return -EINVAL; > } > > + drv_data->num_clks = num_clks; > drv_data->max_clk_data = devm_kcalloc(dev, num_clks, > sizeof(*drv_data->max_clk_data), > GFP_KERNEL); > Looks good to me. Reviewed-by: Chanwoo Choi -- Best Regards, Chanwoo Choi