fpga: Switch back to struct platform_driver::remove()
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Fri, 8 Nov 2024 16:00:02 +0000 (17:00 +0100)
committerXu Yilun <yilun.xu@linux.intel.com>
Mon, 11 Nov 2024 02:43:21 +0000 (10:43 +0800)
After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

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

A few white space changes are included to make indention consistent.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Acked-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/20241108160002.252517-2-u.kleine-koenig@baylibre.com
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
13 files changed:
drivers/fpga/altera-fpga2sdram.c
drivers/fpga/altera-freeze-bridge.c
drivers/fpga/altera-hps2fpga.c
drivers/fpga/dfl-afu-main.c
drivers/fpga/dfl-fme-br.c
drivers/fpga/dfl-fme-main.c
drivers/fpga/dfl-fme-region.c
drivers/fpga/intel-m10-bmc-sec-update.c
drivers/fpga/of-fpga-region.c
drivers/fpga/socfpga-a10.c
drivers/fpga/stratix10-soc.c
drivers/fpga/xilinx-pr-decoupler.c
drivers/fpga/zynq-fpga.c

index f4de3fe..e414929 100644 (file)
@@ -152,7 +152,7 @@ MODULE_DEVICE_TABLE(of, altera_fpga_of_match);
 
 static struct platform_driver altera_fpga_driver = {
        .probe = alt_fpga_bridge_probe,
-       .remove_new = alt_fpga_bridge_remove,
+       .remove = alt_fpga_bridge_remove,
        .driver = {
                .name   = "altera_fpga2sdram_bridge",
                .of_match_table = of_match_ptr(altera_fpga_of_match),
index 44061cb..594693f 100644 (file)
@@ -262,7 +262,7 @@ static void altera_freeze_br_remove(struct platform_device *pdev)
 
 static struct platform_driver altera_freeze_br_driver = {
        .probe = altera_freeze_br_probe,
-       .remove_new = altera_freeze_br_remove,
+       .remove = altera_freeze_br_remove,
        .driver = {
                .name   = "altera_freeze_br",
                .of_match_table = altera_freeze_br_of_match,
index 6f8e24b..f2f1250 100644 (file)
@@ -205,7 +205,7 @@ MODULE_DEVICE_TABLE(of, altera_fpga_of_match);
 
 static struct platform_driver alt_fpga_bridge_driver = {
        .probe = alt_fpga_bridge_probe,
-       .remove_new = alt_fpga_bridge_remove,
+       .remove = alt_fpga_bridge_remove,
        .driver = {
                .name   = "altera_hps2fpga_bridge",
                .of_match_table = of_match_ptr(altera_fpga_of_match),
index 6b97c07..2fd4f07 100644 (file)
@@ -947,12 +947,12 @@ static const struct attribute_group *afu_dev_groups[] = {
 };
 
 static struct platform_driver afu_driver = {
-       .driver = {
-               .name       = DFL_FPGA_FEATURE_DEV_PORT,
+       .driver = {
+               .name = DFL_FPGA_FEATURE_DEV_PORT,
                .dev_groups = afu_dev_groups,
        },
-       .probe   = afu_probe,
-       .remove_new = afu_remove,
+       .probe = afu_probe,
+       .remove = afu_remove,
 };
 
 static int __init afu_init(void)
index 0b01b38..950c606 100644 (file)
@@ -92,11 +92,11 @@ static void fme_br_remove(struct platform_device *pdev)
 }
 
 static struct platform_driver fme_br_driver = {
-       .driver = {
-               .name    = DFL_FPGA_FME_BRIDGE,
+       .driver = {
+               .name = DFL_FPGA_FME_BRIDGE,
        },
-       .probe   = fme_br_probe,
-       .remove_new = fme_br_remove,
+       .probe = fme_br_probe,
+       .remove = fme_br_remove,
 };
 
 module_platform_driver(fme_br_driver);
index 864924f..f8d89a4 100644 (file)
@@ -742,12 +742,12 @@ static const struct attribute_group *fme_dev_groups[] = {
 };
 
 static struct platform_driver fme_driver = {
-       .driver = {
-               .name       = DFL_FPGA_FEATURE_DEV_FME,
+       .driver = {
+               .name = DFL_FPGA_FEATURE_DEV_FME,
                .dev_groups = fme_dev_groups,
        },
-       .probe   = fme_probe,
-       .remove_new = fme_remove,
+       .probe = fme_probe,
+       .remove = fme_remove,
 };
 
 module_platform_driver(fme_driver);
index 71616f8..c6cd630 100644 (file)
@@ -71,11 +71,11 @@ static void fme_region_remove(struct platform_device *pdev)
 }
 
 static struct platform_driver fme_region_driver = {
-       .driver = {
-               .name    = DFL_FPGA_FME_REGION,
+       .driver = {
+               .name = DFL_FPGA_FME_REGION,
        },
-       .probe   = fme_region_probe,
-       .remove_new = fme_region_remove,
+       .probe = fme_region_probe,
+       .remove = fme_region_remove,
 };
 
 module_platform_driver(fme_region_driver);
index 7ac9f9f..dd51508 100644 (file)
@@ -759,7 +759,7 @@ MODULE_DEVICE_TABLE(platform, intel_m10bmc_sec_ids);
 
 static struct platform_driver intel_m10bmc_sec_driver = {
        .probe = m10bmc_sec_probe,
-       .remove_new = m10bmc_sec_remove,
+       .remove = m10bmc_sec_remove,
        .driver = {
                .name = "intel-m10bmc-sec-update",
                .dev_groups = m10bmc_sec_attr_groups,
index 8526a5a..43db4bb 100644 (file)
@@ -436,7 +436,7 @@ static void of_fpga_region_remove(struct platform_device *pdev)
 
 static struct platform_driver of_fpga_region_driver = {
        .probe = of_fpga_region_probe,
-       .remove_new = of_fpga_region_remove,
+       .remove = of_fpga_region_remove,
        .driver = {
                .name   = "of-fpga-region",
                .of_match_table = of_match_ptr(fpga_region_of_match),
index 4c03513..0165a3c 100644 (file)
@@ -535,7 +535,7 @@ MODULE_DEVICE_TABLE(of, socfpga_a10_fpga_of_match);
 
 static struct platform_driver socfpga_a10_fpga_driver = {
        .probe = socfpga_a10_fpga_probe,
-       .remove_new = socfpga_a10_fpga_remove,
+       .remove = socfpga_a10_fpga_remove,
        .driver = {
                .name   = "socfpga_a10_fpga_manager",
                .of_match_table = socfpga_a10_fpga_of_match,
index 2c0def7..0a295cc 100644 (file)
@@ -455,7 +455,7 @@ MODULE_DEVICE_TABLE(of, s10_of_match);
 
 static struct platform_driver s10_driver = {
        .probe = s10_probe,
-       .remove_new = s10_remove,
+       .remove = s10_remove,
        .driver = {
                .name   = "Stratix10 SoC FPGA manager",
                .of_match_table = of_match_ptr(s10_of_match),
index 788dd2f..822751f 100644 (file)
@@ -162,7 +162,7 @@ static void xlnx_pr_decoupler_remove(struct platform_device *pdev)
 
 static struct platform_driver xlnx_pr_decoupler_driver = {
        .probe = xlnx_pr_decoupler_probe,
-       .remove_new = xlnx_pr_decoupler_remove,
+       .remove = xlnx_pr_decoupler_remove,
        .driver = {
                .name = "xlnx_pr_decoupler",
                .of_match_table = xlnx_pr_decoupler_of_match,
index 4db3d80..f7e08f7 100644 (file)
@@ -642,7 +642,7 @@ MODULE_DEVICE_TABLE(of, zynq_fpga_of_match);
 
 static struct platform_driver zynq_fpga_driver = {
        .probe = zynq_fpga_probe,
-       .remove_new = zynq_fpga_remove,
+       .remove = zynq_fpga_remove,
        .driver = {
                .name = "zynq_fpga_manager",
                .of_match_table = of_match_ptr(zynq_fpga_of_match),