mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
rtc: ds1302: remove unnecessary spi_set_drvdata()
Remove unnecessary spi_set_drvdata() in ds1302_remove(), the driver_data will be set to NULL in device_unbind_cleanup() after calling ->remove(). After this, ds1302_remove() is an empty function, so remove it too. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220913144905.2004924-1-yangyingliang@huawei.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
f27efee663
commit
5dc8356830
1 changed files with 0 additions and 6 deletions
|
@ -185,11 +185,6 @@ static int ds1302_probe(struct spi_device *spi)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ds1302_remove(struct spi_device *spi)
|
|
||||||
{
|
|
||||||
spi_set_drvdata(spi, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
#ifdef CONFIG_OF
|
||||||
static const struct of_device_id ds1302_dt_ids[] = {
|
static const struct of_device_id ds1302_dt_ids[] = {
|
||||||
{ .compatible = "maxim,ds1302", },
|
{ .compatible = "maxim,ds1302", },
|
||||||
|
@ -208,7 +203,6 @@ static struct spi_driver ds1302_driver = {
|
||||||
.driver.name = "rtc-ds1302",
|
.driver.name = "rtc-ds1302",
|
||||||
.driver.of_match_table = of_match_ptr(ds1302_dt_ids),
|
.driver.of_match_table = of_match_ptr(ds1302_dt_ids),
|
||||||
.probe = ds1302_probe,
|
.probe = ds1302_probe,
|
||||||
.remove = ds1302_remove,
|
|
||||||
.id_table = ds1302_spi_ids,
|
.id_table = ds1302_spi_ids,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue