Commit fbae0fa9 authored by Jakub Kicinski's avatar Jakub Kicinski

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 5c5a7680
("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.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 5e317a2f 145473b2
...@@ -2457,15 +2457,13 @@ static int idtcm_probe(struct platform_device *pdev) ...@@ -2457,15 +2457,13 @@ static int idtcm_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int idtcm_remove(struct platform_device *pdev) static void idtcm_remove(struct platform_device *pdev)
{ {
struct idtcm *idtcm = platform_get_drvdata(pdev); struct idtcm *idtcm = platform_get_drvdata(pdev);
idtcm->extts_mask = 0; idtcm->extts_mask = 0;
ptp_clock_unregister_all(idtcm); ptp_clock_unregister_all(idtcm);
cancel_delayed_work_sync(&idtcm->extts_work); cancel_delayed_work_sync(&idtcm->extts_work);
return 0;
} }
static struct platform_driver idtcm_driver = { static struct platform_driver idtcm_driver = {
...@@ -2473,7 +2471,7 @@ static struct platform_driver idtcm_driver = { ...@@ -2473,7 +2471,7 @@ static struct platform_driver idtcm_driver = {
.name = "8a3400x-phc", .name = "8a3400x-phc",
}, },
.probe = idtcm_probe, .probe = idtcm_probe,
.remove = idtcm_remove, .remove_new = idtcm_remove,
}; };
module_platform_driver(idtcm_driver); module_platform_driver(idtcm_driver);
...@@ -258,7 +258,7 @@ static int ptp_dte_probe(struct platform_device *pdev) ...@@ -258,7 +258,7 @@ static int ptp_dte_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int ptp_dte_remove(struct platform_device *pdev) static void ptp_dte_remove(struct platform_device *pdev)
{ {
struct ptp_dte *ptp_dte = platform_get_drvdata(pdev); struct ptp_dte *ptp_dte = platform_get_drvdata(pdev);
u8 i; u8 i;
...@@ -267,8 +267,6 @@ static int ptp_dte_remove(struct platform_device *pdev) ...@@ -267,8 +267,6 @@ static int ptp_dte_remove(struct platform_device *pdev)
for (i = 0; i < DTE_NUM_REGS_TO_RESTORE; i++) for (i = 0; i < DTE_NUM_REGS_TO_RESTORE; i++)
writel(0, ptp_dte->regs + (i * sizeof(u32))); writel(0, ptp_dte->regs + (i * sizeof(u32)));
return 0;
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
...@@ -329,7 +327,7 @@ static struct platform_driver ptp_dte_driver = { ...@@ -329,7 +327,7 @@ static struct platform_driver ptp_dte_driver = {
.of_match_table = ptp_dte_of_match, .of_match_table = ptp_dte_of_match,
}, },
.probe = ptp_dte_probe, .probe = ptp_dte_probe,
.remove = ptp_dte_remove, .remove_new = ptp_dte_remove,
}; };
module_platform_driver(ptp_dte_driver); module_platform_driver(ptp_dte_driver);
......
...@@ -1447,15 +1447,13 @@ static int idt82p33_probe(struct platform_device *pdev) ...@@ -1447,15 +1447,13 @@ static int idt82p33_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int idt82p33_remove(struct platform_device *pdev) static void idt82p33_remove(struct platform_device *pdev)
{ {
struct idt82p33 *idt82p33 = platform_get_drvdata(pdev); struct idt82p33 *idt82p33 = platform_get_drvdata(pdev);
cancel_delayed_work_sync(&idt82p33->extts_work); cancel_delayed_work_sync(&idt82p33->extts_work);
idt82p33_ptp_clock_unregister_all(idt82p33); idt82p33_ptp_clock_unregister_all(idt82p33);
return 0;
} }
static struct platform_driver idt82p33_driver = { static struct platform_driver idt82p33_driver = {
...@@ -1463,7 +1461,7 @@ static struct platform_driver idt82p33_driver = { ...@@ -1463,7 +1461,7 @@ static struct platform_driver idt82p33_driver = {
.name = "82p33x1x-phc", .name = "82p33x1x-phc",
}, },
.probe = idt82p33_probe, .probe = idt82p33_probe,
.remove = idt82p33_remove, .remove_new = idt82p33_remove,
}; };
module_platform_driver(idt82p33_driver); module_platform_driver(idt82p33_driver);
...@@ -765,7 +765,7 @@ static int ines_ptp_ctrl_probe(struct platform_device *pld) ...@@ -765,7 +765,7 @@ static int ines_ptp_ctrl_probe(struct platform_device *pld)
return err; return err;
} }
static int ines_ptp_ctrl_remove(struct platform_device *pld) static void ines_ptp_ctrl_remove(struct platform_device *pld)
{ {
struct ines_clock *clock = dev_get_drvdata(&pld->dev); struct ines_clock *clock = dev_get_drvdata(&pld->dev);
...@@ -775,7 +775,6 @@ static int ines_ptp_ctrl_remove(struct platform_device *pld) ...@@ -775,7 +775,6 @@ static int ines_ptp_ctrl_remove(struct platform_device *pld)
mutex_unlock(&ines_clocks_lock); mutex_unlock(&ines_clocks_lock);
ines_clock_cleanup(clock); ines_clock_cleanup(clock);
kfree(clock); kfree(clock);
return 0;
} }
static const struct of_device_id ines_ptp_ctrl_of_match[] = { static const struct of_device_id ines_ptp_ctrl_of_match[] = {
...@@ -787,7 +786,7 @@ MODULE_DEVICE_TABLE(of, ines_ptp_ctrl_of_match); ...@@ -787,7 +786,7 @@ MODULE_DEVICE_TABLE(of, ines_ptp_ctrl_of_match);
static struct platform_driver ines_ptp_ctrl_driver = { static struct platform_driver ines_ptp_ctrl_driver = {
.probe = ines_ptp_ctrl_probe, .probe = ines_ptp_ctrl_probe,
.remove = ines_ptp_ctrl_remove, .remove_new = ines_ptp_ctrl_remove,
.driver = { .driver = {
.name = "ines_ptp_ctrl", .name = "ines_ptp_ctrl",
.of_match_table = ines_ptp_ctrl_of_match, .of_match_table = ines_ptp_ctrl_of_match,
......
...@@ -648,14 +648,13 @@ static int ptp_qoriq_probe(struct platform_device *dev) ...@@ -648,14 +648,13 @@ static int ptp_qoriq_probe(struct platform_device *dev)
return err; return err;
} }
static int ptp_qoriq_remove(struct platform_device *dev) static void ptp_qoriq_remove(struct platform_device *dev)
{ {
struct ptp_qoriq *ptp_qoriq = platform_get_drvdata(dev); struct ptp_qoriq *ptp_qoriq = platform_get_drvdata(dev);
ptp_qoriq_free(ptp_qoriq); ptp_qoriq_free(ptp_qoriq);
release_resource(ptp_qoriq->rsrc); release_resource(ptp_qoriq->rsrc);
kfree(ptp_qoriq); kfree(ptp_qoriq);
return 0;
} }
static const struct of_device_id match_table[] = { static const struct of_device_id match_table[] = {
...@@ -671,7 +670,7 @@ static struct platform_driver ptp_qoriq_driver = { ...@@ -671,7 +670,7 @@ static struct platform_driver ptp_qoriq_driver = {
.of_match_table = match_table, .of_match_table = match_table,
}, },
.probe = ptp_qoriq_probe, .probe = ptp_qoriq_probe,
.remove = ptp_qoriq_remove, .remove_new = ptp_qoriq_remove,
}; };
module_platform_driver(ptp_qoriq_driver); module_platform_driver(ptp_qoriq_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment