Re: [PATCH] rtc: ds1307: drop redundant dev_set_drvdata() in probe

[email protected]
Newsgroups org.kernel.vger.linux-rtc
Message-ID <[email protected]>
> From: Guoming Chen <[email protected]>
> 
> 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 <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.