diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2013-04-13 13:03:54 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-04-17 14:07:32 +0200 |
commit | 14556b33f2a5d6a3bc75cd33b709452a31555b25 (patch) | |
tree | ae937b86290af27d01e2ea5fd0b660f86a1a40a4 /drivers/s390/cio/cio.c | |
parent | s390/cio: get rid of static console device (diff) | |
download | linux-dev-14556b33f2a5d6a3bc75cd33b709452a31555b25.tar.xz linux-dev-14556b33f2a5d6a3bc75cd33b709452a31555b25.zip |
s390/css: introduce cio_register_early_subchannels
Use cio_register_early_subchannels to register early subchannels
which are already in use. Call this function before we do the
actual subchannel scanning loop. This helps us to get rid of some
more special cases regarding the console subchannel.
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>
Diffstat (limited to 'drivers/s390/cio/cio.c')
-rw-r--r-- | drivers/s390/cio/cio.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index ab99500604b7..3ab99d883888 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c @@ -749,9 +749,16 @@ int cio_is_console(struct subchannel_id schid) return schid_equal(&schid, &console_sch->schid); } -struct subchannel *cio_get_console_subchannel(void) +void cio_register_early_subchannels(void) { - return console_sch; + int ret; + + if (!console_sch) + return; + + ret = css_register_subchannel(console_sch); + if (ret) + put_device(&console_sch->dev); } #endif /* CONFIG_CCW_CONSOLE */ |