Skip to content

Commit 5bcfc4e

Browse files
author
Bartosz Golaszewski
committed
power: sequencing: thead-gpu: add missing header
When using kcalloc(), kfree() etc., we need to include linux/slab.h. While on some architectures it may work fine because the header is pulled in implicitly, on others it triggers the following errors: drivers/power/sequencing/pwrseq-thead-gpu.c: In function ‘pwrseq_thead_gpu_match’: drivers/power/sequencing/pwrseq-thead-gpu.c:147:21: error: implicit declaration of function ‘kcalloc’ [-Wimplicit-function-declaration] 147 | ctx->clks = kcalloc(ctx->num_clks, sizeof(*ctx->clks), GFP_KERNEL); Fixes: d4c2d9b ("power: sequencing: Add T-HEAD TH1520 GPU power sequencer driver") Reviewed-by: Ulf Hansson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent d4c2d9b commit 5bcfc4e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/power/sequencing/pwrseq-thead-gpu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <linux/of.h>
2222
#include <linux/pwrseq/provider.h>
2323
#include <linux/reset.h>
24+
#include <linux/slab.h>
2425

2526
#include <dt-bindings/power/thead,th1520-power.h>
2627

0 commit comments

Comments
 (0)