Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
void input_release_device(struct input_handle *handle)
{
- if (handle->dev->grab == handle) {
- handle->dev->grab = NULL;
+ struct input_dev *dev = handle->dev;
+
+ if (dev->grab == handle) {
+ dev->grab = NULL;
- list_for_each_entry(handle, &handle->dev->h_list, d_node)
+ list_for_each_entry(handle, &dev->h_list, d_node)
if (handle->handler->start)
handle->handler->start(handle);
}