net: dsa: Remove allocation of driver private memory
authorAndrew Lunn <andrew@lunn.ch>
Wed, 13 Apr 2016 00:40:41 +0000 (02:40 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Apr 2016 22:15:23 +0000 (18:15 -0400)
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>
include/net/dsa.h
net/dsa/dsa.c

index 7bc7bd9b5dedd171197949fbd61699046de21f70..165c2e10615ce573d559e090bd57aa4d9e0414d3 100644 (file)
@@ -213,7 +213,6 @@ struct dsa_switch_driver {
        struct list_head        list;
 
        enum dsa_tag_protocol   tag_protocol;
-       int                     priv_size;
 
        /*
         * Probing and setup.
index 7ef8a92a9e395e4bb3d13f3a60381ce1de26e592..14bf12f637d23a9e994025ad28d1e5940ae6b1c7 100644 (file)
@@ -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);