aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r--drivers/s390/cio/device.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index e644fd6905ee..9a31239fe028 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -774,9 +774,9 @@ io_subchannel_register(struct work_struct *work)
774 printk (KERN_WARNING "%s: could not register %s\n", 774 printk (KERN_WARNING "%s: could not register %s\n",
775 __func__, cdev->dev.bus_id); 775 __func__, cdev->dev.bus_id);
776 put_device(&cdev->dev); 776 put_device(&cdev->dev);
777 spin_lock_irqsave(&sch->lock, flags); 777 spin_lock_irqsave(sch->lock, flags);
778 sch->dev.driver_data = NULL; 778 sch->dev.driver_data = NULL;
779 spin_unlock_irqrestore(&sch->lock, flags); 779 spin_unlock_irqrestore(sch->lock, flags);
780 kfree (cdev->private); 780 kfree (cdev->private);
781 kfree (cdev); 781 kfree (cdev);
782 put_device(&sch->dev); 782 put_device(&sch->dev);
@@ -860,7 +860,7 @@ io_subchannel_recog(struct ccw_device *cdev, struct subchannel *sch)
860 860
861 sch->dev.driver_data = cdev; 861 sch->dev.driver_data = cdev;
862 sch->driver = &io_subchannel_driver; 862 sch->driver = &io_subchannel_driver;
863 cdev->ccwlock = &sch->lock; 863 cdev->ccwlock = sch->lock;
864 864
865 /* Init private data. */ 865 /* Init private data. */
866 priv = cdev->private; 866 priv = cdev->private;
@@ -880,9 +880,9 @@ io_subchannel_recog(struct ccw_device *cdev, struct subchannel *sch)
880 atomic_inc(&ccw_device_init_count); 880 atomic_inc(&ccw_device_init_count);
881 881
882 /* Start async. device sensing. */ 882 /* Start async. device sensing. */
883 spin_lock_irq(&sch->lock); 883 spin_lock_irq(sch->lock);
884 rc = ccw_device_recognition(cdev); 884 rc = ccw_device_recognition(cdev);
885 spin_unlock_irq(&sch->lock); 885 spin_unlock_irq(sch->lock);
886 if (rc) { 886 if (rc) {
887 if (atomic_dec_and_test(&ccw_device_init_count)) 887 if (atomic_dec_and_test(&ccw_device_init_count))
888 wake_up(&ccw_device_init_wq); 888 wake_up(&ccw_device_init_wq);
@@ -924,9 +924,9 @@ io_subchannel_probe (struct subchannel *sch)
924 924
925 rc = io_subchannel_recog(cdev, sch); 925 rc = io_subchannel_recog(cdev, sch);
926 if (rc) { 926 if (rc) {
927 spin_lock_irqsave(&sch->lock, flags); 927 spin_lock_irqsave(sch->lock, flags);
928 sch->dev.driver_data = NULL; 928 sch->dev.driver_data = NULL;
929 spin_unlock_irqrestore(&sch->lock, flags); 929 spin_unlock_irqrestore(sch->lock, flags);
930 if (cdev->dev.release) 930 if (cdev->dev.release)
931 cdev->dev.release(&cdev->dev); 931 cdev->dev.release(&cdev->dev);
932 } 932 }
@@ -1036,6 +1036,13 @@ static struct ccw_device console_cdev;
1036static struct ccw_device_private console_private; 1036static struct ccw_device_private console_private;
1037static int console_cdev_in_use; 1037static int console_cdev_in_use;
1038 1038
1039static DEFINE_SPINLOCK(ccw_console_lock);
1040
1041spinlock_t * cio_get_console_lock(void)
1042{
1043 return &ccw_console_lock;
1044}
1045
1039static int 1046static int
1040ccw_device_console_enable (struct ccw_device *cdev, struct subchannel *sch) 1047ccw_device_console_enable (struct ccw_device *cdev, struct subchannel *sch)
1041{ 1048{