summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/max8907.c
diff options
context:
space:
mode:
authorGuiting Shen <aarongt.shen@gmail.com>2023-04-25 04:45:26 +0200
committerLee Jones <lee@kernel.org>2023-06-15 10:19:37 +0200
commit0c5dc500abf81e296959b289e72ac7f38fd8c087 (patch)
tree362929957cc3791e14ded143eaf253e91a747628 /drivers/mfd/max8907.c
parentmfd: dln2: Remove the unneeded include <linux/i2c.h> (diff)
downloadlinux-0c5dc500abf81e296959b289e72ac7f38fd8c087.tar.xz
linux-0c5dc500abf81e296959b289e72ac7f38fd8c087.zip
mfd: Remove redundant dev_set_drvdata() from I2C drivers
the i2c_set_clientdata() is the inline function which is complemented by the dev_set_drvdata() internally. Do not need to use i2c_set_clientdata() and dev_set_drvdata() at the same time. Signed-off-by: Guiting Shen <aarongt.shen@gmail.com> Reviewed-by: Johan Hovold <johan@kernel.org> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20230425024526.6443-1-aarongt.shen@gmail.com
Diffstat (limited to 'drivers/mfd/max8907.c')
-rw-r--r--drivers/mfd/max8907.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/mfd/max8907.c b/drivers/mfd/max8907.c
index a69b865c6eac..0b8f6c298f97 100644
--- a/drivers/mfd/max8907.c
+++ b/drivers/mfd/max8907.c
@@ -201,8 +201,6 @@ static int max8907_i2c_probe(struct i2c_client *i2c)
}
max8907->dev = &i2c->dev;
- dev_set_drvdata(max8907->dev, max8907);
-
max8907->i2c_gen = i2c;
i2c_set_clientdata(i2c, max8907);
max8907->regmap_gen = devm_regmap_init_i2c(i2c,