diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-28 21:32:01 -0400 | 
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-28 21:32:01 -0400 | 
| commit | 5615ca7906aefbdc3318604c89db5931d0a25910 (patch) | |
| tree | c34bcc7e314f49005ad88ac84c908128729c0329 /drivers/input/tsdev.c | |
| parent | 7a9f8f93d2dad38f30fbc79d8a1e6517373aa4b6 (diff) | |
| parent | 9dfb7808fb05643b0d06df7411b94d9546696bf1 (diff) | |
Merge branch 'upstream'
Diffstat (limited to 'drivers/input/tsdev.c')
| -rw-r--r-- | drivers/input/tsdev.c | 19 | 
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c index 50c63a155156..ca1547929d62 100644 --- a/drivers/input/tsdev.c +++ b/drivers/input/tsdev.c  | |||
| @@ -53,7 +53,6 @@ | |||
| 53 | #include <linux/random.h> | 53 | #include <linux/random.h> | 
| 54 | #include <linux/time.h> | 54 | #include <linux/time.h> | 
| 55 | #include <linux/device.h> | 55 | #include <linux/device.h> | 
| 56 | #include <linux/devfs_fs_kernel.h> | ||
| 57 | 56 | ||
| 58 | #ifndef CONFIG_INPUT_TSDEV_SCREEN_X | 57 | #ifndef CONFIG_INPUT_TSDEV_SCREEN_X | 
| 59 | #define CONFIG_INPUT_TSDEV_SCREEN_X 240 | 58 | #define CONFIG_INPUT_TSDEV_SCREEN_X 240 | 
| @@ -369,6 +368,7 @@ static struct input_handle *tsdev_connect(struct input_handler *handler, | |||
| 369 | struct input_device_id *id) | 368 | struct input_device_id *id) | 
| 370 | { | 369 | { | 
| 371 | struct tsdev *tsdev; | 370 | struct tsdev *tsdev; | 
| 371 | struct class_device *cdev; | ||
| 372 | int minor, delta; | 372 | int minor, delta; | 
| 373 | 373 | ||
| 374 | for (minor = 0; minor < TSDEV_MINORS/2 && tsdev_table[minor]; | 374 | for (minor = 0; minor < TSDEV_MINORS/2 && tsdev_table[minor]; | 
| @@ -410,13 +410,13 @@ static struct input_handle *tsdev_connect(struct input_handler *handler, | |||
| 410 | 410 | ||
| 411 | tsdev_table[minor] = tsdev; | 411 | tsdev_table[minor] = tsdev; | 
| 412 | 412 | ||
| 413 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor), | 413 | cdev = class_device_create(&input_class, &dev->cdev, | 
| 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), | ||
| 416 | S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor); | ||
| 417 | class_device_create(input_class, | ||
| 418 | MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor), | 414 | MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor), | 
| 419 | dev->dev, "ts%d", minor); | 415 | dev->cdev.dev, tsdev->name); | 
| 416 | |||
| 417 | /* temporary symlink to keep userspace happy */ | ||
| 418 | sysfs_create_link(&input_class.subsys.kset.kobj, &cdev->kobj, | ||
| 419 | tsdev->name); | ||
| 420 | 420 | ||
| 421 | return &tsdev->handle; | 421 | return &tsdev->handle; | 
| 422 | } | 422 | } | 
| @@ -426,10 +426,9 @@ 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_device_destroy(input_class, | 429 | sysfs_remove_link(&input_class.subsys.kset.kobj, tsdev->name); | 
| 430 | class_device_destroy(&input_class, | ||
| 430 | MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor)); | 431 | MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor)); | 
| 431 | devfs_remove("input/ts%d", tsdev->minor); | ||
| 432 | devfs_remove("input/tsraw%d", tsdev->minor); | ||
| 433 | tsdev->exist = 0; | 432 | tsdev->exist = 0; | 
| 434 | 433 | ||
| 435 | if (tsdev->open) { | 434 | if (tsdev->open) { | 
