Merge "pinctrl: protect pinctrl_list add"

This commit is contained in:
Linux Build Service Account 2014-02-12 09:30:22 -08:00 committed by Gerrit - the friendly Code Review server
commit 613eaf41bd
1 changed files with 2 additions and 0 deletions

View File

@ -807,7 +807,9 @@ static struct pinctrl *create_pinctrl(struct device *dev)
kref_init(&p->users);
/* Add the pinctrl handle to the global list */
mutex_lock(&pinctrl_list_mutex);
list_add_tail(&p->node, &pinctrl_list);
mutex_unlock(&pinctrl_list_mutex);
return p;
}