Skip to content

Commit

Permalink
ASoC: codecs: max98390: simplify getting the adapter of a client
Browse files Browse the repository at this point in the history
We have a dedicated pointer for that, so use it. Much easier to read and
less computation involved.

Signed-off-by: Wolfram Sang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Wolfram Sang authored and broonie committed Sep 20, 2021
1 parent 5374b92 commit 0f9a84b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/max98390.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0f9a84b

Please sign in to comment.