forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/clk/imgtec/clk-boston.c
....@@ -1,11 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (C) 2016-2017 Imagination Technologies
34 * Author: Paul Burton <paul.burton@mips.com>
4
- *
5
- * This program is free software; you can redistribute it and/or modify it
6
- * under the terms of the GNU General Public License as published by the
7
- * Free Software Foundation; either version 2 of the License, or (at your
8
- * option) any later version.
95 */
106
117 #define pr_fmt(fmt) "clk-boston: " fmt
....@@ -62,8 +58,7 @@
6258 cpu_div = ext_field(mmcmdiv, BOSTON_PLAT_MMCMDIV_CLK1DIV);
6359 cpu_freq = mult_frac(in_freq, mul, cpu_div);
6460
65
- onecell = kzalloc(sizeof(*onecell) +
66
- (BOSTON_CLK_COUNT * sizeof(struct clk_hw *)),
61
+ onecell = kzalloc(struct_size(onecell, hws, BOSTON_CLK_COUNT),
6762 GFP_KERNEL);
6863 if (!onecell)
6964 return;