Skip to content

Commit

Permalink
drm/amd/display: include linux/slab.h where needed
Browse files Browse the repository at this point in the history
Calling kzalloc() and related functions requires the
linux/slab.h header to be included:

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function 'dcn21_ipp_create':
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:679:3: error: implicit declaration of function 'kzalloc'; did you mean 'd_alloc'? [-Werror=implicit-function-declaration]
   kzalloc(sizeof(struct dcn10_ipp), GFP_KERNEL);

A lot of other headers also miss a direct include in this file,
but this is the only one that causes a problem for now.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Arnd Bergmann authored and Alex Deucher committed Dec 11, 2019
1 parent 3504bd4 commit aec4340
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
*
*/

#include <linux/slab.h>

#include "dm_services.h"
#include "dc.h"

Expand Down

0 comments on commit aec4340

Please sign in to comment.