diff options
Diffstat (limited to 'drivers/input/joydev.c')
-rw-r--r-- | drivers/input/joydev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 7d7527f8b02d..39775fc380c7 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
@@ -422,7 +422,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct | |||
422 | joydev->nkey++; | 422 | joydev->nkey++; |
423 | } | 423 | } |
424 | 424 | ||
425 | for (i = 0; i < BTN_JOYSTICK - BTN_MISC + 1; i++) | 425 | for (i = 0; i < BTN_JOYSTICK - BTN_MISC; i++) |
426 | if (test_bit(i + BTN_MISC, dev->keybit)) { | 426 | if (test_bit(i + BTN_MISC, dev->keybit)) { |
427 | joydev->keymap[i] = joydev->nkey; | 427 | joydev->keymap[i] = joydev->nkey; |
428 | joydev->keypam[joydev->nkey] = i + BTN_MISC; | 428 | joydev->keypam[joydev->nkey] = i + BTN_MISC; |
@@ -452,9 +452,9 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct | |||
452 | 452 | ||
453 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), | 453 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), |
454 | S_IFCHR|S_IRUGO|S_IWUSR, "input/js%d", minor); | 454 | S_IFCHR|S_IRUGO|S_IWUSR, "input/js%d", minor); |
455 | class_simple_device_add(input_class, | 455 | class_device_create(input_class, |
456 | MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), | 456 | MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), |
457 | dev->dev, "js%d", minor); | 457 | dev->dev, "js%d", minor); |
458 | 458 | ||
459 | return &joydev->handle; | 459 | return &joydev->handle; |
460 | } | 460 | } |
@@ -464,7 +464,7 @@ static void joydev_disconnect(struct input_handle *handle) | |||
464 | struct joydev *joydev = handle->private; | 464 | struct joydev *joydev = handle->private; |
465 | struct joydev_list *list; | 465 | struct joydev_list *list; |
466 | 466 | ||
467 | class_simple_device_remove(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor)); | 467 | class_device_destroy(input_class, MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor)); |
468 | devfs_remove("input/js%d", joydev->minor); | 468 | devfs_remove("input/js%d", joydev->minor); |
469 | joydev->exist = 0; | 469 | joydev->exist = 0; |
470 | 470 | ||