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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux