diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/cio/cio.h | 2 | ||||
-rw-r--r-- | drivers/s390/cio/device.c | 23 |
2 files changed, 6 insertions, 19 deletions
diff --git a/drivers/s390/cio/cio.h b/drivers/s390/cio/cio.h index 883e19d83e4..2e43558c704 100644 --- a/drivers/s390/cio/cio.h +++ b/drivers/s390/cio/cio.h | |||
@@ -133,13 +133,11 @@ extern int cio_is_console(struct subchannel_id); | |||
133 | extern struct subchannel *cio_get_console_subchannel(void); | 133 | extern struct subchannel *cio_get_console_subchannel(void); |
134 | extern spinlock_t * cio_get_console_lock(void); | 134 | extern spinlock_t * cio_get_console_lock(void); |
135 | extern void *cio_get_console_priv(void); | 135 | extern void *cio_get_console_priv(void); |
136 | extern const char *cio_get_console_cdev_name(struct subchannel *sch); | ||
137 | #else | 136 | #else |
138 | #define cio_is_console(schid) 0 | 137 | #define cio_is_console(schid) 0 |
139 | #define cio_get_console_subchannel() NULL | 138 | #define cio_get_console_subchannel() NULL |
140 | #define cio_get_console_lock() NULL | 139 | #define cio_get_console_lock() NULL |
141 | #define cio_get_console_priv() NULL | 140 | #define cio_get_console_priv() NULL |
142 | #define cio_get_console_cdev_name(sch) NULL | ||
143 | #endif | 141 | #endif |
144 | 142 | ||
145 | #endif | 143 | #endif |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 345a61f45a5..0f95405c2c5 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -669,8 +669,12 @@ static int ccw_device_register(struct ccw_device *cdev) | |||
669 | int ret; | 669 | int ret; |
670 | 670 | ||
671 | dev->bus = &ccw_bus_type; | 671 | dev->bus = &ccw_bus_type; |
672 | 672 | ret = dev_set_name(&cdev->dev, "0.%x.%04x", cdev->private->dev_id.ssid, | |
673 | if ((ret = device_add(dev))) | 673 | cdev->private->dev_id.devno); |
674 | if (ret) | ||
675 | return ret; | ||
676 | ret = device_add(dev); | ||
677 | if (ret) | ||
674 | return ret; | 678 | return ret; |
675 | 679 | ||
676 | set_bit(1, &cdev->private->registered); | 680 | set_bit(1, &cdev->private->registered); |
@@ -1124,13 +1128,6 @@ io_subchannel_recog(struct ccw_device *cdev, struct subchannel *sch) | |||
1124 | init_waitqueue_head(&priv->wait_q); | 1128 | init_waitqueue_head(&priv->wait_q); |
1125 | init_timer(&priv->timer); | 1129 | init_timer(&priv->timer); |
1126 | 1130 | ||
1127 | /* Set an initial name for the device. */ | ||
1128 | if (cio_is_console(sch->schid)) | ||
1129 | cdev->dev.init_name = cio_get_console_cdev_name(sch); | ||
1130 | else | ||
1131 | dev_set_name(&cdev->dev, "0.%x.%04x", | ||
1132 | sch->schid.ssid, sch->schib.pmcw.dev); | ||
1133 | |||
1134 | /* Increase counter of devices currently in recognition. */ | 1131 | /* Increase counter of devices currently in recognition. */ |
1135 | atomic_inc(&ccw_device_init_count); | 1132 | atomic_inc(&ccw_device_init_count); |
1136 | 1133 | ||
@@ -1731,7 +1728,6 @@ static int io_subchannel_sch_event(struct subchannel *sch, int slow) | |||
1731 | 1728 | ||
1732 | #ifdef CONFIG_CCW_CONSOLE | 1729 | #ifdef CONFIG_CCW_CONSOLE |
1733 | static struct ccw_device console_cdev; | 1730 | static struct ccw_device console_cdev; |
1734 | static char console_cdev_name[10] = "0.x.xxxx"; | ||
1735 | static struct ccw_device_private console_private; | 1731 | static struct ccw_device_private console_private; |
1736 | static int console_cdev_in_use; | 1732 | static int console_cdev_in_use; |
1737 | 1733 | ||
@@ -1815,13 +1811,6 @@ int ccw_device_force_console(void) | |||
1815 | return ccw_device_pm_restore(&console_cdev.dev); | 1811 | return ccw_device_pm_restore(&console_cdev.dev); |
1816 | } | 1812 | } |
1817 | EXPORT_SYMBOL_GPL(ccw_device_force_console); | 1813 | EXPORT_SYMBOL_GPL(ccw_device_force_console); |
1818 | |||
1819 | const char *cio_get_console_cdev_name(struct subchannel *sch) | ||
1820 | { | ||
1821 | snprintf(console_cdev_name, 10, "0.%x.%04x", | ||
1822 | sch->schid.ssid, sch->schib.pmcw.dev); | ||
1823 | return (const char *)console_cdev_name; | ||
1824 | } | ||
1825 | #endif | 1814 | #endif |
1826 | 1815 | ||
1827 | /* | 1816 | /* |