Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ata: libata: Make ata_platform_remove_one return void

The function returned zero unconditionally, so the function returning an
int is something between useless and irritating. With the goal to make
platform drivers' remove function return void, it's helpful to convert
the function accordingly. This converts several drivers to the new
.remove_new callback that was introduced to smoothen the platform driver
conversion.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Acked-by: Serge Semin <fancer.lancer@gmail.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>

authored by

Uwe Kleine-König and committed by
Damien Le Moal
a7eb54d4 f1fcbaa1

+23 -25
+3 -3
drivers/ata/ahci_brcm.c
··· 544 544 return ret; 545 545 } 546 546 547 - static int brcm_ahci_remove(struct platform_device *pdev) 547 + static void brcm_ahci_remove(struct platform_device *pdev) 548 548 { 549 549 struct ata_host *host = dev_get_drvdata(&pdev->dev); 550 550 struct ahci_host_priv *hpriv = host->private_data; ··· 552 552 553 553 brcm_sata_phys_disable(priv); 554 554 555 - return ata_platform_remove_one(pdev); 555 + ata_platform_remove_one(pdev); 556 556 } 557 557 558 558 static void brcm_ahci_shutdown(struct platform_device *pdev) ··· 573 573 574 574 static struct platform_driver brcm_ahci_driver = { 575 575 .probe = brcm_ahci_probe, 576 - .remove = brcm_ahci_remove, 576 + .remove_new = brcm_ahci_remove, 577 577 .shutdown = brcm_ahci_shutdown, 578 578 .driver = { 579 579 .name = DRV_NAME,
+1 -1
drivers/ata/ahci_ceva.c
··· 369 369 370 370 static struct platform_driver ceva_ahci_driver = { 371 371 .probe = ceva_ahci_probe, 372 - .remove = ata_platform_remove_one, 372 + .remove_new = ata_platform_remove_one, 373 373 .driver = { 374 374 .name = DRV_NAME, 375 375 .of_match_table = ceva_ahci_of_match,
+1 -1
drivers/ata/ahci_da850.c
··· 238 238 239 239 static struct platform_driver ahci_da850_driver = { 240 240 .probe = ahci_da850_probe, 241 - .remove = ata_platform_remove_one, 241 + .remove_new = ata_platform_remove_one, 242 242 .driver = { 243 243 .name = DRV_NAME, 244 244 .of_match_table = ahci_da850_of_match,
+1 -1
drivers/ata/ahci_dm816.c
··· 182 182 183 183 static struct platform_driver ahci_dm816_driver = { 184 184 .probe = ahci_dm816_probe, 185 - .remove = ata_platform_remove_one, 185 + .remove_new = ata_platform_remove_one, 186 186 .driver = { 187 187 .name = AHCI_DM816_DRV_NAME, 188 188 .of_match_table = ahci_dm816_of_match,
+1 -1
drivers/ata/ahci_dwc.c
··· 478 478 479 479 static struct platform_driver ahci_dwc_driver = { 480 480 .probe = ahci_dwc_probe, 481 - .remove = ata_platform_remove_one, 481 + .remove_new = ata_platform_remove_one, 482 482 .shutdown = ahci_platform_shutdown, 483 483 .driver = { 484 484 .name = DRV_NAME,
+1 -1
drivers/ata/ahci_imx.c
··· 1223 1223 1224 1224 static struct platform_driver imx_ahci_driver = { 1225 1225 .probe = imx_ahci_probe, 1226 - .remove = ata_platform_remove_one, 1226 + .remove_new = ata_platform_remove_one, 1227 1227 .driver = { 1228 1228 .name = DRV_NAME, 1229 1229 .of_match_table = imx_ahci_of_match,
+1 -1
drivers/ata/ahci_mtk.c
··· 173 173 174 174 static struct platform_driver mtk_ahci_driver = { 175 175 .probe = mtk_ahci_probe, 176 - .remove = ata_platform_remove_one, 176 + .remove_new = ata_platform_remove_one, 177 177 .driver = { 178 178 .name = DRV_NAME, 179 179 .of_match_table = ahci_of_match,
+1 -1
drivers/ata/ahci_mvebu.c
··· 245 245 246 246 static struct platform_driver ahci_mvebu_driver = { 247 247 .probe = ahci_mvebu_probe, 248 - .remove = ata_platform_remove_one, 248 + .remove_new = ata_platform_remove_one, 249 249 .suspend = ahci_mvebu_suspend, 250 250 .resume = ahci_mvebu_resume, 251 251 .driver = {
+1 -1
drivers/ata/ahci_platform.c
··· 96 96 97 97 static struct platform_driver ahci_driver = { 98 98 .probe = ahci_probe, 99 - .remove = ata_platform_remove_one, 99 + .remove_new = ata_platform_remove_one, 100 100 .shutdown = ahci_platform_shutdown, 101 101 .driver = { 102 102 .name = DRV_NAME,
+1 -1
drivers/ata/ahci_qoriq.c
··· 359 359 360 360 static struct platform_driver ahci_qoriq_driver = { 361 361 .probe = ahci_qoriq_probe, 362 - .remove = ata_platform_remove_one, 362 + .remove_new = ata_platform_remove_one, 363 363 .driver = { 364 364 .name = DRV_NAME, 365 365 .of_match_table = ahci_qoriq_of_match,
+1 -1
drivers/ata/ahci_seattle.c
··· 187 187 188 188 static struct platform_driver ahci_seattle_driver = { 189 189 .probe = ahci_seattle_probe, 190 - .remove = ata_platform_remove_one, 190 + .remove_new = ata_platform_remove_one, 191 191 .driver = { 192 192 .name = DRV_NAME, 193 193 .acpi_match_table = ahci_acpi_match,
+1 -1
drivers/ata/ahci_st.c
··· 239 239 .of_match_table = st_ahci_match, 240 240 }, 241 241 .probe = st_ahci_probe, 242 - .remove = ata_platform_remove_one, 242 + .remove_new = ata_platform_remove_one, 243 243 }; 244 244 module_platform_driver(st_ahci_driver); 245 245
+1 -1
drivers/ata/ahci_sunxi.c
··· 292 292 293 293 static struct platform_driver ahci_sunxi_driver = { 294 294 .probe = ahci_sunxi_probe, 295 - .remove = ata_platform_remove_one, 295 + .remove_new = ata_platform_remove_one, 296 296 .driver = { 297 297 .name = DRV_NAME, 298 298 .of_match_table = ahci_sunxi_of_match,
+1 -1
drivers/ata/ahci_tegra.c
··· 609 609 610 610 static struct platform_driver tegra_ahci_driver = { 611 611 .probe = tegra_ahci_probe, 612 - .remove = ata_platform_remove_one, 612 + .remove_new = ata_platform_remove_one, 613 613 .driver = { 614 614 .name = DRV_NAME, 615 615 .of_match_table = tegra_ahci_of_match,
+1 -1
drivers/ata/ahci_xgene.c
··· 868 868 869 869 static struct platform_driver xgene_ahci_driver = { 870 870 .probe = xgene_ahci_probe, 871 - .remove = ata_platform_remove_one, 871 + .remove_new = ata_platform_remove_one, 872 872 .driver = { 873 873 .name = DRV_NAME, 874 874 .of_match_table = xgene_ahci_of_match,
+1 -3
drivers/ata/libata-core.c
··· 6141 6141 * LOCKING: 6142 6142 * Inherited from platform layer (may sleep). 6143 6143 */ 6144 - int ata_platform_remove_one(struct platform_device *pdev) 6144 + void ata_platform_remove_one(struct platform_device *pdev) 6145 6145 { 6146 6146 struct ata_host *host = platform_get_drvdata(pdev); 6147 6147 6148 6148 ata_host_detach(host); 6149 - 6150 - return 0; 6151 6149 } 6152 6150 EXPORT_SYMBOL_GPL(ata_platform_remove_one); 6153 6151
+1 -1
drivers/ata/pata_ixp4xx_cf.c
··· 303 303 .of_match_table = ixp4xx_pata_of_match, 304 304 }, 305 305 .probe = ixp4xx_pata_probe, 306 - .remove = ata_platform_remove_one, 306 + .remove_new = ata_platform_remove_one, 307 307 }; 308 308 309 309 module_platform_driver(ixp4xx_pata_platform_driver);
+1 -1
drivers/ata/pata_of_platform.c
··· 89 89 .of_match_table = pata_of_platform_match, 90 90 }, 91 91 .probe = pata_of_platform_probe, 92 - .remove = ata_platform_remove_one, 92 + .remove_new = ata_platform_remove_one, 93 93 }; 94 94 95 95 module_platform_driver(pata_of_platform_driver);
+1 -1
drivers/ata/pata_platform.c
··· 223 223 224 224 static struct platform_driver pata_platform_driver = { 225 225 .probe = pata_platform_probe, 226 - .remove = ata_platform_remove_one, 226 + .remove_new = ata_platform_remove_one, 227 227 .driver = { 228 228 .name = DRV_NAME, 229 229 },
+1 -1
drivers/ata/sata_highbank.c
··· 614 614 ahci_highbank_suspend, ahci_highbank_resume); 615 615 616 616 static struct platform_driver ahci_highbank_driver = { 617 - .remove = ata_platform_remove_one, 617 + .remove_new = ata_platform_remove_one, 618 618 .driver = { 619 619 .name = "highbank-ahci", 620 620 .of_match_table = ahci_of_match,
+1 -1
include/linux/libata.h
··· 1276 1276 1277 1277 struct platform_device; 1278 1278 1279 - extern int ata_platform_remove_one(struct platform_device *pdev); 1279 + extern void ata_platform_remove_one(struct platform_device *pdev); 1280 1280 1281 1281 /* 1282 1282 * ACPI - drivers/ata/libata-acpi.c