浏览代码

at24: Init dynamic bin_attribute structures

Commit 6992f5334995af474c2b58d010d08bc597f0f2fe introduced this requirement.

Reported-by: Albrecht Dress <albrecht.dress@arcor.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Wolfram Sang 15 年之前
父节点
当前提交
d07b56b309
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/misc/eeprom/at24.c

+ 1 - 0
drivers/misc/eeprom/at24.c

@@ -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;