kernel: ledtrig-netdev: use netdev_notifier_info
[openwrt.git] / target / linux / generic / patches-3.14 / 831-ledtrig_netdev.patch
index 1fdd6e8..77bc8cc 100644 (file)
  #include <linux/netdevice.h>
  #include <linux/timer.h>
  #include <linux/ctype.h>
+@@ -254,7 +253,7 @@ static int netdev_trig_notify(struct not
+                             unsigned long evt,
+                             void *dv)
+ {
+-      struct net_device *dev = dv;
++      struct net_device *dev = netdev_notifier_info_to_dev((struct netdev_notifier_info *) dv);
+       struct led_netdev_data *trigger_data = container_of(nb, struct led_netdev_data, notifier);
+       if (evt != NETDEV_UP && evt != NETDEV_DOWN && evt != NETDEV_CHANGE && evt != NETDEV_REGISTER && evt != NETDEV_UNREGISTER)
 @@ -294,8 +293,9 @@ done:
  static void netdev_trig_timer(unsigned long arg)
  {