Problems with adding a sysfs file

Abhishek Bhardwaj abshkbh at gmail.com
Mon Apr 17 04:17:08 EDT 2017


I followed this link to add a sysfs file
http://kroah.com/log/blog/2013/06/26/how-to-create-a-sysfs-file-correctly/
.

I set the driver.groups field and declared the attribute and attribute
groups required by the sysfs file. When I boot my kernel I see the
file but my store and show handlers don't get called when I try to cat
or echo to the file. Is there any step I'm missing ?. I also see that
a lot of drivers still use sysfs_create_file which is racy according
to the link I posted.

-
AB



More information about the Kernelnewbies mailing list