aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r--drivers/s390/cio/device.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 7fe1ccdc7812..803579053c2f 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -235,9 +235,11 @@ chpids_show (struct device * dev, struct device_attribute *attr, char * buf)
235 ssize_t ret = 0; 235 ssize_t ret = 0;
236 int chp; 236 int chp;
237 237
238 for (chp = 0; chp < 8; chp++) 238 if (ssd)
239 ret += sprintf (buf+ret, "%02x ", ssd->chpid[chp]); 239 for (chp = 0; chp < 8; chp++)
240 240 ret += sprintf (buf+ret, "%02x ", ssd->chpid[chp]);
241 else
242 ret += sprintf (buf, "n/a");
241 ret += sprintf (buf+ret, "\n"); 243 ret += sprintf (buf+ret, "\n");
242 return min((ssize_t)PAGE_SIZE, ret); 244 return min((ssize_t)PAGE_SIZE, ret);
243} 245}
@@ -531,10 +533,10 @@ static struct attribute_group subch_attr_group = {
531 .attrs = subch_attrs, 533 .attrs = subch_attrs,
532}; 534};
533 535
534int subchannel_add_files (struct device *dev) 536struct attribute_group *subch_attr_groups[] = {
535{ 537 &subch_attr_group,
536 return sysfs_create_group(&dev->kobj, &subch_attr_group); 538 NULL,
537} 539};
538 540
539static struct attribute * ccwdev_attrs[] = { 541static struct attribute * ccwdev_attrs[] = {
540 &dev_attr_devtype.attr, 542 &dev_attr_devtype.attr,