summaryrefslogtreecommitdiff
path: root/xhfc/xhfc.h
diff options
context:
space:
mode:
authorNoe Rubinstein <nrubinstein@proformatique.com>2010-10-22 15:45:09 +0200
committerNoe Rubinstein <nrubinstein@proformatique.com>2010-10-22 16:11:17 +0200
commit634c91f6d61df2870fb63886d013848844308f76 (patch)
tree7def63b6732fcd039c5b94fb18407e813f2d1560 /xhfc/xhfc.h
parent0e0bc1e7d590db9216399af1e702e5f54e3fa7c6 (diff)
#ifdef AUDIO
#endif
Diffstat (limited to 'xhfc/xhfc.h')
-rw-r--r--xhfc/xhfc.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/xhfc/xhfc.h b/xhfc/xhfc.h
index 367ac46..35772b8 100644
--- a/xhfc/xhfc.h
+++ b/xhfc/xhfc.h
@@ -5,16 +5,9 @@
#include <linux/pci.h>
#include <dahdi/kernel.h>
-#if 1
+#if AUDIO
# include <tdm/xivo_tdm_api.h>
-#else
-/* place holder */
-#define ICP_HSSDRV_PORT_XHFC_MEGREZ_PROTO_XIVO_CONFIG 42
-struct xivo_tdm_port { int lol; };
-extern struct xivo_tdm_port kikoolol;
-static inline struct xivo_tdm_port* xivo_tdm_get_port(int port) { return &kikoolol; }
-static inline void xivo_tdm_put_port(struct xivo_tdm_port* x) {}
-static inline int xivo_tdm_config_port(struct xivo_tdm_port* x, unsigned int port_config) { return 0; }
+# define XIVO_XHFC_TDM_PORT 0
#endif
#include "xhfc24sucd.h"
@@ -22,7 +15,6 @@ static inline int xivo_tdm_config_port(struct xivo_tdm_port* x, unsigned int por
#define DRIVER_NAME "xhfc"
-#define XIVO_XHFC_TDM_PORT 0
#ifndef CHIP_ID_2S4U
#define CHIP_ID_2S4U 0x62
@@ -116,7 +108,9 @@ struct xhfc_span {
/* Same as in DAHDI's for sameness reasons XXX which are??? */
struct dahdi_span span;
- atomic_t hdlc_pending;
+ atomic_t hdlc_pending; /* read and dec'd in interrupt context
+ * inc'd in xhfc_hdlc_hard_xmit called by DAHDI
+ * in user context */
int port; /* (physical) S/T port number */
int nt; /* 1 if the port is nt, 0 if it's TE */
@@ -159,7 +153,9 @@ struct xhfc_pi {
struct xhfc xhfc; /* mem for one XHFC */
struct pci_dev *pci_dev;
+#ifdef AUDIO
struct xivo_tdm_port *tdm_port;
+#endif
};
#define dchan_fifo(span) (span->port * 4 + 2)