提交 d07b56b3 编写于 作者: W Wolfram Sang 提交者: Jean Delvare

at24: Init dynamic bin_attribute structures

Commit 6992f533 introduced this requirement.
Reported-by: NAlbrecht Dress <albrecht.dress@arcor.de>
Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: NJean Delvare <khali@linux-fr.org>
上级 e77482d7
......@@ -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.
* 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.mode = chip.flags & AT24_FLAG_IRUGO ? S_IRUGO : S_IRUSR;
at24->bin.read = at24_bin_read;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册