aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rapidio/rio-sysfs.c
diff options
context:
space:
mode:
authorChris Wright <chrisw@sous-sol.org>2010-05-12 21:28:57 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-21 12:37:31 -0400
commit2c3c8bea608866d8bd9dcf92657d57fdcac011c5 (patch)
treef509b958d0a65c46c831dbdd447a81e706dd995a /drivers/rapidio/rio-sysfs.c
parent68d75ed4b84a0806ecd4bc14da4759713b23a532 (diff)
sysfs: add struct file* to bin_attr callbacks
This allows bin_attr->read,write,mmap callbacks to check file specific data (such as inode owner) as part of any privilege validation. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/rapidio/rio-sysfs.c')
-rw-r--r--drivers/rapidio/rio-sysfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/rapidio/rio-sysfs.c b/drivers/rapidio/rio-sysfs.c
index ba742e82c57d..00b475658356 100644
--- a/drivers/rapidio/rio-sysfs.c
+++ b/drivers/rapidio/rio-sysfs.c
@@ -68,7 +68,8 @@ struct device_attribute rio_dev_attrs[] = {
68}; 68};
69 69
70static ssize_t 70static ssize_t
71rio_read_config(struct kobject *kobj, struct bin_attribute *bin_attr, 71rio_read_config(struct file *filp, struct kobject *kobj,
72 struct bin_attribute *bin_attr,
72 char *buf, loff_t off, size_t count) 73 char *buf, loff_t off, size_t count)
73{ 74{
74 struct rio_dev *dev = 75 struct rio_dev *dev =
@@ -139,7 +140,8 @@ rio_read_config(struct kobject *kobj, struct bin_attribute *bin_attr,
139} 140}
140 141
141static ssize_t 142static ssize_t
142rio_write_config(struct kobject *kobj, struct bin_attribute *bin_attr, 143rio_write_config(struct file *filp, struct kobject *kobj,
144 struct bin_attribute *bin_attr,
143 char *buf, loff_t off, size_t count) 145 char *buf, loff_t off, size_t count)
144{ 146{
145 struct rio_dev *dev = 147 struct rio_dev *dev =