Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43869
b: refs/heads/master
c: 529192f
h: refs/heads/master
i:
  43867: 9586afd
v: v3
  • Loading branch information
Cornelia Huck authored and Martin Schwidefsky committed Dec 8, 2006
1 parent 70edb28 commit ef2fdb7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 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: d7b5a4c94f49131811112526f7d404a50f0b5ca7
refs/heads/master: 529192f3b90682e37c5fcab461d968d062f1e0e4
5 changes: 1 addition & 4 deletions trunk/drivers/s390/cio/css.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ css_register_subchannel(struct subchannel *sch)
sch->dev.parent = &css[0]->device;
sch->dev.bus = &css_bus_type;
sch->dev.release = &css_subchannel_release;
sch->dev.groups = subch_attr_groups;

/* make it known to the system */
ret = css_sch_device_register(sch);
Expand All @@ -146,10 +147,6 @@ css_register_subchannel(struct subchannel *sch)
return ret;
}
css_get_ssd_info(sch);
ret = subchannel_add_files(&sch->dev);
if (ret)
printk(KERN_WARNING "%s: could not add attributes to %s\n",
__func__, sch->dev.bus_id);
return ret;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/s390/cio/css.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,5 @@ extern struct workqueue_struct *slow_path_wq;
extern struct work_struct slow_path_work;

int subchannel_add_files (struct device *);
extern struct attribute_group *subch_attr_groups[];
#endif
16 changes: 9 additions & 7 deletions trunk/drivers/s390/cio/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit ef2fdb7

Please sign in to comment.