summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorSebastian Reichel <sebastian.reichel@collabora.com>2023-05-04 20:36:08 +0300
committerLee Jones <lee@kernel.org>2023-05-15 18:18:27 +0300
commit049449976f549605a6913d468b61356a9950a6a2 (patch)
tree10a26011cd345bc5092c0944bbdd9b22a7614e64 /drivers/mfd
parente714b50bdf3cf45076c601276e9e3da00ea05319 (diff)
downloadlinux-049449976f549605a6913d468b61356a9950a6a2.tar.xz
mfd: rk808: Replace 'struct i2c_client' with 'struct device'
Put 'struct device' pointer into the MFD platform_data instead of the 'struct i2c_client' pointer. This simplifies the code and prepares the MFD for SPI support. Tested-by: Diederik de Haas <didi.debian@cknow.org> # Rock64, Quartz64 Model A + B Tested-by: Vincent Legoll <vincent.legoll@gmail.com> # Pine64 QuartzPro64 Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20230504173618.142075-5-sebastian.reichel@collabora.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/rk808.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c
index f42e09e3a3f5..ce52307cbaea 100644
--- a/drivers/mfd/rk808.c
+++ b/drivers/mfd/rk808.c
@@ -577,7 +577,7 @@ static int rk808_power_off(struct sys_off_data *data)
}
ret = regmap_update_bits(rk808->regmap, reg, bit, bit);
if (ret)
- dev_err(&rk808->i2c->dev, "Failed to shutdown device!\n");
+ dev_err(rk808->dev, "Failed to shutdown device!\n");
return NOTIFY_DONE;
}
@@ -600,7 +600,7 @@ static int rk808_restart(struct sys_off_data *data)
}
ret = regmap_update_bits(rk808->regmap, reg, bit, bit);
if (ret)
- dev_err(&rk808->i2c->dev, "Failed to restart device!\n");
+ dev_err(rk808->dev, "Failed to restart device!\n");
return NOTIFY_DONE;
}
@@ -720,7 +720,7 @@ static int rk808_probe(struct i2c_client *client)
return -EINVAL;
}
- rk808->i2c = client;
+ rk808->dev = &client->dev;
i2c_set_clientdata(client, rk808);
rk808->regmap = devm_regmap_init_i2c(client, rk808->regmap_cfg);