Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11798
b: refs/heads/master
c: f1fc78a
h: refs/heads/master
v: v3
  • Loading branch information
Bastian Blank authored and Linus Torvalds committed Oct 31, 2005
1 parent b4cb6f1 commit aa86fbd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1e8e338325fa0f2bd5c1c800086e900cf188d2cd
refs/heads/master: f1fc78a8c7f3a784b9fd1e07cc1438a0ea569555
19 changes: 19 additions & 0 deletions trunk/drivers/s390/cio/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,23 @@ cutype_show (struct device *dev, struct device_attribute *attr, char *buf)
id->cu_type, id->cu_model);
}

static ssize_t
modalias_show (struct device *dev, struct device_attribute *attr, char *buf)
{
struct ccw_device *cdev = to_ccwdev(dev);
struct ccw_device_id *id = &(cdev->id);
int ret;

ret = sprintf(buf, "ccw:t%04Xm%02x",
id->cu_type, id->cu_model);
if (id->dev_type != 0)
ret += sprintf(buf + ret, "dt%04Xdm%02X\n",
id->dev_type, id->dev_model);
else
ret += sprintf(buf + ret, "dtdm\n");
return ret;
}

static ssize_t
online_show (struct device *dev, struct device_attribute *attr, char *buf)
{
Expand Down Expand Up @@ -448,6 +465,7 @@ static DEVICE_ATTR(chpids, 0444, chpids_show, NULL);
static DEVICE_ATTR(pimpampom, 0444, pimpampom_show, NULL);
static DEVICE_ATTR(devtype, 0444, devtype_show, NULL);
static DEVICE_ATTR(cutype, 0444, cutype_show, NULL);
static DEVICE_ATTR(modalias, 0444, modalias_show, NULL);
static DEVICE_ATTR(online, 0644, online_show, online_store);
extern struct device_attribute dev_attr_cmb_enable;
static DEVICE_ATTR(availability, 0444, available_show, NULL);
Expand All @@ -471,6 +489,7 @@ subchannel_add_files (struct device *dev)
static struct attribute * ccwdev_attrs[] = {
&dev_attr_devtype.attr,
&dev_attr_cutype.attr,
&dev_attr_modalias.attr,
&dev_attr_online.attr,
&dev_attr_cmb_enable.attr,
&dev_attr_availability.attr,
Expand Down

0 comments on commit aa86fbd

Please sign in to comment.