Commit dae39843 authored by Cornelia Huck's avatar Cornelia Huck Committed by Heiko Carstens
Browse files

[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: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent b9993a38
...@@ -27,7 +27,13 @@ ...@@ -27,7 +27,13 @@
static void *sei_page; static void *sei_page;
static int chsc_error_from_response(int response) /**
* chsc_error_from_response() - convert a chsc response to an error
* @response: chsc response code
*
* Returns an appropriate Linux error code for @response.
*/
int chsc_error_from_response(int response)
{ {
switch (response) { switch (response) {
case 0x0001: case 0x0001:
...@@ -45,6 +51,7 @@ static int chsc_error_from_response(int response) ...@@ -45,6 +51,7 @@ static int chsc_error_from_response(int response)
return -EIO; return -EIO;
} }
} }
EXPORT_SYMBOL_GPL(chsc_error_from_response);
struct chsc_ssd_area { struct chsc_ssd_area {
struct chsc_header request; struct chsc_header request;
......
...@@ -101,4 +101,6 @@ void chsc_chp_online(struct chp_id chpid); ...@@ -101,4 +101,6 @@ void chsc_chp_online(struct chp_id chpid);
void chsc_chp_offline(struct chp_id chpid); void chsc_chp_offline(struct chp_id chpid);
int chsc_get_channel_measurement_chars(struct channel_path *chp); int chsc_get_channel_measurement_chars(struct channel_path *chp);
int chsc_error_from_response(int response);
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment