diff options
author | Lorenzo Bianconi | 2018-09-09 22:32:40 +0200 |
---|---|---|
committer | Felix Fietkau | 2018-09-19 12:31:21 +0200 |
commit | 1750715726c6663a0ee202adbe1badef741d8004 (patch) | |
tree | 5b021062b87764c382fd0fe819c93d0da2ec78a8 /drivers/net/wireless/mediatek/mt76/usb.c | |
parent | mt76: add rd_rp and wr_rp to bus_ops/mcu_ops (diff) | |
download | kernel-qcow2-linux-1750715726c6663a0ee202adbe1badef741d8004.tar.gz kernel-qcow2-linux-1750715726c6663a0ee202adbe1badef741d8004.tar.xz kernel-qcow2-linux-1750715726c6663a0ee202adbe1badef741d8004.zip |
mt76: usb: use common helpers for mcu_alloc_msg()/mcu_send_msg()
Use mcu common helpers instead of usb specific routines.
Add static qualifier to the following functions:
- mt76u_mcu_msg_alloc
- __mt76u_mcu_send_msg
- mt76u_mcu_send_msg
- mt76u_mcu_wr_rp
- mt76u_mcu_rd_rp
- mt76u_wr_rp
- mt76u_rd_rp
This is a preliminary patch to move mt76x02 usb mcu code in
mt76x02-usb module
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/usb.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/usb.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c index fe36c4adbd38..981518dae48c 100644 --- a/drivers/net/wireless/mediatek/mt76/usb.c +++ b/drivers/net/wireless/mediatek/mt76/usb.c @@ -203,15 +203,15 @@ mt76u_req_wr_rp(struct mt76_dev *dev, u32 base, return 0; } -int mt76u_wr_rp(struct mt76_dev *dev, u32 base, - const struct mt76_reg_pair *data, int n) +static int +mt76u_wr_rp(struct mt76_dev *dev, u32 base, + const struct mt76_reg_pair *data, int n) { if (test_bit(MT76_STATE_MCU_RUNNING, &dev->state)) - return mt76u_mcu_wr_rp(dev, base, data, n); + return dev->mcu_ops->mcu_wr_rp(dev, base, data, n); else return mt76u_req_wr_rp(dev, base, data, n); } -EXPORT_SYMBOL_GPL(mt76u_wr_rp); static int mt76u_req_rd_rp(struct mt76_dev *dev, u32 base, struct mt76_reg_pair *data, @@ -230,15 +230,15 @@ mt76u_req_rd_rp(struct mt76_dev *dev, u32 base, struct mt76_reg_pair *data, return 0; } -int mt76u_rd_rp(struct mt76_dev *dev, u32 base, - struct mt76_reg_pair *data, int n) +static int +mt76u_rd_rp(struct mt76_dev *dev, u32 base, + struct mt76_reg_pair *data, int n) { if (test_bit(MT76_STATE_MCU_RUNNING, &dev->state)) - return mt76u_mcu_rd_rp(dev, base, data, n); + return dev->mcu_ops->mcu_rd_rp(dev, base, data, n); else return mt76u_req_rd_rp(dev, base, data, n); } -EXPORT_SYMBOL_GPL(mt76u_rd_rp); static int mt76u_set_endpoints(struct usb_interface *intf, |