clk-gemini.c (498495dba268b20e8eadd7fe93c140c68b6cc9d2) clk-gemini.c (acafe7e30216166a17e6e226aadc3ecb63993242)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Cortina Gemini SoC Clock Controller driver
4 * Copyright (c) 2017 Linus Walleij <linus.walleij@linaro.org>
5 */
6
7#define pr_fmt(fmt) "clk-gemini: " fmt
8

--- 385 unchanged lines hidden (view full) ---

394 struct regmap *map;
395 struct clk_hw *hw;
396 unsigned long freq;
397 unsigned int mult, div;
398 u32 val;
399 int ret;
400 int i;
401
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Cortina Gemini SoC Clock Controller driver
4 * Copyright (c) 2017 Linus Walleij <linus.walleij@linaro.org>
5 */
6
7#define pr_fmt(fmt) "clk-gemini: " fmt
8

--- 385 unchanged lines hidden (view full) ---

394 struct regmap *map;
395 struct clk_hw *hw;
396 unsigned long freq;
397 unsigned int mult, div;
398 u32 val;
399 int ret;
400 int i;
401
402 gemini_clk_data = kzalloc(sizeof(*gemini_clk_data) +
403 sizeof(*gemini_clk_data->hws) * GEMINI_NUM_CLKS,
404 GFP_KERNEL);
402 gemini_clk_data = kzalloc(struct_size(gemini_clk_data, hws,
403 GEMINI_NUM_CLKS),
404 GFP_KERNEL);
405 if (!gemini_clk_data)
406 return;
407
408 /*
409 * This way all clock fetched before the platform device probes,
410 * except those we assign here for early use, will be deferred.
411 */
412 for (i = 0; i < GEMINI_NUM_CLKS; i++)

--- 51 unchanged lines hidden ---
405 if (!gemini_clk_data)
406 return;
407
408 /*
409 * This way all clock fetched before the platform device probes,
410 * except those we assign here for early use, will be deferred.
411 */
412 for (i = 0; i < GEMINI_NUM_CLKS; i++)

--- 51 unchanged lines hidden ---