diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/evdev.c | 9 | ||||
-rw-r--r-- | drivers/input/gameport/gameport.c | 6 | ||||
-rw-r--r-- | drivers/input/input.c | 10 | ||||
-rw-r--r-- | drivers/input/joydev.c | 8 | ||||
-rw-r--r-- | drivers/input/keyboard/atkbd.c | 4 | ||||
-rw-r--r-- | drivers/input/mouse/alps.c | 2 | ||||
-rw-r--r-- | drivers/input/mouse/psmouse.h | 4 | ||||
-rw-r--r-- | drivers/input/mousedev.c | 16 | ||||
-rw-r--r-- | drivers/input/serio/serio.c | 16 | ||||
-rw-r--r-- | drivers/input/tsdev.c | 9 |
10 files changed, 44 insertions, 40 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 17552a29978b..556264b43425 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -431,9 +431,9 @@ static struct input_handle *evdev_connect(struct input_handler *handler, struct | |||
431 | 431 | ||
432 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), | 432 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), |
433 | S_IFCHR|S_IRUGO|S_IWUSR, "input/event%d", minor); | 433 | S_IFCHR|S_IRUGO|S_IWUSR, "input/event%d", minor); |
434 | class_simple_device_add(input_class, | 434 | class_device_create(input_class, |
435 | MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), | 435 | MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), |
436 | dev->dev, "event%d", minor); | 436 | dev->dev, "event%d", minor); |
437 | 437 | ||
438 | return &evdev->handle; | 438 | return &evdev->handle; |
439 | } | 439 | } |
@@ -443,7 +443,8 @@ static void evdev_disconnect(struct input_handle *handle) | |||
443 | struct evdev *evdev = handle->private; | 443 | struct evdev *evdev = handle->private; |
444 | struct evdev_list *list; | 444 | struct evdev_list *list; |
445 | 445 | ||
446 | class_simple_device_remove(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor)); | 446 | class_device_destroy(input_class, |
447 | MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor)); | ||
447 | devfs_remove("input/event%d", evdev->minor); | 448 | devfs_remove("input/event%d", evdev->minor); |
448 | evdev->exist = 0; | 449 | evdev->exist = 0; |
449 | 450 | ||
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c index f20c3f23388b..e152d0fa0cdd 100644 --- a/drivers/input/gameport/gameport.c +++ b/drivers/input/gameport/gameport.c | |||
@@ -134,7 +134,7 @@ static int gameport_measure_speed(struct gameport *gameport) | |||
134 | } | 134 | } |
135 | 135 | ||
136 | gameport_close(gameport); | 136 | gameport_close(gameport); |
137 | return (cpu_data[_smp_processor_id()].loops_per_jiffy * (unsigned long)HZ / (1000 / 50)) / (tx < 1 ? 1 : tx); | 137 | return (cpu_data[raw_smp_processor_id()].loops_per_jiffy * (unsigned long)HZ / (1000 / 50)) / (tx < 1 ? 1 : tx); |
138 | 138 | ||
139 | #else | 139 | #else |
140 | 140 | ||
@@ -453,13 +453,13 @@ static int gameport_thread(void *nothing) | |||
453 | * Gameport port operations | 453 | * Gameport port operations |
454 | */ | 454 | */ |
455 | 455 | ||
456 | static ssize_t gameport_show_description(struct device *dev, char *buf) | 456 | static ssize_t gameport_show_description(struct device *dev, struct device_attribute *attr, char *buf) |
457 | { | 457 | { |
458 | struct gameport *gameport = to_gameport_port(dev); | 458 | struct gameport *gameport = to_gameport_port(dev); |
459 | return sprintf(buf, "%s\n", gameport->name); | 459 | return sprintf(buf, "%s\n", gameport->name); |
460 | } | 460 | } |
461 | 461 | ||
462 | static ssize_t gameport_rebind_driver(struct device *dev, const char *buf, size_t count) | 462 | static ssize_t gameport_rebind_driver(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
463 | { | 463 | { |
464 | struct gameport *gameport = to_gameport_port(dev); | 464 | struct gameport *gameport = to_gameport_port(dev); |
465 | struct device_driver *drv; | 465 | struct device_driver *drv; |
diff --git a/drivers/input/input.c b/drivers/input/input.c index 3385dd03abfc..83c77c990dda 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -702,13 +702,13 @@ static int __init input_proc_init(void) | |||
702 | static inline int input_proc_init(void) { return 0; } | 702 | static inline int input_proc_init(void) { return 0; } |
703 | #endif | 703 | #endif |
704 | 704 | ||
705 | struct class_simple *input_class; | 705 | struct class *input_class; |
706 | 706 | ||
707 | static int __init input_init(void) | 707 | static int __init input_init(void) |
708 | { | 708 | { |
709 | int retval = -ENOMEM; | 709 | int retval = -ENOMEM; |
710 | 710 | ||
711 | input_class = class_simple_create(THIS_MODULE, "input"); | 711 | input_class = class_create(THIS_MODULE, "input"); |
712 | if (IS_ERR(input_class)) | 712 | if (IS_ERR(input_class)) |
713 | return PTR_ERR(input_class); | 713 | return PTR_ERR(input_class); |
714 | input_proc_init(); | 714 | input_proc_init(); |
@@ -718,7 +718,7 @@ static int __init input_init(void) | |||
718 | remove_proc_entry("devices", proc_bus_input_dir); | 718 | remove_proc_entry("devices", proc_bus_input_dir); |
719 | remove_proc_entry("handlers", proc_bus_input_dir); | 719 | remove_proc_entry("handlers", proc_bus_input_dir); |
720 | remove_proc_entry("input", proc_bus); | 720 | remove_proc_entry("input", proc_bus); |
721 | class_simple_destroy(input_class); | 721 | class_destroy(input_class); |
722 | return retval; | 722 | return retval; |
723 | } | 723 | } |
724 | 724 | ||
@@ -728,7 +728,7 @@ static int __init input_init(void) | |||
728 | remove_proc_entry("handlers", proc_bus_input_dir); | 728 | remove_proc_entry("handlers", proc_bus_input_dir); |
729 | remove_proc_entry("input", proc_bus); | 729 | remove_proc_entry("input", proc_bus); |
730 | unregister_chrdev(INPUT_MAJOR, "input"); | 730 | unregister_chrdev(INPUT_MAJOR, "input"); |
731 | class_simple_destroy(input_class); | 731 | class_destroy(input_class); |
732 | } | 732 | } |
733 | return retval; | 733 | return retval; |
734 | } | 734 | } |
@@ -741,7 +741,7 @@ static void __exit input_exit(void) | |||
741 | 741 | ||
742 | devfs_remove("input"); | 742 | devfs_remove("input"); |
743 | unregister_chrdev(INPUT_MAJOR, "input"); | 743 | unregister_chrdev(INPUT_MAJOR, "input"); |
744 | class_simple_destroy(input_class); | 744 | class_destroy(input_class); |
745 | } | 745 | } |
746 | 746 | ||
747 | subsys_initcall(input_init); | 747 | subsys_initcall(input_init); |
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 627d343dfba1..39775fc380c7 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
@@ -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 | ||
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 48fdf1e517cf..82fad9a23ace 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -219,11 +219,11 @@ static ssize_t atkbd_attr_set_helper(struct device *dev, const char *buf, size_t | |||
219 | #define ATKBD_DEFINE_ATTR(_name) \ | 219 | #define ATKBD_DEFINE_ATTR(_name) \ |
220 | static ssize_t atkbd_show_##_name(struct atkbd *, char *); \ | 220 | static ssize_t atkbd_show_##_name(struct atkbd *, char *); \ |
221 | static ssize_t atkbd_set_##_name(struct atkbd *, const char *, size_t); \ | 221 | static ssize_t atkbd_set_##_name(struct atkbd *, const char *, size_t); \ |
222 | static ssize_t atkbd_do_show_##_name(struct device *d, char *b) \ | 222 | static ssize_t atkbd_do_show_##_name(struct device *d, struct device_attribute *attr, char *b) \ |
223 | { \ | 223 | { \ |
224 | return atkbd_attr_show_helper(d, b, atkbd_show_##_name); \ | 224 | return atkbd_attr_show_helper(d, b, atkbd_show_##_name); \ |
225 | } \ | 225 | } \ |
226 | static ssize_t atkbd_do_set_##_name(struct device *d, const char *b, size_t s) \ | 226 | static ssize_t atkbd_do_set_##_name(struct device *d, struct device_attribute *attr, const char *b, size_t s) \ |
227 | { \ | 227 | { \ |
228 | return atkbd_attr_set_helper(d, b, s, atkbd_set_##_name); \ | 228 | return atkbd_attr_set_helper(d, b, s, atkbd_set_##_name); \ |
229 | } \ | 229 | } \ |
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 42a9f7f6f8cb..7bf4be733e9a 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -352,7 +352,7 @@ static int alps_reconnect(struct psmouse *psmouse) | |||
352 | if (alps_get_status(psmouse, param)) | 352 | if (alps_get_status(psmouse, param)) |
353 | return -1; | 353 | return -1; |
354 | 354 | ||
355 | if (param[0] & 0x04) | 355 | if (!(param[0] & 0x04)) |
356 | alps_tap_mode(psmouse, 1); | 356 | alps_tap_mode(psmouse, 1); |
357 | 357 | ||
358 | if (alps_absolute_mode(psmouse)) { | 358 | if (alps_absolute_mode(psmouse)) { |
diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h index bda5b065d03c..79e17a0c4664 100644 --- a/drivers/input/mouse/psmouse.h +++ b/drivers/input/mouse/psmouse.h | |||
@@ -91,11 +91,11 @@ ssize_t psmouse_attr_set_helper(struct device *dev, const char *buf, size_t coun | |||
91 | #define PSMOUSE_DEFINE_ATTR(_name) \ | 91 | #define PSMOUSE_DEFINE_ATTR(_name) \ |
92 | static ssize_t psmouse_attr_show_##_name(struct psmouse *, char *); \ | 92 | static ssize_t psmouse_attr_show_##_name(struct psmouse *, char *); \ |
93 | static ssize_t psmouse_attr_set_##_name(struct psmouse *, const char *, size_t);\ | 93 | static ssize_t psmouse_attr_set_##_name(struct psmouse *, const char *, size_t);\ |
94 | static ssize_t psmouse_do_show_##_name(struct device *d, char *b) \ | 94 | static ssize_t psmouse_do_show_##_name(struct device *d, struct device_attribute *attr, char *b) \ |
95 | { \ | 95 | { \ |
96 | return psmouse_attr_show_helper(d, b, psmouse_attr_show_##_name); \ | 96 | return psmouse_attr_show_helper(d, b, psmouse_attr_show_##_name); \ |
97 | } \ | 97 | } \ |
98 | static ssize_t psmouse_do_set_##_name(struct device *d, const char *b, size_t s)\ | 98 | static ssize_t psmouse_do_set_##_name(struct device *d, struct device_attribute *attr, const char *b, size_t s)\ |
99 | { \ | 99 | { \ |
100 | return psmouse_attr_set_helper(d, b, s, psmouse_attr_set_##_name); \ | 100 | return psmouse_attr_set_helper(d, b, s, psmouse_attr_set_##_name); \ |
101 | } \ | 101 | } \ |
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 96fb9870834a..062848ac7e6b 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c | |||
@@ -647,9 +647,9 @@ static struct input_handle *mousedev_connect(struct input_handler *handler, stru | |||
647 | 647 | ||
648 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), | 648 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), |
649 | S_IFCHR|S_IRUGO|S_IWUSR, "input/mouse%d", minor); | 649 | S_IFCHR|S_IRUGO|S_IWUSR, "input/mouse%d", minor); |
650 | class_simple_device_add(input_class, | 650 | class_device_create(input_class, |
651 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), | 651 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), |
652 | dev->dev, "mouse%d", minor); | 652 | dev->dev, "mouse%d", minor); |
653 | 653 | ||
654 | return &mousedev->handle; | 654 | return &mousedev->handle; |
655 | } | 655 | } |
@@ -659,7 +659,8 @@ static void mousedev_disconnect(struct input_handle *handle) | |||
659 | struct mousedev *mousedev = handle->private; | 659 | struct mousedev *mousedev = handle->private; |
660 | struct mousedev_list *list; | 660 | struct mousedev_list *list; |
661 | 661 | ||
662 | class_simple_device_remove(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor)); | 662 | class_device_destroy(input_class, |
663 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor)); | ||
663 | devfs_remove("input/mouse%d", mousedev->minor); | 664 | devfs_remove("input/mouse%d", mousedev->minor); |
664 | mousedev->exist = 0; | 665 | mousedev->exist = 0; |
665 | 666 | ||
@@ -735,8 +736,8 @@ static int __init mousedev_init(void) | |||
735 | 736 | ||
736 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), | 737 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), |
737 | S_IFCHR|S_IRUGO|S_IWUSR, "input/mice"); | 738 | S_IFCHR|S_IRUGO|S_IWUSR, "input/mice"); |
738 | class_simple_device_add(input_class, MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), | 739 | class_device_create(input_class, |
739 | NULL, "mice"); | 740 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), NULL, "mice"); |
740 | 741 | ||
741 | #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX | 742 | #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX |
742 | if (!(psaux_registered = !misc_register(&psaux_mouse))) | 743 | if (!(psaux_registered = !misc_register(&psaux_mouse))) |
@@ -755,7 +756,8 @@ static void __exit mousedev_exit(void) | |||
755 | misc_deregister(&psaux_mouse); | 756 | misc_deregister(&psaux_mouse); |
756 | #endif | 757 | #endif |
757 | devfs_remove("input/mice"); | 758 | devfs_remove("input/mice"); |
758 | class_simple_device_remove(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX)); | 759 | class_device_destroy(input_class, |
760 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX)); | ||
759 | input_unregister_handler(&mousedev_handler); | 761 | input_unregister_handler(&mousedev_handler); |
760 | } | 762 | } |
761 | 763 | ||
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index 0beacb77ee18..feab4970406e 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c | |||
@@ -358,31 +358,31 @@ static int serio_thread(void *nothing) | |||
358 | * Serio port operations | 358 | * Serio port operations |
359 | */ | 359 | */ |
360 | 360 | ||
361 | static ssize_t serio_show_description(struct device *dev, char *buf) | 361 | static ssize_t serio_show_description(struct device *dev, struct device_attribute *attr, char *buf) |
362 | { | 362 | { |
363 | struct serio *serio = to_serio_port(dev); | 363 | struct serio *serio = to_serio_port(dev); |
364 | return sprintf(buf, "%s\n", serio->name); | 364 | return sprintf(buf, "%s\n", serio->name); |
365 | } | 365 | } |
366 | 366 | ||
367 | static ssize_t serio_show_id_type(struct device *dev, char *buf) | 367 | static ssize_t serio_show_id_type(struct device *dev, struct device_attribute *attr, char *buf) |
368 | { | 368 | { |
369 | struct serio *serio = to_serio_port(dev); | 369 | struct serio *serio = to_serio_port(dev); |
370 | return sprintf(buf, "%02x\n", serio->id.type); | 370 | return sprintf(buf, "%02x\n", serio->id.type); |
371 | } | 371 | } |
372 | 372 | ||
373 | static ssize_t serio_show_id_proto(struct device *dev, char *buf) | 373 | static ssize_t serio_show_id_proto(struct device *dev, struct device_attribute *attr, char *buf) |
374 | { | 374 | { |
375 | struct serio *serio = to_serio_port(dev); | 375 | struct serio *serio = to_serio_port(dev); |
376 | return sprintf(buf, "%02x\n", serio->id.proto); | 376 | return sprintf(buf, "%02x\n", serio->id.proto); |
377 | } | 377 | } |
378 | 378 | ||
379 | static ssize_t serio_show_id_id(struct device *dev, char *buf) | 379 | static ssize_t serio_show_id_id(struct device *dev, struct device_attribute *attr, char *buf) |
380 | { | 380 | { |
381 | struct serio *serio = to_serio_port(dev); | 381 | struct serio *serio = to_serio_port(dev); |
382 | return sprintf(buf, "%02x\n", serio->id.id); | 382 | return sprintf(buf, "%02x\n", serio->id.id); |
383 | } | 383 | } |
384 | 384 | ||
385 | static ssize_t serio_show_id_extra(struct device *dev, char *buf) | 385 | static ssize_t serio_show_id_extra(struct device *dev, struct device_attribute *attr, char *buf) |
386 | { | 386 | { |
387 | struct serio *serio = to_serio_port(dev); | 387 | struct serio *serio = to_serio_port(dev); |
388 | return sprintf(buf, "%02x\n", serio->id.extra); | 388 | return sprintf(buf, "%02x\n", serio->id.extra); |
@@ -406,7 +406,7 @@ static struct attribute_group serio_id_attr_group = { | |||
406 | .attrs = serio_device_id_attrs, | 406 | .attrs = serio_device_id_attrs, |
407 | }; | 407 | }; |
408 | 408 | ||
409 | static ssize_t serio_rebind_driver(struct device *dev, const char *buf, size_t count) | 409 | static ssize_t serio_rebind_driver(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
410 | { | 410 | { |
411 | struct serio *serio = to_serio_port(dev); | 411 | struct serio *serio = to_serio_port(dev); |
412 | struct device_driver *drv; | 412 | struct device_driver *drv; |
@@ -437,13 +437,13 @@ static ssize_t serio_rebind_driver(struct device *dev, const char *buf, size_t c | |||
437 | return retval; | 437 | return retval; |
438 | } | 438 | } |
439 | 439 | ||
440 | static ssize_t serio_show_bind_mode(struct device *dev, char *buf) | 440 | static ssize_t serio_show_bind_mode(struct device *dev, struct device_attribute *attr, char *buf) |
441 | { | 441 | { |
442 | struct serio *serio = to_serio_port(dev); | 442 | struct serio *serio = to_serio_port(dev); |
443 | return sprintf(buf, "%s\n", serio->manual_bind ? "manual" : "auto"); | 443 | return sprintf(buf, "%s\n", serio->manual_bind ? "manual" : "auto"); |
444 | } | 444 | } |
445 | 445 | ||
446 | static ssize_t serio_set_bind_mode(struct device *dev, const char *buf, size_t count) | 446 | static ssize_t serio_set_bind_mode(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
447 | { | 447 | { |
448 | struct serio *serio = to_serio_port(dev); | 448 | struct serio *serio = to_serio_port(dev); |
449 | int retval; | 449 | int retval; |
diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c index d0afba85720b..50c63a155156 100644 --- a/drivers/input/tsdev.c +++ b/drivers/input/tsdev.c | |||
@@ -414,9 +414,9 @@ static struct input_handle *tsdev_connect(struct input_handler *handler, | |||
414 | S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor); | 414 | S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor); |
415 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2), | 415 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2), |
416 | S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor); | 416 | S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor); |
417 | class_simple_device_add(input_class, | 417 | class_device_create(input_class, |
418 | MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor), | 418 | MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor), |
419 | dev->dev, "ts%d", minor); | 419 | dev->dev, "ts%d", minor); |
420 | 420 | ||
421 | return &tsdev->handle; | 421 | return &tsdev->handle; |
422 | } | 422 | } |
@@ -426,7 +426,8 @@ static void tsdev_disconnect(struct input_handle *handle) | |||
426 | struct tsdev *tsdev = handle->private; | 426 | struct tsdev *tsdev = handle->private; |
427 | struct tsdev_list *list; | 427 | struct tsdev_list *list; |
428 | 428 | ||
429 | class_simple_device_remove(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor)); | 429 | class_device_destroy(input_class, |
430 | MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor)); | ||
430 | devfs_remove("input/ts%d", tsdev->minor); | 431 | devfs_remove("input/ts%d", tsdev->minor); |
431 | devfs_remove("input/tsraw%d", tsdev->minor); | 432 | devfs_remove("input/tsraw%d", tsdev->minor); |
432 | tsdev->exist = 0; | 433 | tsdev->exist = 0; |