diff options
author | Greg KH <greg@press.(none)> | 2005-10-18 01:14:35 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-18 01:14:35 -0700 |
commit | 6cf5df3526317de1fa6815a2bd53608c248ba633 (patch) | |
tree | 85ed896f6ca96d7c32d25545daee468052d7eb50 /driver | |
parent | e4a7cf467712336fe4641b96fe33b44dd6afb5bf (diff) | |
download | patches-6cf5df3526317de1fa6815a2bd53608c248ba633.tar.gz |
add input fixes and update some others
Also add a bunch of usb patches
Diffstat (limited to 'driver')
-rw-r--r-- | driver/input-remove-custom-hotplug.patch | 10 | ||||
-rw-r--r-- | driver/input-remove-input_class.patch | 6 | ||||
-rw-r--r-- | driver/input-rename-input_dev_class.patch | 12 | ||||
-rw-r--r-- | driver/input_backward_compatible_symlink.patch | 48 | ||||
-rw-r--r-- | driver/input_oops_fix.patch | 57 |
5 files changed, 119 insertions, 14 deletions
diff --git a/driver/input-remove-custom-hotplug.patch b/driver/input-remove-custom-hotplug.patch index 058ef786adba2..664cef38e7ca6 100644 --- a/driver/input-remove-custom-hotplug.patch +++ b/driver/input-remove-custom-hotplug.patch @@ -206,7 +206,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> len += sprintf(buf + len, "\n"); -@@ -684,7 +565,7 @@ static struct attribute_group input_dev_ +@@ -689,7 +570,7 @@ static struct attribute_group input_dev_ static ssize_t input_dev_show_cap_##bm(struct class_device *dev, char *buf) \ { \ struct input_dev *input_dev = to_input_dev(dev); \ @@ -215,7 +215,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } \ static CLASS_DEVICE_ATTR(bm, S_IRUGO, input_dev_show_cap_##bm, NULL); -@@ -724,9 +605,95 @@ static void input_dev_release(struct cla +@@ -729,9 +610,95 @@ static void input_dev_release(struct cla module_put(THIS_MODULE); } @@ -308,10 +308,10 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> .name = "input", .release = input_dev_release, + .hotplug = input_dev_hotplug, - .class_dev_attrs = input_dev_attrs, }; -@@ -805,10 +772,6 @@ void input_register_device(struct input_ + struct input_dev *input_allocate_device(void) +@@ -810,10 +777,6 @@ void input_register_device(struct input_ input_link_handle(handle); @@ -322,7 +322,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> input_wakeup_procfs_readers(); } -@@ -827,10 +790,6 @@ void input_unregister_device(struct inpu +@@ -832,10 +795,6 @@ void input_unregister_device(struct inpu handle->handler->disconnect(handle); } diff --git a/driver/input-remove-input_class.patch b/driver/input-remove-input_class.patch index 7d4c7945806f0..79dd4941de049 100644 --- a/driver/input-remove-input_class.patch +++ b/driver/input-remove-input_class.patch @@ -18,7 +18,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> EXPORT_SYMBOL_GPL(input_dev_class); #define INPUT_DEVICES 256 -@@ -922,8 +921,6 @@ static struct file_operations input_fops +@@ -927,8 +926,6 @@ static struct file_operations input_fops .open = input_open_file, }; @@ -27,7 +27,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> static int __init input_init(void) { int err; -@@ -934,27 +931,19 @@ static int __init input_init(void) +@@ -939,27 +936,19 @@ static int __init input_init(void) return err; } @@ -58,7 +58,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> fail1: class_unregister(&input_dev_class); return err; } -@@ -963,7 +952,6 @@ static void __exit input_exit(void) +@@ -968,7 +957,6 @@ static void __exit input_exit(void) { input_proc_exit(); unregister_chrdev(INPUT_MAJOR, "input"); diff --git a/driver/input-rename-input_dev_class.patch b/driver/input-rename-input_dev_class.patch index 20975dfaed1d6..752e1f264d369 100644 --- a/driver/input-rename-input_dev_class.patch +++ b/driver/input-rename-input_dev_class.patch @@ -44,7 +44,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #define INPUT_DEVICES 256 -@@ -724,8 +724,8 @@ static void input_dev_release(struct cla +@@ -729,8 +729,8 @@ static void input_dev_release(struct cla module_put(THIS_MODULE); } @@ -53,9 +53,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +struct class input_class = { + .name = "input", .release = input_dev_release, - .class_dev_attrs = input_dev_attrs, }; -@@ -737,7 +737,7 @@ struct input_dev *input_allocate_device( + +@@ -741,7 +741,7 @@ struct input_dev *input_allocate_device( dev = kzalloc(sizeof(struct input_dev), GFP_KERNEL); if (dev) { dev->dynalloc = 1; @@ -64,7 +64,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> class_device_initialize(&dev->cdev); INIT_LIST_HEAD(&dev->h_list); INIT_LIST_HEAD(&dev->node); -@@ -925,7 +925,7 @@ static int __init input_init(void) +@@ -930,7 +930,7 @@ static int __init input_init(void) { int err; @@ -73,7 +73,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (err) { printk(KERN_ERR "input: unable to register input_dev class\n"); return err; -@@ -944,7 +944,7 @@ static int __init input_init(void) +@@ -949,7 +949,7 @@ static int __init input_init(void) return 0; fail2: input_proc_exit(); @@ -82,7 +82,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return err; } -@@ -952,7 +952,7 @@ static void __exit input_exit(void) +@@ -957,7 +957,7 @@ static void __exit input_exit(void) { input_proc_exit(); unregister_chrdev(INPUT_MAJOR, "input"); diff --git a/driver/input_backward_compatible_symlink.patch b/driver/input_backward_compatible_symlink.patch new file mode 100644 index 0000000000000..b4ecf13db9148 --- /dev/null +++ b/driver/input_backward_compatible_symlink.patch @@ -0,0 +1,48 @@ +From: Greg Kroah-Hartman <gregkh@suse.de> +Subject: INPUT: Create symlinks for backwards compatibility + +This creates symlinks in /sys/class/input/ to the nested class devices +to help userspace cope with the nesting. + +Unfortunatly udev still needs to be updated as it can't handle symlinks +properly here :( + +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/input/evdev.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- gregkh-2.6.orig/drivers/input/evdev.c ++++ gregkh-2.6/drivers/input/evdev.c +@@ -661,6 +661,7 @@ static struct file_operations evdev_fops + static struct input_handle *evdev_connect(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id) + { + struct evdev *evdev; ++ struct class_device *cdev; + int minor; + + for (minor = 0; minor < EVDEV_MINORS && evdev_table[minor]; minor++); +@@ -686,10 +687,13 @@ static struct input_handle *evdev_connec + + evdev_table[minor] = evdev; + +- class_device_create(&input_class, &dev->cdev, ++ cdev = class_device_create(&input_class, &dev->cdev, + MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), + dev->cdev.dev, "event%d", minor); + ++ /* temporary symlink to keep userspace happy */ ++ sysfs_create_link(&input_class.subsys.kset.kobj, &cdev->kobj, evdev->name); ++ + return &evdev->handle; + } + +@@ -698,6 +702,7 @@ static void evdev_disconnect(struct inpu + struct evdev *evdev = handle->private; + struct evdev_list *list; + ++ sysfs_remove_link(&input_class.subsys.kset.kobj, evdev->name); + class_device_destroy(&input_class, + MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor)); + evdev->exist = 0; diff --git a/driver/input_oops_fix.patch b/driver/input_oops_fix.patch new file mode 100644 index 0000000000000..acc62c4384bef --- /dev/null +++ b/driver/input_oops_fix.patch @@ -0,0 +1,57 @@ +From: Greg Kroah-Hartman <gregkh@suse.de> +Subject: INPUT: Fix oops when accessing sysfs files of nested input devices + +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + drivers/input/input.c | 19 ++++++++++++------- + 1 file changed, 12 insertions(+), 7 deletions(-) + +--- gregkh-2.6.orig/drivers/input/input.c ++++ gregkh-2.6/drivers/input/input.c +@@ -642,17 +642,22 @@ static ssize_t input_dev_show_##name(str + up(&input_dev->sem); \ + \ + return retval; \ +-} ++} \ ++static CLASS_DEVICE_ATTR(name, S_IRUGO, input_dev_show_##name, NULL); + + INPUT_DEV_STRING_ATTR_SHOW(name); + INPUT_DEV_STRING_ATTR_SHOW(phys); + INPUT_DEV_STRING_ATTR_SHOW(uniq); + +-static struct class_device_attribute input_dev_attrs[] = { +- __ATTR(name, S_IRUGO, input_dev_show_name, NULL), +- __ATTR(phys, S_IRUGO, input_dev_show_phys, NULL), +- __ATTR(uniq, S_IRUGO, input_dev_show_uniq, NULL), +- __ATTR_NULL ++static struct attribute *input_dev_attrs[] = { ++ &class_device_attr_name.attr, ++ &class_device_attr_phys.attr, ++ &class_device_attr_uniq.attr, ++ NULL ++}; ++ ++static struct attribute_group input_dev_group = { ++ .attrs = input_dev_attrs, + }; + + #define INPUT_DEV_ID_ATTR(name) \ +@@ -728,7 +733,6 @@ static void input_dev_release(struct cla + struct class input_dev_class = { + .name = "input_dev", + .release = input_dev_release, +- .class_dev_attrs = input_dev_attrs, + }; + + struct input_dev *input_allocate_device(void) +@@ -766,6 +770,7 @@ static void input_register_classdevice(s + kfree(path); + + class_device_add(&dev->cdev); ++ sysfs_create_group(&dev->cdev.kobj, &input_dev_group); + sysfs_create_group(&dev->cdev.kobj, &input_dev_id_attr_group); + sysfs_create_group(&dev->cdev.kobj, &input_dev_caps_attr_group); + } |