Skip to content

Commit f847000

Browse files
ukleinekmiquelraynal
authored andcommitted
mtd: Switch back to struct platform_driver::remove()
After commit 0edb555 ("platform: Make platform_driver::remove() return void") .remove() is (again) the right callback to implement for platform drivers. Convert all platform drivers below drivers/mtd 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. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20241007205803.444994-10-u.kleine-koenig@baylibre.com
1 parent 4c9b44e commit f847000

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+74
-74
lines changed

drivers/mtd/devices/bcm47xxsflash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ static void bcm47xxsflash_bcma_remove(struct platform_device *pdev)
367367

368368
static struct platform_driver bcma_sflash_driver = {
369369
.probe = bcm47xxsflash_bcma_probe,
370-
.remove_new = bcm47xxsflash_bcma_remove,
370+
.remove = bcm47xxsflash_bcma_remove,
371371
.driver = {
372372
.name = "bcma_sflash",
373373
},

drivers/mtd/devices/docg3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2075,7 +2075,7 @@ static struct platform_driver g3_driver = {
20752075
},
20762076
.suspend = docg3_suspend,
20772077
.resume = docg3_resume,
2078-
.remove_new = docg3_release,
2078+
.remove = docg3_release,
20792079
};
20802080

20812081
module_platform_driver_probe(g3_driver, docg3_probe);

drivers/mtd/devices/phram.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ static void phram_remove(struct platform_device *pdev)
399399

400400
static struct platform_driver phram_driver = {
401401
.probe = phram_probe,
402-
.remove_new = phram_remove,
402+
.remove = phram_remove,
403403
.driver = {
404404
.name = "phram",
405405
.of_match_table = of_match_ptr(phram_of_match),

drivers/mtd/devices/powernv_flash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ static struct platform_driver powernv_flash_driver = {
286286
.name = "powernv_flash",
287287
.of_match_table = powernv_flash_match,
288288
},
289-
.remove_new = powernv_flash_release,
289+
.remove = powernv_flash_release,
290290
.probe = powernv_flash_probe,
291291
};
292292

drivers/mtd/devices/spear_smi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ static struct platform_driver spear_smi_driver = {
10931093
.pm = &spear_smi_pm_ops,
10941094
},
10951095
.probe = spear_smi_probe,
1096-
.remove_new = spear_smi_remove,
1096+
.remove = spear_smi_remove,
10971097
};
10981098
module_platform_driver(spear_smi_driver);
10991099

drivers/mtd/devices/st_spi_fsm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2132,7 +2132,7 @@ MODULE_DEVICE_TABLE(of, stfsm_match);
21322132

21332133
static struct platform_driver stfsm_driver = {
21342134
.probe = stfsm_probe,
2135-
.remove_new = stfsm_remove,
2135+
.remove = stfsm_remove,
21362136
.driver = {
21372137
.name = "st-spi-fsm",
21382138
.of_match_table = stfsm_match,

drivers/mtd/hyperbus/hbmc-am654.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ MODULE_DEVICE_TABLE(of, am654_hbmc_dt_ids);
254254

255255
static struct platform_driver am654_hbmc_platform_driver = {
256256
.probe = am654_hbmc_probe,
257-
.remove_new = am654_hbmc_remove,
257+
.remove = am654_hbmc_remove,
258258
.driver = {
259259
.name = "hbmc-am654",
260260
.of_match_table = am654_hbmc_dt_ids,

drivers/mtd/hyperbus/rpc-if.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ MODULE_DEVICE_TABLE(platform, rpc_if_hyperflash_id_table);
171171

172172
static struct platform_driver rpcif_platform_driver = {
173173
.probe = rpcif_hb_probe,
174-
.remove_new = rpcif_hb_remove,
174+
.remove = rpcif_hb_remove,
175175
.id_table = rpc_if_hyperflash_id_table,
176176
.driver = {
177177
.name = "rpc-if-hyperflash",

drivers/mtd/lpddr/lpddr2_nvm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ static struct platform_driver lpddr2_nvm_drv = {
487487
.name = "lpddr2_nvm",
488488
},
489489
.probe = lpddr2_nvm_probe,
490-
.remove_new = lpddr2_nvm_remove,
490+
.remove = lpddr2_nvm_remove,
491491
};
492492

493493
module_platform_driver(lpddr2_nvm_drv);

drivers/mtd/maps/lantiq-flash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ MODULE_DEVICE_TABLE(of, ltq_mtd_match);
184184

185185
static struct platform_driver ltq_mtd_driver = {
186186
.probe = ltq_mtd_probe,
187-
.remove_new = ltq_mtd_remove,
187+
.remove = ltq_mtd_remove,
188188
.driver = {
189189
.name = "ltq-nor",
190190
.of_match_table = ltq_mtd_match,

0 commit comments

Comments
 (0)