aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/eeprom/at24.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/misc/eeprom/at24.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/misc/eeprom/at24.c')
-rw-r--r--drivers/misc/eeprom/at24.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index db7d0f21b65d..a79a62f75481 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -274,7 +274,8 @@ static ssize_t at24_read(struct at24_data *at24,
274 return retval; 274 return retval;
275} 275}
276 276
277static ssize_t at24_bin_read(struct kobject *kobj, struct bin_attribute *attr, 277static ssize_t at24_bin_read(struct file *filp, struct kobject *kobj,
278 struct bin_attribute *attr,
278 char *buf, loff_t off, size_t count) 279 char *buf, loff_t off, size_t count)
279{ 280{
280 struct at24_data *at24; 281 struct at24_data *at24;
@@ -395,7 +396,8 @@ static ssize_t at24_write(struct at24_data *at24, const char *buf, loff_t off,
395 return retval; 396 return retval;
396} 397}
397 398
398static ssize_t at24_bin_write(struct kobject *kobj, struct bin_attribute *attr, 399static ssize_t at24_bin_write(struct file *filp, struct kobject *kobj,
400 struct bin_attribute *attr,
399 char *buf, loff_t off, size_t count) 401 char *buf, loff_t off, size_t count)
400{ 402{
401 struct at24_data *at24; 403 struct at24_data *at24;