summaryrefslogtreecommitdiff
path: root/drivers/s390/cio/cio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/cio.c')
-rw-r--r--drivers/s390/cio/cio.c33
1 files changed, 7 insertions, 26 deletions
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index 07fc5d9e7f10..b5620e818d6b 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -476,26 +476,6 @@ static int cio_check_devno_blacklisted(struct subchannel *sch)
return 0;
}
-static int cio_validate_io_subchannel(struct subchannel *sch)
-{
- /* Initialization for io subchannels. */
- if (!css_sch_is_valid(&sch->schib))
- return -ENODEV;
-
- /* Devno is valid. */
- return cio_check_devno_blacklisted(sch);
-}
-
-static int cio_validate_msg_subchannel(struct subchannel *sch)
-{
- /* Initialization for message subchannels. */
- if (!css_sch_is_valid(&sch->schib))
- return -ENODEV;
-
- /* Devno is valid. */
- return cio_check_devno_blacklisted(sch);
-}
-
/**
* cio_validate_subchannel - basic validation of subchannel
* @sch: subchannel structure to be filled out
@@ -533,10 +513,11 @@ int cio_validate_subchannel(struct subchannel *sch, struct subchannel_id schid)
switch (sch->st) {
case SUBCHANNEL_TYPE_IO:
- err = cio_validate_io_subchannel(sch);
- break;
case SUBCHANNEL_TYPE_MSG:
- err = cio_validate_msg_subchannel(sch);
+ if (!css_sch_is_valid(&sch->schib))
+ err = -ENODEV;
+ else
+ err = cio_check_devno_blacklisted(sch);
break;
default:
err = 0;
@@ -826,11 +807,11 @@ static atomic_t chpid_reset_count;
static void s390_reset_chpids_mcck_handler(void)
{
struct crw crw;
- struct mci *mci;
+ union mci mci;
/* Check for pending channel report word. */
- mci = (struct mci *)&S390_lowcore.mcck_interruption_code;
- if (!mci->cp)
+ mci.val = S390_lowcore.mcck_interruption_code;
+ if (!mci.cp)
return;
/* Process channel report words. */
while (stcrw(&crw) == 0) {