[PATCH v2 7/7] clk: sunxi: drop an unnecesary kmalloc

Mike Turquette mturquette at linaro.org
Wed Apr 3 17:49:23 EDT 2013


Quoting Emilio López (2013-03-27 14:20:43)
> clk_register will copy this information, so we can just use a normal
> array and do one less dynamic allocation.
> 
> Signed-off-by: Emilio López <emilio at elopez.com.ar>

Looks good to me.

Regards,
Mike

> ---
> 
> Changes from v1:
>   - this patch was not present on v1
> 
>  drivers/clk/sunxi/clk-sunxi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
> index daa51ab..0bb0eb4 100644
> --- a/drivers/clk/sunxi/clk-sunxi.c
> +++ b/drivers/clk/sunxi/clk-sunxi.c
> @@ -232,7 +232,7 @@ static void __init sunxi_mux_clk_setup(struct device_node *node,
>  {
>         struct clk *clk;
>         const char *clk_name = node->name;
> -       const char **parents = kmalloc(sizeof(char *) * 5, GFP_KERNEL);
> +       const char *parents[5];
>         void *reg;
>         int i = 0;
>  
> -- 
> 1.8.2



More information about the linux-arm-kernel mailing list