Просмотр исходного кода

siflower: switch to .remove_new for downstream driver

Switch to .remove_new for downstream driver that still use the old
.remove to reduce patch delta for 6.12 bump.

Suggested-by: Zhu Yujie <[email protected]>
Signed-off-by: Christian Marangi <[email protected]>
Christian Marangi 1 месяц назад
Родитель
Сommit
00a166d065

+ 2 - 3
target/linux/siflower/files-6.6/drivers/gpio/gpio-siflower.c

@@ -317,12 +317,11 @@ static int sf_gpio_probe(struct platform_device *pdev)
 	return devm_gpiochip_add_data(dev, gc, priv);
 }
 
-static int sf_gpio_remove(struct platform_device *pdev)
+static void sf_gpio_remove(struct platform_device *pdev)
 {
 	struct sf_gpio_priv *priv = platform_get_drvdata(pdev);
 
 	reset_control_assert(priv->rstc);
-	return 0;
 }
 
 static const struct of_device_id sf_gpio_ids[] = {
@@ -333,7 +332,7 @@ MODULE_DEVICE_TABLE(of, sf_gpio_ids);
 
 static struct platform_driver sf_gpio_driver = {
 	.probe		= sf_gpio_probe,
-	.remove		= sf_gpio_remove,
+	.remove_new	= sf_gpio_remove,
 	.driver = {
 		.name		= "siflower_gpio",
 		.owner		= THIS_MODULE,

+ 3 - 3
target/linux/siflower/files-6.6/drivers/net/ethernet/siflower/sfxpcs.c

@@ -592,12 +592,12 @@ static int xpcs_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int xpcs_remove(struct platform_device *pdev)
+static void xpcs_remove(struct platform_device *pdev)
 {
 	struct xpcs_priv *priv = platform_get_drvdata(pdev);
 
 	clk_bulk_disable_unprepare(XPCS_NUM_CLKS, priv->clks);
-	return regmap_clear_bits(priv->ethsys, ETHSYS_RST, BIT(5 + priv->id));
+	regmap_clear_bits(priv->ethsys, ETHSYS_RST, BIT(5 + priv->id));
 }
 
 static const struct of_device_id xpcs_match[] = {
@@ -608,7 +608,7 @@ MODULE_DEVICE_TABLE(of, xpcs_match);
 
 static struct platform_driver xpcs_driver = {
 	.probe	= xpcs_probe,
-	.remove	= xpcs_remove,
+	.remove_new	= xpcs_remove,
 	.driver	= {
 		.name		= "sfxpcs",
 		.of_match_table	= xpcs_match,

+ 2 - 4
target/linux/siflower/files-6.6/drivers/pci/controller/dwc/pcie-sf21.c

@@ -332,13 +332,11 @@ static int sf_pcie_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int sf_pcie_remove(struct platform_device *pdev)
+static void sf_pcie_remove(struct platform_device *pdev)
 {
 	struct sf_pcie *pcie = platform_get_drvdata(pdev);
 
 	dw_pcie_host_deinit(&pcie->pci.pp);
-	return 0;
-
 }
 
 static const struct of_device_id sf_pcie_of_match[] = {
@@ -353,7 +351,7 @@ static struct platform_driver sf_pcie_driver = {
 		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
 	},
 	.probe    = sf_pcie_probe,
-	.remove	  = sf_pcie_remove,
+	.remove_new = sf_pcie_remove,
 };
 
 module_platform_driver(sf_pcie_driver);