Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75fee595 authored by Joachim Eastwood's avatar Joachim Eastwood Committed by David S. Miller
Browse files

stmmac: remove setup/free glue callbacks



As all dwmac-* drivers have been converted to have a proper probe
function the setup callback can now be removed. Also remove the
free callback that wasn't used by any driver.

New dwmac-* drivers should implement standard probe and remove
functions to preform any needed setup and teardown.

Signed-off-by: default avatarJoachim Eastwood <manabian@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0933328a
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -135,8 +135,6 @@ struct plat_stmmacenet_data {
	int maxmtu;
	void (*fix_mac_speed)(void *priv, unsigned int speed);
	void (*bus_setup)(void __iomem *ioaddr);
	void *(*setup)(struct platform_device *pdev);
	void (*free)(struct platform_device *pdev, void *priv);
	int (*init)(struct platform_device *pdev, void *priv);
	void (*exit)(struct platform_device *pdev, void *priv);
	void *bsp_priv;
@@ -177,12 +175,10 @@ Where:
 o bus_setup: perform HW setup of the bus. For example, on some ST platforms
	     this field is used to configure the AMBA  bridge to generate more
	     efficient STBus traffic.
 o setup/init/exit: callbacks used for calling a custom initialization;
 o init/exit: callbacks used for calling a custom initialization;
	     this is sometime necessary on some platforms (e.g. ST boxes)
	     where the HW needs to have set some PIO lines or system cfg
	     registers. setup should return a pointer to private data,
	     which will be stored in bsp_priv, and then passed to init and
	     exit callbacks. init/exit callbacks should not use or modify
	     registers.  init/exit callbacks should not use or modify
	     platform data.
 o bsp_priv: another private pointer.

+0 −7
Original line number Diff line number Diff line
@@ -46,13 +46,6 @@ static int dwmac_generic_probe(struct platform_device *pdev)
		plat_dat->unicast_filter_entries = 1;
	}

	/* Custom setup (if needed) */
	if (plat_dat->setup) {
		plat_dat->bsp_priv = plat_dat->setup(pdev);
		if (IS_ERR(plat_dat->bsp_priv))
			return PTR_ERR(plat_dat->bsp_priv);
	}

	/* Custom initialisation (if needed) */
	if (plat_dat->init) {
		ret = plat_dat->init(pdev, plat_dat->bsp_priv);
+0 −3
Original line number Diff line number Diff line
@@ -300,9 +300,6 @@ int stmmac_pltfr_remove(struct platform_device *pdev)
	if (priv->plat->exit)
		priv->plat->exit(pdev, priv->plat->bsp_priv);

	if (priv->plat->free)
		priv->plat->free(pdev, priv->plat->bsp_priv);

	return ret;
}
EXPORT_SYMBOL_GPL(stmmac_pltfr_remove);
+0 −2
Original line number Diff line number Diff line
@@ -119,8 +119,6 @@ struct plat_stmmacenet_data {
	int rx_fifo_size;
	void (*fix_mac_speed)(void *priv, unsigned int speed);
	void (*bus_setup)(void __iomem *ioaddr);
	void *(*setup)(struct platform_device *pdev);
	void (*free)(struct platform_device *pdev, void *priv);
	int (*init)(struct platform_device *pdev, void *priv);
	void (*exit)(struct platform_device *pdev, void *priv);
	void *bsp_priv;