[PATCH 10/10] ixj: Remove dead code from ifdef IXJ_DYN_ALLOC.
From: Richard A. Holden III
Date: Wed Oct 08 2008 - 15:44:00 EST
There is no way to set IXJ_DYN_ALLOC from kernel config, remove dead code.
Signed-off-by: Richard A. Holden III <aciddeath@xxxxxxxxx>
---
drivers/telephony/ixj.c | 62 -----------------------------------------------
drivers/telephony/ixj.h | 4 ---
2 files changed, 0 insertions(+), 66 deletions(-)
diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c
index e502f02..4218520 100644
--- a/drivers/telephony/ixj.c
+++ b/drivers/telephony/ixj.c
@@ -309,57 +309,6 @@ MODULE_DEVICE_TABLE(pci, ixj_pci_tbl);
*
************************************************************************/
-#ifdef IXJ_DYN_ALLOC
-
-static IXJ *ixj[IXJMAX];
-#define get_ixj(b) ixj[(b)]
-
-/*
- * Allocate a free IXJ device
- */
-
-static IXJ *ixj_alloc()
-{
- for(cnt=0; cnt<IXJMAX; cnt++)
- {
- if(ixj[cnt] == NULL || !ixj[cnt]->DSPbase)
- {
- j = kmalloc(sizeof(IXJ), GFP_KERNEL);
- if (j == NULL)
- return NULL;
- ixj[cnt] = j;
- return j;
- }
- }
- return NULL;
-}
-
-static void ixj_fsk_free(IXJ *j)
-{
- kfree(j->fskdata);
- j->fskdata = NULL;
-}
-
-static void ixj_fsk_alloc(IXJ *j)
-{
- if(!j->fskdata) {
- j->fskdata = kmalloc(8000, GFP_KERNEL);
- if (!j->fskdata) {
- if(ixjdebug & 0x0200) {
- printk("IXJ phone%d - allocate failed\n", j->board);
- }
- return;
- } else {
- j->fsksize = 8000;
- if(ixjdebug & 0x0200) {
- printk("IXJ phone%d - allocate succeded\n", j->board);
- }
- }
- }
-}
-
-#else
-
static IXJ ixj[IXJMAX];
#define get_ixj(b) (&ixj[(b)])
@@ -384,8 +333,6 @@ static inline void ixj_fsk_alloc(IXJ *j)
j->fsksize = 8000;
}
-#endif
-
#ifdef PERFMON_STATS
#define ixj_perfmon(x) ((x)++)
#else
@@ -7079,9 +7026,6 @@ static int ixj_selfprobe(IXJ *j)
j->ex_sig.bits.dtmf_ready = j->ex_sig.bits.hookstate = j->ex_sig.bits.flash = j->ex_sig.bits.pstn_ring =
j->ex_sig.bits.caller_id = j->ex_sig.bits.pstn_wink = j->ex_sig.bits.f0 = j->ex_sig.bits.f1 = j->ex_sig.bits.f2 =
j->ex_sig.bits.f3 = j->ex_sig.bits.fc0 = j->ex_sig.bits.fc1 = j->ex_sig.bits.fc2 = j->ex_sig.bits.fc3 = 1;
-#ifdef IXJ_DYN_ALLOC
- j->fskdata = NULL;
-#endif
j->fskdcnt = 0;
j->cidcw_wait = 0;
@@ -7405,12 +7349,6 @@ static void cleanup(void)
if (ixjdebug & 0x0002)
printk(KERN_INFO "IXJ: Releasing DSP address for /dev/phone%d\n", cnt);
release_region(j->DSPbase, 16);
-#ifdef IXJ_DYN_ALLOC
- if (ixjdebug & 0x0002)
- printk(KERN_INFO "IXJ: Freeing memory for /dev/phone%d\n", cnt);
- kfree(j);
- ixj[cnt] = NULL;
-#endif
}
}
if (ixjdebug & 0x0002)
diff --git a/drivers/telephony/ixj.h b/drivers/telephony/ixj.h
index 4c32a43..fe8c690 100644
--- a/drivers/telephony/ixj.h
+++ b/drivers/telephony/ixj.h
@@ -1307,11 +1307,7 @@ typedef struct {
unsigned long iscontrolready;
unsigned long iscontrolreadyfail;
unsigned long pstnstatecheck;
-#ifdef IXJ_DYN_ALLOC
- short *fskdata;
-#else
short fskdata[8000];
-#endif
int fsksize;
int fskdcnt;
} IXJ;
--
1.5.6.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/