From dc1a5266e8ff68f15992bad51c391709cbf7469b Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 20 Oct 2011 20:52:31 +0000 Subject: wct4xxp: Remove unused fields from 'struct t4' and 'struct t4_span' 'memaddr' and 'memlen' is already cached as part of the underlying pci device so the wct4xxp driver does not need to cache it again. 'canary', 'passno', 'master', and 'oct_rw_count' are unused. In t4_span 'irqmisses' was incremented, but never used anywhere, and there is already the irqmisses on the span itself. Signed-off-by: Shaun Ruffell Acked-by: Michael Spiceland Acked-by: Russ Meyerriecks git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10237 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wct4xxp/base.c | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index 89a1153..c6f2465 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -305,8 +305,6 @@ struct t4_span { unsigned char ec_chunk1[31][DAHDI_CHUNKSIZE]; /* first EC chunk buffer */ unsigned char ec_chunk2[31][DAHDI_CHUNKSIZE]; /* second EC chunk buffer */ #endif - int irqmisses; - /* HDLC controller fields */ struct dahdi_chan *sigchan; unsigned char sigmode; @@ -346,7 +344,6 @@ struct t4 { int order; /* Order */ int flags; /* Device flags */ unsigned int falc31 : 1; /* are we falc v3.1 (atomic not necessary) */ - int master; /* Are we master */ int ledreg; /* LED Register */ unsigned int gpio; unsigned int gpioctl; @@ -355,12 +352,10 @@ struct t4 { int spansstarted; /* number of spans started */ u32 *writechunk; /* Double-word aligned write memory */ u32 *readchunk; /* Double-word aligned read memory */ - unsigned short canary; #ifdef ENABLE_WORKQUEUES atomic_t worklist; struct workqueue_struct *workq; #endif - unsigned int passno; /* number of interrupt passes */ char *variety; int last0; /* for detecting double-missed IRQ */ @@ -368,13 +363,8 @@ struct t4 { unsigned int dmactrl; dma_addr_t readdma; dma_addr_t writedma; - unsigned long memaddr; /* Base address of card */ - unsigned long memlen; void __iomem *membase; /* Base address of card */ - /* Add this for our softlockup protector */ - unsigned int oct_rw_count; - /* Flags for our bottom half */ unsigned long checkflag; struct tasklet_struct t4_tlet; @@ -2791,13 +2781,9 @@ static void t4_receiveprep(struct t4 *wc, int irq) dbl = 1; wc->last0 = 1; } - if (dbl) { - for (x=0;xnumspans;x++) - wc->tspans[x]->irqmisses++; - if (debug & DEBUG_MAIN) - dev_notice(&wc->dev->dev, "TE%dXXP: Double/missed " - "interrupt detected\n", wc->numspans); - } + if (unlikely(dbl && (debug & DEBUG_MAIN))) + dev_notice(&wc->dev->dev, "Double/missed interrupt detected\n"); + for (x=0;xvariety = dt->desc; - wc->memaddr = pci_resource_start(pdev, 0); - wc->memlen = pci_resource_len(pdev, 0); - wc->membase = ioremap(wc->memaddr, wc->memlen); + wc->membase = pci_iomap(pdev, 0, 0); /* This rids of the Double missed interrupt message after loading */ wc->last0 = 1; #if 0 @@ -4901,7 +4885,7 @@ static void _t4_remove_one(struct t4 *wc) free_irq(wc->dev->irq, wc); if (wc->membase) - iounmap(wc->membase); + pci_iounmap(wc->dev, wc->membase); pci_release_regions(wc->dev); -- cgit v1.2.3