Commit 72ff490e authored by Vojtech Pavlik's avatar Vojtech Pavlik

Fixes/cleanups after converting drivers to list.h lists.

parent 8c81d480
...@@ -411,7 +411,7 @@ void input_register_device(struct input_dev *dev) ...@@ -411,7 +411,7 @@ void input_register_device(struct input_dev *dev)
dev->rep[REP_PERIOD] = HZ/33; dev->rep[REP_PERIOD] = HZ/33;
INIT_LIST_HEAD(&dev->h_list); INIT_LIST_HEAD(&dev->h_list);
list_add_tail(&dev->node,&input_dev_list); list_add_tail(&dev->node, &input_dev_list);
list_for_each_entry(handler, &input_handler_list, node) list_for_each_entry(handler, &input_handler_list, node)
if ((id = input_match_device(handler->id_table, dev))) if ((id = input_match_device(handler->id_table, dev)))
...@@ -471,7 +471,7 @@ void input_register_handler(struct input_handler *handler) ...@@ -471,7 +471,7 @@ void input_register_handler(struct input_handler *handler)
if (handler->fops != NULL) if (handler->fops != NULL)
input_table[handler->minor >> 5] = handler; input_table[handler->minor >> 5] = handler;
list_add_tail(&handler->node,&input_handler_list); list_add_tail(&handler->node, &input_handler_list);
list_for_each_entry(dev, &input_dev_list, node) list_for_each_entry(dev, &input_dev_list, node)
if ((id = input_match_device(handler->id_table, dev))) if ((id = input_match_device(handler->id_table, dev)))
......
...@@ -332,7 +332,8 @@ static int atkbd_set_3(struct atkbd *atkbd) ...@@ -332,7 +332,8 @@ static int atkbd_set_3(struct atkbd *atkbd)
* Try to set the set we want. * Try to set the set we want.
*/ */
if (atkbd_command(atkbd, &atkbd_set, ATKBD_CMD_SSCANSET)) param[0] = atkbd_set;
if (atkbd_command(atkbd, param, ATKBD_CMD_SSCANSET))
return 2; return 2;
/* /*
......
...@@ -215,6 +215,8 @@ static int mousedev_release(struct inode * inode, struct file * file) ...@@ -215,6 +215,8 @@ static int mousedev_release(struct inode * inode, struct file * file)
static int mousedev_open(struct inode * inode, struct file * file) static int mousedev_open(struct inode * inode, struct file * file)
{ {
struct mousedev_list *list; struct mousedev_list *list;
struct input_handle *handle;
struct mousedev *mousedev;
int i; int i;
#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
...@@ -237,19 +239,14 @@ static int mousedev_open(struct inode * inode, struct file * file) ...@@ -237,19 +239,14 @@ static int mousedev_open(struct inode * inode, struct file * file)
if (!list->mousedev->open++) { if (!list->mousedev->open++) {
if (list->mousedev->minor == MOUSEDEV_MIX) { if (list->mousedev->minor == MOUSEDEV_MIX) {
struct list_head * node; list_for_each_entry(handle, &mousedev_handler.h_list, h_node) {
list_for_each(node,&mousedev_handler.h_list) { mousedev = handle->private;
struct input_handle *handle = to_handle_h(node); if (!mousedev->open && mousedev->exist)
struct mousedev *mousedev = handle->private; input_open_device(handle);
if (!mousedev->open)
if (mousedev->exist)
input_open_device(handle);
} }
} else { } else
if (!mousedev_mix.open) if (!mousedev_mix.open && list->mousedev->exist)
if (list->mousedev->exist) input_open_device(&list->mousedev->handle);
input_open_device(&list->mousedev->handle);
}
} }
return 0; return 0;
...@@ -496,6 +493,7 @@ static int __init mousedev_init(void) ...@@ -496,6 +493,7 @@ static int __init mousedev_init(void)
input_register_handler(&mousedev_handler); input_register_handler(&mousedev_handler);
memset(&mousedev_mix, 0, sizeof(struct mousedev)); memset(&mousedev_mix, 0, sizeof(struct mousedev));
INIT_LIST_HEAD(&mousedev_mix.list);
init_waitqueue_head(&mousedev_mix.wait); init_waitqueue_head(&mousedev_mix.wait);
mousedev_table[MOUSEDEV_MIX] = &mousedev_mix; mousedev_table[MOUSEDEV_MIX] = &mousedev_mix;
mousedev_mix.exist = 1; mousedev_mix.exist = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment