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

Merge branch 'ptp-convert-to-platform-remove-callback-returning-void'

Uwe Kleine-König says:

====================
ptp: Convert to platform remove callback returning void

this series converts all platform drivers below drivers/ptp/ to not use
struct platform_device::remove() any more. See commit 5c5a7680e67b
("platform: Provide a remove callback that returns no value") for an
extended explanation and the eventual goal.

All conversations are trivial, because the driver's .remove() callbacks
returned zero unconditionally.
====================

Link: https://lore.kernel.org/r/cover.1712734365.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+10 -18
+2 -4
drivers/ptp/ptp_clockmatrix.c
··· 2457 2457 return 0; 2458 2458 } 2459 2459 2460 - static int idtcm_remove(struct platform_device *pdev) 2460 + static void idtcm_remove(struct platform_device *pdev) 2461 2461 { 2462 2462 struct idtcm *idtcm = platform_get_drvdata(pdev); 2463 2463 2464 2464 idtcm->extts_mask = 0; 2465 2465 ptp_clock_unregister_all(idtcm); 2466 2466 cancel_delayed_work_sync(&idtcm->extts_work); 2467 - 2468 - return 0; 2469 2467 } 2470 2468 2471 2469 static struct platform_driver idtcm_driver = { ··· 2471 2473 .name = "8a3400x-phc", 2472 2474 }, 2473 2475 .probe = idtcm_probe, 2474 - .remove = idtcm_remove, 2476 + .remove_new = idtcm_remove, 2475 2477 }; 2476 2478 2477 2479 module_platform_driver(idtcm_driver);
+2 -4
drivers/ptp/ptp_dte.c
··· 258 258 return 0; 259 259 } 260 260 261 - static int ptp_dte_remove(struct platform_device *pdev) 261 + static void ptp_dte_remove(struct platform_device *pdev) 262 262 { 263 263 struct ptp_dte *ptp_dte = platform_get_drvdata(pdev); 264 264 u8 i; ··· 267 267 268 268 for (i = 0; i < DTE_NUM_REGS_TO_RESTORE; i++) 269 269 writel(0, ptp_dte->regs + (i * sizeof(u32))); 270 - 271 - return 0; 272 270 } 273 271 274 272 #ifdef CONFIG_PM_SLEEP ··· 327 329 .of_match_table = ptp_dte_of_match, 328 330 }, 329 331 .probe = ptp_dte_probe, 330 - .remove = ptp_dte_remove, 332 + .remove_new = ptp_dte_remove, 331 333 }; 332 334 module_platform_driver(ptp_dte_driver); 333 335
+2 -4
drivers/ptp/ptp_idt82p33.c
··· 1447 1447 return 0; 1448 1448 } 1449 1449 1450 - static int idt82p33_remove(struct platform_device *pdev) 1450 + static void idt82p33_remove(struct platform_device *pdev) 1451 1451 { 1452 1452 struct idt82p33 *idt82p33 = platform_get_drvdata(pdev); 1453 1453 1454 1454 cancel_delayed_work_sync(&idt82p33->extts_work); 1455 1455 1456 1456 idt82p33_ptp_clock_unregister_all(idt82p33); 1457 - 1458 - return 0; 1459 1457 } 1460 1458 1461 1459 static struct platform_driver idt82p33_driver = { ··· 1461 1463 .name = "82p33x1x-phc", 1462 1464 }, 1463 1465 .probe = idt82p33_probe, 1464 - .remove = idt82p33_remove, 1466 + .remove_new = idt82p33_remove, 1465 1467 }; 1466 1468 1467 1469 module_platform_driver(idt82p33_driver);
+2 -3
drivers/ptp/ptp_ines.c
··· 765 765 return err; 766 766 } 767 767 768 - static int ines_ptp_ctrl_remove(struct platform_device *pld) 768 + static void ines_ptp_ctrl_remove(struct platform_device *pld) 769 769 { 770 770 struct ines_clock *clock = dev_get_drvdata(&pld->dev); 771 771 ··· 775 775 mutex_unlock(&ines_clocks_lock); 776 776 ines_clock_cleanup(clock); 777 777 kfree(clock); 778 - return 0; 779 778 } 780 779 781 780 static const struct of_device_id ines_ptp_ctrl_of_match[] = { ··· 786 787 787 788 static struct platform_driver ines_ptp_ctrl_driver = { 788 789 .probe = ines_ptp_ctrl_probe, 789 - .remove = ines_ptp_ctrl_remove, 790 + .remove_new = ines_ptp_ctrl_remove, 790 791 .driver = { 791 792 .name = "ines_ptp_ctrl", 792 793 .of_match_table = ines_ptp_ctrl_of_match,
+2 -3
drivers/ptp/ptp_qoriq.c
··· 648 648 return err; 649 649 } 650 650 651 - static int ptp_qoriq_remove(struct platform_device *dev) 651 + static void ptp_qoriq_remove(struct platform_device *dev) 652 652 { 653 653 struct ptp_qoriq *ptp_qoriq = platform_get_drvdata(dev); 654 654 655 655 ptp_qoriq_free(ptp_qoriq); 656 656 release_resource(ptp_qoriq->rsrc); 657 657 kfree(ptp_qoriq); 658 - return 0; 659 658 } 660 659 661 660 static const struct of_device_id match_table[] = { ··· 670 671 .of_match_table = match_table, 671 672 }, 672 673 .probe = ptp_qoriq_probe, 673 - .remove = ptp_qoriq_remove, 674 + .remove_new = ptp_qoriq_remove, 674 675 }; 675 676 676 677 module_platform_driver(ptp_qoriq_driver);