mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
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:
parent
17c22334d7
commit
b2f0193ac3
2 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue