Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157464
b: refs/heads/master
c: 95f1556
h: refs/heads/master
v: v3
  • Loading branch information
Felix Beck authored and Martin Schwidefsky committed Sep 11, 2009
1 parent ef20111 commit 49bc039
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 99b5e2d3d7ae8f5a2dba7a41a02ba7eb25523b3f
refs/heads/master: 95f1556c35529a162cef50296f3dc7f978852048
8 changes: 6 additions & 2 deletions trunk/drivers/s390/crypto/ap_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,9 @@ static int ap_bus_suspend(struct device *dev, pm_message_t state)
/* Poll on the device until all requests are finished. */
do {
flags = 0;
spin_lock_bh(&ap_dev->lock);
__ap_poll_device(ap_dev, &flags);
spin_unlock_bh(&ap_dev->lock);
} while ((flags & 1) || (flags & 2));

ap_device_remove(dev);
Expand Down Expand Up @@ -1407,14 +1409,12 @@ static void ap_reset(struct ap_device *ap_dev)

static int __ap_poll_device(struct ap_device *ap_dev, unsigned long *flags)
{
spin_lock(&ap_dev->lock);
if (!ap_dev->unregistered) {
if (ap_poll_queue(ap_dev, flags))
ap_dev->unregistered = 1;
if (ap_dev->reset == AP_RESET_DO)
ap_reset(ap_dev);
}
spin_unlock(&ap_dev->lock);
return 0;
}

Expand All @@ -1441,7 +1441,9 @@ static void ap_poll_all(unsigned long dummy)
flags = 0;
spin_lock(&ap_device_list_lock);
list_for_each_entry(ap_dev, &ap_device_list, list) {
spin_lock(&ap_dev->lock);
__ap_poll_device(ap_dev, &flags);
spin_unlock(&ap_dev->lock);
}
spin_unlock(&ap_device_list_lock);
} while (flags & 1);
Expand Down Expand Up @@ -1487,7 +1489,9 @@ static int ap_poll_thread(void *data)
flags = 0;
spin_lock_bh(&ap_device_list_lock);
list_for_each_entry(ap_dev, &ap_device_list, list) {
spin_lock(&ap_dev->lock);
__ap_poll_device(ap_dev, &flags);
spin_unlock(&ap_dev->lock);
}
spin_unlock_bh(&ap_device_list_lock);
}
Expand Down

0 comments on commit 49bc039

Please sign in to comment.