]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: add ds_to_priv
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 28 Apr 2014 18:14:27 +0000 (11:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Apr 2014 17:31:25 +0000 (13:31 -0400)
commitac37c095ea166e777c75482a503453fd203bf788
treeef2b1467a36a089d3961f60f8d445cb6743bde4a
parent064c6bcdebee3de1f0056087a53346892e33ec4e
net: dsa: add ds_to_priv

DSA drivers have a trick which consists in allocating "priv_size" more
bytes to account for the DSA driver private context. Add a helper
function to access that private context instead of open-coding it in
drivers with (void *)(ds + 1).

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dsa.h