diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-20 13:17:02 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-20 13:17:02 -0400 |
| commit | 93db6294958f62643a917e44d1abc85440e600cf (patch) | |
| tree | 33de2c41b0f70d209d64487d1a2bba6d673015ef /drivers/input/joydev.c | |
| parent | 43813f399c72aa22e01a680559c1cb5274bf2140 (diff) | |
| parent | eef3e4cab72eaf5345e3c73b2975c194a714f6cd (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (35 commits)
Input: add driver for Synaptics I2C touchpad
Input: synaptics - add support for reporting x/y resolution
Input: ALPS - handle touchpoints buttons correctly
Input: gpio-keys - change timer to workqueue
Input: ads7846 - pin change interrupt support
Input: add support for touchscreen on W90P910 ARM platform
Input: appletouch - improve finger detection
Input: wacom - clear Intuos4 wheel data when finger leaves proximity
Input: ucb1400 - move static function from header into core
Input: add driver for EETI touchpanels
Input: ads7846 - more detailed model name in sysfs
Input: ads7846 - support swapping x and y axes
Input: ati_remote2 - use non-atomic bitops
Input: introduce lm8323 keypad driver
Input: psmouse - ESD workaround fix for OLPC XO touchpad
Input: tsc2007 - make sure platform provides get_pendown_state()
Input: uinput - flush all pending ff effects before destroying device
Input: simplify name handling for certain input handles
Input: serio - do not use deprecated dev.power.power_state
Input: wacom - add support for Intuos4 tablets
...
Diffstat (limited to 'drivers/input/joydev.c')
| -rw-r--r-- | drivers/input/joydev.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 012a5e753991..0e12f89276a3 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
| @@ -39,7 +39,6 @@ struct joydev { | |||
| 39 | int exist; | 39 | int exist; |
| 40 | int open; | 40 | int open; |
| 41 | int minor; | 41 | int minor; |
| 42 | char name[16]; | ||
| 43 | struct input_handle handle; | 42 | struct input_handle handle; |
| 44 | wait_queue_head_t wait; | 43 | wait_queue_head_t wait; |
| 45 | struct list_head client_list; | 44 | struct list_head client_list; |
| @@ -537,12 +536,14 @@ static int joydev_ioctl_common(struct joydev *joydev, | |||
| 537 | default: | 536 | default: |
| 538 | if ((cmd & ~IOCSIZE_MASK) == JSIOCGNAME(0)) { | 537 | if ((cmd & ~IOCSIZE_MASK) == JSIOCGNAME(0)) { |
| 539 | int len; | 538 | int len; |
| 540 | if (!dev->name) | 539 | const char *name = dev_name(&dev->dev); |
| 540 | |||
| 541 | if (!name) | ||
| 541 | return 0; | 542 | return 0; |
| 542 | len = strlen(dev->name) + 1; | 543 | len = strlen(name) + 1; |
| 543 | if (len > _IOC_SIZE(cmd)) | 544 | if (len > _IOC_SIZE(cmd)) |
| 544 | len = _IOC_SIZE(cmd); | 545 | len = _IOC_SIZE(cmd); |
| 545 | if (copy_to_user(argp, dev->name, len)) | 546 | if (copy_to_user(argp, name, len)) |
| 546 | return -EFAULT; | 547 | return -EFAULT; |
| 547 | return len; | 548 | return len; |
| 548 | } | 549 | } |
| @@ -742,13 +743,13 @@ static int joydev_connect(struct input_handler *handler, struct input_dev *dev, | |||
| 742 | mutex_init(&joydev->mutex); | 743 | mutex_init(&joydev->mutex); |
| 743 | init_waitqueue_head(&joydev->wait); | 744 | init_waitqueue_head(&joydev->wait); |
| 744 | 745 | ||
| 745 | snprintf(joydev->name, sizeof(joydev->name), "js%d", minor); | 746 | dev_set_name(&joydev->dev, "js%d", minor); |
| 746 | joydev->exist = 1; | 747 | joydev->exist = 1; |
| 747 | joydev->minor = minor; | 748 | joydev->minor = minor; |
| 748 | 749 | ||
| 749 | joydev->exist = 1; | 750 | joydev->exist = 1; |
| 750 | joydev->handle.dev = input_get_device(dev); | 751 | joydev->handle.dev = input_get_device(dev); |
| 751 | joydev->handle.name = joydev->name; | 752 | joydev->handle.name = dev_name(&joydev->dev); |
| 752 | joydev->handle.handler = handler; | 753 | joydev->handle.handler = handler; |
| 753 | joydev->handle.private = joydev; | 754 | joydev->handle.private = joydev; |
| 754 | 755 | ||
| @@ -797,7 +798,6 @@ static int joydev_connect(struct input_handler *handler, struct input_dev *dev, | |||
| 797 | } | 798 | } |
| 798 | } | 799 | } |
| 799 | 800 | ||
| 800 | dev_set_name(&joydev->dev, joydev->name); | ||
| 801 | joydev->dev.devt = MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor); | 801 | joydev->dev.devt = MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor); |
| 802 | joydev->dev.class = &input_class; | 802 | joydev->dev.class = &input_class; |
| 803 | joydev->dev.parent = &dev->dev; | 803 | joydev->dev.parent = &dev->dev; |
