eeprom: at24: don't check if byte_len is a power of 2
authorBartosz Golaszewski <brgl@bgdev.pl>
Mon, 19 Mar 2018 09:17:09 +0000 (10:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Mar 2018 15:25:00 +0000 (16:25 +0100)
We support certain models the size of which is not a power of 2. This
is not a reason to emit a warning.

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Tested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/eeprom/at24.c

index 001d784..d68dc0d 100644 (file)
@@ -553,9 +553,6 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id)
                at24_get_pdata(&client->dev, &chip);
        }
 
-       if (!is_power_of_2(chip.byte_len))
-               dev_warn(&client->dev,
-                       "byte_len looks suspicious (no power of 2)!\n");
        if (!chip.page_size) {
                dev_err(&client->dev, "page_size must not be 0!\n");
                return -EINVAL;