[SCSI] sysfs: make group is_valid return a mode_t
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Fri, 21 Mar 2008 01:47:52 +0000 (20:47 -0500)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Tue, 22 Apr 2008 20:16:31 +0000 (15:16 -0500)
commit0f4238958d28044b335644b69df6071cdb04b5ce
tree159b82f8eb9479cdc10f861d682309b4c0c8c411
parentbbd1ae412c9eb09ae7bb11cfaf7018a2367d493f
[SCSI] sysfs: make group is_valid return a mode_t

We have a problem in scsi_transport_spi in that we need to customise
not only the visibility of the attributes, but also their mode.  Fix
this by making the is_visible() callback return a mode, with 0
indicating is not visible.

Also add a sysfs_update_group() API to allow us to change either the
visibility or mode of the files at any time on the fly.

Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
fs/sysfs/file.c
fs/sysfs/group.c
fs/sysfs/sysfs.h
include/linux/sysfs.h