From e0a4ef9a5510196d4a571cc6666754706cc2da16 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Sat, 2 Jan 2016 22:15:40 +0000 Subject: [PATCH] ledtrig-netdev: don't stop timer on events for different interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This fixes regression introduced in my recent ledtrig-netdev commit. Events triggered by different interfaces were stopping timer so it wasn't working for tx/rx mode. Signed-off-by: Rafał Miłecki Backport of r48072 SVN-Revision: 48074 --- target/linux/generic/files/drivers/leds/ledtrig-netdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c index 5d0f95499b..cfa4dc0758 100644 --- a/target/linux/generic/files/drivers/leds/ledtrig-netdev.c +++ b/target/linux/generic/files/drivers/leds/ledtrig-netdev.c @@ -269,11 +269,12 @@ static int netdev_trig_notify(struct notifier_block *nb, return NOTIFY_DONE; spin_lock_bh(&trigger_data->lock); - del_timer_sync(&trigger_data->timer); if (strcmp(dev->name, trigger_data->device_name)) goto done; + del_timer_sync(&trigger_data->timer); + if (evt == NETDEV_REGISTER || evt == NETDEV_CHANGENAME) { if (trigger_data->net_dev != NULL) dev_put(trigger_data->net_dev); -- 2.30.2