When using AT24_FLAG_SERIAL and AT24_FLAG_MAC we expose just parts of the chip. These parts can have arbitrary size (e.g. a 6 byte MAC), so remove the check for power of two. Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx> --- drivers/misc/eeprom/at24.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c index 8fef6d5a8..74d2347a1 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/misc/eeprom/at24.c @@ -539,8 +539,6 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id) if (chip.flags & AT24_FLAG_SERIAL || chip.flags & AT24_FLAG_MAC) chip.flags |= AT24_FLAG_READONLY; - if (!is_power_of_2(chip.byte_len)) - dev_warn(dev, "byte_len looks suspicious (no power of 2)!\n"); if (!chip.page_size) { dev_err(dev, "page_size must not be 0!\n"); return -EINVAL; -- 2.15.0