power: bq25890: remove redundant I2C bus check
regmap initialization will check I2C adapter functionality. Remove redundant check in the driver. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
Родитель
a6a48fac96
Коммит
a9c2419406
|
@ -878,17 +878,11 @@ static int bq25890_fw_probe(struct bq25890_device *bq)
|
||||||
static int bq25890_probe(struct i2c_client *client,
|
static int bq25890_probe(struct i2c_client *client,
|
||||||
const struct i2c_device_id *id)
|
const struct i2c_device_id *id)
|
||||||
{
|
{
|
||||||
struct i2c_adapter *adapter = client->adapter;
|
|
||||||
struct device *dev = &client->dev;
|
struct device *dev = &client->dev;
|
||||||
struct bq25890_device *bq;
|
struct bq25890_device *bq;
|
||||||
int ret;
|
int ret;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
|
|
||||||
dev_err(dev, "No support for SMBUS_BYTE_DATA\n");
|
|
||||||
return -ENODEV;
|
|
||||||
}
|
|
||||||
|
|
||||||
bq = devm_kzalloc(dev, sizeof(*bq), GFP_KERNEL);
|
bq = devm_kzalloc(dev, sizeof(*bq), GFP_KERNEL);
|
||||||
if (!bq)
|
if (!bq)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче