mirror of https://gitee.com/openkylin/linux.git
mt76x0: remove mt76x0_complete_urb routine
Remove mt76x0_complete_urb routine and use mt76u_mcu_complete_urb utility function as usb mcu completion handler Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
ad27c4ae0b
commit
73d411e2d4
|
@ -113,7 +113,7 @@ static int mt76x0_mcu_wait_resp(struct mt76x0_dev *dev, u8 seq)
|
|||
|
||||
ret = mt76x0_usb_submit_buf(dev, USB_DIR_IN, MT_EP_IN_CMD_RESP,
|
||||
&dev->mcu.resp, GFP_KERNEL,
|
||||
mt76x0_complete_urb,
|
||||
mt76u_mcu_complete_urb,
|
||||
&usb->mcu.cmpl);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
@ -412,7 +412,7 @@ static int __mt76x0_dma_fw(struct mt76x0_dev *dev,
|
|||
buf.len = MT_DMA_HDR_LEN + len + 4;
|
||||
ret = mt76x0_usb_submit_buf(dev, USB_DIR_OUT, MT_EP_OUT_INBAND_CMD,
|
||||
&buf, GFP_KERNEL,
|
||||
mt76x0_complete_urb, &cmpl);
|
||||
mt76u_mcu_complete_urb, &cmpl);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -624,7 +624,7 @@ int mt76x0_mcu_cmd_init(struct mt76x0_dev *dev)
|
|||
|
||||
ret = mt76x0_usb_submit_buf(dev, USB_DIR_IN, MT_EP_IN_CMD_RESP,
|
||||
&dev->mcu.resp, GFP_KERNEL,
|
||||
mt76x0_complete_urb, &usb->mcu.cmpl);
|
||||
mt76u_mcu_complete_urb, &usb->mcu.cmpl);
|
||||
if (ret) {
|
||||
mt76x0_usb_free_buf(dev, &dev->mcu.resp);
|
||||
return ret;
|
||||
|
|
|
@ -93,13 +93,6 @@ int mt76x0_usb_submit_buf(struct mt76x0_dev *dev, int dir, int ep_idx,
|
|||
return ret;
|
||||
}
|
||||
|
||||
void mt76x0_complete_urb(struct urb *urb)
|
||||
{
|
||||
struct completion *cmpl = urb->context;
|
||||
|
||||
complete(cmpl);
|
||||
}
|
||||
|
||||
int mt76x0_vendor_request(struct mt76x0_dev *dev, const u8 req,
|
||||
const u8 direction, const u16 val, const u16 offset,
|
||||
void *buf, const size_t buflen)
|
||||
|
|
|
@ -49,7 +49,6 @@ void mt76x0_usb_free_buf(struct mt76x0_dev *dev, struct mt76x0_dma_buf *buf);
|
|||
int mt76x0_usb_submit_buf(struct mt76x0_dev *dev, int dir, int ep_idx,
|
||||
struct mt76x0_dma_buf *buf, gfp_t gfp,
|
||||
usb_complete_t complete_fn, void *context);
|
||||
void mt76x0_complete_urb(struct urb *urb);
|
||||
|
||||
int mt76x0_vendor_request(struct mt76x0_dev *dev, const u8 req,
|
||||
const u8 direction, const u16 val, const u16 offset,
|
||||
|
|
Loading…
Reference in New Issue