On Friday 18 August 2006 00:25, Jim Cromie wrote:patch trimmed
With this patch, atts 4..N can be disabled at runtime,
by setting mode = 0. Afterwards, when sysfs_group_create
is called, it creates attr-files *only* for those whose
mode != 0. IOW - no attr-files for non-existent hardware.
Normally, mode is set usefully, and attr-files
are created as normal.
Unfortunately this does not work too well if your box happen to have
2 or more different chips served by the same driver as you fiddle with
the static array of attributes shared by all device instances.