Commit d07b56b3 authored by Wolfram Sang's avatar Wolfram Sang Committed by Jean Delvare

at24: Init dynamic bin_attribute structures

Commit 6992f533 introduced this requirement.
Reported-by: default avatarAlbrecht Dress <albrecht.dress@arcor.de>
Signed-off-by: default avatarWolfram Sang <w.sang@pengutronix.de>
Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent e77482d7
...@@ -505,6 +505,7 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -505,6 +505,7 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id)
* Export the EEPROM bytes through sysfs, since that's convenient. * Export the EEPROM bytes through sysfs, since that's convenient.
* By default, only root should see the data (maybe passwords etc) * By default, only root should see the data (maybe passwords etc)
*/ */
sysfs_bin_attr_init(&at24->bin);
at24->bin.attr.name = "eeprom"; at24->bin.attr.name = "eeprom";
at24->bin.attr.mode = chip.flags & AT24_FLAG_IRUGO ? S_IRUGO : S_IRUSR; at24->bin.attr.mode = chip.flags & AT24_FLAG_IRUGO ? S_IRUGO : S_IRUSR;
at24->bin.read = at24_bin_read; at24->bin.read = at24_bin_read;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment