diff options
author | Noe Rubinstein <nrubinstein@proformatique.com> | 2010-10-22 16:15:39 +0200 |
---|---|---|
committer | Noe Rubinstein <nrubinstein@proformatique.com> | 2010-10-22 16:27:41 +0200 |
commit | c3200ae30a899081220b1e9e1b06ddc3128b57c6 (patch) | |
tree | 2c59c8ba68701a2134d0c4d41c2740a9d208cdab /xhfc | |
parent | 634c91f6d61df2870fb63886d013848844308f76 (diff) |
fix some errors in the previous commits
Diffstat (limited to 'xhfc')
-rw-r--r-- | xhfc/xhfc.c | 25 | ||||
-rw-r--r-- | xhfc/xhfc.h | 2 |
2 files changed, 15 insertions, 12 deletions
diff --git a/xhfc/xhfc.c b/xhfc/xhfc.c index b0b2bde..b6d0bce 100644 --- a/xhfc/xhfc.c +++ b/xhfc/xhfc.c @@ -56,8 +56,10 @@ MODULE_PARM_DESC(reset_gpio, "Reset the XHFC using this GPIO"); #endif MODULE_PARM_DESC(exit_after_reset, "Exit after hard reset"); +#ifdef AUDIO #define RX_HISTO_NB 16 static int rx_histo[RX_HISTO_NB]; +#endif void xhfc_waitbusy(struct xhfc *xhfc) { @@ -735,6 +737,12 @@ void xhfc_init_and_configure(struct xhfc* x) xhfc_config_data_flow(x); } +static void xhfc_span_set_ntte(struct xhfc_span* s, int ntte) +{ + s->nt = !!ntte; + s->span.spantype = ntte ? "NT" : "TE"; +} + int xhfc_span_startup(struct dahdi_span* span) { struct xhfc_span *xhfc_span = container_of(span, struct xhfc_span, span); @@ -766,7 +774,7 @@ int xhfc_spanconfig(struct dahdi_span *span, struct dahdi_lineconfig *lc) xhfc_span = container_of(span, struct xhfc_span, span); xhfc = xhfc_span->xhfc; - xhfc_span_set_ntte(xhfc_span, lc->lineconfig & DAHDI_CONFIG_NTTE) /* xref2 */ + xhfc_span_set_ntte(xhfc_span, lc->lineconfig & DAHDI_CONFIG_NTTE); /* xref2 */ term = (lc->lineconfig & DAHDI_CONFIG_TERM) ? 1 : 0; @@ -872,11 +880,6 @@ static const struct dahdi_span_ops xhfc_span_ops = { .hdlc_hard_xmit = xhfc_hdlc_hard_xmit, }; -void xhfc_span_set_ntte(struct xhfc_span* s, int ntte) -{ - s->nt = !!ntte; - s->span.spantype = ntte ? "NT" : "TE"; -} void init_spans(struct xhfc* x) { @@ -895,7 +898,7 @@ void init_spans(struct xhfc* x) xhfc_span->port = i; xhfc_span->sigchan = NULL; /* conf'd in chanconfig (xref1) */ - xhfc_span_set_ntte(xhfc_span, ntte & (1 << i)) /* reconf'd in spanconfig (xref2) */ + xhfc_span_set_ntte(xhfc_span, ntte & (1 << i)); /* reconf'd in spanconfig (xref2) */ xhfc_span->newalarm = DAHDI_ALARM_RED; @@ -1094,7 +1097,7 @@ int __devinit xhfc_init_one(struct pci_dev *pdev, init_spans(&pi->xhfc); xhfc_init_and_configure(&pi->xhfc); -#if AUDIO +#ifdef AUDIO /* TDM started on the XHFC side, XHFC is MASTER */ /* Now it's possible to start the TDM bus on the EP80579 side, as SLAVE: */ if ((rc = xivo_tdm_config_port(pi->tdm_port, XHFC_MEGREZ_PROTO_XIVO_CONFIG)) < 0) { @@ -1111,7 +1114,7 @@ int __devinit xhfc_init_one(struct pci_dev *pdev, enable_interrupts(&pi->xhfc); /* enabled in startup <== XXX gnnnnn??? BUGBUG? */ -#if AUDIO +#ifdef AUDIO xivo_tdm_start_chans(pi->tdm_port, /* timeslots 0->7 */ 0xFF, NULL); @@ -1122,7 +1125,7 @@ int __devinit xhfc_init_one(struct pci_dev *pdev, err_in_dahdi_register: for (span--; span >= 0; span--) dahdi_unregister(&pi->xhfc.spans[span].span); -#if AUDIO +#ifdef AUDIO err_tdm_config_port: #endif free_irq(pi->irq, pi); @@ -1130,7 +1133,7 @@ err_request_irq: err_collect_chip_id: //acpi_unregister_gsi(IRQ_TLP_GPIO_30); /* symbol doesn't exist??? */ err_acpi_register: -#if AUDIO +#ifdef AUDIO xivo_tdm_put_port(pi->tdm_port); err_tdm_get_port: #endif diff --git a/xhfc/xhfc.h b/xhfc/xhfc.h index 35772b8..1726975 100644 --- a/xhfc/xhfc.h +++ b/xhfc/xhfc.h @@ -5,7 +5,7 @@ #include <linux/pci.h> #include <dahdi/kernel.h> -#if AUDIO +#ifdef AUDIO # include <tdm/xivo_tdm_api.h> # define XIVO_XHFC_TDM_PORT 0 #endif |