clk-asm9260.c (cf40a76e7d5874bb25f4404eecc58a2e033af885) | clk-asm9260.c (acafe7e30216166a17e6e226aadc3ecb63993242) |
---|---|
1/* 2 * Copyright (c) 2014 Oleksij Rempel <linux@rempel-privat.de>. 3 * 4 * This program is free software; you can redistribute it and/or modify it 5 * under the terms and conditions of the GNU General Public License, 6 * version 2, as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope it will be useful, but WITHOUT --- 259 unchanged lines hidden (view full) --- 268{ 269 struct clk_hw *hw; 270 struct clk_hw **hws; 271 const char *ref_clk, *pll_clk = "pll"; 272 u32 rate; 273 int n; 274 u32 accuracy = 0; 275 | 1/* 2 * Copyright (c) 2014 Oleksij Rempel <linux@rempel-privat.de>. 3 * 4 * This program is free software; you can redistribute it and/or modify it 5 * under the terms and conditions of the GNU General Public License, 6 * version 2, as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope it will be useful, but WITHOUT --- 259 unchanged lines hidden (view full) --- 268{ 269 struct clk_hw *hw; 270 struct clk_hw **hws; 271 const char *ref_clk, *pll_clk = "pll"; 272 u32 rate; 273 int n; 274 u32 accuracy = 0; 275 |
276 clk_data = kzalloc(sizeof(*clk_data) + 277 sizeof(*clk_data->hws) * MAX_CLKS, GFP_KERNEL); | 276 clk_data = kzalloc(struct_size(clk_data, hws, MAX_CLKS), GFP_KERNEL); |
278 if (!clk_data) 279 return; 280 clk_data->num = MAX_CLKS; 281 hws = clk_data->hws; 282 283 base = of_io_request_and_map(np, 0, np->name); 284 if (IS_ERR(base)) 285 panic("%s: unable to map resource", np->name); --- 68 unchanged lines hidden --- | 277 if (!clk_data) 278 return; 279 clk_data->num = MAX_CLKS; 280 hws = clk_data->hws; 281 282 base = of_io_request_and_map(np, 0, np->name); 283 if (IS_ERR(base)) 284 panic("%s: unable to map resource", np->name); --- 68 unchanged lines hidden --- |