Skip to content

Commit

Permalink
serial: Switch back to struct platform_driver::remove()
Browse files Browse the repository at this point in the history
After commit 0edb555 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/tty/serial 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-7-u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Uwe Kleine-König authored and gregkh committed Oct 11, 2024
1 parent 8cf0b93 commit 5cbb9b1
Show file tree
Hide file tree
Showing 66 changed files with 66 additions and 66 deletions.
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_aspeed_vuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ static struct platform_driver aspeed_vuart_driver = {
.of_match_table = aspeed_vuart_table,
},
.probe = aspeed_vuart_probe,
.remove_new = aspeed_vuart_remove,
.remove = aspeed_vuart_remove,
};

module_platform_driver(aspeed_vuart_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_bcm2835aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ static struct platform_driver bcm2835aux_serial_driver = {
.pm = pm_ptr(&bcm2835aux_dev_pm_ops),
},
.probe = bcm2835aux_serial_probe,
.remove_new = bcm2835aux_serial_remove,
.remove = bcm2835aux_serial_remove,
};
module_platform_driver(bcm2835aux_serial_driver);

Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_bcm7271.c
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ static struct platform_driver brcmuart_platform_driver = {
.of_match_table = brcmuart_dt_ids,
},
.probe = brcmuart_probe,
.remove_new = brcmuart_remove,
.remove = brcmuart_remove,
};

static int __init brcmuart_init(void)
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ static struct platform_driver dw8250_platform_driver = {
.acpi_match_table = dw8250_acpi_match,
},
.probe = dw8250_probe,
.remove_new = dw8250_remove,
.remove = dw8250_remove,
};

module_platform_driver(dw8250_platform_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_em.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static struct platform_driver serial8250_em_platform_driver = {
.of_match_table = serial8250_em_dt_ids,
},
.probe = serial8250_em_probe,
.remove_new = serial8250_em_remove,
.remove = serial8250_em_remove,
};

module_platform_driver(serial8250_em_platform_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_fsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static struct platform_driver fsl8250_platform_driver = {
.acpi_match_table = ACPI_PTR(fsl_8250_acpi_id),
},
.probe = fsl8250_acpi_probe,
.remove_new = fsl8250_acpi_remove,
.remove = fsl8250_acpi_remove,
};

module_platform_driver(fsl8250_platform_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_ingenic.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ static struct platform_driver ingenic_uart_platform_driver = {
.of_match_table = of_match,
},
.probe = ingenic_uart_probe,
.remove_new = ingenic_uart_remove,
.remove = ingenic_uart_remove,
};

