diff --git a/drivers/input/keyboard/aaed2000_kbd.c b/drivers/input/keyboard/aaed2000_kbd.c index 65fcb6af63a8747a1a697cf254a8af9eb2346ba5..e584413f1d04b675a68f583b33b8356dd205dd71 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) static int aaedkbd_open(struct input_dev *indev) { - struct aaedkbd *aaedkbd = indev->private; + struct aaedkbd *aaedkbd = input_get_drvdata(indev); schedule_delayed_work(&aaedkbd->workq, msecs_to_jiffies(SCAN_INTERVAL)); @@ -106,7 +106,7 @@ static int aaedkbd_open(struct input_dev *indev) static void aaedkbd_close(struct input_dev *indev) { - struct aaedkbd *aaedkbd = indev->private; + struct aaedkbd *aaedkbd = input_get_drvdata(indev); cancel_delayed_work(&aaedkbd->workq); flush_scheduled_work(); @@ -142,7 +142,7 @@ static int __devinit aaedkbd_probe(struct platform_device *pdev) input_dev->id.product = 0x0001; input_dev->id.version = 0x0100; input_dev->cdev.dev = &pdev->dev; - input_dev->private = aaedkbd; + input_set_drvdata(input_dev, aaedkbd); input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); input_dev->keycode = aaedkbd->keycode; diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 663877076bc7d9ef047a836815fe31eabbe920c4..04754732c2c5744ec45a2f8d2a503ca33c867a82 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c @@ -586,7 +586,7 @@ static void atkbd_event_work(struct work_struct *work) static int atkbd_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) { - struct atkbd *atkbd = dev->private; + struct atkbd *atkbd = input_get_drvdata(dev); if (!atkbd->write) return -1; @@ -883,9 +883,10 @@ static void atkbd_set_device_attrs(struct atkbd *atkbd) input_dev->id.product = atkbd->translated ? 1 : atkbd->set; input_dev->id.version = atkbd->id; input_dev->event = atkbd_event; - input_dev->private = atkbd; input_dev->cdev.dev = &atkbd->ps2dev.serio->dev; + input_set_drvdata(input_dev, atkbd); + input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_MSC); if (atkbd->write) { diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c index 1016c94e65db684c9a84cfdc33478b42dc581640..25dd8799217182dd75a1e688b4544c5610d4b746 100644 --- a/drivers/input/keyboard/corgikbd.c +++ b/drivers/input/keyboard/corgikbd.c @@ -324,7 +324,6 @@ static int __init corgikbd_probe(struct platform_device *pdev) input_dev->id.product = 0x0001; input_dev->id.version = 0x0100; input_dev->cdev.dev = &pdev->dev; - input_dev->private = corgikbd; input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_PWR) | BIT(EV_SW); input_dev->keycode = corgikbd->keycode; diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index fa03a00b4c6df8948e8d6eba0033cf58bf360ba8..b94399359ee82741bf45750c433d6ec08bffa824 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -66,7 +66,6 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) input->name = pdev->name; input->phys = "gpio-keys/input0"; input->cdev.dev = &pdev->dev; - input->private = pdata; input->id.bustype = BUS_HOST; input->id.vendor = 0x0001; diff --git a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c index 18f4d417576fff14e437cd0bf01a23e6db35b8e7..087d4df2c49560e4bffb2f0581a1dde0b328706f 100644 --- a/drivers/input/keyboard/hil_kbd.c +++ b/drivers/input/keyboard/hil_kbd.c @@ -269,8 +269,6 @@ static int hil_kbd_connect(struct serio *serio, struct serio_driver *drv) if (!kbd->dev) goto bail0; - kbd->dev->private = kbd; - if (serio_open(serio, drv)) goto bail1; diff --git a/drivers/input/keyboard/hilkbd.c b/drivers/input/keyboard/hilkbd.c index 230f5db30f0fdd2629d4953a4333a87021ec3a06..73b85cb59830b2c4c75f042427f8354d91175ea2 100644 --- a/drivers/input/keyboard/hilkbd.c +++ b/drivers/input/keyboard/hilkbd.c @@ -215,7 +215,6 @@ hil_keyb_init(void) hil_dev.dev = input_allocate_device(); if (!hil_dev.dev) return -ENOMEM; - hil_dev.dev->private = &hil_dev; #if defined(CONFIG_HP300) if (!hwreg_present((void *)(HILBASE + HIL_DATA))) { diff --git a/drivers/input/keyboard/lkkbd.c b/drivers/input/keyboard/lkkbd.c index 3d4d0a0ede28333bb3bc7b12ae24bcd7bd116e2e..257b9d42bba52b2cb09693b9f19cb45fac97df44 100644 --- a/drivers/input/keyboard/lkkbd.c +++ b/drivers/input/keyboard/lkkbd.c @@ -515,7 +515,7 @@ static int lkkbd_event (struct input_dev *dev, unsigned int type, unsigned int code, int value) { - struct lkkbd *lk = dev->private; + struct lkkbd *lk = input_get_drvdata (dev); unsigned char leds_on = 0; unsigned char leds_off = 0; @@ -668,7 +668,8 @@ lkkbd_connect (struct serio *serio, struct serio_driver *drv) input_dev->id.version = 0x0100; input_dev->cdev.dev = &serio->dev; input_dev->event = lkkbd_event; - input_dev->private = lk; + + input_set_drvdata (input_dev, lk); set_bit (EV_KEY, input_dev->evbit); set_bit (EV_LED, input_dev->evbit); diff --git a/drivers/input/keyboard/locomokbd.c b/drivers/input/keyboard/locomokbd.c index 2ade5186cc418dab9bfb831ce610b77a44c5ece7..764f5ee764fabc49cc8531c38b06f60c3e7a078f 100644 --- a/drivers/input/keyboard/locomokbd.c +++ b/drivers/input/keyboard/locomokbd.c @@ -231,7 +231,6 @@ static int locomokbd_probe(struct locomo_dev *dev) input_dev->id.vendor = 0x0001; input_dev->id.product = 0x0001; input_dev->id.version = 0x0100; - input_dev->private = locomokbd; input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); input_dev->keycode = locomokbd->keycode; diff --git a/drivers/input/keyboard/newtonkbd.c b/drivers/input/keyboard/newtonkbd.c index aa29b50765c942af946d0ef79730a8ff0872cb81..179f3a4f4eda8d53104744ca1335f3e29a831f45 100644 --- a/drivers/input/keyboard/newtonkbd.c +++ b/drivers/input/keyboard/newtonkbd.c @@ -105,7 +105,6 @@ static int nkbd_connect(struct serio *serio, struct serio_driver *drv) input_dev->id.product = 0x0001; input_dev->id.version = 0x0100; input_dev->cdev.dev = &serio->dev; - input_dev->private = nkbd; input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); input_dev->keycode = nkbd->keycode; diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index 5680a6d95b2b335c36c8bd6eed067ee87d2d085e..1790f0c15f11ade789733e436cdb1171895a16aa 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c @@ -371,7 +371,6 @@ static int __init omap_kp_probe(struct platform_device *pdev) input_dev->name = "omap-keypad"; input_dev->phys = "omap-keypad/input0"; input_dev->cdev.dev = &pdev->dev; - input_dev->private = omap_kp; input_dev->id.bustype = BUS_HOST; input_dev->id.vendor = 0x0001; diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index 8a2166c77ff4ea9514b49a1c5ea9aa136f9fda21..bc960748bf006a724c4492fc671f2589c5b9f82e 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c @@ -372,7 +372,6 @@ static int __init spitzkbd_probe(struct platform_device *dev) spitzkbd->input = input_dev; - input_dev->private = spitzkbd; input_dev->name = "Spitz Keyboard"; input_dev->phys = spitzkbd->phys; input_dev->cdev.dev = &dev->dev; diff --git a/drivers/input/keyboard/stowaway.c b/drivers/input/keyboard/stowaway.c index f7b5c5b8145162c654bd8a5c783d43e4c0abbdaa..c10962089398b7dc9b598c111ff364172fbb229d 100644 --- a/drivers/input/keyboard/stowaway.c +++ b/drivers/input/keyboard/stowaway.c @@ -109,7 +109,6 @@ static int skbd_connect(struct serio *serio, struct serio_driver *drv) input_dev->id.product = 0x0001; input_dev->id.version = 0x0100; input_dev->cdev.dev = &serio->dev; - input_dev->private = skbd; input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); input_dev->keycode = skbd->keycode; diff --git a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c index cc02383664140e1a0ff5ce38d05045af388c1598..ca74b2bacb52f31f2012d2ad3e429c7da21a8334 100644 --- a/drivers/input/keyboard/sunkbd.c +++ b/drivers/input/keyboard/sunkbd.c @@ -146,7 +146,7 @@ static irqreturn_t sunkbd_interrupt(struct serio *serio, static int sunkbd_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) { - struct sunkbd *sunkbd = dev->private; + struct sunkbd *sunkbd = input_get_drvdata(dev); switch (type) { @@ -272,7 +272,9 @@ static int sunkbd_connect(struct serio *serio, struct serio_driver *drv) input_dev->id.product = sunkbd->type; input_dev->id.version = 0x0100; input_dev->cdev.dev = &serio->dev; - input_dev->private = sunkbd; + + input_set_drvdata(input_dev, sunkbd); + input_dev->event = sunkbd_event; input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_SND) | BIT(EV_REP); diff --git a/drivers/input/keyboard/xtkbd.c b/drivers/input/keyboard/xtkbd.c index a8209343213860bf96157bb401aa4cc0a9e02b6e..11d970881d971fee0fa82220fc276524219a0d25 100644 --- a/drivers/input/keyboard/xtkbd.c +++ b/drivers/input/keyboard/xtkbd.c @@ -109,7 +109,6 @@ static int xtkbd_connect(struct serio *serio, struct serio_driver *drv) input_dev->id.product = 0x0001; input_dev->id.version = 0x0100; input_dev->cdev.dev = &serio->dev; - input_dev->private = xtkbd; input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); input_dev->keycode = xtkbd->keycode;