aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/crypto')
-rw-r--r--drivers/s390/crypto/ap_bus.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index a817dade37c..bf37cdf43fa 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -505,6 +505,9 @@ static int ap_device_remove(struct device *dev)
505 spin_lock_bh(&ap_device_lock); 505 spin_lock_bh(&ap_device_lock);
506 list_del_init(&ap_dev->list); 506 list_del_init(&ap_dev->list);
507 spin_unlock_bh(&ap_device_lock); 507 spin_unlock_bh(&ap_device_lock);
508 spin_lock_bh(&ap_dev->lock);
509 atomic_sub(ap_dev->queue_count, &ap_poll_requests);
510 spin_unlock_bh(&ap_dev->lock);
508 return 0; 511 return 0;
509} 512}
510 513
@@ -867,6 +870,7 @@ static int ap_poll_read(struct ap_device *ap_dev, unsigned long *flags)
867 case AP_RESPONSE_NO_PENDING_REPLY: 870 case AP_RESPONSE_NO_PENDING_REPLY:
868 if (status.queue_empty) { 871 if (status.queue_empty) {
869 /* The card shouldn't forget requests but who knows. */ 872 /* The card shouldn't forget requests but who knows. */
873 atomic_sub(ap_dev->queue_count, &ap_poll_requests);
870 ap_dev->queue_count = 0; 874 ap_dev->queue_count = 0;
871 list_splice_init(&ap_dev->pendingq, &ap_dev->requestq); 875 list_splice_init(&ap_dev->pendingq, &ap_dev->requestq);
872 ap_dev->requestq_count += ap_dev->pendingq_count; 876 ap_dev->requestq_count += ap_dev->pendingq_count;