aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/aaed2000_kbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/keyboard/aaed2000_kbd.c')
-rw-r--r--drivers/input/keyboard/aaed2000_kbd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/input/keyboard/aaed2000_kbd.c b/drivers/input/keyboard/aaed2000_kbd.c
index 65fcb6af63a8..3a37505f067c 100644
--- a/drivers/input/keyboard/aaed2000_kbd.c
+++ b/drivers/input/keyboard/aaed2000_kbd.c
@@ -97,7 +97,7 @@ static void aaedkbd_work(void *data)
97 97
98static int aaedkbd_open(struct input_dev *indev) 98static int aaedkbd_open(struct input_dev *indev)
99{ 99{
100 struct aaedkbd *aaedkbd = indev->private; 100 struct aaedkbd *aaedkbd = input_get_drvdata(indev);
101 101
102 schedule_delayed_work(&aaedkbd->workq, msecs_to_jiffies(SCAN_INTERVAL)); 102 schedule_delayed_work(&aaedkbd->workq, msecs_to_jiffies(SCAN_INTERVAL));
103 103
@@ -106,7 +106,7 @@ static int aaedkbd_open(struct input_dev *indev)
106 106
107static void aaedkbd_close(struct input_dev *indev) 107static void aaedkbd_close(struct input_dev *indev)
108{ 108{
109 struct aaedkbd *aaedkbd = indev->private; 109 struct aaedkbd *aaedkbd = input_get_drvdata(indev);
110 110
111 cancel_delayed_work(&aaedkbd->workq); 111 cancel_delayed_work(&aaedkbd->workq);
112 flush_scheduled_work(); 112 flush_scheduled_work();
@@ -141,8 +141,9 @@ static int __devinit aaedkbd_probe(struct platform_device *pdev)
141 input_dev->id.vendor = 0x0001; 141 input_dev->id.vendor = 0x0001;
142 input_dev->id.product = 0x0001; 142 input_dev->id.product = 0x0001;
143 input_dev->id.version = 0x0100; 143 input_dev->id.version = 0x0100;
144 input_dev->cdev.dev = &pdev->dev; 144 input_dev->dev.parent = &pdev->dev;
145 input_dev->private = aaedkbd; 145
146 input_set_drvdata(input_dev, aaedkbd);
146 147
147 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); 148 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
148 input_dev->keycode = aaedkbd->keycode; 149 input_dev->keycode = aaedkbd->keycode;