aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2013-04-13 06:56:51 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-04-17 08:07:31 -0400
commitf10ccca7a555f5e80ed7ecff58e7dfdab03860da (patch)
tree1b6255b840b1f3bbcc25cc3129bc004c655fe2e5
parent188561a462d3b82451d6ba09e2e32c9ba2c9938c (diff)
s390/cio: ccw_device_force_console don't use static variable
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>
-rw-r--r--arch/s390/include/asm/ccwdev.h2
-rw-r--r--drivers/s390/char/con3215.c2
-rw-r--r--drivers/s390/char/raw3270.c2
-rw-r--r--drivers/s390/cio/device.c6
4 files changed, 5 insertions, 7 deletions
diff --git a/arch/s390/include/asm/ccwdev.h b/arch/s390/include/asm/ccwdev.h
index cb56fb6cff7e..f201af8be580 100644
--- a/arch/s390/include/asm/ccwdev.h
+++ b/arch/s390/include/asm/ccwdev.h
@@ -221,7 +221,7 @@ extern void ccw_device_get_id(struct ccw_device *, struct ccw_dev_id *);
221 221
222extern struct ccw_device *ccw_device_probe_console(void); 222extern struct ccw_device *ccw_device_probe_console(void);
223extern void ccw_device_wait_idle(struct ccw_device *); 223extern void ccw_device_wait_idle(struct ccw_device *);
224extern int ccw_device_force_console(void); 224extern int ccw_device_force_console(struct ccw_device *);
225 225
226int ccw_device_siosl(struct ccw_device *); 226int ccw_device_siosl(struct ccw_device *);
227 227
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
index 0d79eec799f1..eb5d22795c47 100644
--- a/drivers/s390/char/con3215.c
+++ b/drivers/s390/char/con3215.c
@@ -858,7 +858,7 @@ static void con3215_flush(void)
858 raw = raw3215[0]; /* console 3215 is the first one */ 858 raw = raw3215[0]; /* console 3215 is the first one */
859 if (raw->port.flags & ASYNC_SUSPENDED) 859 if (raw->port.flags & ASYNC_SUSPENDED)
860 /* The console is still frozen for suspend. */ 860 /* The console is still frozen for suspend. */
861 if (ccw_device_force_console()) 861 if (ccw_device_force_console(raw->cdev))
862 /* Forcing didn't work, no panic message .. */ 862 /* Forcing didn't work, no panic message .. */
863 return; 863 return;
864 spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); 864 spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c
index 383d6432a1a8..24a08e8f19e1 100644
--- a/drivers/s390/char/raw3270.c
+++ b/drivers/s390/char/raw3270.c
@@ -1274,7 +1274,7 @@ void raw3270_pm_unfreeze(struct raw3270_view *view)
1274 1274
1275 rp = view->dev; 1275 rp = view->dev;
1276 if (rp && test_bit(RAW3270_FLAGS_FROZEN, &rp->flags)) 1276 if (rp && test_bit(RAW3270_FLAGS_FROZEN, &rp->flags))
1277 ccw_device_force_console(); 1277 ccw_device_force_console(rp->cdev);
1278#endif 1278#endif
1279} 1279}
1280 1280
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 2e1e9086e916..6ac0066d3158 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -1680,11 +1680,9 @@ void ccw_device_wait_idle(struct ccw_device *cdev)
1680 1680
1681static int ccw_device_pm_restore(struct device *dev); 1681static int ccw_device_pm_restore(struct device *dev);
1682 1682
1683int ccw_device_force_console(void) 1683int ccw_device_force_console(struct ccw_device *cdev)
1684{ 1684{
1685 if (!console_cdev_in_use) 1685 return ccw_device_pm_restore(&cdev->dev);
1686 return -ENODEV;
1687 return ccw_device_pm_restore(&console_cdev.dev);
1688} 1686}
1689EXPORT_SYMBOL_GPL(ccw_device_force_console); 1687EXPORT_SYMBOL_GPL(ccw_device_force_console);
1690#endif 1688#endif