Skip to contentSkip to conversation

PCI: acpiphp_ampere_altra: Switch back to struct platform_driver::remove()

PATCH Applied Sergio Paracuellos 2 participants 2 messages Sep 27, 2024 – Oct 1, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: acpiphp_ampere_altra: Switch back to struct platform_driver::remove()

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

Convert all PCI controller drivers 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.

---
 drivers/pci/hotplug/acpiphp_ampere_altra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Hi Bjorn,

This is the last 'remove_new' inside 'drivers/pci' folder. Since it is not in controller I preferred to sent this patch alone.

Thanks,
Sergio Paracuellos

drivers/pci/hotplug/acpiphp_ampere_altra.c +1 -1
index f5c9e741c1d4..70dbc0431fc6 100644
@@ -119,7 +119,7 @@ static struct platform_driver altra_led_driver = {
 		.acpi_match_table = altra_led_ids,
 	},
 	.probe = altra_led_probe,
-	.remove_new = altra_led_remove,
+	.remove = altra_led_remove,
 };
 module_platform_driver(altra_led_driver);
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 10 lines · Sergio Paracuellos

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

Convert all PCI controller drivers 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.

Applied to pci/driver-remove for v6.13, thanks.

I also moved the controller patch to this branch so they're all together.

Quoted 28 lines
---
 drivers/pci/hotplug/acpiphp_ampere_altra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Hi Bjorn,

This is the last 'remove_new' inside 'drivers/pci' folder. Since it is not in controller I preferred to sent this patch alone.

Thanks,
Sergio Paracuellos

drivers/pci/hotplug/acpiphp_ampere_altra.c +1 -1
index f5c9e741c1d4..70dbc0431fc6 100644
@@ -119,7 +119,7 @@ static struct platform_driver altra_led_driver = {
 		.acpi_match_table = altra_led_ids,
 	},
 	.probe = altra_led_probe,
-	.remove_new = altra_led_remove,
+	.remove = altra_led_remove,
 };
 module_platform_driver(altra_led_driver);
 
Signature · 1 line
2.25.1