diff options
author | Jiri Pirko <jiri@resnulli.us> | 2013-05-27 21:30:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-28 16:11:01 -0400 |
commit | 351638e7deeed2ec8ce451b53d33921b3da68f83 (patch) | |
tree | 175dfff289b5e3baecffbc7e97d1884e9a18345c /drivers/scsi/fcoe | |
parent | b1098bbe1b24d5d90cff92fbd716d2ef4bed2cff (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/scsi/fcoe')
-rw-r--r-- | drivers/scsi/fcoe/fcoe.c | 2 | ||||
-rw-r--r-- | drivers/scsi/fcoe/fcoe_transport.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 292b24f9bf93..ee721b6cbcdf 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c | |||
@@ -1975,7 +1975,7 @@ static int fcoe_device_notification(struct notifier_block *notifier, | |||
1975 | { | 1975 | { |
1976 | struct fcoe_ctlr_device *cdev; | 1976 | struct fcoe_ctlr_device *cdev; |
1977 | struct fc_lport *lport = NULL; | 1977 | struct fc_lport *lport = NULL; |
1978 | struct net_device *netdev = ptr; | 1978 | struct net_device *netdev = netdev_notifier_info_to_dev(ptr); |
1979 | struct fcoe_ctlr *ctlr; | 1979 | struct fcoe_ctlr *ctlr; |
1980 | struct fcoe_interface *fcoe; | 1980 | struct fcoe_interface *fcoe; |
1981 | struct fcoe_port *port; | 1981 | struct fcoe_port *port; |
diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c index f3a5a53e8631..01adbe0ec53b 100644 --- a/drivers/scsi/fcoe/fcoe_transport.c +++ b/drivers/scsi/fcoe/fcoe_transport.c | |||
@@ -704,7 +704,7 @@ static struct net_device *fcoe_if_to_netdev(const char *buffer) | |||
704 | static int libfcoe_device_notification(struct notifier_block *notifier, | 704 | static int libfcoe_device_notification(struct notifier_block *notifier, |
705 | ulong event, void *ptr) | 705 | ulong event, void *ptr) |
706 | { | 706 | { |
707 | struct net_device *netdev = ptr; | 707 | struct net_device *netdev = netdev_notifier_info_to_dev(ptr); |
708 | 708 | ||
709 | switch (event) { | 709 | switch (event) { |
710 | case NETDEV_UNREGISTER: | 710 | case NETDEV_UNREGISTER: |