aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2013-05-27 21:30:21 -0400
committerDavid S. Miller <davem@davemloft.net>2013-05-28 16:11:01 -0400
commit351638e7deeed2ec8ce451b53d33921b3da68f83 (patch)
tree175dfff289b5e3baecffbc7e97d1884e9a18345c /drivers/net/wan
parentb1098bbe1b24d5d90cff92fbd716d2ef4bed2cff (diff)
net: pass info struct via netdevice notifier
So far, only net_device * could be passed along with netdevice notifier event. This patch provides a possibility to pass custom structure able to provide info that event listener needs to know. Signed-off-by: Jiri Pirko <jiri@resnulli.us> v2->v3: fix typo on simeth shortened dev_getter shortened notifier_info struct name v1->v2: fix notifier_call parameter in call_netdevice_notifier() Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/dlci.c2
-rw-r--r--drivers/net/wan/hdlc.c2
-rw-r--r--drivers/net/wan/lapbether.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c
index 147614ed86aa..70ac59929f80 100644
--- a/drivers/net/wan/dlci.c
+++ b/drivers/net/wan/dlci.c
@@ -477,7 +477,7 @@ static void dlci_setup(struct net_device *dev)
477static int dlci_dev_event(struct notifier_block *unused, 477static int dlci_dev_event(struct notifier_block *unused,
478 unsigned long event, void *ptr) 478 unsigned long event, void *ptr)
479{ 479{
480 struct net_device *dev = (struct net_device *) ptr; 480 struct net_device *dev = netdev_notifier_info_to_dev(ptr);
481 481
482 if (dev_net(dev) != &init_net) 482 if (dev_net(dev) != &init_net)
483 return NOTIFY_DONE; 483 return NOTIFY_DONE;
diff --git a/drivers/net/wan/hdlc.c b/drivers/net/wan/hdlc.c
index a0a932c63d0a..9c33ca918e19 100644
--- a/drivers/net/wan/hdlc.c
+++ b/drivers/net/wan/hdlc.c
@@ -99,7 +99,7 @@ static inline void hdlc_proto_stop(struct net_device *dev)
99static int hdlc_device_event(struct notifier_block *this, unsigned long event, 99static int hdlc_device_event(struct notifier_block *this, unsigned long event,
100 void *ptr) 100 void *ptr)
101{ 101{
102 struct net_device *dev = ptr; 102 struct net_device *dev = netdev_notifier_info_to_dev(ptr);
103 hdlc_device *hdlc; 103 hdlc_device *hdlc;
104 unsigned long flags; 104 unsigned long flags;
105 int on; 105 int on;
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index a73b49eb87e3..a33a46fa88dd 100644
--- a/drivers/net/wan/lapbether.c
+++ b/drivers/net/wan/lapbether.c
@@ -370,7 +370,7 @@ static int lapbeth_device_event(struct notifier_block *this,
370 unsigned long event, void *ptr) 370 unsigned long event, void *ptr)
371{ 371{
372 struct lapbethdev *lapbeth; 372 struct lapbethdev *lapbeth;
373 struct net_device *dev = ptr; 373 struct net_device *dev = netdev_notifier_info_to_dev(ptr);
374 374
375 if (dev_net(dev) != &init_net) 375 if (dev_net(dev) != &init_net)
376 return NOTIFY_DONE; 376 return NOTIFY_DONE;