diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-01-30 14:14:14 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-01-30 14:14:14 +0000 |
commit | 12efc4bad60d197754df29080c2de66d98041e5a (patch) | |
tree | 00241d7c5c38817a2fd68a4ae6065d45ba1e4a39 /drivers/dahdi/xpp/card_fxo.c | |
parent | 5ad21bfc23dc09b0e2acd0763e83b107b4e1dc80 (diff) |
xpp: phonedev: Cleanup method macros
* Caller to CALL_XMETHOD() no longer need to explicitly pass xbus
(calculate xpd->xbus)
* Create CALL_PHONE_METHOD() similar to CALL_XMETHOD() -- inlining
the extra parameters (more readable)
* Reverse parameter order in PHONE_METHOD() and CALL_PHONE_METHOD()
to be consistent with XMETHOD() and CALL_XMETHOD()
* Rename XPD_STATE phonedev method to card_state:
- Consistency with other phonedev methods.
- These calls now Wrap internal calls to XPD_STATE protocol HOSTCMD
in PRI, BRI, FXS, FXO
Signed-off-by: Oron Peled <oron@actcom.co.il>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9706 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/card_fxo.c')
-rw-r--r-- | drivers/dahdi/xpp/card_fxo.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/dahdi/xpp/card_fxo.c b/drivers/dahdi/xpp/card_fxo.c index 5ee41c5..00c9320 100644 --- a/drivers/dahdi/xpp/card_fxo.c +++ b/drivers/dahdi/xpp/card_fxo.c @@ -482,7 +482,7 @@ static int FXO_card_init(xbus_t *xbus, xpd_t *xpd) do_led(xpd, i, LED_GREEN, 0); msleep(50); } - PHONE_METHOD(xpd, card_pcm_recompute)(xbus, xpd, 0); + CALL_PHONE_METHOD(card_pcm_recompute, xpd, 0); return 0; } @@ -555,7 +555,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, enum dahdi_txsig txsig) +static int FXO_card_hooksig(xpd_t *xpd, int pos, enum dahdi_txsig txsig) { struct FXO_priv_data *priv; int ret = 0; @@ -1111,6 +1111,11 @@ static int FXO_card_register_reply(xbus_t *xbus, xpd_t *xpd, reg_cmd_t *info) return 0; } +static int FXO_card_state(xpd_t *xpd, bool on) +{ + return CALL_PROTO(FXO, XPD_STATE, xpd->xbus, xpd, on); +} + static const struct xops fxo_xops = { .card_new = FXO_card_new, .card_init = FXO_card_init, @@ -1129,8 +1134,7 @@ static const struct phoneops fxo_phoneops = { .card_timing_priority = generic_timing_priority, .card_ioctl = FXO_card_ioctl, .card_open = FXO_card_open, - - .XPD_STATE = XPROTO_CALLER(FXO, XPD_STATE), + .card_state = FXO_card_state, }; static xproto_table_t PROTO_TABLE(FXO) = { |