Commit 01584892 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: mousevsc: Change the allocation flags to reflect interrupt context

Change the allocation flags to reflect interrupt context.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7f2bad4b
...@@ -329,7 +329,7 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device, ...@@ -329,7 +329,7 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device,
desc = &device_info->hid_descriptor; desc = &device_info->hid_descriptor;
WARN_ON(desc->bLength == 0); WARN_ON(desc->bLength == 0);
input_device->hid_desc = kzalloc(desc->bLength, GFP_KERNEL); input_device->hid_desc = kzalloc(desc->bLength, GFP_ATOMIC);
if (!input_device->hid_desc) { if (!input_device->hid_desc) {
pr_err("unable to allocate hid descriptor - size %d", pr_err("unable to allocate hid descriptor - size %d",
...@@ -342,7 +342,7 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device, ...@@ -342,7 +342,7 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device,
/* Save the report desc */ /* Save the report desc */
input_device->report_desc_size = desc->desc[0].wDescriptorLength; input_device->report_desc_size = desc->desc[0].wDescriptorLength;
input_device->report_desc = kzalloc(input_device->report_desc_size, input_device->report_desc = kzalloc(input_device->report_desc_size,
GFP_KERNEL); GFP_ATOMIC);
if (!input_device->report_desc) { if (!input_device->report_desc) {
pr_err("unable to allocate report descriptor - size %d", pr_err("unable to allocate report descriptor - size %d",
...@@ -541,7 +541,7 @@ static void mousevsc_on_channel_callback(void *context) ...@@ -541,7 +541,7 @@ static void mousevsc_on_channel_callback(void *context)
} else if (ret == -ENOBUFS) { } else if (ret == -ENOBUFS) {
/* Handle large packet */ /* Handle large packet */
bufferlen = bytes_recvd; bufferlen = bytes_recvd;
buffer = kzalloc(bytes_recvd, GFP_KERNEL); buffer = kzalloc(bytes_recvd, GFP_ATOMIC);
if (buffer == NULL) { if (buffer == NULL) {
buffer = packet; buffer = packet;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment