From: Stanislav Vorobiov Date: Mon, 17 Mar 2014 07:59:10 +0000 (+0400) Subject: slp_global_lock: Fixed for kernel 3.12 X-Git-Tag: submit/tizen_common/20140905.094502~128 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f0083616f4992e47b71b97e130829b26671d9c7;p=sdk%2Femulator%2Femulator-kernel.git slp_global_lock: Fixed for kernel 3.12 Change-Id: I89f0cedba73eae66e56911b8ebcfb9010443d4bd --- diff --git a/drivers/misc/slp_global_lock.c b/drivers/misc/slp_global_lock.c index 01f2d38eb74b..4e78e7976b97 100644 --- a/drivers/misc/slp_global_lock.c +++ b/drivers/misc/slp_global_lock.c @@ -101,12 +101,11 @@ static struct sgl_hash_node *sgl_hash_get_node(struct sgl_hash_head *hash, unsig struct sgl_hash_node *found = NULL; struct hlist_head *head = &hash_head->head; - struct hlist_node *pos; SGL_LOG("key %d", key); mutex_lock(&hash_head->mutex); - hlist_for_each_entry(hash_node, pos, head, node) { + hlist_for_each_entry(hash_node, head, node) { if (hash_node->key == key) { found = hash_node; break; @@ -152,14 +151,13 @@ static int sgl_hash_remove_node(struct sgl_hash_head *hash, unsigned int key) struct sgl_hash_node *hash_node; struct hlist_head *head = &hash_head->head; - struct hlist_node *pos; int err = -ENOENT; SGL_LOG("key %d", key); mutex_lock(&hash_head->mutex); - hlist_for_each_entry(hash_node, pos, head, node) { + hlist_for_each_entry(hash_node, head, node) { if (hash_node->key == key) { hlist_del(&hash_node->node); kfree(hash_node); @@ -667,14 +665,13 @@ static void sgl_dump_locks(void) struct sgl_hash_head *shead; struct sgl_hash_node *snode; struct hlist_head *hhead; - struct hlist_node *pos; shead = &((struct sgl_hash_head *)sgl_global.locks)[i]; if (!shead) continue; mutex_lock(&shead->mutex); hhead = &shead->head; - hlist_for_each_entry(snode, pos, hhead, node) { + hlist_for_each_entry(snode, hhead, node) { struct sgl_lock *lock = snode->lock; mutex_lock(&lock->data_mutex); SGL_INFO("lock key: %d, refcnt: %d, owner_pid: %d, owner_tid: %d\n",