Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 313855
b: refs/heads/master
c: ed35ba9
h: refs/heads/master
i:
  313853: c4f0a59
  313851: 8e2dbeb
  313847: ba1d608
  313839: fd1f217
  313823: 35cfb71
  313791: a2693bf
  313727: c060158
  313599: 33d50d7
  313343: 63050c9
v: v3
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Jun 5, 2012
1 parent 582b56d commit f842579
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eb546195a7d8bc492ec6865980bf767474e74d87
refs/heads/master: ed35ba9af4f40056a222dd7b67f39f1f6172185a
12 changes: 5 additions & 7 deletions trunk/drivers/s390/cio/chp.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,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)
{
Expand Down Expand Up @@ -397,6 +400,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);

Expand Down Expand Up @@ -426,16 +430,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;
Expand Down

0 comments on commit f842579

Please sign in to comment.