[PATCH v2 03/11] clk: sunxi: Add driver for A80 MMC config clocks/resets

Maxime Ripard maxime.ripard at free-electrons.com
Thu Jan 8 01:39:21 PST 2015


On Mon, Dec 22, 2014 at 10:15:19AM +0800, Chen-Yu Tsai wrote:
> >> +     clk_data->clks = devm_kcalloc(&pdev->dev, count, sizeof(struct clk *),
> >
> > Hmmm, are you sure of that sizeof?
> 
> Quite sure. Code in clk-sunxi.c for gates:
> 
>     clk_data->clks = kzalloc((qty+1) * sizeof(struct clk *), GFP_KERNEL);
> 
> Note I'm using kcalloc here.
> 
> Also definition for clk_data:
> 
>     struct clk_onecell_data {
>             struct clk **clks;
>             unsigned int clk_num;
>     };

Ah, right, my bad :)

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150108/2153110c/attachment.sig>


More information about the linux-arm-kernel mailing list