From 0bbeed584e92744c30858233d498215a32faa8eb Mon Sep 17 00:00:00 2001 From: Guoming Chen Date: Fri, 21 Aug 2026 21:16:44 +0800 Subject: [PATCH] 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 11e5890b5342c ("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 Link: https://patch.msgid.link/20260821131644.71794-1-chenguoming88s@gmail.com Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1307.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 0cf4836b81b1..8627f84232ce 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -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;