From 8d91c1e411f55d7ea91b1183a2e9f8088fb4d5be Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Tue, 15 Dec 2015 14:52:16 -0300 Subject: Linux-libre 4.3.2-gnu --- drivers/misc/eeprom/max6875.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'drivers/misc/eeprom/max6875.c') diff --git a/drivers/misc/eeprom/max6875.c b/drivers/misc/eeprom/max6875.c index 580ff9df5..e4dd93b25 100644 --- a/drivers/misc/eeprom/max6875.c +++ b/drivers/misc/eeprom/max6875.c @@ -114,12 +114,6 @@ static ssize_t max6875_read(struct file *filp, struct kobject *kobj, struct max6875_data *data = i2c_get_clientdata(client); int slice, max_slice; - if (off > USER_EEPROM_SIZE) - return 0; - - if (off + count > USER_EEPROM_SIZE) - count = USER_EEPROM_SIZE - off; - /* refresh slices which contain requested bytes */ max_slice = (off + count - 1) >> SLICE_BITS; for (slice = (off >> SLICE_BITS); slice <= max_slice; slice++) @@ -197,6 +191,7 @@ static const struct i2c_device_id max6875_id[] = { { "max6875", 0 }, { } }; +MODULE_DEVICE_TABLE(i2c, max6875_id); static struct i2c_driver max6875_driver = { .driver = { -- cgit v1.2.3-54-g00ecf