Skip to content

Commit 14c59dc

Browse files
committed
Merge branch 'net-func-cast'
Phong Tran says: ==================== Fix -Wcast-function-type usb net drivers Change log with v1: - Modify suffix of patch subject. - Did the checkpatch.pl (remove the space, add a blank line). ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 82f31eb + 2eb1d3f commit 14c59dc

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

drivers/net/usb/hso.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,8 +1214,9 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb)
12141214
* This needs to be a tasklet otherwise we will
12151215
* end up recursively calling this function.
12161216
*/
1217-
static void hso_unthrottle_tasklet(struct hso_serial *serial)
1217+
static void hso_unthrottle_tasklet(unsigned long data)
12181218
{
1219+
struct hso_serial *serial = (struct hso_serial *)data;
12191220
unsigned long flags;
12201221

12211222
spin_lock_irqsave(&serial->serial_lock, flags);
@@ -1265,7 +1266,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
12651266
/* Force default termio settings */
12661267
_hso_serial_set_termios(tty, NULL);
12671268
tasklet_init(&serial->unthrottle_tasklet,
1268-
(void (*)(unsigned long))hso_unthrottle_tasklet,
1269+
hso_unthrottle_tasklet,
12691270
(unsigned long)serial);
12701271
result = hso_start_serial_device(serial->parent, GFP_KERNEL);
12711272
if (result) {

drivers/net/usb/usbnet.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1573,6 +1573,13 @@ static void usbnet_bh (struct timer_list *t)
15731573
}
15741574
}
15751575

1576+
static void usbnet_bh_tasklet(unsigned long data)
1577+
{
1578+
struct timer_list *t = (struct timer_list *)data;
1579+
1580+
usbnet_bh(t);
1581+
}
1582+
15761583

15771584
/*-------------------------------------------------------------------------
15781585
*
@@ -1700,7 +1707,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
17001707
skb_queue_head_init (&dev->txq);
17011708
skb_queue_head_init (&dev->done);
17021709
skb_queue_head_init(&dev->rxq_pause);
1703-
dev->bh.func = (void (*)(unsigned long))usbnet_bh;
1710+
dev->bh.func = usbnet_bh_tasklet;
17041711
dev->bh.data = (unsigned long)&dev->delay;
17051712
INIT_WORK (&dev->kevent, usbnet_deferred_kevent);
17061713
init_usb_anchor(&dev->deferred);

0 commit comments

Comments
 (0)