From 941ff5963f64a3b1a3cb1fb377f36a5d7f1bd3ff Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Thu, 12 Apr 2007 01:34:47 -0400 Subject: [PATCH] --- yaml --- r: 53432 b: refs/heads/master c: 88a447a030bfec9f1e8666daf27d9d73c8c92448 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/input/input.c | 3 +++ trunk/include/linux/input.h | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 3409ea0de024..b2cc02cdc5f3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7791bdae71243050132ede7ea1558c828b69458f +refs/heads/master: 88a447a030bfec9f1e8666daf27d9d73c8c92448 diff --git a/trunk/drivers/input/input.c b/trunk/drivers/input/input.c index 86b27079004a..173c2861ec58 100644 --- a/trunk/drivers/input/input.c +++ b/trunk/drivers/input/input.c @@ -1079,6 +1079,9 @@ int input_register_device(struct input_dev *dev) snprintf(dev->cdev.class_id, sizeof(dev->cdev.class_id), "input%ld", (unsigned long) atomic_inc_return(&input_no) - 1); + if (!dev->cdev.dev) + dev->cdev.dev = dev->dev.parent; + error = class_device_add(&dev->cdev); if (error) return error; diff --git a/trunk/include/linux/input.h b/trunk/include/linux/input.h index d0bea9755186..7b6d7c408b07 100644 --- a/trunk/include/linux/input.h +++ b/trunk/include/linux/input.h @@ -972,6 +972,9 @@ struct input_dev { unsigned int users; struct class_device cdev; + union { /* temporarily so while we switching to struct device */ + struct device *parent; + } dev; struct list_head h_list; struct list_head node;