diff options
author | Russell Bryant <russell@digium.com> | 2008-08-03 15:42:46 +0000 |
---|---|---|
committer | Russell Bryant <russell@digium.com> | 2008-08-03 15:42:46 +0000 |
commit | 99bb77154edc3511ce751829fcc948de59793dc4 (patch) | |
tree | 295a3ecde4aed3fb7e28470efa4ec8c9f1e85187 /drivers/dahdi/xpp | |
parent | 210e1ee25783d7be083220b0690bd37c4a7a99c0 (diff) |
Rework the table of signalling bits for signalling types and hook states
in dahdi_rbs_sethook() to a much more readable and less error prone format.
In passing, get rid of the dahdi_txsig_t typedef, and fix uses of it
throughout the tree.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4679 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp')
-rw-r--r-- | drivers/dahdi/xpp/card_fxo.c | 2 | ||||
-rw-r--r-- | drivers/dahdi/xpp/card_fxs.c | 2 | ||||
-rw-r--r-- | drivers/dahdi/xpp/card_pri.c | 2 | ||||
-rw-r--r-- | drivers/dahdi/xpp/dahdi_debug.h | 3 | ||||
-rw-r--r-- | drivers/dahdi/xpp/xpp_dahdi.c | 2 | ||||
-rw-r--r-- | drivers/dahdi/xpp/xproto.h | 2 |
6 files changed, 7 insertions, 6 deletions
diff --git a/drivers/dahdi/xpp/card_fxo.c b/drivers/dahdi/xpp/card_fxo.c index 4d9dec5..b7c8154 100644 --- a/drivers/dahdi/xpp/card_fxo.c +++ b/drivers/dahdi/xpp/card_fxo.c @@ -541,7 +541,7 @@ static int FXO_card_dahdi_postregistration(xpd_t *xpd, bool on) return 0; } -static int FXO_card_hooksig(xbus_t *xbus, xpd_t *xpd, int pos, dahdi_txsig_t txsig) +static int FXO_card_hooksig(xbus_t *xbus, xpd_t *xpd, int pos, enum dahdi_txsig txsig) { struct FXO_priv_data *priv; int ret = 0; diff --git a/drivers/dahdi/xpp/card_fxs.c b/drivers/dahdi/xpp/card_fxs.c index cabda03..8110fa2 100644 --- a/drivers/dahdi/xpp/card_fxs.c +++ b/drivers/dahdi/xpp/card_fxs.c @@ -635,7 +635,7 @@ static int send_ring(xpd_t *xpd, lineno_t chan, bool on) return ret; } -static int FXS_card_hooksig(xbus_t *xbus, xpd_t *xpd, int pos, dahdi_txsig_t txsig) +static int FXS_card_hooksig(xbus_t *xbus, xpd_t *xpd, int pos, enum dahdi_txsig txsig) { struct FXS_priv_data *priv; int ret = 0; diff --git a/drivers/dahdi/xpp/card_pri.c b/drivers/dahdi/xpp/card_pri.c index 12f91da..e83044d 100644 --- a/drivers/dahdi/xpp/card_pri.c +++ b/drivers/dahdi/xpp/card_pri.c @@ -913,7 +913,7 @@ static int PRI_card_dahdi_postregistration(xpd_t *xpd, bool on) return(0); } -static int PRI_card_hooksig(xbus_t *xbus, xpd_t *xpd, int pos, dahdi_txsig_t txsig) +static int PRI_card_hooksig(xbus_t *xbus, xpd_t *xpd, int pos, enum dahdi_txsig txsig) { LINE_DBG(SIGNAL, xpd, pos, "%s\n", txsig2str(txsig)); return 0; diff --git a/drivers/dahdi/xpp/dahdi_debug.h b/drivers/dahdi/xpp/dahdi_debug.h index 753fa1a..a2cd242 100644 --- a/drivers/dahdi/xpp/dahdi_debug.h +++ b/drivers/dahdi/xpp/dahdi_debug.h @@ -104,13 +104,14 @@ static inline char *rxsig2str(dahdi_rxsig_t sig) return "Unknown rxsig"; } -static inline char *txsig2str(dahdi_txsig_t sig) +static inline char *txsig2str(enum dahdi_txsig sig) { switch(sig) { case DAHDI_TXSIG_ONHOOK: return "TXSIG_ONHOOK"; case DAHDI_TXSIG_OFFHOOK: return "TXSIG_OFFHOOK"; case DAHDI_TXSIG_START: return "TXSIG_START"; case DAHDI_TXSIG_KEWL: return "TXSIG_KEWL"; /* Drop battery if possible */ + case DAHDI_TXSIG_TOTAL: break; } return "Unknown txsig"; } diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c index 49153bc..9c5ebd2 100644 --- a/drivers/dahdi/xpp/xpp_dahdi.c +++ b/drivers/dahdi/xpp/xpp_dahdi.c @@ -770,7 +770,7 @@ int xpp_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long arg) return 0; } -static int xpp_hooksig(struct dahdi_chan *chan, dahdi_txsig_t txsig) +static int xpp_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig) { xpd_t *xpd = chan->pvt; xbus_t *xbus; diff --git a/drivers/dahdi/xpp/xproto.h b/drivers/dahdi/xpp/xproto.h index 9a0726e..c58f36d 100644 --- a/drivers/dahdi/xpp/xproto.h +++ b/drivers/dahdi/xpp/xproto.h @@ -225,7 +225,7 @@ struct xops { void (*card_pcm_tospan)(xbus_t *xbus, xpd_t *xpd, xpacket_t *pack); int (*card_dahdi_preregistration)(xpd_t *xpd, bool on); int (*card_dahdi_postregistration)(xpd_t *xpd, bool on); - int (*card_hooksig)(xbus_t *xbus, xpd_t *xpd, int pos, dahdi_txsig_t txsig); + int (*card_hooksig)(xbus_t *xbus, xpd_t *xpd, int pos, enum dahdi_txsig txsig); int (*card_ioctl)(xpd_t *xpd, int pos, unsigned int cmd, unsigned long arg); int (*card_open)(xpd_t *xpd, lineno_t pos); int (*card_close)(xpd_t *xpd, lineno_t pos); |