aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/input.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-04-12 01:34:47 -0400
committerDmitry Torokhov <dtor@insightbb.com>2007-04-12 01:34:47 -0400
commit88a447a030bfec9f1e8666daf27d9d73c8c92448 (patch)
tree950840ba1271c2129d48692f4deab2fa661bd0a5 /drivers/input/input.c
parent7791bdae71243050132ede7ea1558c828b69458f (diff)
Input: prepare to switching to struct device
In preparation to switching to struct device and class device going away provide an alias to allow drivers that create devices to use either input_dev->cdev.dev or input_dev->dev.parent to put them into sysfs tree. The former will go away once conversion to struct device is complete. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r--drivers/input/input.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 86b27079004..173c2861ec5 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1079,6 +1079,9 @@ int input_register_device(struct input_dev *dev)
1079 snprintf(dev->cdev.class_id, sizeof(dev->cdev.class_id), 1079 snprintf(dev->cdev.class_id, sizeof(dev->cdev.class_id),
1080 "input%ld", (unsigned long) atomic_inc_return(&input_no) - 1); 1080 "input%ld", (unsigned long) atomic_inc_return(&input_no) - 1);
1081 1081
1082 if (!dev->cdev.dev)
1083 dev->cdev.dev = dev->dev.parent;
1084
1082 error = class_device_add(&dev->cdev); 1085 error = class_device_add(&dev->cdev);
1083 if (error) 1086 if (error)
1084 return error; 1087 return error;