]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
power: bq25890: remove redundant I2C bus check
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Sun, 3 May 2020 15:21:10 +0000 (17:21 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Sun, 3 May 2020 19:51:03 +0000 (21:51 +0200)
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>
drivers/power/supply/bq25890_charger.c

index 9e862e2a99cf0d78c4bfbe95a8bced39b9bfaee9..c4a69fd69f3415d15259ac52a1a52c8e0af56eed 100644 (file)
@@ -878,17 +878,11 @@ static int bq25890_fw_probe(struct bq25890_device *bq)
 static int bq25890_probe(struct i2c_client *client,
                         const struct i2c_device_id *id)
 {
-       struct i2c_adapter *adapter = client->adapter;
        struct device *dev = &client->dev;
        struct bq25890_device *bq;
        int ret;
        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);
        if (!bq)
                return -ENOMEM;