system died in sysfs node making process

来源:互联网 发布:mac如何用鼠标复制粘贴 编辑:程序博客网 时间:2024/05/22 11:30

1.

sysfs_create_group(&light3310_data->xx_input_dev->dev.kobj, &light_xx_attribute_group);

2.

static struct attribute_group light_xx_attribute_group = {
 .name = "driver", 
 .attrs = light_xx_attrs,
};

3.

static struct attribute *light_xx_attrs [] =
{
 &xx_nodename_attribute.attr,
 NULL
};

4.

static struct device_attribute xx_nodename_attribute = __ATTR(nodename,0664,light_xx_nodename_show,light_xx_nodename_store);

-----------------------------------------------

fix method:

  add NULL in attribute