Commit ad1e15dd authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'dsa-platform-remove-void'



Uwe Kleine-König says:

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

this series converts all platform drivers below drivers/net/dsa to use
remove_new. The motivation is to get rid of an integer return code
that is (mostly) ignored by the platform driver core and error prone on
the driver side.

See commit 5c5a7680 ("platform: Provide a remove callback that
returns no value") for an extended explanation and the eventual goal.

There are no interdependencies between the patches. As there are still
quite a few drivers to convert, I'm happy about every patch that makes
it in. So even if there is a merge conflict with one patch until you
apply or a subject prefix is suboptimal, please apply the remainder of
this series anyhow.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 6f0b985d ce322d45
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -324,14 +324,12 @@ static int b53_mmap_probe(struct platform_device *pdev)
	return b53_switch_register(dev);
}

static int b53_mmap_remove(struct platform_device *pdev)
static void b53_mmap_remove(struct platform_device *pdev)
{
	struct b53_device *dev = platform_get_drvdata(pdev);

	if (dev)
		b53_switch_remove(dev);

	return 0;
}

static void b53_mmap_shutdown(struct platform_device *pdev)
@@ -372,7 +370,7 @@ MODULE_DEVICE_TABLE(of, b53_mmap_of_table);

static struct platform_driver b53_mmap_driver = {
	.probe = b53_mmap_probe,
	.remove = b53_mmap_remove,
	.remove_new = b53_mmap_remove,
	.shutdown = b53_mmap_shutdown,
	.driver = {
		.name = "b53-switch",
+3 −5
Original line number Diff line number Diff line
@@ -657,17 +657,15 @@ static int b53_srab_probe(struct platform_device *pdev)
	return b53_switch_register(dev);
}

static int b53_srab_remove(struct platform_device *pdev)
static void b53_srab_remove(struct platform_device *pdev)
{
	struct b53_device *dev = platform_get_drvdata(pdev);

	if (!dev)
		return 0;
		return;

	b53_srab_intr_set(dev->priv, false);
	b53_switch_remove(dev);

	return 0;
}

static void b53_srab_shutdown(struct platform_device *pdev)
@@ -684,7 +682,7 @@ static void b53_srab_shutdown(struct platform_device *pdev)

static struct platform_driver b53_srab_driver = {
	.probe = b53_srab_probe,
	.remove = b53_srab_remove,
	.remove_new = b53_srab_remove,
	.shutdown = b53_srab_shutdown,
	.driver = {
		.name = "b53-srab-switch",
+3 −5
Original line number Diff line number Diff line
@@ -1537,12 +1537,12 @@ static int bcm_sf2_sw_probe(struct platform_device *pdev)
	return ret;
}

static int bcm_sf2_sw_remove(struct platform_device *pdev)
static void bcm_sf2_sw_remove(struct platform_device *pdev)
{
	struct bcm_sf2_priv *priv = platform_get_drvdata(pdev);

	if (!priv)
		return 0;
		return;

	priv->wol_ports_mask = 0;
	/* Disable interrupts */
@@ -1554,8 +1554,6 @@ static int bcm_sf2_sw_remove(struct platform_device *pdev)
	clk_disable_unprepare(priv->clk);
	if (priv->type == BCM7278_DEVICE_ID)
		reset_control_assert(priv->rcdev);

	return 0;
}

static void bcm_sf2_sw_shutdown(struct platform_device *pdev)
@@ -1601,7 +1599,7 @@ static SIMPLE_DEV_PM_OPS(bcm_sf2_pm_ops,

static struct platform_driver bcm_sf2_driver = {
	.probe	= bcm_sf2_sw_probe,
	.remove	= bcm_sf2_sw_remove,
	.remove_new = bcm_sf2_sw_remove,
	.shutdown = bcm_sf2_sw_shutdown,
	.driver = {
		.name = "brcm-sf2",
+3 −5
Original line number Diff line number Diff line
@@ -2060,18 +2060,16 @@ static int hellcreek_probe(struct platform_device *pdev)
	return ret;
}

static int hellcreek_remove(struct platform_device *pdev)
static void hellcreek_remove(struct platform_device *pdev)
{
	struct hellcreek *hellcreek = platform_get_drvdata(pdev);

	if (!hellcreek)
		return 0;
		return;

	hellcreek_hwtstamp_free(hellcreek);
	hellcreek_ptp_free(hellcreek);
	dsa_unregister_switch(hellcreek->ds);

	return 0;
}

static void hellcreek_shutdown(struct platform_device *pdev)
@@ -2107,7 +2105,7 @@ MODULE_DEVICE_TABLE(of, hellcreek_of_match);

static struct platform_driver hellcreek_driver = {
	.probe	= hellcreek_probe,
	.remove = hellcreek_remove,
	.remove_new = hellcreek_remove,
	.shutdown = hellcreek_shutdown,
	.driver = {
		.name = "hellcreek",
+3 −5
Original line number Diff line number Diff line
@@ -2207,13 +2207,13 @@ static int gswip_probe(struct platform_device *pdev)
	return err;
}

static int gswip_remove(struct platform_device *pdev)
static void gswip_remove(struct platform_device *pdev)
{
	struct gswip_priv *priv = platform_get_drvdata(pdev);
	int i;

	if (!priv)
		return 0;
		return;

	/* disable the switch */
	gswip_mdio_mask(priv, GSWIP_MDIO_GLOB_ENABLE, 0, GSWIP_MDIO_GLOB);
@@ -2228,8 +2228,6 @@ static int gswip_remove(struct platform_device *pdev)

	for (i = 0; i < priv->num_gphy_fw; i++)
		gswip_gphy_fw_remove(priv, &priv->gphy_fw[i]);

	return 0;
}

static void gswip_shutdown(struct platform_device *pdev)
@@ -2266,7 +2264,7 @@ MODULE_DEVICE_TABLE(of, gswip_of_match);

static struct platform_driver gswip_driver = {
	.probe = gswip_probe,
	.remove = gswip_remove,
	.remove_new = gswip_remove,
	.shutdown = gswip_shutdown,
	.driver = {
		.name = "gswip",
Loading