diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-03 01:10:07 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-03 01:10:07 -0500 |
commit | 7a53c7f56bbfc9b0ef892e68f5cfae3d902544d1 (patch) | |
tree | 19dec256fc80ad06d631ece78b9eb68a457ce66b /drivers/input/input.c | |
parent | e57130698fe3dd2b7d617d90bbf86474473cb40c (diff) | |
parent | 012abeea669ea49636cf952d13298bb68654146a (diff) |
Merge commit 'v2.6.32-rc5' into for-linus
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r-- | drivers/input/input.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index 60a4eaabb7d..cc763c96fad 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/random.h> | 17 | #include <linux/random.h> |
18 | #include <linux/major.h> | 18 | #include <linux/major.h> |
19 | #include <linux/proc_fs.h> | 19 | #include <linux/proc_fs.h> |
20 | #include <linux/sched.h> | ||
20 | #include <linux/seq_file.h> | 21 | #include <linux/seq_file.h> |
21 | #include <linux/poll.h> | 22 | #include <linux/poll.h> |
22 | #include <linux/device.h> | 23 | #include <linux/device.h> |
@@ -1176,7 +1177,7 @@ static struct attribute_group input_dev_caps_attr_group = { | |||
1176 | .attrs = input_dev_caps_attrs, | 1177 | .attrs = input_dev_caps_attrs, |
1177 | }; | 1178 | }; |
1178 | 1179 | ||
1179 | static struct attribute_group *input_dev_attr_groups[] = { | 1180 | static const struct attribute_group *input_dev_attr_groups[] = { |
1180 | &input_dev_attr_group, | 1181 | &input_dev_attr_group, |
1181 | &input_dev_id_attr_group, | 1182 | &input_dev_id_attr_group, |
1182 | &input_dev_caps_attr_group, | 1183 | &input_dev_caps_attr_group, |
@@ -1304,6 +1305,7 @@ static int input_dev_uevent(struct device *device, struct kobj_uevent_env *env) | |||
1304 | } \ | 1305 | } \ |
1305 | } while (0) | 1306 | } while (0) |
1306 | 1307 | ||
1308 | #ifdef CONFIG_PM | ||
1307 | static void input_dev_reset(struct input_dev *dev, bool activate) | 1309 | static void input_dev_reset(struct input_dev *dev, bool activate) |
1308 | { | 1310 | { |
1309 | if (!dev->event) | 1311 | if (!dev->event) |
@@ -1318,7 +1320,6 @@ static void input_dev_reset(struct input_dev *dev, bool activate) | |||
1318 | } | 1320 | } |
1319 | } | 1321 | } |
1320 | 1322 | ||
1321 | #ifdef CONFIG_PM | ||
1322 | static int input_dev_suspend(struct device *dev) | 1323 | static int input_dev_suspend(struct device *dev) |
1323 | { | 1324 | { |
1324 | struct input_dev *input_dev = to_input_dev(dev); | 1325 | struct input_dev *input_dev = to_input_dev(dev); |
@@ -1358,14 +1359,14 @@ static struct device_type input_dev_type = { | |||
1358 | #endif | 1359 | #endif |
1359 | }; | 1360 | }; |
1360 | 1361 | ||
1361 | static char *input_nodename(struct device *dev) | 1362 | static char *input_devnode(struct device *dev, mode_t *mode) |
1362 | { | 1363 | { |
1363 | return kasprintf(GFP_KERNEL, "input/%s", dev_name(dev)); | 1364 | return kasprintf(GFP_KERNEL, "input/%s", dev_name(dev)); |
1364 | } | 1365 | } |
1365 | 1366 | ||
1366 | struct class input_class = { | 1367 | struct class input_class = { |
1367 | .name = "input", | 1368 | .name = "input", |
1368 | .nodename = input_nodename, | 1369 | .devnode = input_devnode, |
1369 | }; | 1370 | }; |
1370 | EXPORT_SYMBOL_GPL(input_class); | 1371 | EXPORT_SYMBOL_GPL(input_class); |
1371 | 1372 | ||