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

Merge branch 'mdio-platform-remove-void'



Uwe Kleine-König says:

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

this series convert all platform drivers below drivers/net/mdio 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, please apply the remainder of this series anyhow.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents ad1e15dd 032ca4f9
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -177,15 +177,13 @@ static int aspeed_mdio_probe(struct platform_device *pdev)
	return 0;
}

static int aspeed_mdio_remove(struct platform_device *pdev)
static void aspeed_mdio_remove(struct platform_device *pdev)
{
	struct mii_bus *bus = (struct mii_bus *)platform_get_drvdata(pdev);
	struct aspeed_mdio *ctx = bus->priv;

	reset_control_assert(ctx->reset);
	mdiobus_unregister(bus);

	return 0;
}

static const struct of_device_id aspeed_mdio_of_match[] = {
@@ -200,7 +198,7 @@ static struct platform_driver aspeed_mdio_driver = {
		.of_match_table = aspeed_mdio_of_match,
	},
	.probe = aspeed_mdio_probe,
	.remove = aspeed_mdio_remove,
	.remove_new = aspeed_mdio_remove,
};

module_platform_driver(aspeed_mdio_driver);
+2 −4
Original line number Diff line number Diff line
@@ -168,14 +168,12 @@ static int iproc_mdio_probe(struct platform_device *pdev)
	return rc;
}

static int iproc_mdio_remove(struct platform_device *pdev)
static void iproc_mdio_remove(struct platform_device *pdev)
{
	struct iproc_mdio_priv *priv = platform_get_drvdata(pdev);

	mdiobus_unregister(priv->mii_bus);
	mdiobus_free(priv->mii_bus);

	return 0;
}

#ifdef CONFIG_PM_SLEEP
@@ -210,7 +208,7 @@ static struct platform_driver iproc_mdio_driver = {
#endif
	},
	.probe = iproc_mdio_probe,
	.remove = iproc_mdio_remove,
	.remove_new = iproc_mdio_remove,
};

module_platform_driver(iproc_mdio_driver);
+2 −4
Original line number Diff line number Diff line
@@ -296,15 +296,13 @@ static int unimac_mdio_probe(struct platform_device *pdev)
	return ret;
}

static int unimac_mdio_remove(struct platform_device *pdev)
static void unimac_mdio_remove(struct platform_device *pdev)
{
	struct unimac_mdio_priv *priv = platform_get_drvdata(pdev);

	mdiobus_unregister(priv->mii_bus);
	mdiobus_free(priv->mii_bus);
	clk_disable_unprepare(priv->clk);

	return 0;
}

static int __maybe_unused unimac_mdio_suspend(struct device *d)
@@ -353,7 +351,7 @@ static struct platform_driver unimac_mdio_driver = {
		.pm = &unimac_mdio_pm_ops,
	},
	.probe	= unimac_mdio_probe,
	.remove	= unimac_mdio_remove,
	.remove_new = unimac_mdio_remove,
};
module_platform_driver(unimac_mdio_driver);

+2 −4
Original line number Diff line number Diff line
@@ -194,11 +194,9 @@ static int mdio_gpio_probe(struct platform_device *pdev)
	return ret;
}

static int mdio_gpio_remove(struct platform_device *pdev)
static void mdio_gpio_remove(struct platform_device *pdev)
{
	mdio_gpio_bus_destroy(&pdev->dev);

	return 0;
}

static const struct of_device_id mdio_gpio_of_match[] = {
@@ -210,7 +208,7 @@ MODULE_DEVICE_TABLE(of, mdio_gpio_of_match);

static struct platform_driver mdio_gpio_driver = {
	.probe = mdio_gpio_probe,
	.remove = mdio_gpio_remove,
	.remove_new = mdio_gpio_remove,
	.driver		= {
		.name	= "mdio-gpio",
		.of_match_table = mdio_gpio_of_match,
+2 −4
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ static int hisi_femac_mdio_probe(struct platform_device *pdev)
	return ret;
}

static int hisi_femac_mdio_remove(struct platform_device *pdev)
static void hisi_femac_mdio_remove(struct platform_device *pdev)
{
	struct mii_bus *bus = platform_get_drvdata(pdev);
	struct hisi_femac_mdio_data *data = bus->priv;
@@ -126,8 +126,6 @@ static int hisi_femac_mdio_remove(struct platform_device *pdev)
	mdiobus_unregister(bus);
	clk_disable_unprepare(data->clk);
	mdiobus_free(bus);

	return 0;
}

static const struct of_device_id hisi_femac_mdio_dt_ids[] = {
@@ -138,7 +136,7 @@ MODULE_DEVICE_TABLE(of, hisi_femac_mdio_dt_ids);

static struct platform_driver hisi_femac_mdio_driver = {
	.probe = hisi_femac_mdio_probe,
	.remove = hisi_femac_mdio_remove,
	.remove_new = hisi_femac_mdio_remove,
	.driver = {
		.name = "hisi-femac-mdio",
		.of_match_table = hisi_femac_mdio_dt_ids,
Loading