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

Commit 5feebd0a authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller
Browse files

net: dsa: Remove allocation of driver private memory



The drivers now allocate their own memory for private usage. Remove
the allocation from the core code.

Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Tested-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7543a6d5
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -213,7 +213,6 @@ struct dsa_switch_driver {
	struct list_head	list;

	enum dsa_tag_protocol	tag_protocol;
	int			priv_size;

	/*
	 * Probing and setup.
+1 −1
Original line number Diff line number Diff line
@@ -402,7 +402,7 @@ dsa_switch_setup(struct dsa_switch_tree *dst, int index,
	/*
	 * Allocate and initialise switch state.
	 */
	ds = devm_kzalloc(parent, sizeof(*ds) + drv->priv_size, GFP_KERNEL);
	ds = devm_kzalloc(parent, sizeof(*ds), GFP_KERNEL);
	if (ds == NULL)
		return ERR_PTR(-ENOMEM);