Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=88a447a030bfec9f1e8666daf27d9d73c8c92448
Commit:     88a447a030bfec9f1e8666daf27d9d73c8c92448
Parent:     7791bdae71243050132ede7ea1558c828b69458f
Author:     Dmitry Torokhov <[EMAIL PROTECTED]>
AuthorDate: Thu Apr 12 01:34:47 2007 -0400
Committer:  Dmitry Torokhov <[EMAIL PROTECTED]>
CommitDate: Thu Apr 12 01:34:47 2007 -0400

    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 <[EMAIL PROTECTED]>
---
 drivers/input/input.c |    3 +++
 include/linux/input.h |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/input/input.c b/drivers/input/input.c
index 86b2707..173c286 100644
--- a/drivers/input/input.c
+++ b/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/include/linux/input.h b/include/linux/input.h
index d0bea97..7b6d7c4 100644
--- a/include/linux/input.h
+++ b/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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to