summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-01-25 23:13:41 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-01-25 23:13:41 +0000
commit38eea6d6ed04741dc03bd35023399936bf4da978 (patch)
treeeea788ed4c45d70ed2021c2a0ee783ea0fe2542d
parent3b6a6980c74f80b1fba54335329aea4bab953700 (diff)
make wcte12xp build successfully on 2.4 kernels, although it won't have VPM support
(closes issue #11514) Reported by: tzafrir git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3738 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r--wcte12xp/Makefile12
-rw-r--r--wcte12xp/base.c9
-rw-r--r--wcte12xp/wcte12xp.h2
3 files changed, 15 insertions, 8 deletions
diff --git a/wcte12xp/Makefile b/wcte12xp/Makefile
index 1df324e..b92d0d0 100644
--- a/wcte12xp/Makefile
+++ b/wcte12xp/Makefile
@@ -6,19 +6,17 @@ include $(src)/Kbuild
else
+# building for 2.4 kernels means no VPM support, so none of the VPM support
+# modules are included in the Makefile rules
+
all: wcte12xp.o
%.o: %.c
$(CC) $(KFLAGS) -o $@ -c $<
-base.o: ../zaptel.h vpmadt032.h
-
-vpmadt032.o: vpmadt032.h
-
-../firmware/zaptel-fw-vpmadt032.o: base.o
- $(MAKE) -C ../firmware zaptel-fw-vpmadt032.o
+base.o: ../zaptel.h
-wcte12xp.o: base.o vpmadt032.o GpakApi.o ../firmware/zaptel-fw-vpmadt032.o
+wcte12xp.o: base.o
$(LD) -r -o $@ $^
clean:
diff --git a/wcte12xp/base.c b/wcte12xp/base.c
index 6cff2d8..5dd83db 100644
--- a/wcte12xp/base.c
+++ b/wcte12xp/base.c
@@ -47,8 +47,11 @@
#include "../wct4xxp/wct4xxp.h" /* For certain definitions */
#include "wcte12xp.h"
+
+#if defined(VPM_SUPPORT)
#include "vpmadt032.h"
#include "GpakApi.h"
+#endif
struct pci_driver te12xp_driver;
@@ -1355,8 +1358,12 @@ static int t1_software_init(struct t1 *wc)
snprintf(wc->span.desc, sizeof(wc->span.desc) - 1, "%s Card %d", wc->variety, wc->num);
wc->span.manufacturer = "Digium";
strncpy(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype) - 1);
+
+#if defined(VPM_SUPPORT)
if (wc->vpm150m)
strncat(wc->span.devicetype, " with VPMADT032", sizeof(wc->span.devicetype) - 1);
+#endif
+
snprintf(wc->span.location, sizeof(wc->span.location) - 1,
"PCI Bus %02d Slot %02d", wc->dev->bus->number, PCI_SLOT(wc->dev->devfn) + 1);
@@ -2015,9 +2022,9 @@ static int __devinit te12xp_init_one(struct pci_dev *pdev, const struct pci_devi
static void __devexit te12xp_remove_one(struct pci_dev *pdev)
{
- unsigned long flags;
struct t1 *wc = pci_get_drvdata(pdev);
#ifdef VPM_SUPPORT
+ unsigned long flags;
struct vpm150m *vpm150m = wc->vpm150m;
#endif
if (!wc)
diff --git a/wcte12xp/wcte12xp.h b/wcte12xp/wcte12xp.h
index 2edc109..20e0558 100644
--- a/wcte12xp/wcte12xp.h
+++ b/wcte12xp/wcte12xp.h
@@ -31,8 +31,10 @@
#ifndef _WCTE12XP_H
#define _WCTE12XP_H
+#ifdef LINUX26
/* Comment to disable VPM support */
#define VPM_SUPPORT 1
+#endif
#define WC_MAX_IFACES 8