Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965954AbcJYOEM (ORCPT ); Tue, 25 Oct 2016 10:04:12 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:38210 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934242AbcJYOEK (ORCPT ); Tue, 25 Oct 2016 10:04:10 -0400 Subject: Re: [PATCH v9 1/4] soc: mediatek: Refine scpsys to support multiple platform To: James Liao , Sascha Hauer References: <1476953798-23263-1-git-send-email-jamesjj.liao@mediatek.com> <1476953798-23263-2-git-send-email-jamesjj.liao@mediatek.com> Cc: Rob Herring , Kevin Hilman , Daniel Kurtz , srv_heupstream@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org From: Matthias Brugger Message-ID: <1d5cda95-467a-4f95-1cc9-b8f156271a54@gmail.com> Date: Tue, 25 Oct 2016 16:04:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <1476953798-23263-2-git-send-email-jamesjj.liao@mediatek.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 842 Lines: 33 Hi James, On 10/20/2016 10:56 AM, James Liao wrote: > -static int scpsys_probe(struct platform_device *pdev) > +static void init_clks(struct platform_device *pdev, struct clk *clk[CLK_MAX]) I prefer struct clk **clk. > +{ > + int i; > + > + for (i = CLK_NONE + 1; i < CLK_MAX; i++) > + clk[i] = devm_clk_get(&pdev->dev, clk_names[i]); > +} > + > +static struct scp *init_scp(struct platform_device *pdev, > + const struct scp_domain_data *scp_domain_data, int num) > { > struct genpd_onecell_data *pd_data; > struct resource *res; > - int i, j, ret; > + int i, j; > struct scp *scp; > - struct clk *clk[MT8173_CLK_MAX]; > + struct clk *clk[CLK_MAX]; should be *[CLK_MAX - 1] but I would prefer to define in the enum: CLK_MAX = CLK_VENC_LT, If you are ok with it, I can fix both of my comments when applying. Regards, Matthias