summaryrefslogtreecommitdiff
path: root/drivers/dahdi/xpp/xpp_dahdi.c
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-10-26 19:06:57 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-10-26 19:06:57 +0000
commit5b206a53116de43b4e3754bf17eb1a25f54eeab7 (patch)
tree9a37fb69f542e20bc261d422af5d2a9c6376e81f /drivers/dahdi/xpp/xpp_dahdi.c
parente87d8320847049338bab87281737e7bdfcfad1b1 (diff)
xpp: more informative span description:
* Contains the hardware_id and the local span number Signed-off-by: Oron Peled <oron.peled@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10283 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/xpp_dahdi.c')
-rw-r--r--drivers/dahdi/xpp/xpp_dahdi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c
index 397cd2c..1c61c49 100644
--- a/drivers/dahdi/xpp/xpp_dahdi.c
+++ b/drivers/dahdi/xpp/xpp_dahdi.c
@@ -977,8 +977,14 @@ void xpd_set_spanname(xpd_t *xpd)
struct dahdi_span *span = &PHONEDEV(xpd).span;
snprintf(span->name, MAX_SPANNAME, "%s/%s", xpd->xbus->busname, xpd->xpdname);
- snprintf(span->desc, MAX_SPANDESC, "Xorcom XPD #%02d/%1d%1d: %s",
- xpd->xbus->num, xpd->addr.unit, xpd->addr.subunit, xpd->type_name);
+ /*
+ * The "Xorcom XPD" is a prefix in one of the regexes we
+ * use in our dahdi_genconf to match for PRI cards.
+ * FIXME: After moving completely to sysfs, we can remove
+ * this horseshit.
+ */
+ snprintf(span->desc, MAX_SPANDESC, "Xorcom XPD [%s].%d: %s",
+ xpd->xbus->label, span->offset + 1, xpd->type_name);
}
EXPORT_SYMBOL(xpd_set_spanname);