Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Yang Yingliang and committed by
Alexandre Belloni
5dc83568 f27efee6

-6
-6
drivers/rtc/rtc-ds1302.c
··· 185 185 return 0; 186 186 } 187 187 188 - static void ds1302_remove(struct spi_device *spi) 189 - { 190 - spi_set_drvdata(spi, NULL); 191 - } 192 - 193 188 #ifdef CONFIG_OF 194 189 static const struct of_device_id ds1302_dt_ids[] = { 195 190 { .compatible = "maxim,ds1302", }, ··· 203 208 .driver.name = "rtc-ds1302", 204 209 .driver.of_match_table = of_match_ptr(ds1302_dt_ids), 205 210 .probe = ds1302_probe, 206 - .remove = ds1302_remove, 207 211 .id_table = ds1302_spi_ids, 208 212 }; 209 213