Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334091
b: refs/heads/master
c: 3376b8b
h: refs/heads/master
i:
  334089: 8ce7f94
  334087: f797016
v: v3
  • Loading branch information
Dmitry Torokhov committed Oct 8, 2012
1 parent 969e832 commit ee0eca2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c74585eccbef8fbdac494bfb2abb768aab886d3
refs/heads/master: 3376b8b753bcc300c4f1b170d01c2fb472889a3d
16 changes: 8 additions & 8 deletions trunk/drivers/input/mousedev.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct mousedev {
bool exist;

struct list_head mixdev_node;
int mixdev_open;
bool opened_by_mixdev;

struct mousedev_hw_data packet;
unsigned int pkt_count;
Expand Down Expand Up @@ -469,11 +469,11 @@ static void mixdev_open_devices(void)
return;

list_for_each_entry(mousedev, &mousedev_mix_list, mixdev_node) {
if (!mousedev->mixdev_open) {
if (!mousedev->opened_by_mixdev) {
if (mousedev_open_device(mousedev))
continue;

mousedev->mixdev_open = 1;
mousedev->opened_by_mixdev = true;
}
}
}
Expand All @@ -491,8 +491,8 @@ static void mixdev_close_devices(void)
return;

list_for_each_entry(mousedev, &mousedev_mix_list, mixdev_node) {
if (mousedev->mixdev_open) {
mousedev->mixdev_open = 0;
if (mousedev->opened_by_mixdev) {
mousedev->opened_by_mixdev = false;
mousedev_close_device(mousedev);
}
}
Expand Down Expand Up @@ -935,7 +935,7 @@ static int mixdev_add_device(struct mousedev *mousedev)
if (retval)
goto out;

mousedev->mixdev_open = 1;
mousedev->opened_by_mixdev = true;
}

get_device(&mousedev->dev);
Expand All @@ -950,8 +950,8 @@ static void mixdev_remove_device(struct mousedev *mousedev)
{
mutex_lock(&mousedev_mix->mutex);

if (mousedev->mixdev_open) {
mousedev->mixdev_open = 0;
if (mousedev->opened_by_mixdev) {
mousedev->opened_by_mixdev = false;
mousedev_close_device(mousedev);
}

Expand Down

0 comments on commit ee0eca2

Please sign in to comment.