USB: atm: ueagle-atm: Declare MODULE_FIRMWARE usage
authorTim Gardner <tim.gardner@canonical.com>
Wed, 25 Jul 2012 20:32:50 +0000 (14:32 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2012 22:17:40 +0000 (15:17 -0700)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Cc: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Matthieu Castet <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/atm/ueagle-atm.c

index d7e422dc0ef7d567ea391c13b901d0b222a8e2fc..e1f8b2c973fe1e7df698e918328fd5bc421906e6 100644 (file)
@@ -307,6 +307,34 @@ enum {
 #define FW_GET_BYTE(p) (*((__u8 *) (p)))
 
 #define FW_DIR "ueagle-atm/"
+#define EAGLE_FIRMWARE FW_DIR "eagle.fw"
+#define ADI930_FIRMWARE FW_DIR "adi930.fw"
+#define EAGLE_I_FIRMWARE FW_DIR "eagleI.fw"
+#define EAGLE_II_FIRMWARE FW_DIR "eagleII.fw"
+#define EAGLE_III_FIRMWARE FW_DIR "eagleIII.fw"
+#define EAGLE_IV_FIRMWARE FW_DIR "eagleIV.fw"
+
+#define DSP4I_FIRMWARE FW_DIR "DSP4i.bin"
+#define DSP4P_FIRMWARE FW_DIR "DSP4p.bin"
+#define DSP9I_FIRMWARE FW_DIR "DSP9i.bin"
+#define DSP9P_FIRMWARE FW_DIR "DSP9p.bin"
+#define DSPEI_FIRMWARE FW_DIR "DSPei.bin"
+#define DSPEP_FIRMWARE FW_DIR "DSPep.bin"
+#define FPGA930_FIRMWARE FW_DIR "930-fpga.bin"
+
+#define CMV4P_FIRMWARE FW_DIR "CMV4p.bin"
+#define CMV4PV2_FIRMWARE FW_DIR "CMV4p.bin.v2"
+#define CMV4I_FIRMWARE FW_DIR "CMV4i.bin"
+#define CMV4IV2_FIRMWARE FW_DIR "CMV4i.bin.v2"
+#define CMV9P_FIRMWARE FW_DIR "CMV9p.bin"
+#define CMV9PV2_FIRMWARE FW_DIR "CMV9p.bin.v2"
+#define CMV9I_FIRMWARE FW_DIR "CMV9i.bin"
+#define CMV9IV2_FIRMWARE FW_DIR "CMV9i.bin.v2"
+#define CMVEP_FIRMWARE FW_DIR "CMVep.bin"
+#define CMVEPV2_FIRMWARE FW_DIR "CMVep.bin.v2"
+#define CMVEI_FIRMWARE FW_DIR "CMVei.bin"
+#define CMVEIV2_FIRMWARE FW_DIR "CMVei.bin.v2"
+
 #define UEA_FW_NAME_MAX 30
 #define NB_MODEM 4
 
@@ -694,26 +722,26 @@ err:
 static int uea_load_firmware(struct usb_device *usb, unsigned int ver)
 {
        int ret;
-       char *fw_name = FW_DIR "eagle.fw";
+       char *fw_name = EAGLE_FIRMWARE;
 
        uea_enters(usb);
        uea_info(usb, "pre-firmware device, uploading firmware\n");
 
        switch (ver) {
        case ADI930:
-               fw_name = FW_DIR "adi930.fw";
+               fw_name = ADI930_FIRMWARE;
                break;
        case EAGLE_I:
-               fw_name = FW_DIR "eagleI.fw";
+               fw_name = EAGLE_I_FIRMWARE;
                break;
        case EAGLE_II:
-               fw_name = FW_DIR "eagleII.fw";
+               fw_name = EAGLE_II_FIRMWARE;
                break;
        case EAGLE_III:
-               fw_name = FW_DIR "eagleIII.fw";
+               fw_name = EAGLE_III_FIRMWARE;
                break;
        case EAGLE_IV:
-               fw_name = FW_DIR "eagleIV.fw";
+               fw_name = EAGLE_IV_FIRMWARE;
                break;
        }
 
@@ -869,19 +897,19 @@ static int request_dsp(struct uea_softc *sc)
 
        if (UEA_CHIP_VERSION(sc) == EAGLE_IV) {
                if (IS_ISDN(sc))
-                       dsp_name = FW_DIR "DSP4i.bin";
+                       dsp_name = DSP4I_FIRMWARE;
                else
-                       dsp_name = FW_DIR "DSP4p.bin";
+                       dsp_name = DSP4P_FIRMWARE;
        } else if (UEA_CHIP_VERSION(sc) == ADI930) {
                if (IS_ISDN(sc))
-                       dsp_name = FW_DIR "DSP9i.bin";
+                       dsp_name = DSP9I_FIRMWARE;
                else
-                       dsp_name = FW_DIR "DSP9p.bin";
+                       dsp_name = DSP9P_FIRMWARE;
        } else {
                if (IS_ISDN(sc))
-                       dsp_name = FW_DIR "DSPei.bin";
+                       dsp_name = DSPEI_FIRMWARE;
                else
-                       dsp_name = FW_DIR "DSPep.bin";
+                       dsp_name = DSPEP_FIRMWARE;
        }
 
        ret = request_firmware(&sc->dsp_firm, dsp_name, &sc->usb_dev->dev);
@@ -1925,7 +1953,7 @@ static int load_XILINX_firmware(struct uea_softc *sc)
        int ret, size, u, ln;
        const u8 *pfw;
        u8 value;
-       char *fw_name = FW_DIR "930-fpga.bin";
+       char *fw_name = FPGA930_FIRMWARE;
 
        uea_enters(INS_TO_USBDEV(sc));
 
@@ -2753,3 +2781,28 @@ module_usb_driver(uea_driver);
 MODULE_AUTHOR("Damien Bergamini/Matthieu Castet/Stanislaw W. Gruszka");
 MODULE_DESCRIPTION("ADI 930/Eagle USB ADSL Modem driver");
 MODULE_LICENSE("Dual BSD/GPL");
+MODULE_FIRMWARE(EAGLE_FIRMWARE);
+MODULE_FIRMWARE(ADI930_FIRMWARE);
+MODULE_FIRMWARE(EAGLE_I_FIRMWARE);
+MODULE_FIRMWARE(EAGLE_II_FIRMWARE);
+MODULE_FIRMWARE(EAGLE_III_FIRMWARE);
+MODULE_FIRMWARE(EAGLE_IV_FIRMWARE);
+MODULE_FIRMWARE(DSP4I_FIRMWARE);
+MODULE_FIRMWARE(DSP4P_FIRMWARE);
+MODULE_FIRMWARE(DSP9I_FIRMWARE);
+MODULE_FIRMWARE(DSP9P_FIRMWARE);
+MODULE_FIRMWARE(DSPEI_FIRMWARE);
+MODULE_FIRMWARE(DSPEP_FIRMWARE);
+MODULE_FIRMWARE(FPGA930_FIRMWARE);
+MODULE_FIRMWARE(CMV4P_FIRMWARE);
+MODULE_FIRMWARE(CMV4PV2_FIRMWARE);
+MODULE_FIRMWARE(CMV4I_FIRMWARE);
+MODULE_FIRMWARE(CMV4IV2_FIRMWARE);
+MODULE_FIRMWARE(CMV9P_FIRMWARE);
+MODULE_FIRMWARE(CMV9PV2_FIRMWARE);
+MODULE_FIRMWARE(CMV9I_FIRMWARE);
+MODULE_FIRMWARE(CMV9IV2_FIRMWARE);
+MODULE_FIRMWARE(CMVEP_FIRMWARE);
+MODULE_FIRMWARE(CMVEPV2_FIRMWARE);
+MODULE_FIRMWARE(CMVEI_FIRMWARE);
+MODULE_FIRMWARE(CMVEIV2_FIRMWARE);