aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netconsole.c
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/netconsole.c
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/netconsole.c')
-rw-r--r--drivers/net/netconsole.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 59ac143dec25..1d1d0a12765c 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -653,12 +653,11 @@ static struct configfs_subsystem netconsole_subsys = {
653 653
654/* Handle network interface device notifications */ 654/* Handle network interface device notifications */
655static int netconsole_netdev_event(struct notifier_block *this, 655static int netconsole_netdev_event(struct notifier_block *this,
656 unsigned long event, 656 unsigned long event, void *ptr)
657 void *ptr)
658{ 657{
659 unsigned long flags; 658 unsigned long flags;
660 struct netconsole_target *nt; 659 struct netconsole_target *nt;
661 struct net_device *dev = ptr; 660 struct net_device *dev = netdev_notifier_info_to_dev(ptr);
662 bool stopped = false; 661 bool stopped = false;
663 662
664 if (!(event == NETDEV_CHANGENAME || event == NETDEV_UNREGISTER || 663 if (!(event == NETDEV_CHANGENAME || event == NETDEV_UNREGISTER ||