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.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index a8e755a88b01..4e78c82194b4 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -1035,8 +1035,11 @@ io_subchannel_recog(struct ccw_device *cdev, struct subchannel *sch)
1035 init_timer(&priv->timer); 1035 init_timer(&priv->timer);
1036 1036
1037 /* Set an initial name for the device. */ 1037 /* Set an initial name for the device. */
1038 snprintf (cdev->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x", 1038 if (cio_is_console(sch->schid))
1039 sch->schid.ssid, sch->schib.pmcw.dev); 1039 cdev->dev.init_name = cio_get_console_cdev_name(sch);
1040 else
1041 dev_set_name(&cdev->dev, "0.%x.%04x",
1042 sch->schid.ssid, sch->schib.pmcw.dev);
1040 1043
1041 /* Increase counter of devices currently in recognition. */ 1044 /* Increase counter of devices currently in recognition. */
1042 atomic_inc(&ccw_device_init_count); 1045 atomic_inc(&ccw_device_init_count);
@@ -1625,6 +1628,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int slow)
1625 1628
1626#ifdef CONFIG_CCW_CONSOLE 1629#ifdef CONFIG_CCW_CONSOLE
1627static struct ccw_device console_cdev; 1630static struct ccw_device console_cdev;
1631static char console_cdev_name[10] = "0.x.xxxx";
1628static struct ccw_device_private console_private; 1632static struct ccw_device_private console_private;
1629static int console_cdev_in_use; 1633static int console_cdev_in_use;
1630 1634
@@ -1695,6 +1699,14 @@ ccw_device_probe_console(void)
1695 console_cdev.online = 1; 1699 console_cdev.online = 1;
1696 return &console_cdev; 1700 return &console_cdev;
1697} 1701}
1702
1703
1704const char *cio_get_console_cdev_name(struct subchannel *sch)
1705{
1706 snprintf(console_cdev_name, 10, "0.%x.%04x",
1707 sch->schid.ssid, sch->schib.pmcw.dev);
1708 return (const char *)console_cdev_name;
1709}
1698#endif 1710#endif
1699 1711
1700/* 1712/*