diff options
-rw-r--r-- | drivers/s390/cio/chp.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c index 41ecc08b1cf7..afbdee74147d 100644 --- a/drivers/s390/cio/chp.c +++ b/drivers/s390/cio/chp.c | |||
@@ -384,6 +384,28 @@ static ssize_t chp_chid_external_show(struct device *dev, | |||
384 | } | 384 | } |
385 | static DEVICE_ATTR(chid_external, 0444, chp_chid_external_show, NULL); | 385 | static DEVICE_ATTR(chid_external, 0444, chp_chid_external_show, NULL); |
386 | 386 | ||
387 | static ssize_t util_string_read(struct file *filp, struct kobject *kobj, | ||
388 | struct bin_attribute *attr, char *buf, | ||
389 | loff_t off, size_t count) | ||
390 | { | ||
391 | struct channel_path *chp = to_channelpath(kobj_to_dev(kobj)); | ||
392 | ssize_t rc; | ||
393 | |||
394 | mutex_lock(&chp->lock); | ||
395 | rc = memory_read_from_buffer(buf, count, &off, chp->desc_fmt3.util_str, | ||
396 | sizeof(chp->desc_fmt3.util_str)); | ||
397 | mutex_unlock(&chp->lock); | ||
398 | |||
399 | return rc; | ||
400 | } | ||
401 | static BIN_ATTR_RO(util_string, | ||
402 | sizeof(((struct channel_path_desc_fmt3 *)0)->util_str)); | ||
403 | |||
404 | static struct bin_attribute *chp_bin_attrs[] = { | ||
405 | &bin_attr_util_string, | ||
406 | NULL, | ||
407 | }; | ||
408 | |||
387 | static struct attribute *chp_attrs[] = { | 409 | static struct attribute *chp_attrs[] = { |
388 | &dev_attr_status.attr, | 410 | &dev_attr_status.attr, |
389 | &dev_attr_configure.attr, | 411 | &dev_attr_configure.attr, |
@@ -396,6 +418,7 @@ static struct attribute *chp_attrs[] = { | |||
396 | }; | 418 | }; |
397 | static struct attribute_group chp_attr_group = { | 419 | static struct attribute_group chp_attr_group = { |
398 | .attrs = chp_attrs, | 420 | .attrs = chp_attrs, |
421 | .bin_attrs = chp_bin_attrs, | ||
399 | }; | 422 | }; |
400 | static const struct attribute_group *chp_attr_groups[] = { | 423 | static const struct attribute_group *chp_attr_groups[] = { |
401 | &chp_attr_group, | 424 | &chp_attr_group, |