bg2q.c (45ba387511149a5c71d0f720366be64898bc9129) | bg2q.c (acafe7e30216166a17e6e226aadc3ecb63993242) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 | |
2/* 3 * Copyright (c) 2014 Marvell Technology Group Ltd. 4 * 5 * Alexandre Belloni <alexandre.belloni@free-electrons.com> 6 * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | 1/* 2 * Copyright (c) 2014 Marvell Technology Group Ltd. 3 * 4 * Alexandre Belloni <alexandre.belloni@free-electrons.com> 5 * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> |
6 * 7 * This program is free software; you can redistribute it and/or modify it 8 * under the terms and conditions of the GNU General Public License, 9 * version 2, as published by the Free Software Foundation. 10 * 11 * This program is distributed in the hope it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 14 * more details. 15 * 16 * You should have received a copy of the GNU General Public License along with 17 * this program. If not, see <http://www.gnu.org/licenses/>. |
|
7 */ 8 9#include <linux/clk.h> 10#include <linux/clk-provider.h> 11#include <linux/kernel.h> 12#include <linux/of.h> 13#include <linux/of_address.h> 14#include <linux/slab.h> --- 264 unchanged lines hidden (view full) --- 279static void __init berlin2q_clock_setup(struct device_node *np) 280{ 281 struct device_node *parent_np = of_get_parent(np); 282 const char *parent_names[9]; 283 struct clk *clk; 284 struct clk_hw **hws; 285 int n, ret; 286 | 18 */ 19 20#include <linux/clk.h> 21#include <linux/clk-provider.h> 22#include <linux/kernel.h> 23#include <linux/of.h> 24#include <linux/of_address.h> 25#include <linux/slab.h> --- 264 unchanged lines hidden (view full) --- 290static void __init berlin2q_clock_setup(struct device_node *np) 291{ 292 struct device_node *parent_np = of_get_parent(np); 293 const char *parent_names[9]; 294 struct clk *clk; 295 struct clk_hw **hws; 296 int n, ret; 297 |
287 clk_data = kzalloc(sizeof(*clk_data) + 288 sizeof(*clk_data->hws) * MAX_CLKS, GFP_KERNEL); | 298 clk_data = kzalloc(struct_size(clk_data, hws, MAX_CLKS), GFP_KERNEL); |
289 if (!clk_data) 290 return; 291 clk_data->num = MAX_CLKS; 292 hws = clk_data->hws; 293 294 gbase = of_iomap(parent_np, 0); 295 if (!gbase) { 296 pr_err("%pOF: Unable to map global base\n", np); --- 86 unchanged lines hidden --- | 299 if (!clk_data) 300 return; 301 clk_data->num = MAX_CLKS; 302 hws = clk_data->hws; 303 304 gbase = of_iomap(parent_np, 0); 305 if (!gbase) { 306 pr_err("%pOF: Unable to map global base\n", np); --- 86 unchanged lines hidden --- |