diff options
Diffstat (limited to 'drivers/s390/cio/css.c')
| -rw-r--r-- | drivers/s390/cio/css.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index c1afab5f72d6..595e327d2f76 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
| @@ -705,13 +705,17 @@ css_cm_enable_store(struct device *dev, struct device_attribute *attr, | |||
| 705 | { | 705 | { |
| 706 | struct channel_subsystem *css = to_css(dev); | 706 | struct channel_subsystem *css = to_css(dev); |
| 707 | int ret; | 707 | int ret; |
| 708 | unsigned long val; | ||
| 708 | 709 | ||
| 710 | ret = strict_strtoul(buf, 16, &val); | ||
| 711 | if (ret) | ||
| 712 | return ret; | ||
| 709 | mutex_lock(&css->mutex); | 713 | mutex_lock(&css->mutex); |
| 710 | switch (buf[0]) { | 714 | switch (val) { |
| 711 | case '0': | 715 | case 0: |
| 712 | ret = css->cm_enabled ? chsc_secm(css, 0) : 0; | 716 | ret = css->cm_enabled ? chsc_secm(css, 0) : 0; |
| 713 | break; | 717 | break; |
| 714 | case '1': | 718 | case 1: |
| 715 | ret = css->cm_enabled ? 0 : chsc_secm(css, 1); | 719 | ret = css->cm_enabled ? 0 : chsc_secm(css, 1); |
| 716 | break; | 720 | break; |
| 717 | default: | 721 | default: |
