]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/input/joystick/warrior.c
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
[linux-2.6-omap-h63xx.git] / drivers / input / joystick / warrior.c
index 1e4828b9a1ab97327b7ec9dbf60db519f3f9e13a..e928b6e3724a528b632f1a3af472073eaf888419 100644 (file)
@@ -160,12 +160,13 @@ static int warrior_connect(struct serio *serio, struct serio_driver *drv)
        input_dev->id.vendor = SERIO_WARRIOR;
        input_dev->id.product = 0x0001;
        input_dev->id.version = 0x0100;
-       input_dev->cdev.dev = &serio->dev;
-       input_dev->private = warrior;
+       input_dev->dev.parent = &serio->dev;
 
-       input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS);
-       input_dev->keybit[LONG(BTN_TRIGGER)] = BIT(BTN_TRIGGER) | BIT(BTN_THUMB) | BIT(BTN_TOP) | BIT(BTN_TOP2);
-       input_dev->relbit[0] = BIT(REL_DIAL);
+       input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL) |
+               BIT_MASK(EV_ABS);
+       input_dev->keybit[BIT_WORD(BTN_TRIGGER)] = BIT_MASK(BTN_TRIGGER) |
+               BIT_MASK(BTN_THUMB) | BIT_MASK(BTN_TOP) | BIT_MASK(BTN_TOP2);
+       input_dev->relbit[0] = BIT_MASK(REL_DIAL);
        input_set_abs_params(input_dev, ABS_X, -64, 64, 0, 8);
        input_set_abs_params(input_dev, ABS_Y, -64, 64, 0, 8);
        input_set_abs_params(input_dev, ABS_THROTTLE, -112, 112, 0, 0);
@@ -224,8 +225,7 @@ static struct serio_driver warrior_drv = {
 
 static int __init warrior_init(void)
 {
-       serio_register_driver(&warrior_drv);
-       return 0;
+       return serio_register_driver(&warrior_drv);
 }
 
 static void __exit warrior_exit(void)