s390/comments: unify copyright messages and remove file names
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / s390 / cio / chp.c
index e792436c92701fc684fc830c0656666c5a73c95c..50ad5fdd815dca03e53f62c1c0798738d375f9e0 100644 (file)
@@ -1,7 +1,5 @@
 /*
- *  drivers/s390/cio/chp.c
- *
- *    Copyright IBM Corp. 1999,2010
+ *    Copyright IBM Corp. 1999, 2010
  *    Author(s): Cornelia Huck (cornelia.huck@de.ibm.com)
  *              Arnd Bergmann (arndb@de.ibm.com)
  *              Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
@@ -362,10 +360,13 @@ static struct attribute *chp_attrs[] = {
        &dev_attr_shared.attr,
        NULL,
 };
-
 static struct attribute_group chp_attr_group = {
        .attrs = chp_attrs,
 };
+static const struct attribute_group *chp_attr_groups[] = {
+       &chp_attr_group,
+       NULL,
+};
 
 static void chp_release(struct device *dev)
 {
@@ -397,6 +398,7 @@ int chp_new(struct chp_id chpid)
        chp->chpid = chpid;
        chp->state = 1;
        chp->dev.parent = &channel_subsystems[chpid.cssid]->device;
+       chp->dev.groups = chp_attr_groups;
        chp->dev.release = chp_release;
        mutex_init(&chp->lock);
 
@@ -426,16 +428,10 @@ int chp_new(struct chp_id chpid)
                put_device(&chp->dev);
                goto out;
        }
-       ret = sysfs_create_group(&chp->dev.kobj, &chp_attr_group);
-       if (ret) {
-               device_unregister(&chp->dev);
-               goto out;
-       }
        mutex_lock(&channel_subsystems[chpid.cssid]->mutex);
        if (channel_subsystems[chpid.cssid]->cm_enabled) {
                ret = chp_add_cmg_attr(chp);
                if (ret) {
-                       sysfs_remove_group(&chp->dev.kobj, &chp_attr_group);
                        device_unregister(&chp->dev);
                        mutex_unlock(&channel_subsystems[chpid.cssid]->mutex);
                        goto out;