Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252278
b: refs/heads/master
c: e7a46b4
h: refs/heads/master
v: v3
  • Loading branch information
Dan Williams authored and David S. Miller committed May 27, 2011
1 parent 5bce20b commit 0a7591a
Show file tree
Hide file tree
Showing 2 changed files with 11 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: 58bf2dbccc5aca12df77e2328f478e239a68bdd5
refs/heads/master: e7a46b4d0839c2a3aa2e0ae0b145f293f6738498
10 changes: 10 additions & 0 deletions trunk/net/atm/atm_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ static ssize_t show_atmaddress(struct device *cdev,
return pos - buf;
}

static ssize_t show_atmindex(struct device *cdev,
struct device_attribute *attr, char *buf)
{
struct atm_dev *adev = to_atm_dev(cdev);

return sprintf(buf, "%d\n", adev->number);
}

static ssize_t show_carrier(struct device *cdev,
struct device_attribute *attr, char *buf)
{
Expand Down Expand Up @@ -99,13 +107,15 @@ static ssize_t show_link_rate(struct device *cdev,

static DEVICE_ATTR(address, S_IRUGO, show_address, NULL);
static DEVICE_ATTR(atmaddress, S_IRUGO, show_atmaddress, NULL);
static DEVICE_ATTR(atmindex, S_IRUGO, show_atmindex, NULL);
static DEVICE_ATTR(carrier, S_IRUGO, show_carrier, NULL);
static DEVICE_ATTR(type, S_IRUGO, show_type, NULL);
static DEVICE_ATTR(link_rate, S_IRUGO, show_link_rate, NULL);

static struct device_attribute *atm_attrs[] = {
&dev_attr_atmaddress,
&dev_attr_address,
&dev_attr_atmindex,
&dev_attr_carrier,
&dev_attr_type,
&dev_attr_link_rate,
Expand Down

0 comments on commit 0a7591a

Please sign in to comment.