s390/cio: ccw_device_force_console don't use static variable
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Sat, 13 Apr 2013 10:56:51 +0000 (12:56 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 17 Apr 2013 12:07:31 +0000 (14:07 +0200)
force_console is used to wake up the CCW based console device to
print a panic message in case something goes wrong in a suspend
or resume cycle. Stop using the static console_subchannel and add
a parameter to this function to specify which ccw device we have
to wake up.

Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/ccwdev.h
drivers/s390/char/con3215.c
drivers/s390/char/raw3270.c
drivers/s390/cio/device.c

index cb56fb6cff7ef63d2efc824b93491a6ee734ba59..f201af8be580ddc876de2f5de96952aaaf493cb5 100644 (file)
@@ -221,7 +221,7 @@ extern void ccw_device_get_id(struct ccw_device *, struct ccw_dev_id *);
 
 extern struct ccw_device *ccw_device_probe_console(void);
 extern void ccw_device_wait_idle(struct ccw_device *);
-extern int ccw_device_force_console(void);
+extern int ccw_device_force_console(struct ccw_device *);
 
 int ccw_device_siosl(struct ccw_device *);
 
index 0d79eec799f1c14b3f08f487f16fd04456913e70..eb5d22795c47a55744381ee3f9e70c1666701835 100644 (file)
@@ -858,7 +858,7 @@ static void con3215_flush(void)
        raw = raw3215[0];  /* console 3215 is the first one */
        if (raw->port.flags & ASYNC_SUSPENDED)
                /* The console is still frozen for suspend. */
-               if (ccw_device_force_console())
+               if (ccw_device_force_console(raw->cdev))
                        /* Forcing didn't work, no panic message .. */
                        return;
        spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
index 383d6432a1a87ddac74a94be16be8b120fea6dea..24a08e8f19e1b9ed3366b5f035d4a0fd214bf97e 100644 (file)
@@ -1274,7 +1274,7 @@ void raw3270_pm_unfreeze(struct raw3270_view *view)
 
        rp = view->dev;
        if (rp && test_bit(RAW3270_FLAGS_FROZEN, &rp->flags))
-               ccw_device_force_console();
+               ccw_device_force_console(rp->cdev);
 #endif
 }
 
index 2e1e9086e9167e46e03d2281e7fba4bd1c5225ec..6ac0066d3158f97360574791c1d9ed2a6734ab46 100644 (file)
@@ -1680,11 +1680,9 @@ void ccw_device_wait_idle(struct ccw_device *cdev)
 
 static int ccw_device_pm_restore(struct device *dev);
 
-int ccw_device_force_console(void)
+int ccw_device_force_console(struct ccw_device *cdev)
 {
-       if (!console_cdev_in_use)
-               return -ENODEV;
-       return ccw_device_pm_restore(&console_cdev.dev);
+       return ccw_device_pm_restore(&cdev->dev);
 }
 EXPORT_SYMBOL_GPL(ccw_device_force_console);
 #endif