diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-09-01 16:03:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-09-01 16:03:32 -0400 |
commit | b18ed664c262e6c2f7067f2d12e566d134d13505 (patch) | |
tree | e3af30b7ce2ba510b3ba6f6eec7ed4d81dee136e | |
parent | 420f51f4ab6bce6e580390729fadb89c31123636 (diff) | |
parent | bded6c03e398dc6e862dc8301fb9a60175740653 (diff) |
Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
Pull clk fixes from Stephen Boyd:
"Two small fixes, one for the x86 Stoney SoC to get a more accurate clk
frequency and the other to fix a bad allocation in the Nuvoton NPCM7XX
driver"
* tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
clk: x86: Set default parent to 48Mhz
clk: npcm7xx: fix memory allocation
-rw-r--r-- | drivers/clk/clk-npcm7xx.c | 4 | ||||
-rw-r--r-- | drivers/clk/x86/clk-st.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/clk/clk-npcm7xx.c b/drivers/clk/clk-npcm7xx.c index 740af90a9508..c5edf8f2fd19 100644 --- a/drivers/clk/clk-npcm7xx.c +++ b/drivers/clk/clk-npcm7xx.c | |||
@@ -558,8 +558,8 @@ static void __init npcm7xx_clk_init(struct device_node *clk_np) | |||
558 | if (!clk_base) | 558 | if (!clk_base) |
559 | goto npcm7xx_init_error; | 559 | goto npcm7xx_init_error; |
560 | 560 | ||
561 | npcm7xx_clk_data = kzalloc(sizeof(*npcm7xx_clk_data->hws) * | 561 | npcm7xx_clk_data = kzalloc(struct_size(npcm7xx_clk_data, hws, |
562 | NPCM7XX_NUM_CLOCKS + sizeof(npcm7xx_clk_data), GFP_KERNEL); | 562 | NPCM7XX_NUM_CLOCKS), GFP_KERNEL); |
563 | if (!npcm7xx_clk_data) | 563 | if (!npcm7xx_clk_data) |
564 | goto npcm7xx_init_np_err; | 564 | goto npcm7xx_init_np_err; |
565 | 565 | ||
diff --git a/drivers/clk/x86/clk-st.c b/drivers/clk/x86/clk-st.c index fb62f3938008..3a0996f2d556 100644 --- a/drivers/clk/x86/clk-st.c +++ b/drivers/clk/x86/clk-st.c | |||
@@ -46,7 +46,7 @@ static int st_clk_probe(struct platform_device *pdev) | |||
46 | clk_oscout1_parents, ARRAY_SIZE(clk_oscout1_parents), | 46 | clk_oscout1_parents, ARRAY_SIZE(clk_oscout1_parents), |
47 | 0, st_data->base + CLKDRVSTR2, OSCOUT1CLK25MHZ, 3, 0, NULL); | 47 | 0, st_data->base + CLKDRVSTR2, OSCOUT1CLK25MHZ, 3, 0, NULL); |
48 | 48 | ||
49 | clk_set_parent(hws[ST_CLK_MUX]->clk, hws[ST_CLK_25M]->clk); | 49 | clk_set_parent(hws[ST_CLK_MUX]->clk, hws[ST_CLK_48M]->clk); |
50 | 50 | ||
51 | hws[ST_CLK_GATE] = clk_hw_register_gate(NULL, "oscout1", "oscout1_mux", | 51 | hws[ST_CLK_GATE] = clk_hw_register_gate(NULL, "oscout1", "oscout1_mux", |
52 | 0, st_data->base + MISCCLKCNTL1, OSCCLKENB, | 52 | 0, st_data->base + MISCCLKCNTL1, OSCCLKENB, |