diff options
author | Phong Tran <tranmanphong@gmail.com> | 2019-11-26 20:54:13 +0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-26 14:03:58 -0800 |
commit | 2eb1d3f4bcae6c83943214ccb26968a48360db06 (patch) | |
tree | 3a4610f2dfa6dab9a37c5222bf206230f8cce0a9 /drivers | |
parent | 1d4a09dadbb9ea7baaf6be897d69020c729e7440 (diff) | |
download | linux-2eb1d3f4bcae6c83943214ccb26968a48360db06.tar.bz2 |
net: usbnet: Fix -Wcast-function-type
correct usage prototype of callback in tasklet_init().
Report by https://github.com/KSPP/linux/issues/20
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/usb/usbnet.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index dde05e2fdc3e..30e511c2c8d0 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1573,6 +1573,13 @@ static void usbnet_bh (struct timer_list *t) } } +static void usbnet_bh_tasklet(unsigned long data) +{ + struct timer_list *t = (struct timer_list *)data; + + usbnet_bh(t); +} + /*------------------------------------------------------------------------- * @@ -1700,7 +1707,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) skb_queue_head_init (&dev->txq); skb_queue_head_init (&dev->done); skb_queue_head_init(&dev->rxq_pause); - dev->bh.func = (void (*)(unsigned long))usbnet_bh; + dev->bh.func = usbnet_bh_tasklet; dev->bh.data = (unsigned long)&dev->delay; INIT_WORK (&dev->kevent, usbnet_deferred_kevent); init_usb_anchor(&dev->deferred); |