summaryrefslogtreecommitdiff
path: root/kernel/resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/resource.c')
-rw-r--r--kernel/resource.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/resource.c b/kernel/resource.c
index 31341bdd7707..bb966699da31 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -182,7 +182,7 @@ static void free_resource(struct resource *res)
static struct resource *alloc_resource(gfp_t flags)
{
- return kzalloc(sizeof(struct resource), flags);
+ return kzalloc_obj(struct resource, flags);
}
/* Return the conflict entry if you can't request it */
@@ -502,7 +502,7 @@ int walk_system_ram_res_rev(u64 start, u64 end, void *arg,
int ret = -1;
/* create a list */
- rams = kvcalloc(rams_size, sizeof(struct resource), GFP_KERNEL);
+ rams = kvzalloc_objs(struct resource, rams_size);
if (!rams)
return ret;