aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-sensor-hub.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-sensor-hub.c')
-rw-r--r--drivers/hid/hid-sensor-hub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index 4ac759c1fe22..0c93b10b0813 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -173,7 +173,7 @@ int sensor_hub_register_callback(struct hid_sensor_hub_device *hsdev,
173 spin_unlock(&pdata->dyn_callback_lock); 173 spin_unlock(&pdata->dyn_callback_lock);
174 return -EINVAL; 174 return -EINVAL;
175 } 175 }
176 callback = kzalloc(sizeof(*callback), GFP_KERNEL); 176 callback = kzalloc(sizeof(*callback), GFP_ATOMIC);
177 if (!callback) { 177 if (!callback) {
178 spin_unlock(&pdata->dyn_callback_lock); 178 spin_unlock(&pdata->dyn_callback_lock);
179 return -ENOMEM; 179 return -ENOMEM;
@@ -462,7 +462,7 @@ static int sensor_hub_raw_event(struct hid_device *hdev,
462 if (pdata->pending.status && pdata->pending.attr_usage_id == 462 if (pdata->pending.status && pdata->pending.attr_usage_id ==
463 report->field[i]->usage->hid) { 463 report->field[i]->usage->hid) {
464 hid_dbg(hdev, "data was pending ...\n"); 464 hid_dbg(hdev, "data was pending ...\n");
465 pdata->pending.raw_data = kmalloc(sz, GFP_KERNEL); 465 pdata->pending.raw_data = kmalloc(sz, GFP_ATOMIC);
466 if (pdata->pending.raw_data) { 466 if (pdata->pending.raw_data) {
467 memcpy(pdata->pending.raw_data, ptr, sz); 467 memcpy(pdata->pending.raw_data, ptr, sz);
468 pdata->pending.raw_size = sz; 468 pdata->pending.raw_size = sz;