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

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

Convert all platform drivers below drivers/ata/ 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.

While touching these files, make indention of the struct initializer
consistent in several files.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20241016141609.27329-2-u.kleine-koenig@baylibre.com
Signed-off-by: Niklas Cassel <cassel@kernel.org>
This commit is contained in:
Uwe Kleine-König 2024-10-16 16:16:10 +02:00 committed by Niklas Cassel
parent f7a870d0be
commit 2d910fe1e6
33 changed files with 41 additions and 41 deletions

View File

@ -571,7 +571,7 @@ static SIMPLE_DEV_PM_OPS(ahci_brcm_pm_ops, brcm_ahci_suspend, brcm_ahci_resume);
static struct platform_driver brcm_ahci_driver = { static struct platform_driver brcm_ahci_driver = {
.probe = brcm_ahci_probe, .probe = brcm_ahci_probe,
.remove_new = brcm_ahci_remove, .remove = brcm_ahci_remove,
.shutdown = brcm_ahci_shutdown, .shutdown = brcm_ahci_shutdown,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,

View File

@ -402,7 +402,7 @@ MODULE_DEVICE_TABLE(of, ceva_ahci_of_match);
static struct platform_driver ceva_ahci_driver = { static struct platform_driver ceva_ahci_driver = {
.probe = ceva_ahci_probe, .probe = ceva_ahci_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
.of_match_table = ceva_ahci_of_match, .of_match_table = ceva_ahci_of_match,

View File

@ -238,7 +238,7 @@ MODULE_DEVICE_TABLE(of, ahci_da850_of_match);
static struct platform_driver ahci_da850_driver = { static struct platform_driver ahci_da850_driver = {
.probe = ahci_da850_probe, .probe = ahci_da850_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
.of_match_table = ahci_da850_of_match, .of_match_table = ahci_da850_of_match,

View File

@ -182,7 +182,7 @@ MODULE_DEVICE_TABLE(of, ahci_dm816_of_match);
static struct platform_driver ahci_dm816_driver = { static struct platform_driver ahci_dm816_driver = {
.probe = ahci_dm816_probe, .probe = ahci_dm816_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
.driver = { .driver = {
.name = AHCI_DM816_DRV_NAME, .name = AHCI_DM816_DRV_NAME,
.of_match_table = ahci_dm816_of_match, .of_match_table = ahci_dm816_of_match,

View File

@ -478,7 +478,7 @@ MODULE_DEVICE_TABLE(of, ahci_dwc_of_match);
static struct platform_driver ahci_dwc_driver = { static struct platform_driver ahci_dwc_driver = {
.probe = ahci_dwc_probe, .probe = ahci_dwc_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
.shutdown = ahci_platform_shutdown, .shutdown = ahci_platform_shutdown,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,

View File

@ -1027,7 +1027,7 @@ static SIMPLE_DEV_PM_OPS(ahci_imx_pm_ops, imx_ahci_suspend, imx_ahci_resume);
static struct platform_driver imx_ahci_driver = { static struct platform_driver imx_ahci_driver = {
.probe = imx_ahci_probe, .probe = imx_ahci_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
.of_match_table = imx_ahci_of_match, .of_match_table = imx_ahci_of_match,

View File

@ -174,7 +174,7 @@ MODULE_DEVICE_TABLE(of, ahci_of_match);
static struct platform_driver mtk_ahci_driver = { static struct platform_driver mtk_ahci_driver = {
.probe = mtk_ahci_probe, .probe = mtk_ahci_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
.of_match_table = ahci_of_match, .of_match_table = ahci_of_match,

View File

@ -245,7 +245,7 @@ MODULE_DEVICE_TABLE(of, ahci_mvebu_of_match);
static struct platform_driver ahci_mvebu_driver = { static struct platform_driver ahci_mvebu_driver = {
.probe = ahci_mvebu_probe, .probe = ahci_mvebu_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
.suspend = ahci_mvebu_suspend, .suspend = ahci_mvebu_suspend,
.resume = ahci_mvebu_resume, .resume = ahci_mvebu_resume,
.driver = { .driver = {

View File

@ -96,7 +96,7 @@ MODULE_DEVICE_TABLE(acpi, ahci_acpi_match);
static struct platform_driver ahci_driver = { static struct platform_driver ahci_driver = {
.probe = ahci_probe, .probe = ahci_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
.shutdown = ahci_platform_shutdown, .shutdown = ahci_platform_shutdown,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,

View File

@ -357,7 +357,7 @@ static SIMPLE_DEV_PM_OPS(ahci_qoriq_pm_ops, ahci_platform_suspend,
static struct platform_driver ahci_qoriq_driver = { static struct platform_driver ahci_qoriq_driver = {
.probe = ahci_qoriq_probe, .probe = ahci_qoriq_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
.of_match_table = ahci_qoriq_of_match, .of_match_table = ahci_qoriq_of_match,

View File

@ -185,7 +185,7 @@ MODULE_DEVICE_TABLE(acpi, ahci_acpi_match);
static struct platform_driver ahci_seattle_driver = { static struct platform_driver ahci_seattle_driver = {
.probe = ahci_seattle_probe, .probe = ahci_seattle_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
.acpi_match_table = ahci_acpi_match, .acpi_match_table = ahci_acpi_match,

View File

@ -238,7 +238,7 @@ static struct platform_driver st_ahci_driver = {
.of_match_table = st_ahci_match, .of_match_table = st_ahci_match,
}, },
.probe = st_ahci_probe, .probe = st_ahci_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
}; };
module_platform_driver(st_ahci_driver); module_platform_driver(st_ahci_driver);

View File

@ -292,7 +292,7 @@ MODULE_DEVICE_TABLE(of, ahci_sunxi_of_match);
static struct platform_driver ahci_sunxi_driver = { static struct platform_driver ahci_sunxi_driver = {
.probe = ahci_sunxi_probe, .probe = ahci_sunxi_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
.of_match_table = ahci_sunxi_of_match, .of_match_table = ahci_sunxi_of_match,

View File

@ -608,7 +608,7 @@ static int tegra_ahci_probe(struct platform_device *pdev)
static struct platform_driver tegra_ahci_driver = { static struct platform_driver tegra_ahci_driver = {
.probe = tegra_ahci_probe, .probe = tegra_ahci_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
.of_match_table = tegra_ahci_of_match, .of_match_table = tegra_ahci_of_match,

View File

@ -859,7 +859,7 @@ static int xgene_ahci_probe(struct platform_device *pdev)
static struct platform_driver xgene_ahci_driver = { static struct platform_driver xgene_ahci_driver = {
.probe = xgene_ahci_probe, .probe = xgene_ahci_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
.of_match_table = xgene_ahci_of_match, .of_match_table = xgene_ahci_of_match,

View File

@ -964,7 +964,7 @@ MODULE_DEVICE_TABLE(of, arasan_cf_id_table);
static struct platform_driver arasan_cf_driver = { static struct platform_driver arasan_cf_driver = {
.probe = arasan_cf_probe, .probe = arasan_cf_probe,
.remove_new = arasan_cf_remove, .remove = arasan_cf_remove,
.driver = { .driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
.pm = &arasan_cf_pm_ops, .pm = &arasan_cf_pm_ops,

View File

@ -1015,7 +1015,7 @@ static struct platform_driver ep93xx_pata_platform_driver = {
.of_match_table = ep93xx_pata_of_ids, .of_match_table = ep93xx_pata_of_ids,
}, },
.probe = ep93xx_pata_probe, .probe = ep93xx_pata_probe,
.remove_new = ep93xx_pata_remove, .remove = ep93xx_pata_remove,
}; };
module_platform_driver(ep93xx_pata_platform_driver); module_platform_driver(ep93xx_pata_platform_driver);

View File

@ -225,8 +225,8 @@ static void pata_falcon_remove_one(struct platform_device *pdev)
static struct platform_driver pata_falcon_driver = { static struct platform_driver pata_falcon_driver = {
.probe = pata_falcon_init_one, .probe = pata_falcon_init_one,
.remove_new = pata_falcon_remove_one, .remove = pata_falcon_remove_one,
.driver = { .driver = {
.name = "atari-falcon-ide", .name = "atari-falcon-ide",
}, },
}; };

View File

@ -557,7 +557,7 @@ static struct platform_driver pata_ftide010_driver = {
.of_match_table = pata_ftide010_of_match, .of_match_table = pata_ftide010_of_match,
}, },
.probe = pata_ftide010_probe, .probe = pata_ftide010_probe,
.remove_new = pata_ftide010_remove, .remove = pata_ftide010_remove,
}; };
module_platform_driver(pata_ftide010_driver); module_platform_driver(pata_ftide010_driver);

View File

@ -202,9 +202,9 @@ static void pata_gayle_remove_one(struct platform_device *pdev)
static struct platform_driver pata_gayle_driver = { static struct platform_driver pata_gayle_driver = {
.probe = pata_gayle_init_one, .probe = pata_gayle_init_one,
.remove_new = pata_gayle_remove_one, .remove = pata_gayle_remove_one,
.driver = { .driver = {
.name = "amiga-gayle-ide", .name = "amiga-gayle-ide",
}, },
}; };

View File

@ -249,7 +249,7 @@ MODULE_DEVICE_TABLE(of, imx_pata_dt_ids);
static struct platform_driver pata_imx_driver = { static struct platform_driver pata_imx_driver = {
.probe = pata_imx_probe, .probe = pata_imx_probe,
.remove_new = pata_imx_remove, .remove = pata_imx_remove,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
.of_match_table = imx_pata_dt_ids, .of_match_table = imx_pata_dt_ids,

View File

@ -298,7 +298,7 @@ static struct platform_driver ixp4xx_pata_platform_driver = {
.of_match_table = ixp4xx_pata_of_match, .of_match_table = ixp4xx_pata_of_match,
}, },
.probe = ixp4xx_pata_probe, .probe = ixp4xx_pata_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
}; };
module_platform_driver(ixp4xx_pata_platform_driver); module_platform_driver(ixp4xx_pata_platform_driver);

View File

@ -854,7 +854,7 @@ static const struct of_device_id mpc52xx_ata_of_match[] = {
static struct platform_driver mpc52xx_ata_of_platform_driver = { static struct platform_driver mpc52xx_ata_of_platform_driver = {
.probe = mpc52xx_ata_probe, .probe = mpc52xx_ata_probe,
.remove_new = mpc52xx_ata_remove, .remove = mpc52xx_ata_remove,
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
.suspend = mpc52xx_ata_suspend, .suspend = mpc52xx_ata_suspend,
.resume = mpc52xx_ata_resume, .resume = mpc52xx_ata_resume,

View File

@ -89,7 +89,7 @@ static struct platform_driver pata_of_platform_driver = {
.of_match_table = pata_of_platform_match, .of_match_table = pata_of_platform_match,
}, },
.probe = pata_of_platform_probe, .probe = pata_of_platform_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
}; };
module_platform_driver(pata_of_platform_driver); module_platform_driver(pata_of_platform_driver);

View File

@ -223,7 +223,7 @@ static int pata_platform_probe(struct platform_device *pdev)
static struct platform_driver pata_platform_driver = { static struct platform_driver pata_platform_driver = {
.probe = pata_platform_probe, .probe = pata_platform_probe,
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
}, },

View File

@ -306,7 +306,7 @@ static void pxa_ata_remove(struct platform_device *pdev)
static struct platform_driver pxa_ata_driver = { static struct platform_driver pxa_ata_driver = {
.probe = pxa_ata_probe, .probe = pxa_ata_probe,
.remove_new = pxa_ata_remove, .remove = pxa_ata_remove,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
}, },

View File

@ -164,7 +164,7 @@ static void rb532_pata_driver_remove(struct platform_device *pdev)
static struct platform_driver rb532_pata_platform_driver = { static struct platform_driver rb532_pata_platform_driver = {
.probe = rb532_pata_driver_probe, .probe = rb532_pata_driver_probe,
.remove_new = rb532_pata_driver_remove, .remove = rb532_pata_driver_remove,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
}, },

View File

@ -1240,7 +1240,7 @@ static struct platform_driver sata_dwc_driver = {
.of_match_table = sata_dwc_match, .of_match_table = sata_dwc_match,
}, },
.probe = sata_dwc_probe, .probe = sata_dwc_probe,
.remove_new = sata_dwc_remove, .remove = sata_dwc_remove,
}; };
module_platform_driver(sata_dwc_driver); module_platform_driver(sata_dwc_driver);

View File

@ -1589,7 +1589,7 @@ static struct platform_driver fsl_sata_driver = {
.of_match_table = fsl_sata_match, .of_match_table = fsl_sata_match,
}, },
.probe = sata_fsl_probe, .probe = sata_fsl_probe,
.remove_new = sata_fsl_remove, .remove = sata_fsl_remove,
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
.suspend = sata_fsl_suspend, .suspend = sata_fsl_suspend,
.resume = sata_fsl_resume, .resume = sata_fsl_resume,

View File

@ -425,7 +425,7 @@ static struct platform_driver gemini_sata_driver = {
.of_match_table = gemini_sata_of_match, .of_match_table = gemini_sata_of_match,
}, },
.probe = gemini_sata_probe, .probe = gemini_sata_probe,
.remove_new = gemini_sata_remove, .remove = gemini_sata_remove,
}; };
module_platform_driver(gemini_sata_driver); module_platform_driver(gemini_sata_driver);

View File

@ -614,12 +614,12 @@ static SIMPLE_DEV_PM_OPS(ahci_highbank_pm_ops,
ahci_highbank_suspend, ahci_highbank_resume); ahci_highbank_suspend, ahci_highbank_resume);
static struct platform_driver ahci_highbank_driver = { static struct platform_driver ahci_highbank_driver = {
.remove_new = ata_platform_remove_one, .remove = ata_platform_remove_one,
.driver = { .driver = {
.name = "highbank-ahci", .name = "highbank-ahci",
.of_match_table = ahci_of_match, .of_match_table = ahci_of_match,
.pm = &ahci_highbank_pm_ops, .pm = &ahci_highbank_pm_ops,
}, },
.probe = ahci_highbank_probe, .probe = ahci_highbank_probe,
}; };

View File

@ -4255,7 +4255,7 @@ MODULE_DEVICE_TABLE(of, mv_sata_dt_ids);
static struct platform_driver mv_platform_driver = { static struct platform_driver mv_platform_driver = {
.probe = mv_platform_probe, .probe = mv_platform_probe,
.remove_new = mv_platform_remove, .remove = mv_platform_remove,
.suspend = mv_platform_suspend, .suspend = mv_platform_suspend,
.resume = mv_platform_resume, .resume = mv_platform_resume,
.driver = { .driver = {

View File

@ -1009,7 +1009,7 @@ static const struct dev_pm_ops sata_rcar_pm_ops = {
static struct platform_driver sata_rcar_driver = { static struct platform_driver sata_rcar_driver = {
.probe = sata_rcar_probe, .probe = sata_rcar_probe,
.remove_new = sata_rcar_remove, .remove = sata_rcar_remove,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
.of_match_table = sata_rcar_match, .of_match_table = sata_rcar_match,