diff options
author | Andy Shevchenko <[email protected]> | 2022-08-01 14:42:06 +0300 |
---|---|---|
committer | Lee Jones <[email protected]> | 2022-09-28 16:09:49 +0100 |
commit | 4b74ec581a1c8d35f2902f47aaa181d71d17c902 (patch) | |
tree | 98466d9c544c91ae6955c8596bb56dda9b0c4bdb | |
parent | cae02b7a5d908df3529432ead6f0a659c625a261 (diff) |
mfd: intel_soc_pmic_crc: Convert to use i2c_get/set_clientdata()
We have the specific helpers for I2C device to set and get its driver data.
Convert driver to use them instead of open coded variants.
Signed-off-by: Andy Shevchenko <[email protected]>
Tested-by: Hans de Goede <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
-rw-r--r-- | drivers/mfd/intel_soc_pmic_crc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/intel_soc_pmic_crc.c b/drivers/mfd/intel_soc_pmic_crc.c index 64cdd435f8c5..082007485cda 100644 --- a/drivers/mfd/intel_soc_pmic_crc.c +++ b/drivers/mfd/intel_soc_pmic_crc.c @@ -181,7 +181,7 @@ static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c, if (!pmic) return -ENOMEM; - dev_set_drvdata(dev, pmic); + i2c_set_clientdata(i2c, pmic); pmic->regmap = devm_regmap_init_i2c(i2c, config->regmap_config); if (IS_ERR(pmic->regmap)) @@ -227,7 +227,7 @@ static int intel_soc_pmic_i2c_remove(struct i2c_client *i2c) static void intel_soc_pmic_shutdown(struct i2c_client *i2c) { - struct intel_soc_pmic *pmic = dev_get_drvdata(&i2c->dev); + struct intel_soc_pmic *pmic = i2c_get_clientdata(i2c); disable_irq(pmic->irq); |