diff --git a/drivers/dahdi/xpp/card_fxo.c b/drivers/dahdi/xpp/card_fxo.c index b4cdabd..1dbd299 100644 --- a/drivers/dahdi/xpp/card_fxo.c +++ b/drivers/dahdi/xpp/card_fxo.c @@ -620,7 +620,6 @@ static int FXO_card_dahdi_postregistration(xpd_t *xpd, bool on) BUG_ON(!priv); XPD_DBG(GENERAL, xpd, "%s\n", (on) ? "ON" : "OFF"); for_each_line(xpd, i) { - dahdi_report_battery(xpd, i); MARK_OFF(priv, i, LED_GREEN); msleep(2); MARK_OFF(priv, i, LED_RED); @@ -629,6 +628,23 @@ static int FXO_card_dahdi_postregistration(xpd_t *xpd, bool on) return 0; } +static int FXO_span_assigned(xpd_t *xpd) +{ + xbus_t *xbus; + struct FXO_priv_data *priv; + int i; + + BUG_ON(!xpd); + xbus = xpd->xbus; + BUG_ON(!xbus); + priv = xpd->priv; + BUG_ON(!priv); + XPD_DBG(GENERAL, xpd, "\n"); + for_each_line(xpd, i) + dahdi_report_battery(xpd, i); + return 0; +} + static int FXO_card_hooksig(xpd_t *xpd, int pos, enum dahdi_txsig txsig) { struct FXO_priv_data *priv; @@ -1314,6 +1330,7 @@ static const struct phoneops fxo_phoneops = { .card_ioctl = FXO_card_ioctl, .card_open = FXO_card_open, .card_state = FXO_card_state, + .span_assigned = FXO_span_assigned, }; static xproto_table_t PROTO_TABLE(FXO) = {