diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/misc/eeprom | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/misc/eeprom')
-rw-r--r-- | drivers/misc/eeprom/at24.c | 1 | ||||
-rw-r--r-- | drivers/misc/eeprom/at25.c | 1 | ||||
-rw-r--r-- | drivers/misc/eeprom/eeprom.c | 8 |
3 files changed, 4 insertions, 6 deletions
diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c index 2cb2736d65aa..db7d0f21b65d 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/misc/eeprom/at24.c | |||
@@ -505,6 +505,7 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
505 | * Export the EEPROM bytes through sysfs, since that's convenient. | 505 | * Export the EEPROM bytes through sysfs, since that's convenient. |
506 | * By default, only root should see the data (maybe passwords etc) | 506 | * By default, only root should see the data (maybe passwords etc) |
507 | */ | 507 | */ |
508 | sysfs_bin_attr_init(&at24->bin); | ||
508 | at24->bin.attr.name = "eeprom"; | 509 | at24->bin.attr.name = "eeprom"; |
509 | at24->bin.attr.mode = chip.flags & AT24_FLAG_IRUGO ? S_IRUGO : S_IRUSR; | 510 | at24->bin.attr.mode = chip.flags & AT24_FLAG_IRUGO ? S_IRUGO : S_IRUSR; |
510 | at24->bin.read = at24_bin_read; | 511 | at24->bin.read = at24_bin_read; |
diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c index d902d81dde39..d194212a41f6 100644 --- a/drivers/misc/eeprom/at25.c +++ b/drivers/misc/eeprom/at25.c | |||
@@ -347,6 +347,7 @@ static int at25_probe(struct spi_device *spi) | |||
347 | * that's sensitive for read and/or write, like ethernet addresses, | 347 | * that's sensitive for read and/or write, like ethernet addresses, |
348 | * security codes, board-specific manufacturing calibrations, etc. | 348 | * security codes, board-specific manufacturing calibrations, etc. |
349 | */ | 349 | */ |
350 | sysfs_bin_attr_init(&at25->bin); | ||
350 | at25->bin.attr.name = "eeprom"; | 351 | at25->bin.attr.name = "eeprom"; |
351 | at25->bin.attr.mode = S_IRUSR; | 352 | at25->bin.attr.mode = S_IRUSR; |
352 | at25->bin.read = at25_bin_read; | 353 | at25->bin.read = at25_bin_read; |
diff --git a/drivers/misc/eeprom/eeprom.c b/drivers/misc/eeprom/eeprom.c index 2c27193aeaa0..f939ebc2507c 100644 --- a/drivers/misc/eeprom/eeprom.c +++ b/drivers/misc/eeprom/eeprom.c | |||
@@ -32,9 +32,6 @@ | |||
32 | static const unsigned short normal_i2c[] = { 0x50, 0x51, 0x52, 0x53, 0x54, | 32 | static const unsigned short normal_i2c[] = { 0x50, 0x51, 0x52, 0x53, 0x54, |
33 | 0x55, 0x56, 0x57, I2C_CLIENT_END }; | 33 | 0x55, 0x56, 0x57, I2C_CLIENT_END }; |
34 | 34 | ||
35 | /* Insmod parameters */ | ||
36 | I2C_CLIENT_INSMOD_1(eeprom); | ||
37 | |||
38 | 35 | ||
39 | /* Size of EEPROM in bytes */ | 36 | /* Size of EEPROM in bytes */ |
40 | #define EEPROM_SIZE 256 | 37 | #define EEPROM_SIZE 256 |
@@ -135,8 +132,7 @@ static struct bin_attribute eeprom_attr = { | |||
135 | }; | 132 | }; |
136 | 133 | ||
137 | /* Return 0 if detection is successful, -ENODEV otherwise */ | 134 | /* Return 0 if detection is successful, -ENODEV otherwise */ |
138 | static int eeprom_detect(struct i2c_client *client, int kind, | 135 | static int eeprom_detect(struct i2c_client *client, struct i2c_board_info *info) |
139 | struct i2c_board_info *info) | ||
140 | { | 136 | { |
141 | struct i2c_adapter *adapter = client->adapter; | 137 | struct i2c_adapter *adapter = client->adapter; |
142 | 138 | ||
@@ -233,7 +229,7 @@ static struct i2c_driver eeprom_driver = { | |||
233 | 229 | ||
234 | .class = I2C_CLASS_DDC | I2C_CLASS_SPD, | 230 | .class = I2C_CLASS_DDC | I2C_CLASS_SPD, |
235 | .detect = eeprom_detect, | 231 | .detect = eeprom_detect, |
236 | .address_data = &addr_data, | 232 | .address_list = normal_i2c, |
237 | }; | 233 | }; |
238 | 234 | ||
239 | static int __init eeprom_init(void) | 235 | static int __init eeprom_init(void) |