[SCSI] sysfs: add filter function to groups

This patch allows the various users of attribute_groups to selectively
allow the appearance of group attributes.  The primary consumer of
this will be the transport classes in which we currently have
elaborate attribute selection algorithms to do this same thing.

Acked-by: Greg KH <greg@kroah.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
James Bottomley 2007-10-31 09:38:04 -05:00
parent d52b3815a5
commit d4acd722b7
3 changed files with 19 additions and 11 deletions

View file

@ -32,6 +32,8 @@ struct attribute {
struct attribute_group {
const char *name;
int (*is_visible)(struct kobject *,
struct attribute *, int);
struct attribute **attrs;
};