dummy: Add ndo_uninit().
commit3286761923475d1b4a943e65a1dadda1caee7723
authorHiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Sun, 15 Apr 2012 13:26:01 +0000 (15 13:26 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Apr 2012 16:51:20 +0000 (27 09:51 -0700)
treeaa2c3e4115377cbfb1815f9cc64750859d3fe721
parentb447077dd43c927a5c5171956309cd849decd769
dummy: Add ndo_uninit().

[ Upstream commit 890fdf2a0cb88202d1427589db2cf29c1bdd3c1d ]

In register_netdevice(), when ndo_init() is successful and later
some error occurred, ndo_uninit() will be called.
So dummy deivce is desirable to implement ndo_uninit() method
to free percpu stats for this case.
And, ndo_uninit() is also called along with dev->destructor() when
device is unregistered, so in order to prevent dev->dstats from
being freed twice, dev->destructor is modified to free_netdev().

Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/dummy.c