ASoC: codecs: max98390: simplify getting the adapter of a client
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 18 Sep 2021 21:35:52 +0000 (23:35 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 20 Sep 2021 14:46:40 +0000 (15:46 +0100)
We have a dedicated pointer for that, so use it. Much easier to read and
less computation involved.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20210918213553.14514-2-wsa+renesas@sang-engineering.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/max98390.c

index b392567c2b3e6811fdbfd65f22742ba6d6ec5073..d1882cbc9381dec1a0a927f923d618b5f3163176 100644 (file)
@@ -1021,7 +1021,7 @@ static int max98390_i2c_probe(struct i2c_client *i2c,
        int reg = 0;
 
        struct max98390_priv *max98390 = NULL;
-       struct i2c_adapter *adapter = to_i2c_adapter(i2c->dev.parent);
+       struct i2c_adapter *adapter = i2c->adapter;
 
        ret = i2c_check_functionality(adapter,
                I2C_FUNC_SMBUS_BYTE