提交 7c7f428e 编写于 作者: B Bartosz Golaszewski 提交者: Greg Kroah-Hartman

eeprom: at24: don't check if byte_len is a power of 2

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: NBartosz Golaszewski <brgl@bgdev.pl>
Tested-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 53998fa8
...@@ -553,9 +553,6 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -553,9 +553,6 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id)
at24_get_pdata(&client->dev, &chip); 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) { if (!chip.page_size) {
dev_err(&client->dev, "page_size must not be 0!\n"); dev_err(&client->dev, "page_size must not be 0!\n");
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册