diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2006-12-08 15:55:57 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-12-08 15:55:57 +0100 |
commit | 529192f3b90682e37c5fcab461d968d062f1e0e4 (patch) | |
tree | 33f5c9f5b50c36c2f62d0afee1636bd5f5fa07c6 /drivers/s390/cio/device.c | |
parent | d7b5a4c94f49131811112526f7d404a50f0b5ca7 (diff) | |
download | kernel-crypto-529192f3b90682e37c5fcab461d968d062f1e0e4.tar.gz kernel-crypto-529192f3b90682e37c5fcab461d968d062f1e0e4.tar.xz kernel-crypto-529192f3b90682e37c5fcab461d968d062f1e0e4.zip |
[S390] Use dev->groups for adding/removing the subchannel attribute group.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r-- | drivers/s390/cio/device.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 7fe1ccdc781..803579053c2 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) ssize_t ret = 0; int chp; - for (chp = 0; chp < 8; chp++) - ret += sprintf (buf+ret, "%02x ", ssd->chpid[chp]); - + if (ssd) + for (chp = 0; chp < 8; chp++) + ret += sprintf (buf+ret, "%02x ", ssd->chpid[chp]); + else + ret += sprintf (buf, "n/a"); ret += sprintf (buf+ret, "\n"); return min((ssize_t)PAGE_SIZE, ret); } @@ -531,10 +533,10 @@ static struct attribute_group subch_attr_group = { .attrs = subch_attrs, }; -int subchannel_add_files (struct device *dev) -{ - return sysfs_create_group(&dev->kobj, &subch_attr_group); -} +struct attribute_group *subch_attr_groups[] = { + &subch_attr_group, + NULL, +}; static struct attribute * ccwdev_attrs[] = { &dev_attr_devtype.attr, |