diff mbox series

[6/7] eeprom: at24: don't check chip.byte_len for power of two

Message ID bf82e4d8-66df-0d2e-d6e0-9874dbd763b1@gmail.com
State Not Applicable
Delegated to: Bartosz Golaszewski
Headers show
Series eeprom: at24: series with smaller improvements | expand

Commit Message

Heiner Kallweit Nov. 30, 2017, 6:49 a.m. UTC
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@gmail.com>
---
 drivers/misc/eeprom/at24.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

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;