Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote: > What happened to the idea of only creating the sysfs files _if_ it is > needed? You are always creating these files, and then can return > -ENODEV if the device really isn't there, that's not what you should do > for a sysfs file. If the file is present, it should return data, not > return an error. If the device isn't there, just don't create the file. Greg, I submitted a set of patches before this set that does just that. I moved the controlvm channel function into visorchipset_main.c and removed the old files, and made it so that if the channel is not present the module wouldn't load. I also removed all the code that returns ENODEV, except for the module init function, where it gets returned if there's no controlvm channel present. I could change that to some other error, or let the module load and then not create files if the channel isn't present, if you'd prefer that? But if the module doesn't load, the files in sys don't get created, so I thought that would be a good solution. The commit numbers were 524b0b6 for the controlvm channel function, and 8a1182e for the extraneous checks and ENODEV errors being removed. -- Ben _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel