Skip to content

Commit 5feebd0

Browse files
lunndavem330
authored andcommitted
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 <[email protected]> Acked-by: Florian Fainelli <[email protected]> Tested-by: Vivien Didelot <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7543a6d commit 5feebd0

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

include/net/dsa.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ struct dsa_switch_driver {
213213
struct list_head list;
214214

215215
enum dsa_tag_protocol tag_protocol;
216-
int priv_size;
217216

218217
/*
219218
* Probing and setup.

net/dsa/dsa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ dsa_switch_setup(struct dsa_switch_tree *dst, int index,
402402
/*
403403
* Allocate and initialise switch state.
404404
*/
405-
ds = devm_kzalloc(parent, sizeof(*ds) + drv->priv_size, GFP_KERNEL);
405+
ds = devm_kzalloc(parent, sizeof(*ds), GFP_KERNEL);
406406
if (ds == NULL)
407407
return ERR_PTR(-ENOMEM);
408408

0 commit comments

Comments
 (0)