From 7292c263efece355ddcd1efed47dedace55ac3d3 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Tue, 20 Jun 2017 14:39:34 +0300 Subject: [PATCH] xpp: add xpd method span_assigned Add an phone device XPD method called 'span_assigned' that gets called when the XPD's span is assigned. Signed-off-by: Tzafrir Cohen --- drivers/dahdi/xpp/xpp_dahdi.c | 2 ++ drivers/dahdi/xpp/xproto.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c index 6c80df7..ecc272b 100644 --- a/drivers/dahdi/xpp/xpp_dahdi.c +++ b/drivers/dahdi/xpp/xpp_dahdi.c @@ -1020,6 +1020,8 @@ void xpp_span_assigned(struct dahdi_span *span) span->alarms &= ~DAHDI_ALARM_NOTOPEN; dahdi_alarm_notify(&phonedev->span); } + if (PHONE_METHOD(span_assigned, xpd)) + CALL_PHONE_METHOD(span_assigned, xpd); } EXPORT_SYMBOL(xpp_span_assigned); diff --git a/drivers/dahdi/xpp/xproto.h b/drivers/dahdi/xpp/xproto.h index ee583df..9ae58c8 100644 --- a/drivers/dahdi/xpp/xproto.h +++ b/drivers/dahdi/xpp/xproto.h @@ -295,6 +295,7 @@ struct phoneops { int (*card_open) (xpd_t *xpd, lineno_t pos); int (*card_close) (xpd_t *xpd, lineno_t pos); int (*card_state) (xpd_t *xpd, bool on); + int (*span_assigned) (xpd_t *xpd); }; struct xops {