module_platform_driver(ingenic_uart_platform_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_ioc3.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static void serial8250_ioc3_remove(struct platform_device *pdev)

static struct platform_driver serial8250_ioc3_driver = {
.probe = serial8250_ioc3_probe,
.remove_new = serial8250_ioc3_remove,
.remove = serial8250_ioc3_remove,
.driver = {
.name = "ioc3-serial8250",
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_lpc18xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ MODULE_DEVICE_TABLE(of, lpc18xx_serial_match);

static struct platform_driver lpc18xx_serial_driver = {
.probe = lpc18xx_serial_probe,
.remove_new = lpc18xx_serial_remove,
.remove = lpc18xx_serial_remove,
.driver = {
.name = "lpc18xx-uart",
.of_match_table = lpc18xx_serial_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_mtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ static struct platform_driver mtk8250_platform_driver = {
.of_match_table = mtk8250_of_match,
},
.probe = mtk8250_probe,
.remove_new = mtk8250_remove,
.remove = mtk8250_remove,
};
module_platform_driver(mtk8250_platform_driver);

Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_of.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ static struct platform_driver of_platform_serial_driver = {
.pm = &of_serial_pm_ops,
},
.probe = of_platform_serial_probe,
.remove_new = of_platform_serial_remove,
.remove = of_platform_serial_remove,
};

module_platform_driver(of_platform_serial_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,7 @@ static struct platform_driver omap8250_platform_driver = {
.of_match_table = omap8250_dt_ids,
},
.probe = omap8250_probe,
.remove_new = omap8250_remove,
.remove = omap8250_remove,
};
module_platform_driver(omap8250_platform_driver);

Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ MODULE_DEVICE_TABLE(acpi, acpi_platform_serial_table);

static struct platform_driver serial8250_isa_driver = {
.probe = serial8250_probe,
.remove_new = serial8250_remove,
.remove = serial8250_remove,
.suspend = serial8250_suspend,
.resume = serial8250_resume,
.driver = {
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static void serial_pxa_remove(struct platform_device *pdev)

static struct platform_driver serial_pxa_driver = {
.probe = serial_pxa_probe,
.remove_new = serial_pxa_remove,
.remove = serial_pxa_remove,

.driver = {
.name = "pxa2xx-uart",
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ static struct platform_driver tegra_uart_driver = {
.acpi_match_table = ACPI_PTR(tegra_uart_acpi_match),
},
.probe = tegra_uart_probe,
.remove_new = tegra_uart_remove,
.remove = tegra_uart_remove,
};

module_platform_driver(tegra_uart_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_uniphier.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ MODULE_DEVICE_TABLE(of, uniphier_uart_match);

static struct platform_driver uniphier_uart_platform_driver = {
.probe = uniphier_uart_probe,
.remove_new = uniphier_uart_remove,
.remove = uniphier_uart_remove,
.driver = {
.name = "uniphier-uart",
.of_match_table = uniphier_uart_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/altera_jtaguart.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ MODULE_DEVICE_TABLE(of, altera_jtaguart_match);

static struct platform_driver altera_jtaguart_platform_driver = {
.probe = altera_jtaguart_probe,
.remove_new = altera_jtaguart_remove,
.remove = altera_jtaguart_remove,
.driver = {
.name = DRV_NAME,
.of_match_table = of_match_ptr(altera_jtaguart_match),
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/altera_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ MODULE_DEVICE_TABLE(of, altera_uart_match);

static struct platform_driver altera_uart_platform_driver = {
.probe = altera_uart_probe,
.remove_new = altera_uart_remove,
.remove = altera_uart_remove,
.driver = {
.name = DRV_NAME,
.of_match_table = of_match_ptr(altera_uart_match),
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/amba-pl011.c
Original file line number Diff line number Diff line change
Expand Up @@ -2937,7 +2937,7 @@ MODULE_DEVICE_TABLE(acpi, sbsa_uart_acpi_match);

static struct platform_driver arm_sbsa_uart_platform_driver = {
.probe = sbsa_uart_probe,
.remove_new = sbsa_uart_remove,
.remove = sbsa_uart_remove,
.driver = {
.name = "sbsa-uart",
.pm = &pl011_dev_pm_ops,
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/ar933x_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ MODULE_DEVICE_TABLE(of, ar933x_uart_of_ids);

static struct platform_driver ar933x_uart_platform_driver = {
.probe = ar933x_uart_probe,
.remove_new = ar933x_uart_remove,
.remove = ar933x_uart_remove,
.driver = {
.name = DRIVER_NAME,
.of_match_table = of_match_ptr(ar933x_uart_of_ids),
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/atmel_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -3017,7 +3017,7 @@ static SIMPLE_DEV_PM_OPS(atmel_serial_pm_ops, atmel_serial_suspend,

static struct platform_driver atmel_serial_driver = {
.probe = atmel_serial_probe,
.remove_new = atmel_serial_remove,
.remove = atmel_serial_remove,
.driver = {
.name = "atmel_usart_serial",
.of_match_table = of_match_ptr(atmel_serial_dt_ids),
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/bcm63xx_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ MODULE_DEVICE_TABLE(of, bcm63xx_of_match);
*/
static struct platform_driver bcm_uart_platform_driver = {
.probe = bcm_uart_probe,
.remove_new = bcm_uart_remove,
.remove = bcm_uart_remove,
.driver = {
.name = "bcm63xx_uart",
.of_match_table = bcm63xx_of_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/clps711x.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ static struct platform_driver clps711x_uart_platform = {
.of_match_table = of_match_ptr(clps711x_uart_dt_ids),
},
.probe = uart_clps711x_probe,
.remove_new = uart_clps711x_remove,
.remove = uart_clps711x_remove,
};

static int __init uart_clps711x_init(void)
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/cpm_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,7 @@ static struct platform_driver cpm_uart_driver = {
.of_match_table = cpm_uart_match,
},
.probe = cpm_uart_probe,
.remove_new = cpm_uart_remove,
.remove = cpm_uart_remove,
};

static int __init cpm_uart_init(void)
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/digicolor-usart.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ static struct platform_driver digicolor_uart_platform = {
.of_match_table = of_match_ptr(digicolor_uart_dt_ids),
},
.probe = digicolor_uart_probe,
.remove_new = digicolor_uart_remove,
.remove = digicolor_uart_remove,
};

static int __init digicolor_uart_init(void)
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/esp32_acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ static void esp32s3_acm_remove(struct platform_device *pdev)

static struct platform_driver esp32s3_acm_driver = {
.probe = esp32s3_acm_probe,
.remove_new = esp32s3_acm_remove,
.remove = esp32s3_acm_remove,
.driver = {
.name = DRIVER_NAME,
.of_match_table = esp32s3_acm_dt_ids,
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/esp32_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ static void esp32_uart_remove(struct platform_device *pdev)

static struct platform_driver esp32_uart_driver = {
.probe = esp32_uart_probe,
.remove_new = esp32_uart_remove,
.remove = esp32_uart_remove,
.driver = {
.name = DRIVER_NAME,
.of_match_table = esp32_uart_dt_ids,
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/fsl_linflexuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ static SIMPLE_DEV_PM_OPS(linflex_pm_ops, linflex_suspend, linflex_resume);

static struct platform_driver linflex_driver = {
.probe = linflex_probe,
.remove_new = linflex_remove,
.remove = linflex_remove,
.driver = {
.name = DRIVER_NAME,
.of_match_table = linflex_dt_ids,
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/fsl_lpuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -3206,7 +3206,7 @@ static const struct dev_pm_ops lpuart_pm_ops = {

static struct platform_driver lpuart_driver = {
.probe = lpuart_probe,
.remove_new = lpuart_remove,
.remove = lpuart_remove,
.driver = {
.name = "fsl-lpuart",
.of_match_table = lpuart_dt_ids,
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2702,7 +2702,7 @@ static const struct dev_pm_ops imx_uart_pm_ops = {

static struct platform_driver imx_uart_platform_driver = {
.probe = imx_uart_probe,
.remove_new = imx_uart_remove,
.remove = imx_uart_remove,

.driver = {
.name = "imx-uart",
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/lantiq.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ MODULE_DEVICE_TABLE(of, ltq_asc_match);

static struct platform_driver lqasc_driver = {
.probe = lqasc_probe,
.remove_new = lqasc_remove,
.remove = lqasc_remove,
.driver = {
.name = DRVNAME,
.of_match_table = ltq_asc_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/liteuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ MODULE_DEVICE_TABLE(of, liteuart_of_match);

static struct platform_driver liteuart_platform_driver = {
.probe = liteuart_probe,
.remove_new = liteuart_remove,
.remove = liteuart_remove,
.driver = {
.name = KBUILD_MODNAME,
.of_match_table = liteuart_of_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/lpc32xx_hs.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ MODULE_DEVICE_TABLE(of, serial_hs_lpc32xx_dt_ids);

static struct platform_driver serial_hs_lpc32xx_driver = {
.probe = serial_hs_lpc32xx_probe,
.remove_new = serial_hs_lpc32xx_remove,
.remove = serial_hs_lpc32xx_remove,
.suspend = serial_hs_lpc32xx_suspend,
.resume = serial_hs_lpc32xx_resume,
.driver = {
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/ma35d1_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ static int ma35d1serial_resume(struct platform_device *dev)

static struct platform_driver ma35d1serial_driver = {
.probe = ma35d1serial_probe,
.remove_new = ma35d1serial_remove,
.remove = ma35d1serial_remove,
.suspend = ma35d1serial_suspend,
.resume = ma35d1serial_resume,
.driver = {
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/mcf.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ static void mcf_remove(struct platform_device *pdev)

static struct platform_driver mcf_platform_driver = {
.probe = mcf_probe,
.remove_new = mcf_remove,
.remove = mcf_remove,
.driver = {
.name = "mcfuart",
},
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/meson_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ MODULE_DEVICE_TABLE(of, meson_uart_dt_match);

static struct platform_driver meson_uart_platform_driver = {
.probe = meson_uart_probe,
.remove_new = meson_uart_remove,
.remove = meson_uart_remove,
.driver = {
.name = "meson_uart",
.of_match_table = meson_uart_dt_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/milbeaut_usio.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ MODULE_DEVICE_TABLE(of, mlb_usio_dt_ids);

static struct platform_driver mlb_usio_driver = {
.probe = mlb_usio_probe,
.remove_new = mlb_usio_remove,
.remove = mlb_usio_remove,
.driver = {
.name = USIO_NAME,
.of_match_table = mlb_usio_dt_ids,
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/mpc52xx_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1843,7 +1843,7 @@ MODULE_DEVICE_TABLE(of, mpc52xx_uart_of_match);

static struct platform_driver mpc52xx_uart_of_driver = {
.probe = mpc52xx_uart_of_probe,
.remove_new = mpc52xx_uart_of_remove,
.remove = mpc52xx_uart_of_remove,
#ifdef CONFIG_PM
.suspend = mpc52xx_uart_of_suspend,
.resume = mpc52xx_uart_of_resume,
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/msm_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1894,7 +1894,7 @@ static const struct dev_pm_ops msm_serial_dev_pm_ops = {
};

static struct platform_driver msm_platform_driver = {
.remove_new = msm_serial_remove,
.remove = msm_serial_remove,
.probe = msm_serial_probe,
.driver = {
.name = "msm_serial",
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/mxs-auart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ static void mxs_auart_remove(struct platform_device *pdev)

static struct platform_driver mxs_auart_driver = {
.probe = mxs_auart_probe,
.remove_new = mxs_auart_remove,
.remove = mxs_auart_remove,
.driver = {
.name = "mxs-auart",
.of_match_table = mxs_auart_dt_ids,
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/omap-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@ MODULE_DEVICE_TABLE(of, omap_serial_of_match);

static struct platform_driver serial_omap_driver = {
.probe = serial_omap_probe,
.remove_new = serial_omap_remove,
.remove = serial_omap_remove,
.driver = {
.name = OMAP_SERIAL_DRIVER_NAME,
.pm = &serial_omap_dev_pm_ops,
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/owl-uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ static void owl_uart_remove(struct platform_device *pdev)

static struct platform_driver owl_uart_platform_driver = {
.probe = owl_uart_probe,
.remove_new = owl_uart_remove,
.remove = owl_uart_remove,
.driver = {
.name = "owl-uart",
.of_match_table = owl_uart_dt_matches,
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/pic32_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ MODULE_DEVICE_TABLE(of, pic32_serial_dt_ids);

static struct platform_driver pic32_uart_platform_driver = {
.probe = pic32_uart_probe,
.remove_new = pic32_uart_remove,
.remove = pic32_uart_remove,
.driver = {
.name = PIC32_DEV_NAME,
.of_match_table = of_match_ptr(pic32_serial_dt_ids),
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/serial/pmac_zilog.c
Original file line number Diff line number Diff line change
Expand Up @@ -1776,7 +1776,7 @@ static struct macio_driver pmz_driver = {

static struct platform_driver pmz_driver = {
.probe = pmz_attach,
.remove_new = pmz_detach,
.remove = pmz_detach,
.driver = {
.name = "scc",
},
Expand Down
Loading

0 comments on commit 5cbb9b1

Please sign in to comment.