Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5be3946647424b08db0f62c545215cf506af8a52
Commit:     5be3946647424b08db0f62c545215cf506af8a52
Parent:     129a84de2347002f09721cda3155ccfd19fade40
Author:     Marcel Holtmann <[EMAIL PROTECTED]>
AuthorDate: Wed May 9 09:15:30 2007 +0200
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu May 10 23:45:03 2007 -0700

    [Bluetooth] Switch to using input_dev->dev.parent
    
    In preparation for struct class_device -> struct device input core
    conversion, switch to using input_dev->dev.parent when specifying
    device position in sysfs tree.
    
    Also, do not access input_dev->private directly, use helpers and
    do not use kfree() on input device, use input_free_device() instead.
    
    Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]>
    Signed-off-by: Marcel Holtmann <[EMAIL PROTECTED]>
---
 net/bluetooth/hidp/core.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index d342e89..0ea40ab 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -174,7 +174,7 @@ static inline int hidp_queue_event(struct hidp_session 
*session, struct input_de
 
 static int hidp_hidinput_event(struct input_dev *dev, unsigned int type, 
unsigned int code, int value)
 {
-       struct hid_device *hid = dev->private;
+       struct hid_device *hid = input_get_drvdata(dev);
        struct hidp_session *session = hid->driver_data;
 
        return hidp_queue_event(session, dev, type, code, value);
@@ -182,7 +182,7 @@ static int hidp_hidinput_event(struct input_dev *dev, 
unsigned int type, unsigne
 
 static int hidp_input_event(struct input_dev *dev, unsigned int type, unsigned 
int code, int value)
 {
-       struct hidp_session *session = dev->private;
+       struct hidp_session *session = input_get_drvdata(dev);
 
        return hidp_queue_event(session, dev, type, code, value);
 }
@@ -630,7 +630,7 @@ static inline void hidp_setup_input(struct hidp_session 
*session, struct hidp_co
        struct input_dev *input = session->input;
        int i;
 
-       input->private = session;
+       input_set_drvdata(input, session);
 
        input->name = "Bluetooth HID Boot Protocol Device";
 
@@ -663,7 +663,7 @@ static inline void hidp_setup_input(struct hidp_session 
*session, struct hidp_co
                input->relbit[0] |= BIT(REL_WHEEL);
        }
 
-       input->cdev.dev = hidp_get_device(session);
+       input->dev.parent = hidp_get_device(session);
 
        input->event = hidp_input_event;
 
@@ -864,7 +864,7 @@ failed:
        if (session->hid)
                hid_free_device(session->hid);
 
-       kfree(session->input);
+       input_free_device(session->input);
        kfree(session);
        return err;
 }
-
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