diff options
author | Luka Perkov <luka@openwrt.org> | 2014-07-08 23:27:44 +0000 |
---|---|---|
committer | Luka Perkov <luka@openwrt.org> | 2014-07-08 23:27:44 +0000 |
commit | 82abc5c1d9604cec060388a2fe274964eec3a50c (patch) | |
tree | b825fb54c8225b971f70ea32ee2744d18365f479 /target/linux/generic/patches-3.14/831-ledtrig_netdev.patch | |
parent | 90b53991a09578730fab41445e7cbbeb028af722 (diff) | |
download | mtk-20170518-82abc5c1d9604cec060388a2fe274964eec3a50c.zip mtk-20170518-82abc5c1d9604cec060388a2fe274964eec3a50c.tar.gz mtk-20170518-82abc5c1d9604cec060388a2fe274964eec3a50c.tar.bz2 |
kernel: ledtrig-netdev: use netdev_notifier_info
Since kernel 3.11, the third parameter passed to notifier_call()
is of type struct netdev_notifier_info. This patch fixes an oops
when setting a netdev LED trigger.
Signed-off-by: Claudio Leite <leitec@staticky.com>
SVN-Revision: 41552
Diffstat (limited to 'target/linux/generic/patches-3.14/831-ledtrig_netdev.patch')
-rw-r--r-- | target/linux/generic/patches-3.14/831-ledtrig_netdev.patch | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.14/831-ledtrig_netdev.patch b/target/linux/generic/patches-3.14/831-ledtrig_netdev.patch index 1fdd6e8..77bc8cc 100644 --- a/target/linux/generic/patches-3.14/831-ledtrig_netdev.patch +++ b/target/linux/generic/patches-3.14/831-ledtrig_netdev.patch @@ -29,6 +29,15 @@ #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) { |