diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2008-10-10 15:33:14 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-10-10 15:33:53 -0400 |
commit | 1f4e7edabc4071cdff0133e7e04db2d7287d0e36 (patch) | |
tree | 751f447ad52286205502e255d46106e68cb20bf0 /drivers/s390/cio | |
parent | 9286b7ed682615c1508210f85d26e4c9a5cbf126 (diff) |
[S390] bus_id -> dev_set_name() for css and ccw busses
Convert remaining s390 users setting bus_id to dev_set_name()
or init_name.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r-- | drivers/s390/cio/cio.c | 13 | ||||
-rw-r--r-- | drivers/s390/cio/cio.h | 4 | ||||
-rw-r--r-- | drivers/s390/cio/device.c | 16 |
3 files changed, 29 insertions, 4 deletions
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 8759912734e0..719d6c406e97 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
@@ -571,8 +571,10 @@ int cio_validate_subchannel(struct subchannel *sch, struct subchannel_id schid) | |||
571 | } | 571 | } |
572 | mutex_init(&sch->reg_mutex); | 572 | mutex_init(&sch->reg_mutex); |
573 | /* Set a name for the subchannel */ | 573 | /* Set a name for the subchannel */ |
574 | snprintf (sch->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x", schid.ssid, | 574 | if (cio_is_console(schid)) |
575 | schid.sch_no); | 575 | sch->dev.init_name = cio_get_console_sch_name(schid); |
576 | else | ||
577 | dev_set_name(&sch->dev, "0.%x.%04x", schid.ssid, schid.sch_no); | ||
576 | 578 | ||
577 | /* | 579 | /* |
578 | * The first subchannel that is not-operational (ccode==3) | 580 | * The first subchannel that is not-operational (ccode==3) |
@@ -677,6 +679,7 @@ do_IRQ (struct pt_regs *regs) | |||
677 | 679 | ||
678 | #ifdef CONFIG_CCW_CONSOLE | 680 | #ifdef CONFIG_CCW_CONSOLE |
679 | static struct subchannel console_subchannel; | 681 | static struct subchannel console_subchannel; |
682 | static char console_sch_name[10] = "0.x.xxxx"; | ||
680 | static struct io_subchannel_private console_priv; | 683 | static struct io_subchannel_private console_priv; |
681 | static int console_subchannel_in_use; | 684 | static int console_subchannel_in_use; |
682 | 685 | ||
@@ -827,6 +830,12 @@ cio_get_console_subchannel(void) | |||
827 | return &console_subchannel; | 830 | return &console_subchannel; |
828 | } | 831 | } |
829 | 832 | ||
833 | const char *cio_get_console_sch_name(struct subchannel_id schid) | ||
834 | { | ||
835 | snprintf(console_sch_name, 10, "0.%x.%04x", schid.ssid, schid.sch_no); | ||
836 | return (const char *)console_sch_name; | ||
837 | } | ||
838 | |||
830 | #endif | 839 | #endif |
831 | static int | 840 | static int |
832 | __disable_subchannel_easy(struct subchannel_id schid, struct schib *schib) | 841 | __disable_subchannel_easy(struct subchannel_id schid, struct schib *schib) |
diff --git a/drivers/s390/cio/cio.h b/drivers/s390/cio/cio.h index 3b236d20e835..0fb24784e925 100644 --- a/drivers/s390/cio/cio.h +++ b/drivers/s390/cio/cio.h | |||
@@ -117,11 +117,15 @@ extern int cio_is_console(struct subchannel_id); | |||
117 | extern struct subchannel *cio_get_console_subchannel(void); | 117 | extern struct subchannel *cio_get_console_subchannel(void); |
118 | extern spinlock_t * cio_get_console_lock(void); | 118 | extern spinlock_t * cio_get_console_lock(void); |
119 | extern void *cio_get_console_priv(void); | 119 | extern void *cio_get_console_priv(void); |
120 | extern const char *cio_get_console_sch_name(struct subchannel_id schid); | ||
121 | extern const char *cio_get_console_cdev_name(struct subchannel *sch); | ||
120 | #else | 122 | #else |
121 | #define cio_is_console(schid) 0 | 123 | #define cio_is_console(schid) 0 |
122 | #define cio_get_console_subchannel() NULL | 124 | #define cio_get_console_subchannel() NULL |
123 | #define cio_get_console_lock() NULL | 125 | #define cio_get_console_lock() NULL |
124 | #define cio_get_console_priv() NULL | 126 | #define cio_get_console_priv() NULL |
127 | #define cio_get_console_sch_name(schid) NULL | ||
128 | #define cio_get_console_cdev_name(sch) NULL | ||
125 | #endif | 129 | #endif |
126 | 130 | ||
127 | #endif | 131 | #endif |
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 |
1627 | static struct ccw_device console_cdev; | 1630 | static struct ccw_device console_cdev; |
1631 | static char console_cdev_name[10] = "0.x.xxxx"; | ||
1628 | static struct ccw_device_private console_private; | 1632 | static struct ccw_device_private console_private; |
1629 | static int console_cdev_in_use; | 1633 | static 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 | |||
1704 | const 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 | /* |