Commit 38b17bc9 authored by Wolfram Sang's avatar Wolfram Sang Committed by Alexandre Belloni

rtc: rx6110: simplify getting the adapter of a client

We have a dedicated pointer for that, so use it. Much easier to read and
less computation involved.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210918213553.14514-1-wsa+renesas@sang-engineering.com
parent 6eee1c48
...@@ -422,7 +422,7 @@ static struct regmap_config regmap_i2c_config = { ...@@ -422,7 +422,7 @@ static struct regmap_config regmap_i2c_config = {
static int rx6110_i2c_probe(struct i2c_client *client, static int rx6110_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id) const struct i2c_device_id *id)
{ {
struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); struct i2c_adapter *adapter = client->adapter;
struct rx6110_data *rx6110; struct rx6110_data *rx6110;
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment