summaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/zcrypt_pcixcc.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2015-08-17 07:59:47 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-08-19 10:40:26 +0200
commite4e1899aaec0370aea6b98597ee6289d60544ae2 (patch)
treea25d5c833d1f0d00a5ab87e2c50c205ee11e765e /drivers/s390/crypto/zcrypt_pcixcc.c
parents390/hmcdrv: fix interrupt registration (diff)
downloadlinux-e4e1899aaec0370aea6b98597ee6289d60544ae2.tar.xz
linux-e4e1899aaec0370aea6b98597ee6289d60544ae2.zip
s390/zcrypt: use msleep() instead of mdelay()
There is no need to busy loop and monopolize a cpu for up to ~2 seconds. The code in question that calls mdelay() is preemptible anyway, so better let the kernel schedule different processes than just looping and causing unnecessary delays. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_pcixcc.c')
-rw-r--r--drivers/s390/crypto/zcrypt_pcixcc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/crypto/zcrypt_pcixcc.c b/drivers/s390/crypto/zcrypt_pcixcc.c
index 899ffa19f5ec..f41852768953 100644
--- a/drivers/s390/crypto/zcrypt_pcixcc.c
+++ b/drivers/s390/crypto/zcrypt_pcixcc.c
@@ -182,7 +182,7 @@ static int zcrypt_pcixcc_mcl(struct ap_device *ap_dev)
/* Wait for the test message to complete. */
for (i = 0; i < 6; i++) {
- mdelay(300);
+ msleep(300);
rc = ap_recv(ap_dev->qid, &psmid, reply, 4096);
if (rc == 0 && psmid == 0x0102030405060708ULL)
break;