diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2008-07-17 11:16:47 -0400 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-07-17 11:22:10 -0400 |
commit | dae39843f478d181da5b5e1c2c703dfcaaf838c1 (patch) | |
tree | 2f546e519c5378ebb99a9953a4323f3ee7a1a78f /drivers | |
parent | b9993a38a9b491a9df48a5bc82d2e03ab44e352a (diff) |
[S390] cio: Export chsc_error_from_response().
Make chsc_error_from_response() available to chsc callers outside
of chsc.c (namely qdio) to avoid duplicating error checking code.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/cio/chsc.c | 9 | ||||
-rw-r--r-- | drivers/s390/cio/chsc.h | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 65264a38057d..29826fdd47b8 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c | |||
@@ -27,7 +27,13 @@ | |||
27 | 27 | ||
28 | static void *sei_page; | 28 | static void *sei_page; |
29 | 29 | ||
30 | static int chsc_error_from_response(int response) | 30 | /** |
31 | * chsc_error_from_response() - convert a chsc response to an error | ||
32 | * @response: chsc response code | ||
33 | * | ||
34 | * Returns an appropriate Linux error code for @response. | ||
35 | */ | ||
36 | int chsc_error_from_response(int response) | ||
31 | { | 37 | { |
32 | switch (response) { | 38 | switch (response) { |
33 | case 0x0001: | 39 | case 0x0001: |
@@ -45,6 +51,7 @@ static int chsc_error_from_response(int response) | |||
45 | return -EIO; | 51 | return -EIO; |
46 | } | 52 | } |
47 | } | 53 | } |
54 | EXPORT_SYMBOL_GPL(chsc_error_from_response); | ||
48 | 55 | ||
49 | struct chsc_ssd_area { | 56 | struct chsc_ssd_area { |
50 | struct chsc_header request; | 57 | struct chsc_header request; |
diff --git a/drivers/s390/cio/chsc.h b/drivers/s390/cio/chsc.h index fb6c4d6c45b4..ba59bceace98 100644 --- a/drivers/s390/cio/chsc.h +++ b/drivers/s390/cio/chsc.h | |||
@@ -101,4 +101,6 @@ void chsc_chp_online(struct chp_id chpid); | |||
101 | void chsc_chp_offline(struct chp_id chpid); | 101 | void chsc_chp_offline(struct chp_id chpid); |
102 | int chsc_get_channel_measurement_chars(struct channel_path *chp); | 102 | int chsc_get_channel_measurement_chars(struct channel_path *chp); |
103 | 103 | ||
104 | int chsc_error_from_response(int response); | ||
105 | |||
104 | #endif | 106 | #endif |