2 * Distributed under the terms of the GNU GPL version 2.
3 * Copyright (c) 2007, 2008, 2009 Nicira Networks.
5 * Significant portions of this file may be copied from parts of the Linux
6 * kernel, by Linus Torvalds and others.
9 /* Handle changes to managed devices */
11 #include <linux/netdevice.h>
16 static int dp_device_event(struct notifier_block *unused, unsigned long event,
19 struct net_device *dev = ptr;
20 struct net_bridge_port *p = dev->br_port;
21 if (event == NETDEV_UNREGISTER && p) {
22 struct datapath *dp = p->dp;
23 mutex_lock(&dp->mutex);
25 mutex_unlock(&dp->mutex);
30 struct notifier_block dp_device_notifier = {
31 .notifier_call = dp_device_event