xpp: add xpd method span_assigned
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>
Tue, 20 Jun 2017 11:39:34 +0000 (14:39 +0300)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Mon, 26 Jun 2017 14:58:33 +0000 (17:58 +0300)
Add an phone device XPD method called 'span_assigned' that gets
called when the XPD's span is assigned.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

drivers/dahdi/xpp/xpp_dahdi.c
drivers/dahdi/xpp/xproto.h

index 6c80df7..ecc272b 100644 (file)
@@ -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);
 
index ee583df..9ae58c8 100644 (file)
@@ -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 {