rtc: ds1307: drop redundant dev_set_drvdata() in probe

i2c_set_clientdata() is a thin wrapper around
dev_set_drvdata(&client->dev, ...), so calling both in ds1307_probe()
stores the same driver-data pointer twice. The two calls were introduced
together in the regmap conversion in commit 11e5890b53 ("rtc: ds1307:
convert driver to regmap").

Keep i2c_set_clientdata(), which matches the convention used by every
other I2C RTC driver in the subsystem, and drop the redundant
dev_set_drvdata().

Signed-off-by: Guoming Chen <chenguoming88s@gmail.com>
Link: https://patch.msgid.link/20260821131644.71794-1-chenguoming88s@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
Guoming Chen 2026-08-21 21:16:44 +08:00 committed by Alexandre Belloni
parent b253c2e96a
commit 0bbeed584e

View File

@ -1890,7 +1890,6 @@ static int ds1307_probe(struct i2c_client *client)
if (!ds1307)
return -ENOMEM;
dev_set_drvdata(&client->dev, ds1307);
ds1307->dev = &client->dev;
ds1307->name = client->name;