Le 18.10.2005 08:58, Greg KH a écrit :
> I know this patch doesn't have the proc path, but it does fix an easy
> oops that I can generate from sysfs input devices. Can you try it out
> to see if it fixes your issue too?
>
> thanks,
>
> greg k-h
No sorry, it doesn't fix my oops.
By the way, your patch didn't apply to my rc4-mm1 tree.
The one I had to apply is attached.
I might add some debugging code into my tree to help debugging.
But, you'll have to tell what code and where :)
Brice
--- linux-mm/drivers/input/input.c.old 2005-10-18 09:18:13.000000000 +0200
+++ linux-mm/drivers/input/input.c 2005-10-18 09:18:17.000000000 +0200
@@ -641,17 +641,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) \
@@ -727,7 +732,6 @@ static void input_dev_release(struct cla
static 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)
@@ -765,6 +769,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);
}
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]