diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-12-15 14:52:16 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-12-15 14:52:16 -0300 |
commit | 8d91c1e411f55d7ea91b1183a2e9f8088fb4d5be (patch) | |
tree | e9891aa6c295060d065adffd610c4f49ecf884f3 /drivers/power/olpc_battery.c | |
parent | a71852147516bc1cb5b0b3cbd13639bfd4022dc8 (diff) |
Linux-libre 4.3.2-gnu
Diffstat (limited to 'drivers/power/olpc_battery.c')
-rw-r--r-- | drivers/power/olpc_battery.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/power/olpc_battery.c b/drivers/power/olpc_battery.c index a944338a3..9e29b1321 100644 --- a/drivers/power/olpc_battery.c +++ b/drivers/power/olpc_battery.c @@ -521,11 +521,6 @@ static ssize_t olpc_bat_eeprom_read(struct file *filp, struct kobject *kobj, int ret; int i; - if (off >= EEPROM_SIZE) - return 0; - if (off + count > EEPROM_SIZE) - count = EEPROM_SIZE - off; - for (i = 0; i < count; i++) { ec_byte = EEPROM_START + off + i; ret = olpc_ec_cmd(EC_BAT_EEPROM, &ec_byte, 1, &buf[i], 1); @@ -545,7 +540,7 @@ static struct bin_attribute olpc_bat_eeprom = { .name = "eeprom", .mode = S_IRUGO, }, - .size = 0, + .size = EEPROM_SIZE, .read = olpc_bat_eeprom_read, }; |