]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: most: allocate private net_dev_context with the alloc_netdev
authorAndrey Shvetsov <andrey.shvetsov@k2l.de>
Fri, 12 May 2017 10:59:58 +0000 (12:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 May 2017 09:59:10 +0000 (11:59 +0200)
commit578bdec44cc02a4d7bfd6390adee50036152e67c
tree28a49bebfe664252cd5889e81c4e79ec52b033c4
parentd54516086d95c8f2bd67716f54932e3fd3a904b8
staging: most: allocate private net_dev_context with the alloc_netdev

This moves the allocation of the net_dev to the aim_probe_channel() and
uses the parameter sizeof_priv of the function alloc_netdev to reserve
the space for the struct net_dev_context.

As a side effect, the nd->dev always points to the existing net_dev.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/aim-network/networking.c