summaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/css.c
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2010-04-22 17:17:03 +0200
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-04-22 17:17:19 +0200
commit818c272bd74b834c3ca9347c6a540c2ec880afdc (patch)
treece5353ca2f9b0786096508ff218f2615ecb06807 /drivers/s390/cio/css.c
parent6a5176c474e3e722ab273d940442238e554e5e58 (diff)
downloadlinux-818c272bd74b834c3ca9347c6a540c2ec880afdc.tar.bz2
[S390] cio: allow enable_facility from outside init functions
Prepare chsc_enable_facility to be used from outside init functions. Use static memory for the chsc call and protect its access by a spinlock (although there is no concurrent usage). Cc: <stable@kernel.org> 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/css.c')
-rw-r--r--drivers/s390/cio/css.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
index 2769da54f2b9..19635d47dede 100644
--- a/drivers/s390/cio/css.c
+++ b/drivers/s390/cio/css.c
@@ -870,15 +870,10 @@ static int __init css_bus_init(void)
/* Try to enable MSS. */
ret = chsc_enable_facility(CHSC_SDA_OC_MSS);
- switch (ret) {
- case 0: /* Success. */
- max_ssid = __MAX_SSID;
- break;
- case -ENOMEM:
- goto out;
- default:
+ if (ret)
max_ssid = 0;
- }
+ else /* Success. */
+ max_ssid = __MAX_SSID;
ret = slow_subchannel_init();
if (ret)