[PATCH] smsc95xx: fix function prototype of async callback

Subsystems: networking drivers, the rest, usb networking drivers, usb smsc95xx ethernet driver

STALE6440d

2 messages, 2 authors, 2009-01-26 · open the first message on its own page

[PATCH] smsc95xx: fix function prototype of async callback

From: Steve Glendinning <hidden>
Date: 2009-01-20 15:18:30

smsc95xx_async_cmd_callback doesn't currently match usb_complete_t, so
there's a cast to force the square peg into the round hole.  This patch
fixes this properly.

Signed-off-by: Steve Glendinning <redacted>
---
 drivers/net/usb/smsc95xx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 26fabef..5b0b964 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -306,7 +306,7 @@ static int smsc95xx_write_eeprom(struct usbnet *dev, u32 offset, u32 length,
 	return 0;
 }
 
-static void smsc95xx_async_cmd_callback(struct urb *urb, struct pt_regs *regs)
+static void smsc95xx_async_cmd_callback(struct urb *urb)
 {
 	struct usb_context *usb_context = urb->context;
 	struct usbnet *dev = usb_context->dev;
@@ -348,7 +348,7 @@ static int smsc95xx_write_reg_async(struct usbnet *dev, u16 index, u32 *data)
 
 	usb_fill_control_urb(urb, dev->udev, usb_sndctrlpipe(dev->udev, 0),
 		(void *)&usb_context->req, data, size,
-		(usb_complete_t)smsc95xx_async_cmd_callback,
+		smsc95xx_async_cmd_callback,
 		(void *)usb_context);
 
 	status = usb_submit_urb(urb, GFP_ATOMIC);
-- 
1.6.0.6

Re: [PATCH] smsc95xx: fix function prototype of async callback

From: David Miller <davem@davemloft.net>
Date: 2009-01-26 01:54:56

From: Steve Glendinning <redacted>
Date: Tue, 20 Jan 2009 15:09:00 +0000
smsc95xx_async_cmd_callback doesn't currently match usb_complete_t, so
there's a cast to force the square peg into the round hole.  This patch
fixes this properly.

Signed-off-by: Steve Glendinning <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help