Skip to content

Commit

Permalink
Get rid of 'remove_new' relic from platform driver struct
Browse files Browse the repository at this point in the history
The continual trickle of small conversion patches is grating on me, and
is really not helping.  Just get rid of the 'remove_new' member
function, which is just an alias for the plain 'remove', and had a
comment to that effect:

  /*
   * .remove_new() is a relic from a prototype conversion of .remove().
   * New drivers are supposed to implement .remove(). Once all drivers are
   * converted to not use .remove_new any more, it will be dropped.
   */

This was just a tree-wide 'sed' script that replaced '.remove_new' with
'.remove', with some care taken to turn a subsequent tab into two tabs
to make things line up.

I did do some minimal manual whitespace adjustment for places that used
spaces to line things up.

Then I just removed the old (sic) .remove_new member function, and this
is the end result.  No more unnecessary conversion noise.

Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
torvalds committed Dec 1, 2024
1 parent 40384c8 commit e70140b
Show file tree
Hide file tree
Showing 474 changed files with 484 additions and 494 deletions.
2 changes: 1 addition & 1 deletion arch/arm/common/locomo.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ static void locomo_remove(struct platform_device *dev)
*/
static struct platform_driver locomo_device_driver = {
.probe = locomo_probe,
.remove_new = locomo_remove,
.remove = locomo_remove,
#ifdef CONFIG_PM
.suspend = locomo_suspend,
.resume = locomo_resume,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/common/sa1111.c
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ static struct dev_pm_ops sa1111_pm_ops = {
*/
static struct platform_driver sa1111_device_driver = {
.probe = sa1111_probe,
.remove_new = sa1111_remove,
.remove = sa1111_remove,
.driver = {
.name = "sa1111",
.pm = &sa1111_pm_ops,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/common/scoop.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ static void scoop_remove(struct platform_device *pdev)

static struct platform_driver scoop_driver = {
.probe = scoop_probe,
.remove_new = scoop_remove,
.remove = scoop_remove,
.suspend = scoop_suspend,
.resume = scoop_resume,
.driver = {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-imx/mmdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ static struct platform_driver imx_mmdc_driver = {
.of_match_table = imx_mmdc_dt_ids,
},
.probe = imx_mmdc_probe,
.remove_new = imx_mmdc_remove,
.remove = imx_mmdc_remove,
};

static int __init imx_mmdc_init(void)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/omap-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ static void omap_system_dma_remove(struct platform_device *pdev)

static struct platform_driver omap_system_dma_driver = {
.probe = omap_system_dma_probe,
.remove_new = omap_system_dma_remove,
.remove = omap_system_dma_remove,
.driver = {
.name = "omap_dma_system"
},
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/sharpsl_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ static void sharpsl_pm_remove(struct platform_device *pdev)

static struct platform_driver sharpsl_pm_driver = {
.probe = sharpsl_pm_probe,
.remove_new = sharpsl_pm_remove,
.remove = sharpsl_pm_remove,
.suspend = sharpsl_pm_suspend,
.resume = sharpsl_pm_resume,
.driver = {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-sa1100/jornada720_ssp.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ static void jornada_ssp_remove(struct platform_device *dev)

struct platform_driver jornadassp_driver = {
.probe = jornada_ssp_probe,
.remove_new = jornada_ssp_remove,
.remove = jornada_ssp_remove,
.driver = {
.name = "jornada_ssp",
},
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-sa1100/neponset.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ static const struct dev_pm_ops neponset_pm_ops = {

static struct platform_driver neponset_device_driver = {
.probe = neponset_probe,
.remove_new = neponset_remove,
.remove = neponset_remove,
.driver = {
.name = "neponset",
.pm = PM_OPS,
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/pci/pci-xtalk-bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ static void bridge_remove(struct platform_device *pdev)

static struct platform_driver bridge_driver = {
.probe = bridge_probe,
.remove_new = bridge_remove,
.remove = bridge_remove,
.driver = {
.name = "xtalk-bridge",
}
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/drivers/push-switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static void switch_drv_remove(struct platform_device *pdev)

static struct platform_driver switch_driver = {
.probe = switch_drv_probe,
.remove_new = switch_drv_remove,
.remove = switch_drv_remove,
.driver = {
.name = DRV_NAME,
},
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/include/asm/parport_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ static struct platform_driver ecpp_driver = {
.of_match_table = ecpp_match,
},
.probe = ecpp_probe,
.remove_new = ecpp_remove,
.remove = ecpp_remove,
};

static int parport_pc_find_nonpci_ports(int autoirq, int autodma)
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/chmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ static struct platform_driver us3mc_driver = {
.of_match_table = us3mc_match,
},
.probe = us3mc_probe,
.remove_new = us3mc_remove,
.remove = us3mc_remove,
};

static inline bool us3mc_platform(void)
Expand Down
2 changes: 1 addition & 1 deletion arch/um/drivers/rtc_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static void uml_rtc_remove(struct platform_device *pdev)

static struct platform_driver uml_rtc_driver = {
.probe = uml_rtc_probe,
.remove_new = uml_rtc_remove,
.remove = uml_rtc_remove,
.driver = {
.name = "uml-rtc",
},
Expand Down
2 changes: 1 addition & 1 deletion arch/um/drivers/virtio_uml.c
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ static int virtio_uml_resume(struct platform_device *pdev)

static struct platform_driver virtio_uml_driver = {
.probe = virtio_uml_probe,
.remove_new = virtio_uml_remove,
.remove = virtio_uml_remove,
.driver = {
.name = "virtio-uml",
.of_match_table = virtio_uml_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/atm/fore200e.c
Original file line number Diff line number Diff line change
Expand Up @@ -2569,7 +2569,7 @@ static struct platform_driver fore200e_sba_driver = {
.of_match_table = fore200e_sba_match,
},
.probe = fore200e_sba_probe,
.remove_new = fore200e_sba_remove,
.remove = fore200e_sba_remove,
};
#endif

Expand Down
2 changes: 1 addition & 1 deletion drivers/auxdisplay/cfag12864bfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static void cfag12864bfb_remove(struct platform_device *device)

static struct platform_driver cfag12864bfb_driver = {
.probe = cfag12864bfb_probe,
.remove_new = cfag12864bfb_remove,
.remove = cfag12864bfb_remove,
.driver = {
.name = CFAG12864BFB_NAME,
},
Expand Down
2 changes: 1 addition & 1 deletion drivers/auxdisplay/hd44780.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ MODULE_DEVICE_TABLE(of, hd44780_of_match);

static struct platform_driver hd44780_driver = {
.probe = hd44780_probe,
.remove_new = hd44780_remove,
.remove = hd44780_remove,
.driver = {
.name = "hd44780",
.of_match_table = hd44780_of_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/auxdisplay/img-ascii-lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ static struct platform_driver img_ascii_lcd_driver = {
.of_match_table = img_ascii_lcd_matches,
},
.probe = img_ascii_lcd_probe,
.remove_new = img_ascii_lcd_remove,
.remove = img_ascii_lcd_remove,
};
module_platform_driver(img_ascii_lcd_driver);

Expand Down
2 changes: 1 addition & 1 deletion drivers/auxdisplay/seg-led-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ MODULE_DEVICE_TABLE(of, seg_led_of_match);

static struct platform_driver seg_led_driver = {
.probe = seg_led_probe,
.remove_new = seg_led_remove,
.remove = seg_led_remove,
.driver = {
.name = "seg-led-gpio",
.of_match_table = seg_led_of_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/bcma/host_soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ static struct platform_driver bcma_host_soc_driver = {
.of_match_table = bcma_host_soc_of_match,
},
.probe = bcma_host_soc_probe,
.remove_new = bcma_host_soc_remove,
.remove = bcma_host_soc_remove,
};

int __init bcma_host_soc_register_driver(void)
Expand Down
2 changes: 1 addition & 1 deletion drivers/block/swim.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ static void swim_remove(struct platform_device *dev)

static struct platform_driver swim_driver = {
.probe = swim_probe,
.remove_new = swim_remove,
.remove = swim_remove,
.driver = {
.name = CARDNAME,
},
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/btqcomsmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ MODULE_DEVICE_TABLE(of, btqcomsmd_of_match);

static struct platform_driver btqcomsmd_driver = {
.probe = btqcomsmd_probe,
.remove_new = btqcomsmd_remove,
.remove = btqcomsmd_remove,
.driver = {
.name = "btqcomsmd",
.of_match_table = btqcomsmd_of_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci_bcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ static const struct dev_pm_ops bcm_pm_ops = {

static struct platform_driver bcm_driver = {
.probe = bcm_probe,
.remove_new = bcm_remove,
.remove = bcm_remove,
.driver = {
.name = "hci_bcm",
.acpi_match_table = ACPI_PTR(bcm_acpi_match),
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ static void intel_remove(struct platform_device *pdev)

static struct platform_driver intel_driver = {
.probe = intel_probe,
.remove_new = intel_remove,
.remove = intel_remove,
.driver = {
.name = "hci_intel",
.acpi_match_table = ACPI_PTR(intel_acpi_match),
Expand Down
2 changes: 1 addition & 1 deletion drivers/cdrom/gdrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ static void remove_gdrom(struct platform_device *devptr)

static struct platform_driver gdrom_driver = {
.probe = probe_gdrom,
.remove_new = remove_gdrom,
.remove = remove_gdrom,
.driver = {
.name = GDROM_DEV_NAME,
},
Expand Down
2 changes: 1 addition & 1 deletion drivers/cdx/controller/cdx_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ static struct platform_driver cdx_pdriver = {
.of_match_table = cdx_match_table,
},
.probe = xlnx_cdx_probe,
.remove_new = xlnx_cdx_remove,
.remove = xlnx_cdx_remove,
};

static int __init cdx_controller_init(void)
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/ipmi/bt-bmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ static struct platform_driver bt_bmc_driver = {
.of_match_table = bt_bmc_match,
},
.probe = bt_bmc_probe,
.remove_new = bt_bmc_remove,
.remove = bt_bmc_remove,
};

module_platform_driver(bt_bmc_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/ipmi/ipmi_powernv.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ static struct platform_driver powernv_ipmi_driver = {
.of_match_table = ipmi_powernv_match,
},
.probe = ipmi_powernv_probe,
.remove_new = ipmi_powernv_remove,
.remove = ipmi_powernv_remove,
};


Expand Down
2 changes: 1 addition & 1 deletion drivers/char/ipmi/ipmi_si_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ struct platform_driver ipmi_platform_driver = {
.acpi_match_table = ACPI_PTR(acpi_ipmi_match),
},
.probe = ipmi_probe,
.remove_new = ipmi_remove,
.remove = ipmi_remove,
.id_table = si_plat_ids
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/ipmi/ipmi_ssif.c
Original file line number Diff line number Diff line change
Expand Up @@ -2114,7 +2114,7 @@ static struct platform_driver ipmi_driver = {
.name = DEVICE_NAME,
},
.probe = ssif_platform_probe,
.remove_new = ssif_platform_remove,
.remove = ssif_platform_remove,
.id_table = ssif_plat_ids
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/ipmi/kcs_bmc_aspeed.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ static struct platform_driver ast_kcs_bmc_driver = {
.of_match_table = ast_kcs_bmc_match,
},
.probe = aspeed_kcs_probe,
.remove_new = aspeed_kcs_remove,
.remove = aspeed_kcs_remove,
};
module_platform_driver(ast_kcs_bmc_driver);

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/ipmi/kcs_bmc_npcm7xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static struct platform_driver npcm_kcs_bmc_driver = {
.of_match_table = npcm_kcs_bmc_match,
},
.probe = npcm7xx_kcs_probe,
.remove_new = npcm7xx_kcs_remove,
.remove = npcm7xx_kcs_remove,
};
module_platform_driver(npcm_kcs_bmc_driver);

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/tpm/tpm_ftpm_tee.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ static struct platform_driver ftpm_tee_plat_driver = {
},
.shutdown = ftpm_plat_tee_shutdown,
.probe = ftpm_plat_tee_probe,
.remove_new = ftpm_plat_tee_remove,
.remove = ftpm_plat_tee_remove,
};

/* UUID of the fTPM TA */
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/tpm/tpm_tis.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ MODULE_DEVICE_TABLE(of, tis_of_platform_match);

static struct platform_driver tis_drv = {
.probe = tpm_tis_plat_probe,
.remove_new = tpm_tis_plat_remove,
.remove = tpm_tis_plat_remove,
.driver = {
.name = "tpm_tis",
.pm = &tpm_tis_pm,
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/tpm/tpm_tis_synquacer.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ MODULE_DEVICE_TABLE(acpi, tpm_synquacer_acpi_tbl);

static struct platform_driver tis_synquacer_drv = {
.probe = tpm_tis_synquacer_probe,
.remove_new = tpm_tis_synquacer_remove,
.remove = tpm_tis_synquacer_remove,
.driver = {
.name = "tpm_tis_synquacer",
.pm = &tpm_tis_synquacer_pm,
Expand Down
2 changes: 1 addition & 1 deletion drivers/clocksource/timer-sun5i.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ MODULE_DEVICE_TABLE(of, sun5i_timer_of_match);

static struct platform_driver sun5i_timer_driver = {
.probe = sun5i_timer_probe,
.remove_new = sun5i_timer_remove,
.remove = sun5i_timer_remove,
.driver = {
.name = "sun5i-timer",
.of_match_table = sun5i_timer_of_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/clocksource/timer-tegra186.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ static struct platform_driver tegra186_wdt_driver = {
.of_match_table = tegra186_timer_of_match,
},
.probe = tegra186_timer_probe,
.remove_new = tegra186_timer_remove,
.remove = tegra186_timer_remove,
};
module_platform_driver(tegra186_wdt_driver);

Expand Down
2 changes: 1 addition & 1 deletion drivers/clocksource/timer-ti-dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ MODULE_DEVICE_TABLE(of, omap_timer_match);

static struct platform_driver omap_dm_timer_driver = {
.probe = omap_dm_timer_probe,
.remove_new = omap_dm_timer_remove,
.remove = omap_dm_timer_remove,
.driver = {
.name = "omap_timer",
.of_match_table = omap_timer_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/counter/ti-ecap-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ MODULE_DEVICE_TABLE(of, ecap_cnt_of_match);

static struct platform_driver ecap_cnt_driver = {
.probe = ecap_cnt_probe,
.remove_new = ecap_cnt_remove,
.remove = ecap_cnt_remove,
.driver = {
.name = "ecap-capture",
.of_match_table = ecap_cnt_of_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/counter/ti-eqep.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ MODULE_DEVICE_TABLE(of, ti_eqep_of_match);

static struct platform_driver ti_eqep_driver = {
.probe = ti_eqep_probe,
.remove_new = ti_eqep_remove,
.remove = ti_eqep_remove,
.driver = {
.name = "ti-eqep-cnt",
.of_match_table = ti_eqep_of_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/cpuidle/cpuidle-kirkwood.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static void kirkwood_cpuidle_remove(struct platform_device *pdev)

static struct platform_driver kirkwood_cpuidle_driver = {
.probe = kirkwood_cpuidle_probe,
.remove_new = kirkwood_cpuidle_remove,
.remove = kirkwood_cpuidle_remove,
.driver = {
.name = "kirkwood_cpuidle",
},
Expand Down
2 changes: 1 addition & 1 deletion drivers/devfreq/event/exynos-nocp.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ static void exynos_nocp_remove(struct platform_device *pdev)

static struct platform_driver exynos_nocp_driver = {
.probe = exynos_nocp_probe,
.remove_new = exynos_nocp_remove,
.remove = exynos_nocp_remove,
.driver = {
.name = "exynos-nocp",
.of_match_table = exynos_nocp_id_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/devfreq/event/exynos-ppmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ static void exynos_ppmu_remove(struct platform_device *pdev)

static struct platform_driver exynos_ppmu_driver = {
.probe = exynos_ppmu_probe,
.remove_new = exynos_ppmu_remove,
.remove = exynos_ppmu_remove,
.driver = {
.name = "exynos-ppmu",
.of_match_table = exynos_ppmu_id_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/devfreq/mtk-cci-devfreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ MODULE_DEVICE_TABLE(of, mtk_ccifreq_machines);

static struct platform_driver mtk_ccifreq_platdrv = {
.probe = mtk_ccifreq_probe,
.remove_new = mtk_ccifreq_remove,
.remove = mtk_ccifreq_remove,
.driver = {
.name = "mtk-ccifreq",
.of_match_table = mtk_ccifreq_machines,
Expand Down
Loading

0 comments on commit e70140b

Please sign in to comment.