aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2018-10-11 09:03:32 -0400
committerDavid S. Miller <davem@davemloft.net>2018-10-11 15:06:06 -0400
commit8cc1da96d1c92aad27b7dfd689b3cdcc6a2bcc18 (patch)
tree94d40876671a450d84edc8e8e977c56ee0bfcada
parent9dffa76c21268f6188b04b966089b5110a7447ef (diff)
net: cdc_ncm: use tasklet_init() for tasklet_struct init
The tasklet initialisation would be better done by tasklet_init() instead of assuming all the fields are in an ok state by default. This does not fix any actual know bug. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/usb/cdc_ncm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 1eaec648bd1f..35a7d61453d5 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -779,8 +779,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
779 779
780 hrtimer_init(&ctx->tx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 780 hrtimer_init(&ctx->tx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
781 ctx->tx_timer.function = &cdc_ncm_tx_timer_cb; 781 ctx->tx_timer.function = &cdc_ncm_tx_timer_cb;
782 ctx->bh.data = (unsigned long)dev; 782 tasklet_init(&ctx->bh, cdc_ncm_txpath_bh, (unsigned long)dev);
783 ctx->bh.func = cdc_ncm_txpath_bh;
784 atomic_set(&ctx->stop, 0); 783 atomic_set(&ctx->stop, 0);
785 spin_lock_init(&ctx->mtx); 784 spin_lock_init(&ctx->mtx);
786 785