diff options
author | Chris Wright <chrisw@sous-sol.org> | 2010-05-12 21:28:57 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-21 12:37:31 -0400 |
commit | 2c3c8bea608866d8bd9dcf92657d57fdcac011c5 (patch) | |
tree | f509b958d0a65c46c831dbdd447a81e706dd995a /drivers/misc/c2port | |
parent | 68d75ed4b84a0806ecd4bc14da4759713b23a532 (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/misc/c2port')
-rw-r--r-- | drivers/misc/c2port/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/c2port/core.c b/drivers/misc/c2port/core.c index ed090e77c9cd..19fc7c1cb428 100644 --- a/drivers/misc/c2port/core.c +++ b/drivers/misc/c2port/core.c | |||
@@ -707,7 +707,7 @@ static ssize_t __c2port_read_flash_data(struct c2port_device *dev, | |||
707 | return nread; | 707 | return nread; |
708 | } | 708 | } |
709 | 709 | ||
710 | static ssize_t c2port_read_flash_data(struct kobject *kobj, | 710 | static ssize_t c2port_read_flash_data(struct file *filp, struct kobject *kobj, |
711 | struct bin_attribute *attr, | 711 | struct bin_attribute *attr, |
712 | char *buffer, loff_t offset, size_t count) | 712 | char *buffer, loff_t offset, size_t count) |
713 | { | 713 | { |
@@ -824,7 +824,7 @@ static ssize_t __c2port_write_flash_data(struct c2port_device *dev, | |||
824 | return nwrite; | 824 | return nwrite; |
825 | } | 825 | } |
826 | 826 | ||
827 | static ssize_t c2port_write_flash_data(struct kobject *kobj, | 827 | static ssize_t c2port_write_flash_data(struct file *filp, struct kobject *kobj, |
828 | struct bin_attribute *attr, | 828 | struct bin_attribute *attr, |
829 | char *buffer, loff_t offset, size_t count) | 829 | char *buffer, loff_t offset, size_t count) |
830 | { | 830 | { |