summaryrefslogtreecommitdiff
path: root/wct4xxp/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'wct4xxp/base.c')
-rw-r--r--wct4xxp/base.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/wct4xxp/base.c b/wct4xxp/base.c
index 45a8d32..19611a8 100644
--- a/wct4xxp/base.c
+++ b/wct4xxp/base.c
@@ -3093,6 +3093,9 @@ static void t4_vpm450_init(struct t4 *wc)
extern void _binary_zaptel_fw_oct6114_128_bin_size;
extern u8 _binary_zaptel_fw_oct6114_064_bin_start[];
extern u8 _binary_zaptel_fw_oct6114_128_bin_start[];
+#else
+ static const char oct064_firmware[] = "zaptel-fw-oct6114-064.bin";
+ static const char oct128_firmware[] = "zaptel-fw-oct6114-128.bin";
#endif
if (!vpmsupport) {
@@ -3122,9 +3125,9 @@ static void t4_vpm450_init(struct t4 *wc)
switch ((vpm_capacity = get_vpm450m_capacity(wc))) {
case 64:
#if defined(HOTPLUG_FIRMWARE)
- if ((request_firmware(&firmware, "zaptel-fw-oct6114-064.bin", &wc->dev->dev) != 0) ||
+ if ((request_firmware(&firmware, oct064_firmware, &wc->dev->dev) != 0) ||
!firmware) {
- printk("VPM450: firmware zaptel-fw-oct6114-064.bin not available from userspace\n");
+ printk("VPM450: firmware %s not available from userspace\n", oct064_firmware);
return;
}
#else
@@ -3134,15 +3137,15 @@ static void t4_vpm450_init(struct t4 *wc)
the size. The only way we can get the value of the symbol
is to take its address, so we define it as a pointer and
then cast that value to the proper type.
- */
+ */
embedded_firmware.size = (size_t) &_binary_zaptel_fw_oct6114_064_bin_size;
#endif
break;
case 128:
#if defined(HOTPLUG_FIRMWARE)
- if ((request_firmware(&firmware, "zaptel-fw-oct6114-128.bin", &wc->dev->dev) != 0) ||
+ if ((request_firmware(&firmware, oct128_firmware, &wc->dev->dev) != 0) ||
!firmware) {
- printk("VPM450: firmware zaptel-fw-oct6114-128.bin not available from userspace\n");
+ printk("VPM450: firmware %s not available from userspace\n", oct128_firmware);
return;
}
#else
@@ -3163,15 +3166,13 @@ static void t4_vpm450_init(struct t4 *wc)
if (!(wc->vpm450m = init_vpm450m(wc, laws, wc->numspans, firmware))) {
printk("VPM450: Failed to initialize\n");
-#if defined(HOTPLUG_FIRMWARE)
- release_firmware(firmware);
-#endif
+ if (firmware != &embedded_firmware)
+ release_firmware(firmware);
return;
}
-#if defined(HOTPLUG_FIRMWARE)
- release_firmware(firmware);
-#endif
+ if (firmware != &embedded_firmware)
+ release_firmware(firmware);
if (vpmdtmfsupport == -1) {
printk("VPM450: hardware DTMF disabled.\n");