msm: synx: change kzalloc to vzalloc

Change the memory allocation function to vzalloc
as there is no need for physically contiguous memory
for the client structure.

Change-Id: Ic6377953c6acc6442eea8fbee2e1798ac32ebebb
Signed-off-by: Sumukh Hallymysore Ravindra <shallymy@codeaurora.org>
This commit is contained in:
Sumukh Hallymysore Ravindra 2020-04-03 15:08:26 +05:30
commit b2f0193ac3
2 changed files with 4 additions and 2 deletions

View file

@ -9,6 +9,7 @@
#include <linux/poll.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/vmalloc.h>
#include "synx_api.h"
#include "synx_util.h"
@ -1435,7 +1436,7 @@ int synx_initialize(struct synx_session *session_id,
bit = test_and_set_bit(idx, synx_dev->bitmap);
} while (bit);
client = kzalloc(sizeof(*client), GFP_KERNEL);
client = vzalloc(sizeof(*client));
if (!client) {
clear_bit(idx, synx_dev->bitmap);
return -ENOMEM;

View file

@ -6,6 +6,7 @@
#include <linux/slab.h>
#include <linux/random.h>
#include <linux/vmalloc.h>
#include "synx_api.h"
#include "synx_util.h"
@ -975,7 +976,7 @@ static void synx_client_destroy(struct kref *kref)
pr_info("[sess: %u] session destroyed %s\n",
client->id, client->name);
kfree(client);
vfree(client);
}
void synx_put_client(struct synx_client *client)