aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/sis900.h
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-10-14 13:30:33 +0800
committerJohn W. Linville <linville@tuxdriver.com>2008-10-31 19:00:22 -0400
commitfaf3994a9f65fd95a68bbcc03c318a427cd1e7d3 (patch)
tree800dcc297eb751d512d86c6cb0e8809f8e21e096 /drivers/net/sis900.h
parentb706e65b40417e03c2451bb3f92488f3736843fa (diff)
airo: Kill directly reference of netdev->priv
We have some reasons to kill netdev->priv: 1. netdev->priv is equal to netdev_priv(). 2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously netdev_priv() is more flexible than netdev->priv. But we cann't kill netdev->priv, because so many drivers reference to it directly. OK, becasue Dave S. Miller said, "every direct netdev->priv usage is a bug", and I want to kill netdev->priv later, I decided to convert all the direct reference of netdev->priv first. In this driver, I don't simply use netdev_priv() to replace netdev->priv. The reason is: Pointer netdev->priv was changed in this driver, but it shouldn't. Because the memory was allocated when alloc_netdev() and netdev->priv should always point to that memory. So I use netdev->ml_priv to replace netdev->priv. After replacing, both ai and ai->wifidev->ml_priv point to the same memory. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/sis900.h')
0 files changed, 0 insertions, 0 deletions