Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Andrew Lunn <andrew@lunn.ch>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Andrew Lunn and committed by
David S. Miller
5feebd0a 7543a6d5

+1 -2
-1
include/net/dsa.h
··· 213 213 struct list_head list; 214 214 215 215 enum dsa_tag_protocol tag_protocol; 216 - int priv_size; 217 216 218 217 /* 219 218 * Probing and setup.
+1 -1
net/dsa/dsa.c
··· 402 402 /* 403 403 * Allocate and initialise switch state. 404 404 */ 405 - ds = devm_kzalloc(parent, sizeof(*ds) + drv->priv_size, GFP_KERNEL); 405 + ds = devm_kzalloc(parent, sizeof(*ds), GFP_KERNEL); 406 406 if (ds == NULL) 407 407 return ERR_PTR(-ENOMEM); 408 408