ramips: convert driver to .remove_new

Convert driver to .remove_new in preparation for kernel 6.12 support.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18535
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Mieczyslaw Nalewaj 2025-04-13 23:58:40 +02:00 committed by Hauke Mehrtens
parent 5fcc57cca6
commit 8de9174816
7 changed files with 14 additions and 28 deletions

View file

@ -733,7 +733,7 @@ err_uninit_hsdma:
return ret;
}
static int mtk_hsdma_remove(struct platform_device *pdev)
static void mtk_hsdma_remove(struct platform_device *pdev)
{
struct mtk_hsdam_engine *hsdma = platform_get_drvdata(pdev);
@ -741,13 +741,11 @@ static int mtk_hsdma_remove(struct platform_device *pdev)
of_dma_controller_free(pdev->dev.of_node);
dma_async_device_unregister(&hsdma->ddev);
return 0;
}
static struct platform_driver mtk_hsdma_driver = {
.probe = mtk_hsdma_probe,
.remove = mtk_hsdma_remove,
.remove_new = mtk_hsdma_remove,
.driver = {
.name = KBUILD_MODNAME,
.of_match_table = mtk_hsdma_of_match,

View file

@ -890,20 +890,18 @@ err_unregister:
return ret;
}
static int gdma_dma_remove(struct platform_device *pdev)
static void gdma_dma_remove(struct platform_device *pdev)
{
struct gdma_dma_dev *dma_dev = platform_get_drvdata(pdev);
tasklet_kill(&dma_dev->task);
of_dma_controller_free(pdev->dev.of_node);
dma_async_device_unregister(&dma_dev->ddev);
return 0;
}
static struct platform_driver gdma_dma_driver = {
.probe = gdma_dma_probe,
.remove = gdma_dma_remove,
.remove_new = gdma_dma_remove,
.driver = {
.name = "gdma-rt2880",
.of_match_table = gdma_of_match_table,

View file

@ -2346,7 +2346,7 @@ host_free:
}
/* 4 device share one driver, using "drvdata" to show difference */
static int msdc_drv_remove(struct platform_device *pdev)
static void msdc_drv_remove(struct platform_device *pdev)
{
struct mmc_host *mmc;
struct msdc_host *host;
@ -2371,8 +2371,6 @@ static int msdc_drv_remove(struct platform_device *pdev)
host->dma.bd, host->dma.bd_addr);
mmc_free_host(host->mmc);
return 0;
}
/* Fix me: Power Flow */
@ -2412,7 +2410,7 @@ MODULE_DEVICE_TABLE(of, mt7620_sdhci_match);
static struct platform_driver mt_msdc_driver = {
.probe = msdc_drv_probe,
.remove = msdc_drv_remove,
.remove_new = msdc_drv_remove,
#ifdef CONFIG_PM
.suspend = msdc_drv_suspend,
.resume = msdc_drv_resume,

View file

@ -1312,7 +1312,7 @@ static int mt7621_nfc_probe(struct platform_device *pdev)
return 0;
}
static int mt7621_nfc_remove(struct platform_device *pdev)
static void mt7621_nfc_remove(struct platform_device *pdev)
{
struct mt7621_nfc *nfc = platform_get_drvdata(pdev);
struct nand_chip *nand = &nfc->nand;
@ -1321,8 +1321,6 @@ static int mt7621_nfc_remove(struct platform_device *pdev)
mtk_bmt_detach(mtd);
mtd_device_unregister(mtd);
nand_cleanup(nand);
return 0;
}
static const struct of_device_id mt7621_nfc_id_table[] = {
@ -1333,7 +1331,7 @@ MODULE_DEVICE_TABLE(of, match);
static struct platform_driver mt7621_nfc_driver = {
.probe = mt7621_nfc_probe,
.remove = mt7621_nfc_remove,
.remove_new = mt7621_nfc_remove,
.driver = {
.name = MT7621_NFC_NAME,
.of_match_table = mt7621_nfc_id_table,

View file

@ -1437,7 +1437,7 @@ static int esw_probe(struct platform_device *pdev)
return 0;
}
static int esw_remove(struct platform_device *pdev)
static void esw_remove(struct platform_device *pdev)
{
struct rt305x_esw *esw = platform_get_drvdata(pdev);
@ -1445,8 +1445,6 @@ static int esw_remove(struct platform_device *pdev)
esw_w32(esw, ~0, RT305X_ESW_REG_IMR);
platform_set_drvdata(pdev, NULL);
}
return 0;
}
static const struct of_device_id ralink_esw_match[] = {
@ -1522,7 +1520,7 @@ int rt3050_esw_init(struct fe_priv *priv)
static struct platform_driver esw_driver = {
.probe = esw_probe,
.remove = esw_remove,
.remove_new = esw_remove,
.driver = {
.name = "rt3050-esw",
.of_match_table = ralink_esw_match,

View file

@ -284,16 +284,14 @@ static int mt7620_gsw_probe(struct platform_device *pdev)
return 0;
}
static int mt7620_gsw_remove(struct platform_device *pdev)
static void mt7620_gsw_remove(struct platform_device *pdev)
{
platform_set_drvdata(pdev, NULL);
return 0;
}
static struct platform_driver gsw_driver = {
.probe = mt7620_gsw_probe,
.remove = mt7620_gsw_remove,
.remove_new = mt7620_gsw_remove,
.driver = {
.name = "mt7620-gsw",
.of_match_table = mediatek_gsw_match,

View file

@ -1638,7 +1638,7 @@ static int fe_probe(struct platform_device *pdev)
return 0;
}
static int fe_remove(struct platform_device *pdev)
static void fe_remove(struct platform_device *pdev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct fe_priv *priv = netdev_priv(dev);
@ -1648,13 +1648,11 @@ static int fe_remove(struct platform_device *pdev)
cancel_work_sync(&priv->pending_work);
platform_set_drvdata(pdev, NULL);
return 0;
}
static struct platform_driver fe_driver = {
.probe = fe_probe,
.remove = fe_remove,
.remove_new = fe_remove,
.driver = {
.name = "mtk_soc_eth",
.of_match_table = of_fe_match,