From: "Richard A. Holden III" <aciddeath@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: "Richard A. Holden III" <aciddeath@gmail.com>, alan@lxorguk.ukuu.org.uk
Subject: [PATCH 10/10] ixj: Remove dead code from ifdef IXJ_DYN_ALLOC.
Date: Wed, 8 Oct 2008 14:41:45 -0600 [thread overview]
Message-ID: <d1f78877de0710d0a59e94f2a31798bc2d083892.1223497217.git.aciddeath@gmail.com> (raw)
In-Reply-To: <68f61bde4082cc6405cef40ab800f063c22fb6f6.1223497217.git.aciddeath@gmail.com>
In-Reply-To: <cover.1223497216.git.aciddeath@gmail.com>
There is no way to set IXJ_DYN_ALLOC from kernel config, remove dead code.
Signed-off-by: Richard A. Holden III <aciddeath@gmail.com>
---
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
prev parent reply other threads:[~2008-10-08 19:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-08 20:41 [PATCH 00/10] ixj: Cleanup dead and duplicate code Richard A. Holden III
2008-10-08 20:12 ` Alan Cox
2008-10-08 20:41 ` [PATCH 01/10] ixj: Remove code duplication for processing codec names Richard A. Holden III
2008-10-08 20:41 ` [PATCH 02/10] ixj: Remove dead code in preparation for consolidating duplicate code Richard A. Holden III
2008-10-08 20:41 ` [PATCH 03/10] ixj: Unify comments in preparation for pushing duplicate code into a function Richard A. Holden III
2008-10-08 20:41 ` [PATCH 04/10] ixj: Consolidate duplicate Ringer array initializers into common functions Richard A. Holden III
2008-10-08 20:41 ` [PATCH 05/10] ixj: Move duplicate code into well named zero_caller_id function Richard A. Holden III
2008-10-08 20:41 ` [PATCH 06/10] ixj: Caller ID Refactoring Richard A. Holden III
2008-10-08 20:41 ` [PATCH 07/10] ixj: Refactor DTMF tone setting Richard A. Holden III
2008-10-08 20:41 ` [PATCH 08/10] ixj: update quickly readable comments to match the data initializations Richard A. Holden III
2008-10-08 20:41 ` [PATCH 09/10] ixj: Remove unused macro Richard A. Holden III
2008-10-08 20:41 ` Richard A. Holden III [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d1f78877de0710d0a59e94f2a31798bc2d083892.1223497217.git.aciddeath@gmail.com \
--to=aciddeath@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®