mt76x0: remove unused usb header file
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Tue, 11 Sep 2018 21:09:30 +0000 (23:09 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 19 Sep 2018 10:31:47 +0000 (12:31 +0200)
Remove unused usb header file and move mt76x0 firmware definition
in usb.c

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt76x0/init.c
drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
drivers/net/wireless/mediatek/mt76/mt76x0/usb.h [deleted file]

index b31ec78..3a88be2 100644 (file)
@@ -18,7 +18,6 @@
 #include "eeprom.h"
 #include "trace.h"
 #include "mcu.h"
-#include "usb.h"
 #include "../mt76x02_util.h"
 
 #include "initvals.h"
index 3be3402..e707126 100644 (file)
 #include <linux/usb.h>
 
 #include "mt76x0.h"
-#include "usb.h"
 #include "mcu.h"
 #include "trace.h"
 #include "../mt76x02_util.h"
 #include "../mt76x02_usb.h"
 
+#define MT7610U_FIRMWARE               "mediatek/mt7610u.bin"
+
 static struct usb_device_id mt76x0_device_table[] = {
        { USB_DEVICE(0x148F, 0x7610) }, /* MT7610U */
        { USB_DEVICE(0x13B1, 0x003E) }, /* Linksys AE6000 */
@@ -126,7 +127,7 @@ static int mt76x0u_load_firmware(struct mt76x0_dev *dev)
        if (mt76x0_firmware_running(dev))
                return 0;
 
-       ret = request_firmware(&fw, MT7610_FIRMWARE, dev->mt76.dev);
+       ret = request_firmware(&fw, MT7610U_FIRMWARE, dev->mt76.dev);
        if (ret)
                return ret;
 
@@ -352,7 +353,7 @@ err:
 }
 
 MODULE_DEVICE_TABLE(usb, mt76x0_device_table);
-MODULE_FIRMWARE(MT7610_FIRMWARE);
+MODULE_FIRMWARE(MT7610U_FIRMWARE);
 MODULE_LICENSE("GPL");
 
 static struct usb_driver mt76x0_driver = {
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.h b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.h
deleted file mode 100644 (file)
index 7bd0753..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2015 Jakub Kicinski <kubakici@wp.pl>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#ifndef __MT76X0U_USB_H
-#define __MT76X0U_USB_H
-
-#include "mt76x0.h"
-
-#define MT7610_FIRMWARE        "mediatek/mt7610u.bin"
-
-#define MT_VEND_REQ_MAX_RETRY  10
-#define MT_VEND_REQ_TOUT_MS    300
-
-#define MT_VEND_DEV_MODE_RESET 1
-
-#define MT_VEND_BUF            sizeof(__le32)
-
-static inline struct usb_device *mt76x0_to_usb_dev(struct mt76x0_dev *mt76x0)
-{
-       return interface_to_usbdev(to_usb_interface(mt76x0->mt76.dev));
-}
-
-static inline struct usb_device *mt76_to_usb_dev(struct mt76_dev *mt76)
-{
-       return interface_to_usbdev(to_usb_interface(mt76->dev));
-}
-
-static inline bool mt76x0_urb_has_error(struct urb *urb)
-{
-       return urb->status &&
-               urb->status != -ENOENT &&
-               urb->status != -ECONNRESET &&
-               urb->status != -ESHUTDOWN;
-}
-
-#endif