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

rtc: Switch back to struct platform_driver::remove()

After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/rtc to use .remove(), with
the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20241007205803.444994-6-u.kleine-koenig@baylibre.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Uwe Kleine-König and committed by
Alexandre Belloni
e5eab1ae d93f8ac2

+47 -47
+1 -1
drivers/rtc/rtc-88pm80x.c
··· 329 329 .pm = &pm80x_rtc_pm_ops, 330 330 }, 331 331 .probe = pm80x_rtc_probe, 332 - .remove_new = pm80x_rtc_remove, 332 + .remove = pm80x_rtc_remove, 333 333 }; 334 334 335 335 module_platform_driver(pm80x_rtc_driver);
+1 -1
drivers/rtc/rtc-88pm860x.c
··· 371 371 .pm = &pm860x_rtc_pm_ops, 372 372 }, 373 373 .probe = pm860x_rtc_probe, 374 - .remove_new = pm860x_rtc_remove, 374 + .remove = pm860x_rtc_remove, 375 375 }; 376 376 377 377 module_platform_driver(pm860x_rtc_driver);
+1 -1
drivers/rtc/rtc-ab8500.c
··· 403 403 .name = "ab8500-rtc", 404 404 }, 405 405 .probe = ab8500_rtc_probe, 406 - .remove_new = ab8500_rtc_remove, 406 + .remove = ab8500_rtc_remove, 407 407 .id_table = ab85xx_rtc_ids, 408 408 }; 409 409
+1 -1
drivers/rtc/rtc-ac100.c
··· 628 628 629 629 static struct platform_driver ac100_rtc_driver = { 630 630 .probe = ac100_rtc_probe, 631 - .remove_new = ac100_rtc_remove, 631 + .remove = ac100_rtc_remove, 632 632 .driver = { 633 633 .name = "ac100-rtc", 634 634 .of_match_table = of_match_ptr(ac100_rtc_match),
+1 -1
drivers/rtc/rtc-asm9260.c
··· 325 325 326 326 static struct platform_driver asm9260_rtc_driver = { 327 327 .probe = asm9260_rtc_probe, 328 - .remove_new = asm9260_rtc_remove, 328 + .remove = asm9260_rtc_remove, 329 329 .driver = { 330 330 .name = "asm9260-rtc", 331 331 .of_match_table = asm9260_dt_ids,
+1 -1
drivers/rtc/rtc-at91rm9200.c
··· 640 640 * triggering a section mismatch warning. 641 641 */ 642 642 static struct platform_driver at91_rtc_driver __refdata = { 643 - .remove_new = __exit_p(at91_rtc_remove), 643 + .remove = __exit_p(at91_rtc_remove), 644 644 .shutdown = at91_rtc_shutdown, 645 645 .driver = { 646 646 .name = "at91_rtc",
+1 -1
drivers/rtc/rtc-at91sam9.c
··· 530 530 531 531 static struct platform_driver at91_rtc_driver = { 532 532 .probe = at91_rtc_probe, 533 - .remove_new = at91_rtc_remove, 533 + .remove = at91_rtc_remove, 534 534 .shutdown = at91_rtc_shutdown, 535 535 .driver = { 536 536 .name = "rtc-at91sam9",
+1 -1
drivers/rtc/rtc-brcmstb-waketimer.c
··· 417 417 418 418 static struct platform_driver brcmstb_waketmr_driver = { 419 419 .probe = brcmstb_waketmr_probe, 420 - .remove_new = brcmstb_waketmr_remove, 420 + .remove = brcmstb_waketmr_remove, 421 421 .driver = { 422 422 .name = "brcmstb-waketimer", 423 423 .pm = &brcmstb_waketmr_pm_ops,
+1 -1
drivers/rtc/rtc-cadence.c
··· 402 402 .pm = &cdns_rtc_pm_ops, 403 403 }, 404 404 .probe = cdns_rtc_probe, 405 - .remove_new = cdns_rtc_remove, 405 + .remove = cdns_rtc_remove, 406 406 }; 407 407 module_platform_driver(cdns_rtc_driver); 408 408
+1 -1
drivers/rtc/rtc-cmos.c
··· 1527 1527 MODULE_ALIAS("platform:rtc_cmos"); 1528 1528 1529 1529 static struct platform_driver cmos_platform_driver = { 1530 - .remove_new = cmos_platform_remove, 1530 + .remove = cmos_platform_remove, 1531 1531 .shutdown = cmos_platform_shutdown, 1532 1532 .driver = { 1533 1533 .name = driver_name,
+1 -1
drivers/rtc/rtc-cros-ec.c
··· 401 401 402 402 static struct platform_driver cros_ec_rtc_driver = { 403 403 .probe = cros_ec_rtc_probe, 404 - .remove_new = cros_ec_rtc_remove, 404 + .remove = cros_ec_rtc_remove, 405 405 .driver = { 406 406 .name = DRV_NAME, 407 407 .pm = &cros_ec_rtc_pm_ops,
+1 -1
drivers/rtc/rtc-ds1685.c
··· 1354 1354 .name = "rtc-ds1685", 1355 1355 }, 1356 1356 .probe = ds1685_rtc_probe, 1357 - .remove_new = ds1685_rtc_remove, 1357 + .remove = ds1685_rtc_remove, 1358 1358 }; 1359 1359 module_platform_driver(ds1685_rtc_driver); 1360 1360 /* ----------------------------------------------------------------------- */
+1 -1
drivers/rtc/rtc-ftrtc010.c
··· 214 214 .of_match_table = ftrtc010_rtc_dt_match, 215 215 }, 216 216 .probe = ftrtc010_rtc_probe, 217 - .remove_new = ftrtc010_rtc_remove, 217 + .remove = ftrtc010_rtc_remove, 218 218 }; 219 219 220 220 module_platform_driver_probe(ftrtc010_rtc_driver, ftrtc010_rtc_probe);
+1 -1
drivers/rtc/rtc-hid-sensor-time.c
··· 319 319 .name = KBUILD_MODNAME, 320 320 }, 321 321 .probe = hid_time_probe, 322 - .remove_new = hid_time_remove, 322 + .remove = hid_time_remove, 323 323 }; 324 324 module_platform_driver(hid_time_platform_driver); 325 325
+1 -1
drivers/rtc/rtc-imxdi.c
··· 860 860 .name = "imxdi_rtc", 861 861 .of_match_table = dryice_dt_ids, 862 862 }, 863 - .remove_new = __exit_p(dryice_rtc_remove), 863 + .remove = __exit_p(dryice_rtc_remove), 864 864 }; 865 865 866 866 module_platform_driver_probe(dryice_rtc_driver, dryice_rtc_probe);
+1 -1
drivers/rtc/rtc-loongson.c
··· 381 381 382 382 static struct platform_driver loongson_rtc_driver = { 383 383 .probe = loongson_rtc_probe, 384 - .remove_new = loongson_rtc_remove, 384 + .remove = loongson_rtc_remove, 385 385 .driver = { 386 386 .name = "loongson-rtc", 387 387 .of_match_table = loongson_rtc_of_match,
+1 -1
drivers/rtc/rtc-lpc24xx.c
··· 285 285 286 286 static struct platform_driver lpc24xx_rtc_driver = { 287 287 .probe = lpc24xx_rtc_probe, 288 - .remove_new = lpc24xx_rtc_remove, 288 + .remove = lpc24xx_rtc_remove, 289 289 .driver = { 290 290 .name = "lpc24xx-rtc", 291 291 .of_match_table = lpc24xx_rtc_match,
+1 -1
drivers/rtc/rtc-max77686.c
··· 875 875 .pm = &max77686_rtc_pm_ops, 876 876 }, 877 877 .probe = max77686_rtc_probe, 878 - .remove_new = max77686_rtc_remove, 878 + .remove = max77686_rtc_remove, 879 879 .id_table = rtc_id, 880 880 }; 881 881
+1 -1
drivers/rtc/rtc-mc13xxx.c
··· 350 350 351 351 static struct platform_driver mc13xxx_rtc_driver = { 352 352 .id_table = mc13xxx_rtc_idtable, 353 - .remove_new = mc13xxx_rtc_remove, 353 + .remove = mc13xxx_rtc_remove, 354 354 .driver = { 355 355 .name = DRIVER_NAME, 356 356 },
+1 -1
drivers/rtc/rtc-mpc5121.c
··· 398 398 .of_match_table = of_match_ptr(mpc5121_rtc_match), 399 399 }, 400 400 .probe = mpc5121_rtc_probe, 401 - .remove_new = mpc5121_rtc_remove, 401 + .remove = mpc5121_rtc_remove, 402 402 }; 403 403 404 404 module_platform_driver(mpc5121_rtc_driver);
+1 -1
drivers/rtc/rtc-mpfs.c
··· 288 288 289 289 static struct platform_driver mpfs_rtc_driver = { 290 290 .probe = mpfs_rtc_probe, 291 - .remove_new = mpfs_rtc_remove, 291 + .remove = mpfs_rtc_remove, 292 292 .driver = { 293 293 .name = "mpfs_rtc", 294 294 .of_match_table = mpfs_rtc_of_match,
+1 -1
drivers/rtc/rtc-mt7622.c
··· 394 394 395 395 static struct platform_driver mtk_rtc_driver = { 396 396 .probe = mtk_rtc_probe, 397 - .remove_new = mtk_rtc_remove, 397 + .remove = mtk_rtc_remove, 398 398 .driver = { 399 399 .name = MTK_RTC_DEV, 400 400 .of_match_table = mtk_rtc_match,
+1 -1
drivers/rtc/rtc-mv.c
··· 308 308 * triggering a section mismatch warning. 309 309 */ 310 310 static struct platform_driver mv_rtc_driver __refdata = { 311 - .remove_new = __exit_p(mv_rtc_remove), 311 + .remove = __exit_p(mv_rtc_remove), 312 312 .driver = { 313 313 .name = "rtc-mv", 314 314 .of_match_table = of_match_ptr(rtc_mv_of_match_table),
+1 -1
drivers/rtc/rtc-mxc_v2.c
··· 381 381 .of_match_table = mxc_ids, 382 382 }, 383 383 .probe = mxc_rtc_probe, 384 - .remove_new = mxc_rtc_remove, 384 + .remove = mxc_rtc_remove, 385 385 }; 386 386 387 387 module_platform_driver(mxc_rtc_driver);
+1 -1
drivers/rtc/rtc-omap.c
··· 1014 1014 1015 1015 static struct platform_driver omap_rtc_driver = { 1016 1016 .probe = omap_rtc_probe, 1017 - .remove_new = omap_rtc_remove, 1017 + .remove = omap_rtc_remove, 1018 1018 .shutdown = omap_rtc_shutdown, 1019 1019 .driver = { 1020 1020 .name = "omap_rtc",
+1 -1
drivers/rtc/rtc-palmas.c
··· 346 346 347 347 static struct platform_driver palmas_rtc_driver = { 348 348 .probe = palmas_rtc_probe, 349 - .remove_new = palmas_rtc_remove, 349 + .remove = palmas_rtc_remove, 350 350 .driver = { 351 351 .name = "palmas-rtc", 352 352 .pm = &palmas_rtc_pm_ops,
+1 -1
drivers/rtc/rtc-pcf50633.c
··· 273 273 .name = "pcf50633-rtc", 274 274 }, 275 275 .probe = pcf50633_rtc_probe, 276 - .remove_new = pcf50633_rtc_remove, 276 + .remove = pcf50633_rtc_remove, 277 277 }; 278 278 279 279 module_platform_driver(pcf50633_rtc_driver);
+1 -1
drivers/rtc/rtc-pic32.c
··· 371 371 372 372 static struct platform_driver pic32_rtc_driver = { 373 373 .probe = pic32_rtc_probe, 374 - .remove_new = pic32_rtc_remove, 374 + .remove = pic32_rtc_remove, 375 375 .driver = { 376 376 .name = "pic32-rtc", 377 377 .of_match_table = of_match_ptr(pic32_rtc_dt_ids),
+1 -1
drivers/rtc/rtc-pm8xxx.c
··· 537 537 538 538 static struct platform_driver pm8xxx_rtc_driver = { 539 539 .probe = pm8xxx_rtc_probe, 540 - .remove_new = pm8xxx_remove, 540 + .remove = pm8xxx_remove, 541 541 .driver = { 542 542 .name = "rtc-pm8xxx", 543 543 .of_match_table = pm8xxx_id_table,
+1 -1
drivers/rtc/rtc-pxa.c
··· 409 409 * triggering a section mismatch warning. 410 410 */ 411 411 static struct platform_driver pxa_rtc_driver __refdata = { 412 - .remove_new = __exit_p(pxa_rtc_remove), 412 + .remove = __exit_p(pxa_rtc_remove), 413 413 .driver = { 414 414 .name = "pxa-rtc", 415 415 .of_match_table = of_match_ptr(pxa_rtc_dt_ids),
+1 -1
drivers/rtc/rtc-rc5t583.c
··· 298 298 299 299 static struct platform_driver rc5t583_rtc_driver = { 300 300 .probe = rc5t583_rtc_probe, 301 - .remove_new = rc5t583_rtc_remove, 301 + .remove = rc5t583_rtc_remove, 302 302 .driver = { 303 303 .name = "rtc-rc5t583", 304 304 .pm = &rc5t583_rtc_pm_ops,
+1 -1
drivers/rtc/rtc-rtd119x.c
··· 228 228 229 229 static struct platform_driver rtd119x_rtc_driver = { 230 230 .probe = rtd119x_rtc_probe, 231 - .remove_new = rtd119x_rtc_remove, 231 + .remove = rtd119x_rtc_remove, 232 232 .driver = { 233 233 .name = "rtd1295-rtc", 234 234 .of_match_table = rtd119x_rtc_dt_ids,
+1 -1
drivers/rtc/rtc-rzn1.c
··· 405 405 406 406 static struct platform_driver rzn1_rtc_driver = { 407 407 .probe = rzn1_rtc_probe, 408 - .remove_new = rzn1_rtc_remove, 408 + .remove = rzn1_rtc_remove, 409 409 .driver = { 410 410 .name = "rzn1-rtc", 411 411 .of_match_table = rzn1_rtc_of_match,
+1 -1
drivers/rtc/rtc-s3c.c
··· 597 597 598 598 static struct platform_driver s3c_rtc_driver = { 599 599 .probe = s3c_rtc_probe, 600 - .remove_new = s3c_rtc_remove, 600 + .remove = s3c_rtc_remove, 601 601 .driver = { 602 602 .name = "s3c-rtc", 603 603 .pm = &s3c_rtc_pm_ops,
+1 -1
drivers/rtc/rtc-sa1100.c
··· 341 341 342 342 static struct platform_driver sa1100_rtc_driver = { 343 343 .probe = sa1100_rtc_probe, 344 - .remove_new = sa1100_rtc_remove, 344 + .remove = sa1100_rtc_remove, 345 345 .driver = { 346 346 .name = "sa1100-rtc", 347 347 .pm = &sa1100_rtc_pm_ops,
+1 -1
drivers/rtc/rtc-sh.c
··· 678 678 .pm = &sh_rtc_pm_ops, 679 679 .of_match_table = sh_rtc_of_match, 680 680 }, 681 - .remove_new = __exit_p(sh_rtc_remove), 681 + .remove = __exit_p(sh_rtc_remove), 682 682 }; 683 683 684 684 module_platform_driver_probe(sh_rtc_platform_driver, sh_rtc_probe);
+1 -1
drivers/rtc/rtc-spear.c
··· 475 475 476 476 static struct platform_driver spear_rtc_driver = { 477 477 .probe = spear_rtc_probe, 478 - .remove_new = spear_rtc_remove, 478 + .remove = spear_rtc_remove, 479 479 .shutdown = spear_rtc_shutdown, 480 480 .driver = { 481 481 .name = "rtc-spear",
+1 -1
drivers/rtc/rtc-stm32.c
··· 1287 1287 1288 1288 static struct platform_driver stm32_rtc_driver = { 1289 1289 .probe = stm32_rtc_probe, 1290 - .remove_new = stm32_rtc_remove, 1290 + .remove = stm32_rtc_remove, 1291 1291 .driver = { 1292 1292 .name = DRIVER_NAME, 1293 1293 .pm = &stm32_rtc_pm_ops,
+1 -1
drivers/rtc/rtc-stmp3xxx.c
··· 403 403 404 404 static struct platform_driver stmp3xxx_rtcdrv = { 405 405 .probe = stmp3xxx_rtc_probe, 406 - .remove_new = stmp3xxx_rtc_remove, 406 + .remove = stmp3xxx_rtc_remove, 407 407 .driver = { 408 408 .name = "stmp3xxx-rtc", 409 409 .pm = &stmp3xxx_rtc_pm_ops,
+1 -1
drivers/rtc/rtc-sunplus.c
··· 344 344 345 345 static struct platform_driver sp_rtc_driver = { 346 346 .probe = sp_rtc_probe, 347 - .remove_new = sp_rtc_remove, 347 + .remove = sp_rtc_remove, 348 348 .driver = { 349 349 .name = "sp7021-rtc", 350 350 .of_match_table = sp_rtc_of_match,
+1 -1
drivers/rtc/rtc-tegra.c
··· 399 399 400 400 static struct platform_driver tegra_rtc_driver = { 401 401 .probe = tegra_rtc_probe, 402 - .remove_new = tegra_rtc_remove, 402 + .remove = tegra_rtc_remove, 403 403 .shutdown = tegra_rtc_shutdown, 404 404 .driver = { 405 405 .name = "tegra_rtc",
+1 -1
drivers/rtc/rtc-tps6586x.c
··· 317 317 .pm = &tps6586x_pm_ops, 318 318 }, 319 319 .probe = tps6586x_rtc_probe, 320 - .remove_new = tps6586x_rtc_remove, 320 + .remove = tps6586x_rtc_remove, 321 321 }; 322 322 module_platform_driver(tps6586x_rtc_driver); 323 323
+1 -1
drivers/rtc/rtc-twl.c
··· 673 673 674 674 static struct platform_driver twl4030rtc_driver = { 675 675 .probe = twl_rtc_probe, 676 - .remove_new = twl_rtc_remove, 676 + .remove = twl_rtc_remove, 677 677 .shutdown = twl_rtc_shutdown, 678 678 .driver = { 679 679 .name = "twl_rtc",
+1 -1
drivers/rtc/rtc-vt8500.c
··· 251 251 252 252 static struct platform_driver vt8500_rtc_driver = { 253 253 .probe = vt8500_rtc_probe, 254 - .remove_new = vt8500_rtc_remove, 254 + .remove = vt8500_rtc_remove, 255 255 .driver = { 256 256 .name = "vt8500-rtc", 257 257 .of_match_table = wmt_dt_ids,
+1 -1
drivers/rtc/rtc-wm8350.c
··· 459 459 460 460 static struct platform_driver wm8350_rtc_driver = { 461 461 .probe = wm8350_rtc_probe, 462 - .remove_new = wm8350_rtc_remove, 462 + .remove = wm8350_rtc_remove, 463 463 .driver = { 464 464 .name = "wm8350-rtc", 465 465 .pm = &wm8350_rtc_pm_ops,
+1 -1
drivers/rtc/rtc-xgene.c
··· 263 263 264 264 static struct platform_driver xgene_rtc_driver = { 265 265 .probe = xgene_rtc_probe, 266 - .remove_new = xgene_rtc_remove, 266 + .remove = xgene_rtc_remove, 267 267 .driver = { 268 268 .name = "xgene-rtc", 269 269 .pm = &xgene_rtc_pm_ops,
+1 -1
drivers/rtc/rtc-zynqmp.c
··· 382 382 383 383 static struct platform_driver xlnx_rtc_driver = { 384 384 .probe = xlnx_rtc_probe, 385 - .remove_new = xlnx_rtc_remove, 385 + .remove = xlnx_rtc_remove, 386 386 .driver = { 387 387 .name = KBUILD_MODNAME, 388 388 .pm = &xlnx_rtc_pm_ops,