Re: [PATCH] rtc: ds1307: drop redundant dev_set_drvdata() in probe
From: Alexandre Belloni
Date: Tue Oct 20 2026 - 10:06:20 EST
On Fri, 21 Aug 2026 21:16:44 +0800, chenguoming88s@xxxxxxxxx wrote:
> 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().
>
> [...]
Applied, thanks!
[1/1] rtc: ds1307: drop redundant dev_set_drvdata() in probe
https://git.kernel.org/abelloni/c/0bbeed584e92
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com