projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
hid
/
hid-sensor-hub.c
diff --git
a/drivers/hid/hid-sensor-hub.c
b/drivers/hid/hid-sensor-hub.c
index 6a58b6c723aa215408051e2b3c967205569a7b94..e54ce1097e2cc57f5049cf852016087a32534c47 100644
(file)
--- a/
drivers/hid/hid-sensor-hub.c
+++ b/
drivers/hid/hid-sensor-hub.c
@@
-135,8
+135,9
@@
static struct hid_sensor_hub_callbacks *sensor_hub_get_callback(
{
struct hid_sensor_hub_callbacks_list *callback;
struct sensor_hub_data *pdata = hid_get_drvdata(hdev);
{
struct hid_sensor_hub_callbacks_list *callback;
struct sensor_hub_data *pdata = hid_get_drvdata(hdev);
+ unsigned long flags;
- spin_lock
(&pdata->dyn_callback_lock
);
+ spin_lock
_irqsave(&pdata->dyn_callback_lock, flags
);
list_for_each_entry(callback, &pdata->dyn_callback_list, list)
if (callback->usage_id == usage_id &&
(collection_index >=
list_for_each_entry(callback, &pdata->dyn_callback_list, list)
if (callback->usage_id == usage_id &&
(collection_index >=
@@
-145,10
+146,11
@@
static struct hid_sensor_hub_callbacks *sensor_hub_get_callback(
callback->hsdev->end_collection_index)) {
*priv = callback->priv;
*hsdev = callback->hsdev;
callback->hsdev->end_collection_index)) {
*priv = callback->priv;
*hsdev = callback->hsdev;
- spin_unlock(&pdata->dyn_callback_lock);
+ spin_unlock_irqrestore(&pdata->dyn_callback_lock,
+ flags);
return callback->usage_callback;
}
return callback->usage_callback;
}
- spin_unlock
(&pdata->dyn_callback_lock
);
+ spin_unlock
_irqrestore(&pdata->dyn_callback_lock, flags
);
return NULL;
}
return NULL;
}