Commit 1518abee authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'net-freescale-convert-to-platform-remove-callback-returning-void'

Uwe Kleine-König says:

====================
net: freescale: Convert to platform remove callback returning void

v2 of this series was sent in June[1], code changes since then only affect
patch #1 where the dev_err invocation was adapted to emit the error code of
dpaa_fq_free(). Thanks for feedback by Maciej Fijalkowski and Russell King.
Other than that I added Reviewed-by tags for Simon Horman and Wei Fang and
rebased to v6.5-rc1.

There is only one dependency in this series: Patch #2 depends on patch

[1] https://lore.kernel.org/netdev/20230606162829.166226-1-u.kleine-koenig@pengutronix.de
====================

Link: https://lore.kernel.org/r/20230710071946.3470249-1-u.kleine-koenig@pengutronix.de


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents b8e39b38 ae18facf
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -3497,7 +3497,7 @@ static int dpaa_eth_probe(struct platform_device *pdev)
	return err;
}

static int dpaa_remove(struct platform_device *pdev)
static void dpaa_remove(struct platform_device *pdev)
{
	struct net_device *net_dev;
	struct dpaa_priv *priv;
@@ -3516,6 +3516,9 @@ static int dpaa_remove(struct platform_device *pdev)
	phylink_destroy(priv->mac_dev->phylink);

	err = dpaa_fq_free(dev, &priv->dpaa_fq_list);
	if (err)
		dev_err(dev, "Failed to free FQs on remove (%pE)\n",
			ERR_PTR(err));

	qman_delete_cgr_safe(&priv->ingress_cgr);
	qman_release_cgrid(priv->ingress_cgr.cgrid);
@@ -3527,8 +3530,6 @@ static int dpaa_remove(struct platform_device *pdev)
	dpaa_bps_free(priv);

	free_netdev(net_dev);

	return err;
}

static const struct platform_device_id dpaa_devtype[] = {
@@ -3546,7 +3547,7 @@ static struct platform_driver dpaa_driver = {
	},
	.id_table = dpaa_devtype,
	.probe = dpaa_eth_probe,
	.remove = dpaa_remove
	.remove_new = dpaa_remove
};

static int __init dpaa_load(void)
+2 −3
Original line number Diff line number Diff line
@@ -4458,7 +4458,7 @@ fec_probe(struct platform_device *pdev)
	return ret;
}

static int
static void
fec_drv_remove(struct platform_device *pdev)
{
	struct net_device *ndev = platform_get_drvdata(pdev);
@@ -4494,7 +4494,6 @@ fec_drv_remove(struct platform_device *pdev)
	pm_runtime_disable(&pdev->dev);

	free_netdev(ndev);
	return 0;
}

static int __maybe_unused fec_suspend(struct device *dev)
@@ -4650,7 +4649,7 @@ static struct platform_driver fec_driver = {
	},
	.id_table = fec_devtype,
	.probe	= fec_probe,
	.remove	= fec_drv_remove,
	.remove_new = fec_drv_remove,
};

module_platform_driver(fec_driver);
+2 −4
Original line number Diff line number Diff line
@@ -974,7 +974,7 @@ static int mpc52xx_fec_probe(struct platform_device *op)
	return rv;
}

static int
static void
mpc52xx_fec_remove(struct platform_device *op)
{
	struct net_device *ndev;
@@ -998,8 +998,6 @@ mpc52xx_fec_remove(struct platform_device *op)
	release_mem_region(ndev->base_addr, sizeof(struct mpc52xx_fec));

	free_netdev(ndev);

	return 0;
}

#ifdef CONFIG_PM
@@ -1042,7 +1040,7 @@ static struct platform_driver mpc52xx_fec_driver = {
		.of_match_table = mpc52xx_fec_match,
	},
	.probe		= mpc52xx_fec_probe,
	.remove		= mpc52xx_fec_remove,
	.remove_new	= mpc52xx_fec_remove,
#ifdef CONFIG_PM
	.suspend	= mpc52xx_fec_of_suspend,
	.resume		= mpc52xx_fec_of_resume,
+2 −4
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ static int mpc52xx_fec_mdio_probe(struct platform_device *of)
	return err;
}

static int mpc52xx_fec_mdio_remove(struct platform_device *of)
static void mpc52xx_fec_mdio_remove(struct platform_device *of)
{
	struct mii_bus *bus = platform_get_drvdata(of);
	struct mpc52xx_fec_mdio_priv *priv = bus->priv;
@@ -126,8 +126,6 @@ static int mpc52xx_fec_mdio_remove(struct platform_device *of)
	iounmap(priv->regs);
	kfree(priv);
	mdiobus_free(bus);

	return 0;
}

static const struct of_device_id mpc52xx_fec_mdio_match[] = {
@@ -145,7 +143,7 @@ struct platform_driver mpc52xx_fec_mdio_driver = {
		.of_match_table = mpc52xx_fec_mdio_match,
	},
	.probe = mpc52xx_fec_mdio_probe,
	.remove = mpc52xx_fec_mdio_remove,
	.remove_new = mpc52xx_fec_mdio_remove,
};

/* let fec driver call it, since this has to be registered before it */
+2 −3
Original line number Diff line number Diff line
@@ -331,12 +331,11 @@ static int mac_probe(struct platform_device *_of_dev)
	return err;
}

static int mac_remove(struct platform_device *pdev)
static void mac_remove(struct platform_device *pdev)
{
	struct mac_device *mac_dev = platform_get_drvdata(pdev);

	platform_device_unregister(mac_dev->priv->eth_dev);
	return 0;
}

static struct platform_driver mac_driver = {
@@ -345,7 +344,7 @@ static struct platform_driver mac_driver = {
		.of_match_table	= mac_match,
	},
	.probe		= mac_probe,
	.remove		= mac_remove,
	.remove_new	= mac_remove,
};

builtin_platform_driver(mac_driver);
Loading