Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10572
b: refs/heads/master
c: 629b77a
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Oct 28, 2005
1 parent aea42ec commit 114d305
Show file tree
Hide file tree
Showing 2 changed files with 13 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: 967ca692161d8c4e894932599592af8d62c0a895
refs/heads/master: 629b77a42c39c8b3c42a8cf5f5680f0406f8d43f
19 changes: 12 additions & 7 deletions trunk/drivers/input/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,17 +642,22 @@ static ssize_t input_dev_show_##name(struct class_device *dev, char *buf) \
up(&input_dev->sem); \
\
return retval; \
}
} \
static CLASS_DEVICE_ATTR(name, S_IRUGO, input_dev_show_##name, NULL);

INPUT_DEV_STRING_ATTR_SHOW(name);
INPUT_DEV_STRING_ATTR_SHOW(phys);
INPUT_DEV_STRING_ATTR_SHOW(uniq);

static struct class_device_attribute input_dev_attrs[] = {
__ATTR(name, S_IRUGO, input_dev_show_name, NULL),
__ATTR(phys, S_IRUGO, input_dev_show_phys, NULL),
__ATTR(uniq, S_IRUGO, input_dev_show_uniq, NULL),
__ATTR_NULL
static struct attribute *input_dev_attrs[] = {
&class_device_attr_name.attr,
&class_device_attr_phys.attr,
&class_device_attr_uniq.attr,
NULL
};

static struct attribute_group input_dev_group = {
.attrs = input_dev_attrs,
};

#define INPUT_DEV_ID_ATTR(name) \
Expand Down Expand Up @@ -728,7 +733,6 @@ static void input_dev_release(struct class_device *class_dev)
struct class input_dev_class = {
.name = "input_dev",
.release = input_dev_release,
.class_dev_attrs = input_dev_attrs,
};

struct input_dev *input_allocate_device(void)
Expand Down Expand Up @@ -766,6 +770,7 @@ static void input_register_classdevice(struct input_dev *dev)
kfree(path);

class_device_add(&dev->cdev);
sysfs_create_group(&dev->cdev.kobj, &input_dev_group);
sysfs_create_group(&dev->cdev.kobj, &input_dev_id_attr_group);
sysfs_create_group(&dev->cdev.kobj, &input_dev_caps_attr_group);
}
Expand Down

0 comments on commit 114d305

Please sign in to comment.