summaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/sclp_chp.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2007-07-10 11:24:10 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-07-10 11:24:43 +0200
commit83119ad4a1ceacd99f380086c2855ae2c4268afc (patch)
tree6da1d5cdba6e5bcd8fcdf5332700e8353b4e79a8 /drivers/s390/char/sclp_chp.c
parent05dd25307ca67cbfa0207bbba2e6c79fa97d125b (diff)
downloadlinux-83119ad4a1ceacd99f380086c2855ae2c4268afc.tar.gz
linux-83119ad4a1ceacd99f380086c2855ae2c4268afc.tar.bz2
linux-83119ad4a1ceacd99f380086c2855ae2c4268afc.zip
[S390] sclp: Test facility list before executing a service call.
Check if a command is available before executing. Saves some superfluous service calls that won't succeed anyway. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/sclp_chp.c')
-rw-r--r--drivers/s390/char/sclp_chp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/s390/char/sclp_chp.c b/drivers/s390/char/sclp_chp.c
index a66b914519b5..c68f5e7e63a0 100644
--- a/drivers/s390/char/sclp_chp.c
+++ b/drivers/s390/char/sclp_chp.c
@@ -55,6 +55,8 @@ static int do_configure(sclp_cmdw_t cmd)
struct chp_cfg_data *data;
int rc;
+ if (!SCLP_HAS_CHP_RECONFIG)
+ return -EOPNOTSUPP;
/* Prepare sccb. */
data = (struct chp_cfg_data *) get_zeroed_page(GFP_KERNEL | GFP_DMA);
if (!data)
@@ -152,6 +154,8 @@ int sclp_chp_read_info(struct sclp_chp_info *info)
struct chp_info_data *data;
int rc;
+ if (!SCLP_HAS_CHP_INFO)
+ return -EOPNOTSUPP;
/* Prepare sccb. */
data = (struct chp_info_data *) get_zeroed_page(GFP_KERNEL | GFP_DMA);
if (!data)