aboutsummaryrefslogtreecommitdiffstats
path: root/net/appletalk/aarp.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2007-09-12 05:26:59 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:49:02 -0400
commit890d52d3f1e28888c4122e120426588f5ad63d37 (patch)
treec082ca5fd5e00e033cb22067c927e19a00160beb /net/appletalk/aarp.c
parentab5f5e8b144e4c804ef3aa1ce08a9ca9f01187ce (diff)
[ATALK]: In notifier handlers convert the void pointer to a netdevice
This slightly improves code safety and clarity. Later network namespace patches touch this code so this is a preliminary cleanup. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/appletalk/aarp.c')
-rw-r--r--net/appletalk/aarp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c
index 3d1655f98388..80b54148460f 100644
--- a/net/appletalk/aarp.c
+++ b/net/appletalk/aarp.c
@@ -330,15 +330,16 @@ static void aarp_expire_timeout(unsigned long unused)
330static int aarp_device_event(struct notifier_block *this, unsigned long event, 330static int aarp_device_event(struct notifier_block *this, unsigned long event,
331 void *ptr) 331 void *ptr)
332{ 332{
333 struct net_device *dev = ptr;
333 int ct; 334 int ct;
334 335
335 if (event == NETDEV_DOWN) { 336 if (event == NETDEV_DOWN) {
336 write_lock_bh(&aarp_lock); 337 write_lock_bh(&aarp_lock);
337 338
338 for (ct = 0; ct < AARP_HASH_SIZE; ct++) { 339 for (ct = 0; ct < AARP_HASH_SIZE; ct++) {
339 __aarp_expire_device(&resolved[ct], ptr); 340 __aarp_expire_device(&resolved[ct], dev);
340 __aarp_expire_device(&unresolved[ct], ptr); 341 __aarp_expire_device(&unresolved[ct], dev);
341 __aarp_expire_device(&proxies[ct], ptr); 342 __aarp_expire_device(&proxies[ct], dev);
342 } 343 }
343 344
344 write_unlock_bh(&aarp_lock); 345 write_unlock_bh(&aarp_lock);