aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-05-31 11:38:04 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-05-31 11:38:11 -0400
commitd330f93595a4eb100118c8af50012d6b0dc559e3 (patch)
tree9104716c2ca93a9eac8cfccc0e489c43857d3ae9 /drivers/s390
parente11f0d04c6bc6bcf301bc60c060c4ac346e61885 (diff)
[S390] raw3270: use mutex instead of semaphore
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/char/raw3270.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c
index f6ef90ee3e7d..743944ad61ec 100644
--- a/drivers/s390/char/raw3270.c
+++ b/drivers/s390/char/raw3270.c
@@ -487,7 +487,7 @@ struct raw3270_ua { /* Query Reply structure for Usable Area */
487} __attribute__ ((packed)); 487} __attribute__ ((packed));
488 488
489static struct diag210 raw3270_init_diag210; 489static struct diag210 raw3270_init_diag210;
490static DECLARE_MUTEX(raw3270_init_sem); 490static DEFINE_MUTEX(raw3270_init_mutex);
491 491
492static int 492static int
493raw3270_init_irq(struct raw3270_view *view, struct raw3270_request *rq, 493raw3270_init_irq(struct raw3270_view *view, struct raw3270_request *rq,
@@ -713,7 +713,7 @@ raw3270_size_device(struct raw3270 *rp)
713{ 713{
714 int rc; 714 int rc;
715 715
716 down(&raw3270_init_sem); 716 mutex_lock(&raw3270_init_mutex);
717 rp->view = &raw3270_init_view; 717 rp->view = &raw3270_init_view;
718 raw3270_init_view.dev = rp; 718 raw3270_init_view.dev = rp;
719 if (MACHINE_IS_VM) 719 if (MACHINE_IS_VM)
@@ -722,7 +722,7 @@ raw3270_size_device(struct raw3270 *rp)
722 rc = __raw3270_size_device(rp); 722 rc = __raw3270_size_device(rp);
723 raw3270_init_view.dev = NULL; 723 raw3270_init_view.dev = NULL;
724 rp->view = NULL; 724 rp->view = NULL;
725 up(&raw3270_init_sem); 725 mutex_unlock(&raw3270_init_mutex);
726 if (rc == 0) { /* Found something. */ 726 if (rc == 0) { /* Found something. */
727 /* Try to find a model. */ 727 /* Try to find a model. */
728 rp->model = 0; 728 rp->model = 0;
@@ -749,7 +749,7 @@ raw3270_reset_device(struct raw3270 *rp)
749{ 749{
750 int rc; 750 int rc;
751 751
752 down(&raw3270_init_sem); 752 mutex_lock(&raw3270_init_mutex);
753 memset(&rp->init_request, 0, sizeof(rp->init_request)); 753 memset(&rp->init_request, 0, sizeof(rp->init_request));
754 memset(&rp->init_data, 0, sizeof(rp->init_data)); 754 memset(&rp->init_data, 0, sizeof(rp->init_data));
755 /* Store reset data stream to init_data/init_request */ 755 /* Store reset data stream to init_data/init_request */
@@ -764,7 +764,7 @@ raw3270_reset_device(struct raw3270 *rp)
764 rc = raw3270_start_init(rp, &raw3270_init_view, &rp->init_request); 764 rc = raw3270_start_init(rp, &raw3270_init_view, &rp->init_request);
765 raw3270_init_view.dev = NULL; 765 raw3270_init_view.dev = NULL;
766 rp->view = NULL; 766 rp->view = NULL;
767 up(&raw3270_init_sem); 767 mutex_unlock(&raw3270_init_mutex);
768 return rc; 768 return rc;
769} 769}
770 770